Laxkit  0.0.7.1
Namespaces | Macros | Functions
bezutils.cc File Reference
#include <lax/bezutils.h>
#include <lax/transformmath.h>
#include <iostream>
Include dependency graph for bezutils.cc:

Namespaces

namespace  Laxkit
 The mother of all Laxkit classes.

Functions

int Laxkit::bez_bbox (flatpoint p, flatpoint c, flatpoint d, flatpoint q, DoubleBBox *bbox, double *extrema)
 Update a bounding box to include the given bezier segment.
double Laxkit::bez_closest_point (flatpoint p, flatpoint p1, flatpoint c1, flatpoint c2, flatpoint p2, int maxpoints, double *d_ret, double *dalong_ret, flatpoint *found)
 Return the t parament for the point closest to p in the bezier segment p1,c1,c2,p2.
double Laxkit::bez_segment_length (flatpoint p1, flatpoint c1, flatpoint c2, flatpoint p2, int npoints)
 Return the physical length of the segment, by approximating with npoints.
int Laxkit::bez_intersection (flatpoint p1, flatpoint p2, int isline, flatpoint bp1, flatpoint bc1, flatpoint bc2, flatpoint bp2, int resolution, flatpoint *point_ret, double *t_ret)
int Laxkit::bez_intersections (flatpoint P1, flatpoint P2, int isline, flatpoint *points, int n, int resolution, double startt, flatpoint *points_ret, int np, double *t_ret, int nt, double *endt)
double Laxkit::bez_distance_to_t (double dist, flatpoint p1, flatpoint c1, flatpoint c2, flatpoint p2, int resolution)
 From a physical distance, return the corresponding t parameter value.
double Laxkit::bez_t_to_distance (double T, flatpoint p1, flatpoint c1, flatpoint c2, flatpoint p2, int resolution)
 From a t parameter, return the corresponding distance value.
flatpoint Laxkit::bez_tangent (double t, flatpoint p1, flatpoint c1, flatpoint c2, flatpoint p2)
 Return the numerical tangent at t.
flatpoint Laxkit::bez_visual_tangent (double t, flatpoint p1, flatpoint c1, flatpoint c2, flatpoint p2)
 Return the visual tangent at t.
void Laxkit::bez_subdivide (double t, flatpoint p1, flatpoint c1, flatpoint c2, flatpoint p2, flatpoint *points_ret)
 Cut the bezier segment in two at t.
flatpoint Laxkit::bez_point (double t, flatpoint p1, flatpoint c1, flatpoint c2, flatpoint p2)
 Return the cubic bezier point at t. t==0 is p1, t==1 is p2.
flatpointLaxkit::bez_points (flatpoint *to_points, int numsegs, flatpoint *from_points, int resolution)
 Break down numsegs bezier segments to a polyline with resolution*numsegs points.
flatpointLaxkit::bez_points (flatpoint *to_points, int numsegs, flatpoint *from_points, int resolution, int isclosed, int atend)
 Break down numsegs bezier segments to a polyline with resolution*numsegs points.
flatpointLaxkit::bez_points (flatpoint *to_points, flatpoint *from_points, int resolution, int ignorefirst)
 Break down the bezier segment to a polyline with resolution points.
flatpointLaxkit::bez_points (flatpoint *to_points, flatpoint p1, flatpoint c1, flatpoint c2, flatpoint p2, int resolution, int ignorefirst)
 Break down the bezier segment to a polyline with resolution points.
double Laxkit::bez_near_point (flatpoint p, flatpoint *points, int n, int maxpoints, double *t_ret, int *i_ret)
 Return the distance p is from the bezier curve in points.
double Laxkit::bez_near_point_p (flatpoint p, flatpoint **points, int n, int maxpoints, double *t_ret, int *i_ret)
 Just like bez_near_point() but with a list of pointers to points, rather than directly at points.
int Laxkit::point_is_in_bez (flatpoint p, flatpoint *points, int n, int resolution)
 Return the winding number of p relative to the bezier curve in points. 0 means point is inside.
flatpointLaxkit::bez_to_points (flatpoint *to_points, flatpoint *from_points, int n, int resolution, int closed)
 Decompose the bezier curve to a polyline.
flatpointLaxkit::bez_circle (flatpoint *points, int numpoints, double x, double y, double r)
 Return an approximate circle, with numpoints control points, or 4 if numpoints<=1.
flatpointLaxkit::bez_ellipse (flatpoint *points, int numsegments, double x, double y, double xr, double yr, flatvector xaxis, flatvector yaxis, double start_angle, double end_angle)
 Create an ellipse composed of numsegments bezier segments, or 4 if numsegments<=1.

Detailed Description

Todo:
should probably look into lib2geom

Mon Feb 17 2014 11:52:57, Laxkit