ParametricCurve
from panda3d.core import ParametricCurve
- class ParametricCurve
Bases:
PandaNode
A virtual base class for parametric curves. This encapsulates all curves in 3-d space defined for a single parameter t in the range [0,get_max_t()].
Inheritance diagram
- __init__(*args, **kwargs)
- adjustPoint()
C++ Interface: adjust_point(const ParametricCurve self, float t, float px, float py, float pz)
- /**
Recomputes the curve such that it passes through the point (px, py, pz) at
time t, but keeps the same tangent value at that point.
*/
- adjustPt()
C++ Interface: adjust_pt(const ParametricCurve self, float t, float px, float py, float pz, float tx, float ty, float tz)
- /**
Recomputes the curve such that it passes through the point (px, py, pz)
with the tangent (tx, ty, tz).
*/
- adjustTangent()
C++ Interface: adjust_tangent(const ParametricCurve self, float t, float tx, float ty, float tz)
- /**
Recomputes the curve such that it has the tangent (tx, ty, tz) at time t,
but keeps the same position at the point.
*/
- adjust_point()
C++ Interface: adjust_point(const ParametricCurve self, float t, float px, float py, float pz)
- /**
Recomputes the curve such that it passes through the point (px, py, pz) at
time t, but keeps the same tangent value at that point.
*/
- adjust_pt()
C++ Interface: adjust_pt(const ParametricCurve self, float t, float px, float py, float pz, float tx, float ty, float tz)
- /**
Recomputes the curve such that it passes through the point (px, py, pz)
with the tangent (tx, ty, tz).
*/
- adjust_tangent()
C++ Interface: adjust_tangent(const ParametricCurve self, float t, float tx, float ty, float tz)
- /**
Recomputes the curve such that it has the tangent (tx, ty, tz) at time t,
but keeps the same position at the point.
*/
- calcLength()
C++ Interface: calc_length(ParametricCurve self) calc_length(ParametricCurve self, float from, float to)
- calc_length()
C++ Interface: calc_length(ParametricCurve self) calc_length(ParametricCurve self, float from, float to)
- findLength()
C++ Interface: find_length(ParametricCurve self, float start_t, float length_offset)
- /**
Returns the parametric value corresponding to the indicated distance along
the curve from the starting parametric value.
This is the inverse of calc_length(): rather than determining the length
along the curve between two parametric points, it determines the position
in parametric time of a point n units along the curve.
The search distance must not be negative.
*/
- find_length()
C++ Interface: find_length(ParametricCurve self, float start_t, float length_offset)
- /**
Returns the parametric value corresponding to the indicated distance along
the curve from the starting parametric value.
This is the inverse of calc_length(): rather than determining the length
along the curve between two parametric points, it determines the position
in parametric time of a point n units along the curve.
The search distance must not be negative.
*/
- get2ndtangent()
C++ Interface: get_2ndtangent(ParametricCurve self, float t, LVecBase3f tangent2)
- getClassType()
C++ Interface: get_class_type()
- getCurveType()
C++ Interface: get_curve_type(ParametricCurve self)
- /**
Returns the flag indicating the use to which the curve is intended to be
put.
*/
- getMaxT()
C++ Interface: get_max_t(ParametricCurve self)
- /**
Returns the upper bound of t for the entire curve. The curve is defined in
the range 0.0f <= t <= get_max_t(). This base class function always
returns 1.0f; derived classes might override this to return something else.
*/
- getNumDimensions()
C++ Interface: get_num_dimensions(ParametricCurve self)
- /**
Returns the number of significant dimensions in the curve’s vertices, as
set by a previous call to set_num_dimensions(). This is only a hint as to
how the curve is intended to be used; the actual number of dimensions of
any curve is always three.
*/
- getPoint()
C++ Interface: get_point(ParametricCurve self, float t, LVecBase3f point)
- getPt()
C++ Interface: get_pt(ParametricCurve self, float t, LVecBase3f point, LVecBase3f tangent)
- getTangent()
C++ Interface: get_tangent(ParametricCurve self, float t, LVecBase3f tangent)
- get_2ndtangent()
C++ Interface: get_2ndtangent(ParametricCurve self, float t, LVecBase3f tangent2)
- get_class_type()
C++ Interface: get_class_type()
- get_curve_type()
C++ Interface: get_curve_type(ParametricCurve self)
- /**
Returns the flag indicating the use to which the curve is intended to be
put.
*/
- get_max_t()
C++ Interface: get_max_t(ParametricCurve self)
- /**
Returns the upper bound of t for the entire curve. The curve is defined in
the range 0.0f <= t <= get_max_t(). This base class function always
returns 1.0f; derived classes might override this to return something else.
*/
- get_num_dimensions()
C++ Interface: get_num_dimensions(ParametricCurve self)
- /**
Returns the number of significant dimensions in the curve’s vertices, as
set by a previous call to set_num_dimensions(). This is only a hint as to
how the curve is intended to be used; the actual number of dimensions of
any curve is always three.
*/
- get_point()
C++ Interface: get_point(ParametricCurve self, float t, LVecBase3f point)
- get_pt()
C++ Interface: get_pt(ParametricCurve self, float t, LVecBase3f point, LVecBase3f tangent)
- get_tangent()
C++ Interface: get_tangent(ParametricCurve self, float t, LVecBase3f tangent)
- isValid()
C++ Interface: is_valid(ParametricCurve self)
- /**
Returns true if the curve is defined. This base class function always
returns true; derived classes might override this to sometimes return
false.
*/
- is_valid()
C++ Interface: is_valid(ParametricCurve self)
- /**
Returns true if the curve is defined. This base class function always
returns true; derived classes might override this to sometimes return
false.
*/
- recompute()
C++ Interface: recompute(const ParametricCurve self)
- /**
Recalculates the curve, if necessary. Returns true if the resulting curve
is valid, false otherwise.
*/
- setCurveType()
C++ Interface: set_curve_type(const ParametricCurve self, int type)
- /**
Sets the flag indicating the use to which the curve is intended to be put.
This flag is optional and only serves to provide a hint to the egg reader
and writer code; it has no effect on the curve’s behavior.
Setting the curve type also sets the num_dimensions to 3 or 1 according to
the type.
THis flag may have one of the values PCT_XYZ, PCT_HPR, or PCT_T.
*/
- setNumDimensions()
C++ Interface: set_num_dimensions(const ParametricCurve self, int num)
- /**
Specifies the number of significant dimensions in the curve’s vertices.
This should be one of 1, 2, or 3. Normally, XYZ and HPR curves have three
dimensions; time curves should always have one dimension. This only serves
as a hint to the mopath editor, and also controls how the curve is written
out.
*/
- set_curve_type()
C++ Interface: set_curve_type(const ParametricCurve self, int type)
- /**
Sets the flag indicating the use to which the curve is intended to be put.
This flag is optional and only serves to provide a hint to the egg reader
and writer code; it has no effect on the curve’s behavior.
Setting the curve type also sets the num_dimensions to 3 or 1 according to
the type.
THis flag may have one of the values PCT_XYZ, PCT_HPR, or PCT_T.
*/
- set_num_dimensions()
C++ Interface: set_num_dimensions(const ParametricCurve self, int num)
- /**
Specifies the number of significant dimensions in the curve’s vertices.
This should be one of 1, 2, or 3. Normally, XYZ and HPR curves have three
dimensions; time curves should always have one dimension. This only serves
as a hint to the mopath editor, and also controls how the curve is written
out.
*/
- stitch()
C++ Interface: stitch(const ParametricCurve self, const ParametricCurve a, const ParametricCurve b)
- /**
Regenerates this curve as one long curve: the first curve connected end-to-
end with the second one. Either a or b may be the same as ‘this’.
Returns true if successful, false on failure or if the curve type does not
support stitching.
*/
- writeEgg()
C++ Interface: write_egg(const ParametricCurve self, Filename filename) write_egg(const ParametricCurve self, Filename filename, int cs) write_egg(const ParametricCurve self, ostream out, const Filename filename, int cs)
- write_egg()
C++ Interface: write_egg(const ParametricCurve self, Filename filename) write_egg(const ParametricCurve self, Filename filename, int cs) write_egg(const ParametricCurve self, ostream out, const Filename filename, int cs)