Browse Source

regularize vec3's a bit

David Rose 20 years ago
parent
commit
726410e386

+ 4 - 4
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;

+ 4 - 4
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:

+ 1 - 1
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);

+ 3 - 2
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;