mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 09:23:03 -04:00
removed hermite stuff
This commit is contained in:
parent
09b2895336
commit
a7c9e4e127
@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
#include "curve.h"
|
#include "curve.h"
|
||||||
#include "config_parametrics.h"
|
#include "config_parametrics.h"
|
||||||
#include "hermiteCurve.h"
|
|
||||||
#include "nurbsCurve.h"
|
#include "nurbsCurve.h"
|
||||||
#include "curveDrawer.h"
|
#include "curveDrawer.h"
|
||||||
|
|
||||||
@ -1096,17 +1095,6 @@ CubicCurveseg(const LMatrix4f &basis) {
|
|||||||
rational = true;
|
rational = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
|
||||||
// Function: CubicCurveseg::Constructor
|
|
||||||
// Access: Public
|
|
||||||
// Description: Creates the curveseg as a Hermite segment.
|
|
||||||
////////////////////////////////////////////////////////////////////
|
|
||||||
CubicCurveseg::
|
|
||||||
CubicCurveseg(const HermiteCurveCV &cv0,
|
|
||||||
const HermiteCurveCV &cv1) {
|
|
||||||
hermite_basis(cv0, cv1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: CubicCurveseg::Constructor
|
// Function: CubicCurveseg::Constructor
|
||||||
@ -1182,36 +1170,6 @@ get_2ndtangent(double t, LVector3f &tangent2) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
|
||||||
// Function: CubicCurveseg::hermite_basis
|
|
||||||
// Access: Public
|
|
||||||
// Description: Defines the curve segment as a Hermite. This only
|
|
||||||
// sets up the basis vectors, so the curve will be
|
|
||||||
// computed correctly; it does not retain the CV's.
|
|
||||||
////////////////////////////////////////////////////////////////////
|
|
||||||
void CubicCurveseg::
|
|
||||||
hermite_basis(const HermiteCurveCV &cv0,
|
|
||||||
const HermiteCurveCV &cv1,
|
|
||||||
double tlength) {
|
|
||||||
static LMatrix4f
|
|
||||||
Mh(2, -3, 0, 1,
|
|
||||||
-2, 3, 0, 0,
|
|
||||||
1, -2, 1, 0,
|
|
||||||
1, -1, 0, 0);
|
|
||||||
|
|
||||||
LVector4f Gx(cv0._p[0], cv1._p[0],
|
|
||||||
cv0._out[0]*tlength, cv1._in[0]*tlength);
|
|
||||||
LVector4f Gy(cv0._p[1], cv1._p[1],
|
|
||||||
cv0._out[1]*tlength, cv1._in[1]*tlength);
|
|
||||||
LVector4f Gz(cv0._p[2], cv1._p[2],
|
|
||||||
cv0._out[2]*tlength, cv1._in[2]*tlength);
|
|
||||||
|
|
||||||
Bx = Gx * Mh;
|
|
||||||
By = Gy * Mh;
|
|
||||||
Bz = Gz * Mh;
|
|
||||||
rational = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: CubicCurveseg::bezier_basis
|
// Function: CubicCurveseg::bezier_basis
|
||||||
// Access: Public
|
// Access: Public
|
||||||
|
@ -71,8 +71,6 @@ END_PUBLISH //]
|
|||||||
|
|
||||||
|
|
||||||
class ParametricCurveDrawer;
|
class ParametricCurveDrawer;
|
||||||
class HermiteCurveCV;
|
|
||||||
class HermiteCurve;
|
|
||||||
class NurbsCurve;
|
class NurbsCurve;
|
||||||
|
|
||||||
|
|
||||||
@ -105,7 +103,6 @@ PUBLISHED:
|
|||||||
double compute_t(double start_t, double length_offset, double guess,
|
double compute_t(double start_t, double length_offset, double guess,
|
||||||
double threshold) const;
|
double threshold) const;
|
||||||
|
|
||||||
////bool convert_to_hermite(HermiteCurve &hc) const;
|
|
||||||
bool convert_to_nurbs(NurbsCurve &nc) const;
|
bool convert_to_nurbs(NurbsCurve &nc) const;
|
||||||
|
|
||||||
void ascii_draw() const;
|
void ascii_draw() const;
|
||||||
@ -322,14 +319,9 @@ PUBLISHED:
|
|||||||
public:
|
public:
|
||||||
CubicCurveseg();
|
CubicCurveseg();
|
||||||
CubicCurveseg(const LMatrix4f &basis);
|
CubicCurveseg(const LMatrix4f &basis);
|
||||||
CubicCurveseg(const HermiteCurveCV &cv0,
|
|
||||||
const HermiteCurveCV &cv1);
|
|
||||||
CubicCurveseg(const BezierSeg &seg);
|
CubicCurveseg(const BezierSeg &seg);
|
||||||
CubicCurveseg(int order, const double knots[], const LVector4f cvs[]);
|
CubicCurveseg(int order, const double knots[], const LVector4f cvs[]);
|
||||||
|
|
||||||
void hermite_basis(const HermiteCurveCV &cv0,
|
|
||||||
const HermiteCurveCV &cv1,
|
|
||||||
double tlength = 1.0);
|
|
||||||
void bezier_basis(const BezierSeg &seg);
|
void bezier_basis(const BezierSeg &seg);
|
||||||
void nurbs_basis(int order, const double knots[], const LVector4f cvs[]);
|
void nurbs_basis(int order, const double knots[], const LVector4f cvs[]);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user