HermiteCurve
from panda3d.core import HermiteCurve
- class HermiteCurve
Bases:
PiecewiseCurve
A parametric curve defined by a sequence of control vertices, each with an in and out tangent.
This class is actually implemented as a PiecewiseCurve made up of several CubicCurvesegs, each of which is created using the hermite_basis() method. The HermiteCurve class itself keeps its own list of the CV’s that are used to define the curve (since the CubicCurveseg class doesn’t retain these).
Inheritance diagram
- __init__(*args, **kwargs)
- appendCv()
C++ Interface: append_cv(const HermiteCurve self, int type, const LVecBase3f v) append_cv(const HermiteCurve self, int type, float x, float y, float z)
- /**
Adds a new CV to the end of the curve. The new CV is given initial in/out
tangents of 0. The return value is the index of the new CV.
*/
- append_cv()
C++ Interface: append_cv(const HermiteCurve self, int type, const LVecBase3f v) append_cv(const HermiteCurve self, int type, float x, float y, float z)
- /**
Adds a new CV to the end of the curve. The new CV is given initial in/out
tangents of 0. The return value is the index of the new CV.
*/
- getClassType()
C++ Interface: get_class_type()
- getCvIn()
C++ Interface: get_cv_in(HermiteCurve self, int n) get_cv_in(HermiteCurve self, int n, LVecBase3f v)
- /**
Returns the in tangent of the given CV.
*/
- getCvName()
C++ Interface: get_cv_name(HermiteCurve self, int n)
- /**
Returns the name of the given CV, or NULL.
*/
- getCvOut()
C++ Interface: get_cv_out(HermiteCurve self, int n) get_cv_out(HermiteCurve self, int n, LVecBase3f v)
- /**
Returns the out tangent of the given CV.
*/
- getCvPoint()
C++ Interface: get_cv_point(HermiteCurve self, int n) get_cv_point(HermiteCurve self, int n, LVecBase3f v)
- /**
Returns the position of the given CV.
*/
- getCvTstart()
C++ Interface: get_cv_tstart(HermiteCurve self, int n)
- /**
Returns the starting point in parametric space of the given CV.
*/
- getCvType()
C++ Interface: get_cv_type(HermiteCurve self, int n)
- /**
Returns the given CV’s continuity type, HC_CUT, HC_FREE, HC_G1, or
HC_SMOOTH, or 0 if there is no such CV.
*/
- getNumCvs()
C++ Interface: get_num_cvs(HermiteCurve self)
- /**
Returns the number of CV’s in the curve.
*/
- get_class_type()
C++ Interface: get_class_type()
- get_cv_in()
C++ Interface: get_cv_in(HermiteCurve self, int n) get_cv_in(HermiteCurve self, int n, LVecBase3f v)
- /**
Returns the in tangent of the given CV.
*/
- get_cv_name()
C++ Interface: get_cv_name(HermiteCurve self, int n)
- /**
Returns the name of the given CV, or NULL.
*/
- get_cv_out()
C++ Interface: get_cv_out(HermiteCurve self, int n) get_cv_out(HermiteCurve self, int n, LVecBase3f v)
- /**
Returns the out tangent of the given CV.
*/
- get_cv_point()
C++ Interface: get_cv_point(HermiteCurve self, int n) get_cv_point(HermiteCurve self, int n, LVecBase3f v)
- /**
Returns the position of the given CV.
*/
- get_cv_tstart()
C++ Interface: get_cv_tstart(HermiteCurve self, int n)
- /**
Returns the starting point in parametric space of the given CV.
*/
- get_cv_type()
C++ Interface: get_cv_type(HermiteCurve self, int n)
- /**
Returns the given CV’s continuity type, HC_CUT, HC_FREE, HC_G1, or
HC_SMOOTH, or 0 if there is no such CV.
*/
- get_num_cvs()
C++ Interface: get_num_cvs(HermiteCurve self)
- /**
Returns the number of CV’s in the curve.
*/
- insertCv()
C++ Interface: insert_cv(const HermiteCurve self, float t)
- /**
Inserts a new CV at the given parametric point along the curve. If this
parametric point is already on the curve, the CV is assigned an index
between its two neighbors and the indices of all following CV’s are
incremented by 1; its in and out tangents are chosen to keep the curve
consistent. If the new parametric point is beyond the end of the existing
curve, the curve is extended to meet it and the new CV’s position, in
tangent, and out tangent are set to zero.
The index number of the new CV is returned.
*/
- insert_cv()
C++ Interface: insert_cv(const HermiteCurve self, float t)
- /**
Inserts a new CV at the given parametric point along the curve. If this
parametric point is already on the curve, the CV is assigned an index
between its two neighbors and the indices of all following CV’s are
incremented by 1; its in and out tangents are chosen to keep the curve
consistent. If the new parametric point is beyond the end of the existing
curve, the curve is extended to meet it and the new CV’s position, in
tangent, and out tangent are set to zero.
The index number of the new CV is returned.
*/
- removeAllCvs()
C++ Interface: remove_all_cvs(const HermiteCurve self)
- /**
Removes all CV’s from the curve.
*/
- removeCv()
C++ Interface: remove_cv(const HermiteCurve self, int n)
- /**
Removes the given CV from the curve. Returns true if the CV existed, false
otherwise.
*/
- remove_all_cvs()
C++ Interface: remove_all_cvs(const HermiteCurve self)
- /**
Removes all CV’s from the curve.
*/
- remove_cv()
C++ Interface: remove_cv(const HermiteCurve self, int n)
- /**
Removes the given CV from the curve. Returns true if the CV existed, false
otherwise.
*/
- setCvIn()
C++ Interface: set_cv_in(const HermiteCurve self, int n, const LVecBase3f v) set_cv_in(const HermiteCurve self, int n, float x, float y, float z)
- /**
Changes the given CV’s in tangent. Depending on the continuity type, this
may also adjust the out tangent.
*/
- setCvName()
C++ Interface: set_cv_name(const HermiteCurve self, int n, str name)
- /**
Changes the name associated with a particular CV.
*/
- setCvOut()
C++ Interface: set_cv_out(const HermiteCurve self, int n, const LVecBase3f v) set_cv_out(const HermiteCurve self, int n, float x, float y, float z)
- /**
Changes the given CV’s out tangent. Depending on the continuity type, this
may also adjust the in tangent.
*/
- setCvPoint()
C++ Interface: set_cv_point(const HermiteCurve self, int n, const LVecBase3f v) set_cv_point(const HermiteCurve self, int n, float x, float y, float z)
- /**
Changes the given CV’s position.
*/
- setCvTstart()
C++ Interface: set_cv_tstart(const HermiteCurve self, int n, float tstart)
- /**
Changes the given CV’s parametric starting time. This may affect the shape
of the curve.
*/
- setCvType()
C++ Interface: set_cv_type(const HermiteCurve self, int n, int type)
- /**
Changes the given CV’s continuity type. Legal values are HC_CUT, HC_FREE,
HC_G1, or HC_SMOOTH.
Other than HC_CUT, these have no effect on the actual curve; it remains up
to user software to impose the constraints these imply.
HC_CUT implies a disconnection of the curve; HC_FREE imposes no constraints
on the tangents; HC_G1 forces the tangents to be collinear, and HC_SMOOTH
forces the tangents to be identical. Setting type type to HC_G1 or
HC_SMOOTH may adjust the out tangent to match the in tangent.
*/
- set_cv_in()
C++ Interface: set_cv_in(const HermiteCurve self, int n, const LVecBase3f v) set_cv_in(const HermiteCurve self, int n, float x, float y, float z)
- /**
Changes the given CV’s in tangent. Depending on the continuity type, this
may also adjust the out tangent.
*/
- set_cv_name()
C++ Interface: set_cv_name(const HermiteCurve self, int n, str name)
- /**
Changes the name associated with a particular CV.
*/
- set_cv_out()
C++ Interface: set_cv_out(const HermiteCurve self, int n, const LVecBase3f v) set_cv_out(const HermiteCurve self, int n, float x, float y, float z)
- /**
Changes the given CV’s out tangent. Depending on the continuity type, this
may also adjust the in tangent.
*/
- set_cv_point()
C++ Interface: set_cv_point(const HermiteCurve self, int n, const LVecBase3f v) set_cv_point(const HermiteCurve self, int n, float x, float y, float z)
- /**
Changes the given CV’s position.
*/
- set_cv_tstart()
C++ Interface: set_cv_tstart(const HermiteCurve self, int n, float tstart)
- /**
Changes the given CV’s parametric starting time. This may affect the shape
of the curve.
*/
- set_cv_type()
C++ Interface: set_cv_type(const HermiteCurve self, int n, int type)
- /**
Changes the given CV’s continuity type. Legal values are HC_CUT, HC_FREE,
HC_G1, or HC_SMOOTH.
Other than HC_CUT, these have no effect on the actual curve; it remains up
to user software to impose the constraints these imply.
HC_CUT implies a disconnection of the curve; HC_FREE imposes no constraints
on the tangents; HC_G1 forces the tangents to be collinear, and HC_SMOOTH
forces the tangents to be identical. Setting type type to HC_G1 or
HC_SMOOTH may adjust the out tangent to match the in tangent.
*/