glVertex  5.5.2
Public Member Functions | List of all members
lgl_BezierCurve3D Class Reference

3D bezier curve More...

#include <glvertex_bezier.h>

Public Member Functions

 lgl_BezierCurve3D (vec3 a, vec3 b, bool lalign=true, bool ralign=true)
 create 3D bezier curve from 2 control points
 
 lgl_BezierCurve3D (vec3 a, vec3 b, vec3 c, vec3 d, bool lalign=true, bool ralign=true)
 create 3D bezier curve from 4 control points
 
vec3 start ()
 start point
 
vec3 end ()
 end point
 
double distance ()
 calculate distance of start and end point
 
vec3 evaluate (double w) const
 evaluate the 3D bezier curve
 
vec3 gradient (double w, int mode=0, double d=0.001) const
 evaluate the gradient of the 3D bezier curve
 
double length (int steps=100) const
 compute length of curve
 
void alignLeft (vec3 direction, lgl_BezierCurve3D *left=NULL, double factor=(sqrt(2.0) -1) *4/3)
 auto-align the left control point of the 3D bezier curve
 
void alignRight (vec3 direction, lgl_BezierCurve3D *right=NULL, double factor=(sqrt(2.0) -1) *4/3)
 auto-align the right control point of the 3D bezier curve
 
void alignCurves (lgl_BezierCurve3D *left, lgl_BezierCurve3D *right, double factor=(sqrt(2.0) -1) *4/3)
 auto-align the control points of the 3D bezier curve
 
void translate (vec3 v)
 translate curve
 
void rotate (quat q)
 rotate curve
 
void scale (vec3 s)
 scale curve
 
void rotate (double angle, vec3 axis)
 rotate curve
 

Detailed Description

3D bezier curve


The documentation for this class was generated from the following file: