Browse Source

added lvec4 cast

Dave Schuyler 20 years ago
parent
commit
c686acd92d
2 changed files with 11 additions and 0 deletions
  1. 10 0
      panda/src/linmath/lrotation_src.I
  2. 1 0
      panda/src/linmath/lrotation_src.h

+ 10 - 0
panda/src/linmath/lrotation_src.I

@@ -35,6 +35,16 @@ FLOATNAME(LRotation)(const FLOATNAME(LQuaternion) &c) :
   FLOATNAME(LQuaternion)(c) {
   FLOATNAME(LQuaternion)(c) {
 }
 }
 
 
+////////////////////////////////////////////////////////////////////
+//     Function: LRotation::Copy Constructor
+//       Access: public
+//  Description:
+////////////////////////////////////////////////////////////////////
+INLINE_LINMATH FLOATNAME(LRotation)::
+FLOATNAME(LRotation)(const FLOATNAME(LVecBase4) &copy) :
+  FLOATNAME(LQuaternion)(copy) {
+}
+
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: LRotation::Constructor
 //     Function: LRotation::Constructor
 //       Access: public
 //       Access: public

+ 1 - 0
panda/src/linmath/lrotation_src.h

@@ -24,6 +24,7 @@ class EXPCL_PANDA FLOATNAME(LRotation) : public FLOATNAME(LQuaternion) {
 PUBLISHED:
 PUBLISHED:
   INLINE_LINMATH FLOATNAME(LRotation)();
   INLINE_LINMATH FLOATNAME(LRotation)();
   INLINE_LINMATH FLOATNAME(LRotation)(const FLOATNAME(LQuaternion) &);
   INLINE_LINMATH FLOATNAME(LRotation)(const FLOATNAME(LQuaternion) &);
+  INLINE_LINMATH FLOATNAME(LRotation)(const FLOATNAME(LVecBase4) &copy);
   INLINE_LINMATH FLOATNAME(LRotation)(FLOATTYPE, FLOATTYPE, FLOATTYPE, FLOATTYPE);
   INLINE_LINMATH FLOATNAME(LRotation)(FLOATTYPE, FLOATTYPE, FLOATTYPE, FLOATTYPE);
   INLINE_LINMATH FLOATNAME(LRotation)(const FLOATNAME(LVector3) &, FLOATTYPE);
   INLINE_LINMATH FLOATNAME(LRotation)(const FLOATNAME(LVector3) &, FLOATTYPE);
   INLINE_LINMATH FLOATNAME(LRotation)(const FLOATNAME(LMatrix3) &);
   INLINE_LINMATH FLOATNAME(LRotation)(const FLOATNAME(LMatrix3) &);