14 #ifndef PARAMETRICCURVECOLLECTION_H 15 #define PARAMETRICCURVECOLLECTION_H 28 class ParametricCurveDrawer;
47 void remove_curve(
size_t index);
51 void clear_timewarps();
53 INLINE
int get_num_curves()
const;
55 MAKE_SEQ(get_curves, get_num_curves, get_curve);
60 int get_num_timewarps()
const;
62 MAKE_SEQ(get_timewarp_curves, get_num_timewarps, get_timewarp_curve);
64 INLINE PN_stdfloat get_max_t()
const;
66 MAKE_SEQ_PROPERTY(curves, get_num_curves, get_curve, set_curve, remove_curve);
67 MAKE_PROPERTY(xyz_curve, get_xyz_curve);
68 MAKE_PROPERTY(hpr_curve, get_hpr_curve);
69 MAKE_PROPERTY(default_curve, get_default_curve);
70 MAKE_SEQ_PROPERTY(timewarp_curves, get_num_timewarps, get_timewarp_curve);
71 MAKE_PROPERTY(max_t, get_max_t);
73 void make_even(PN_stdfloat max_t, PN_stdfloat segments_per_unit);
74 void face_forward(PN_stdfloat segments_per_unit);
75 void reset_max_t(PN_stdfloat max_t);
77 bool evaluate(PN_stdfloat t, LVecBase3 &xyz, LVecBase3 &hpr)
const;
78 bool evaluate(PN_stdfloat t, LMatrix4 &result, CoordinateSystem cs = CS_default)
const;
80 PN_stdfloat evaluate_t(PN_stdfloat t)
const;
81 INLINE
bool evaluate_xyz(PN_stdfloat t, LVecBase3 &xyz)
const;
82 INLINE
bool evaluate_hpr(PN_stdfloat t, LVecBase3 &hpr)
const;
84 INLINE
bool adjust_xyz(PN_stdfloat t, PN_stdfloat x, PN_stdfloat y, PN_stdfloat z);
85 bool adjust_xyz(PN_stdfloat t,
const LVecBase3 &xyz);
86 INLINE
bool adjust_hpr(PN_stdfloat t, PN_stdfloat h, PN_stdfloat p, PN_stdfloat r);
87 bool adjust_hpr(PN_stdfloat t,
const LVecBase3 &xyz);
94 void output(std::ostream &out)
const;
95 void write(std::ostream &out,
int indent_level = 0)
const;
97 bool write_egg(
Filename filename, CoordinateSystem cs = CS_default);
98 bool write_egg(std::ostream &out,
const Filename &filename, CoordinateSystem cs);
102 void register_drawer(ParametricCurveDrawer *drawer);
103 void unregister_drawer(ParametricCurveDrawer *drawer);
106 bool determine_hpr(PN_stdfloat t,
ParametricCurve *xyz_curve, LVecBase3 &hpr)
const;
118 INLINE std::ostream &
A basic node of the scene graph or data graph.
A virtual base class for parametric curves.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is our own Panda specialization on the default STL vector.
This is a set of zero or more ParametricCurves, which may or may not be related.
The name of a file, such as a texture file or an Egg file.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A base class for all things that want to be reference-counted.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void output(std::ostream &out) const
Writes a brief one-line description of the ParametricCurveCollection to the indicated output stream.