From 726410e386de5e169f69e13f84d7bb57994f922b Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 21 Oct 2005 23:56:40 +0000 Subject: [PATCH] regularize vec3's a bit --- panda/src/collide/collisionPolygon.I | 8 ++++---- panda/src/collide/collisionPolygon.h | 8 ++++---- panda/src/pgraph/transformState.I | 2 +- panda/src/pgraph/transformState.h | 5 +++-- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/panda/src/collide/collisionPolygon.I b/panda/src/collide/collisionPolygon.I index 233d4c8171..892e325b21 100644 --- a/panda/src/collide/collisionPolygon.I +++ b/panda/src/collide/collisionPolygon.I @@ -22,8 +22,8 @@ // Description: //////////////////////////////////////////////////////////////////// INLINE CollisionPolygon:: -CollisionPolygon(const LPoint3f &a, const LPoint3f &b, - const LPoint3f &c) { +CollisionPolygon(const LVecBase3f &a, const LVecBase3f &b, + const LVecBase3f &c) { LPoint3f array[3]; array[0] = a; array[1] = b; @@ -37,8 +37,8 @@ CollisionPolygon(const LPoint3f &a, const LPoint3f &b, // Description: //////////////////////////////////////////////////////////////////// INLINE CollisionPolygon:: -CollisionPolygon(const LPoint3f &a, const LPoint3f &b, - const LPoint3f &c, const LPoint3f &d) { +CollisionPolygon(const LVecBase3f &a, const LVecBase3f &b, + const LVecBase3f &c, const LVecBase3f &d) { LPoint3f array[4]; array[0] = a; array[1] = b; diff --git a/panda/src/collide/collisionPolygon.h b/panda/src/collide/collisionPolygon.h index 7fa2e4f7e9..d581099c58 100644 --- a/panda/src/collide/collisionPolygon.h +++ b/panda/src/collide/collisionPolygon.h @@ -35,10 +35,10 @@ class GeomNode; //////////////////////////////////////////////////////////////////// class EXPCL_PANDA CollisionPolygon : public CollisionPlane { PUBLISHED: - INLINE CollisionPolygon(const LPoint3f &a, const LPoint3f &b, - const LPoint3f &c); - INLINE CollisionPolygon(const LPoint3f &a, const LPoint3f &b, - const LPoint3f &c, const LPoint3f &d); + INLINE CollisionPolygon(const LVecBase3f &a, const LVecBase3f &b, + const LVecBase3f &c); + INLINE CollisionPolygon(const LVecBase3f &a, const LVecBase3f &b, + const LVecBase3f &c, const LVecBase3f &d); INLINE CollisionPolygon(const LPoint3f *begin, const LPoint3f *end); private: diff --git a/panda/src/pgraph/transformState.I b/panda/src/pgraph/transformState.I index 1343b9a260..e72146153c 100644 --- a/panda/src/pgraph/transformState.I +++ b/panda/src/pgraph/transformState.I @@ -452,7 +452,7 @@ has_mat() const { // Description: Returns the pos component of the transform. It is an // error to call this if has_pos() returned false. //////////////////////////////////////////////////////////////////// -INLINE const LVecBase3f &TransformState:: +INLINE const LPoint3f &TransformState:: get_pos() const { check_components(); nassertr(has_pos(), _pos); diff --git a/panda/src/pgraph/transformState.h b/panda/src/pgraph/transformState.h index 10b34c11e7..90a01373cb 100644 --- a/panda/src/pgraph/transformState.h +++ b/panda/src/pgraph/transformState.h @@ -133,7 +133,7 @@ PUBLISHED: INLINE bool has_nonzero_shear() 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 LQuaternionf &get_quat() const; INLINE const LVecBase3f &get_scale() const; @@ -290,7 +290,8 @@ private: F_is_destructing = 0x00008000, F_is_2d = 0x00010000, }; - LVecBase3f _pos, _hpr, _scale, _shear; + LPoint3f _pos; + LVecBase3f _hpr, _scale, _shear; LQuaternionf _quat; LMatrix4f _mat; LMatrix4f *_inv_mat;