ParametricCurve¶
-
class ParametricCurve¶
Bases:
AcronNodeA 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
digraph inheritance4975219a89 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "AcronNode" [URL="acron.core.AcronNode.html#acron.core.AcronNode",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedWritableReferenceCount" -> "AcronNode" [arrowsize=0.75,style=""]; "Namable" -> "AcronNode" [arrowsize=0.75,style=""]; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "Namable" [URL="acron.core.Namable.html#acron.core.Namable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "Namable" [arrowsize=0.75,style=""]; "ParametricCurve" [URL="acron.core.ParametricCurve.html#acron.core.ParametricCurve",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "AcronNode" -> "ParametricCurve" [arrowsize=0.75,style=""]; "ReferenceCount" [URL="acron.core.ReferenceCount.html#acron.core.ReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "ReferenceCount" [arrowsize=0.75,style=""]; "TypedObject" [URL="acron.core.TypedObject.html#acron.core.TypedObject",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "TypedObject" [arrowsize=0.75,style=""]; "TypedWritable" [URL="acron.core.TypedWritable.html#acron.core.TypedWritable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedObject" -> "TypedWritable" [arrowsize=0.75,style=""]; "TypedWritableReferenceCount" [URL="acron.core.TypedWritableReferenceCount.html#acron.core.TypedWritableReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedWritable" -> "TypedWritableReferenceCount" [arrowsize=0.75,style=""]; "ReferenceCount" -> "TypedWritableReferenceCount" [arrowsize=0.75,style=""]; }- ParametricCurve.adjust_point()¶
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.
- ParametricCurve.adjust_pt()¶
Recomputes the curve such that it passes through the point (px, py, pz) with the tangent (tx, ty, tz).
- ParametricCurve.adjust_tangent()¶
Recomputes the curve such that it has the tangent (tx, ty, tz) at time t, but keeps the same position at the point.
- ParametricCurve.calc_length()¶
Approximates the length of the entire curve to within a few decimal places.
Approximates the length of the curve segment from parametric time ‘from’ to time ‘to’.
- ParametricCurve.find_length()¶
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.
- ParametricCurve.get_2ndtangent()¶
- static ParametricCurve.get_class_type()¶
- ParametricCurve.get_curve_type()¶
Returns the flag indicating the use to which the curve is intended to be put.
- ParametricCurve.get_max_t()¶
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.
- ParametricCurve.get_num_dimensions()¶
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.
- ParametricCurve.get_point()¶
- ParametricCurve.get_pt()¶
- ParametricCurve.get_tangent()¶
- ParametricCurve.is_valid()¶
Returns true if the curve is defined. This base class function always returns true; derived classes might override this to sometimes return false.
- ParametricCurve.recompute()¶
Recalculates the curve, if necessary. Returns true if the resulting curve is valid, false otherwise.
- ParametricCurve.set_curve_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.
- ParametricCurve.set_num_dimensions()¶
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.
- ParametricCurve.stitch()¶
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.
- ParametricCurve.write_egg()¶
Writes an egg description of the nurbs curve to the specified output file. Returns true if the file is successfully written.
Writes an egg description of the nurbs curve to the specified output stream. Returns true if the file is successfully written.