17 INLINE ParametricCurveCollection::
18 ~ParametricCurveCollection() {
24 INLINE
int ParametricCurveCollection::
25 get_num_curves()
const {
26 return _curves.size();
34 nassertr(index >= 0 && index < (
int)_curves.size(),
nullptr);
36 return _curves[index];
53 INLINE PN_stdfloat ParametricCurveCollection::
55 if (_curves.empty()) {
58 return _curves.back()->get_max_t();
85 adjust_xyz(PN_stdfloat t, PN_stdfloat x, PN_stdfloat y, PN_stdfloat z) {
95 adjust_hpr(PN_stdfloat t, PN_stdfloat h, PN_stdfloat p, PN_stdfloat r) {
bool adjust_hpr(PN_stdfloat t, PN_stdfloat h, PN_stdfloat p, PN_stdfloat r)
Adjust the HPR curve at the indicated time to the new value.
void insert_curve(size_t index, ParametricCurve *curve)
Adds a new ParametricCurve to the collection at the indicated index.
A virtual base class for parametric curves.
bool evaluate(PN_stdfloat t, LVecBase3 &xyz, LVecBase3 &hpr) const
Computes the position and rotation represented by the first XYZ and HPR curves in the collection at t...
bool evaluate_hpr(PN_stdfloat t, LVecBase3 &hpr) const
Computes only the HPR part of the curves.
get_curve
Returns the nth ParametricCurve in the collection.
bool adjust_xyz(PN_stdfloat t, PN_stdfloat x, PN_stdfloat y, PN_stdfloat z)
Adjust the XYZ curve at the indicated time to the new value.
bool evaluate_xyz(PN_stdfloat t, LVecBase3 &xyz) const
Computes only the XYZ part of the curves.
void add_curve(ParametricCurve *curve)
Adds a new ParametricCurve to the collection.