17 INLINE
int NurbsCurveInterface::
18 append_cv(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z) {
19 return append_cv(LVecBase3(x, y, z));
25 INLINE
int NurbsCurveInterface::
26 append_cv(
const LVecBase3 &v) {
27 return append_cv(LVecBase4(v[0], v[1], v[2], 1.0f));
33 INLINE
int NurbsCurveInterface::
34 append_cv(
const LVecBase4 &v) {
35 return append_cv_impl(v);
51 nassertr(n >= 0 && n < get_num_cvs(),
false);
52 return set_cv(n, LVecBase4(v[0], v[1], v[2], 1.0f) *
get_cv_weight(n));
60 nassertr(n >= 0 && n < get_num_cvs(), LVecBase3::zero());
61 LVecBase4 p = get_cv(n);
62 nassertr(p[3] != 0.0f, LVecBase3::zero());
63 return LVecBase3(p[0], p[1], p[2]) / p[3];
PN_stdfloat get_cv_weight(int n) const
Returns the weight of the indicated CV.
bool set_cv_point(int n, PN_stdfloat x, PN_stdfloat y, PN_stdfloat z)
Repositions the indicated CV.
LVecBase3 get_cv_point(int n) const
Returns the position of the indicated CV.