15 #ifndef CUBICCURVESEG_H 16 #define CUBICCURVESEG_H 18 #include "pandabase.h" 20 #include "parametricCurve.h" 27 #define RT_TANGENT 0x02 29 #define RT_BASE_TYPE 0xff 31 #define RT_KEEP_ORIG 0x100 60 virtual bool get_point(PN_stdfloat t,
LVecBase3 &point)
const;
61 virtual bool get_tangent(PN_stdfloat t,
LVecBase3 &tangent)
const;
63 virtual bool get_2ndtangent(PN_stdfloat t,
LVecBase3 &tangent2)
const;
75 PN_stdfloat tlength = 1.0f);
77 void nurbs_basis(
int order,
const PN_stdfloat knots[],
const LVecBase4 cvs[]);
91 PN_stdfloat recip_h = (rational) ? 1.0f/tv.dot(Bw) : 1.0f;
92 result.set(tv.dot(Bx) * recip_h,
94 tv.dot(Bz) * recip_h);
98 result.set(tv.dot(Bx),
105 static bool compute_seg(
int rtype0, PN_stdfloat t0,
const LVecBase4 &v0,
106 int rtype1, PN_stdfloat t1,
const LVecBase4 &v1,
107 int rtype2, PN_stdfloat t2,
const LVecBase4 &v2,
108 int rtype3, PN_stdfloat t3,
const LVecBase4 &v3,
130 static void init_type() {
131 ParametricCurve::init_type();
132 register_type(_type_handle,
"CubicCurveseg",
133 ParametricCurve::get_class_type());
136 return get_class_type();
138 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
146 void compute_nurbs_basis(
int order,
147 const PN_stdfloat knots_in[],
This is the base class for all three-component vectors and points.
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
A virtual base class for parametric curves.
Base class for objects that can be written to and read from Bam files.
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
static void register_with_read_factory()
Tells the BamReader how to create objects of type PandaNode.
A CubicCurveseg is any curve that can be completely described by four 4-valued basis vectors...
This is a 4-by-4 transform matrix.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
This is the base class for all three-component vectors and points.
A single CV of a Hermite curve.
A class to retrieve the individual data elements previously stored in a Datagram. ...
TypeHandle is the identifier used to differentiate C++ class types.
virtual bool get_bezier_seg(BezierSeg &) const
Fills the BezierSeg structure with a description of the curve segment as a Bezier, if possible, but does not change the _t member of the structure.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...