regularize vec3's a bit

This commit is contained in:
David Rose 2005-10-21 23:56:40 +00:00
parent 3a9a8df64b
commit 726410e386
4 changed files with 12 additions and 11 deletions

View File

@ -22,8 +22,8 @@
// Description: // Description:
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
INLINE CollisionPolygon:: INLINE CollisionPolygon::
CollisionPolygon(const LPoint3f &a, const LPoint3f &b, CollisionPolygon(const LVecBase3f &a, const LVecBase3f &b,
const LPoint3f &c) { const LVecBase3f &c) {
LPoint3f array[3]; LPoint3f array[3];
array[0] = a; array[0] = a;
array[1] = b; array[1] = b;
@ -37,8 +37,8 @@ CollisionPolygon(const LPoint3f &a, const LPoint3f &b,
// Description: // Description:
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
INLINE CollisionPolygon:: INLINE CollisionPolygon::
CollisionPolygon(const LPoint3f &a, const LPoint3f &b, CollisionPolygon(const LVecBase3f &a, const LVecBase3f &b,
const LPoint3f &c, const LPoint3f &d) { const LVecBase3f &c, const LVecBase3f &d) {
LPoint3f array[4]; LPoint3f array[4];
array[0] = a; array[0] = a;
array[1] = b; array[1] = b;

View File

@ -35,10 +35,10 @@ class GeomNode;
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
class EXPCL_PANDA CollisionPolygon : public CollisionPlane { class EXPCL_PANDA CollisionPolygon : public CollisionPlane {
PUBLISHED: PUBLISHED:
INLINE CollisionPolygon(const LPoint3f &a, const LPoint3f &b, INLINE CollisionPolygon(const LVecBase3f &a, const LVecBase3f &b,
const LPoint3f &c); const LVecBase3f &c);
INLINE CollisionPolygon(const LPoint3f &a, const LPoint3f &b, INLINE CollisionPolygon(const LVecBase3f &a, const LVecBase3f &b,
const LPoint3f &c, const LPoint3f &d); const LVecBase3f &c, const LVecBase3f &d);
INLINE CollisionPolygon(const LPoint3f *begin, const LPoint3f *end); INLINE CollisionPolygon(const LPoint3f *begin, const LPoint3f *end);
private: private:

View File

@ -452,7 +452,7 @@ has_mat() const {
// Description: Returns the pos component of the transform. It is an // Description: Returns the pos component of the transform. It is an
// error to call this if has_pos() returned false. // error to call this if has_pos() returned false.
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
INLINE const LVecBase3f &TransformState:: INLINE const LPoint3f &TransformState::
get_pos() const { get_pos() const {
check_components(); check_components();
nassertr(has_pos(), _pos); nassertr(has_pos(), _pos);

View File

@ -133,7 +133,7 @@ PUBLISHED:
INLINE bool has_nonzero_shear() const; INLINE bool has_nonzero_shear() const;
INLINE bool has_mat() const; INLINE bool has_mat() const;
INLINE const LVecBase3f &get_pos() const; INLINE const LPoint3f &get_pos() const;
INLINE const LVecBase3f &get_hpr() const; INLINE const LVecBase3f &get_hpr() const;
INLINE const LQuaternionf &get_quat() const; INLINE const LQuaternionf &get_quat() const;
INLINE const LVecBase3f &get_scale() const; INLINE const LVecBase3f &get_scale() const;
@ -290,7 +290,8 @@ private:
F_is_destructing = 0x00008000, F_is_destructing = 0x00008000,
F_is_2d = 0x00010000, F_is_2d = 0x00010000,
}; };
LVecBase3f _pos, _hpr, _scale, _shear; LPoint3f _pos;
LVecBase3f _hpr, _scale, _shear;
LQuaternionf _quat; LQuaternionf _quat;
LMatrix4f _mat; LMatrix4f _mat;
LMatrix4f *_inv_mat; LMatrix4f *_inv_mat;