47 const PN_stdfloat knots[],
const LVecBase4 cvs[]);
56 virtual void set_order(
int order);
57 virtual int get_order()
const;
59 virtual int get_num_cvs()
const;
60 virtual int get_num_knots()
const;
62 virtual bool insert_cv(PN_stdfloat t);
64 virtual bool remove_cv(
int n);
65 virtual void remove_all_cvs();
67 virtual bool set_cv(
int n,
const LVecBase4 &v);
68 virtual LVecBase4 get_cv(
int n)
const;
70 virtual bool set_knot(
int n, PN_stdfloat t);
71 virtual PN_stdfloat get_knot(
int n)
const;
78 int rtype1, PN_stdfloat t1,
const LVecBase4 &v1,
79 int rtype2, PN_stdfloat t2,
const LVecBase4 &v2,
80 int rtype3, PN_stdfloat t3,
const LVecBase4 &v3);
88 virtual void write(std::ostream &out,
int indent_level = 0)
const;
91 virtual int append_cv_impl(
const LVecBase4 &v);
92 virtual bool format_egg(std::ostream &out,
const std::string &name,
93 const std::string &curve_type,
int indent_level)
const;
95 int find_cv(PN_stdfloat t);
102 CV(
const LVecBase4 &p, PN_stdfloat t) : _p(p), _t(t) {}
122 static void init_type() {
123 PiecewiseCurve::init_type();
124 NurbsCurveInterface::init_type();
126 PiecewiseCurve::get_class_type(),
127 NurbsCurveInterface::get_class_type());
130 return get_class_type();
132 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
A basic node of the scene graph or data graph.
ParametricCurve * get_curveseg(int ti)
Returns the curve segment corresponding to the given index.
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.
virtual bool recompute()
Recalculates the curve, if necessary.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Base class for objects that can be written to and read from Bam files.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
This abstract class defines the interface only for a Nurbs-style curve, with knots and coordinates in...
static void register_with_read_factory()
Tells the BamReader how to create objects of type PandaNode.
virtual NurbsCurveInterface * get_nurbs_interface()
Returns a pointer to the object as a NurbsCurveInterface object if it happens to be a NURBS-style cur...
A CubicCurveseg is any curve that can be completely described by four 4-valued basis vectors,...
virtual bool stitch(const ParametricCurve *a, const ParametricCurve *b)
Regenerates this curve as one long curve: the first curve connected end-to- end with the second one.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A PiecewiseCurve is a curve made up of several curve segments, connected in a head-to-tail fashion.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
A Nonuniform Rational B-Spline.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual PandaNode * make_copy() const
Returns a newly-allocated PandaNode that is a shallow copy of this one.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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 convert_to_nurbs(ParametricCurve *nc) const
Stores in the indicated NurbsCurve a NURBS representation of an equivalent curve.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
virtual bool rebuild_curveseg(int rtype0, PN_stdfloat t0, const LVecBase4 &v0, int rtype1, PN_stdfloat t1, const LVecBase4 &v1, int rtype2, PN_stdfloat t2, const LVecBase4 &v2, int rtype3, PN_stdfloat t3, const LVecBase4 &v3)
Rebuilds the current curve segment (as selected by the most recent call to find_curve()) according to...