From 0fe487d9ecc3e0822fae5da9d7ac47582f118d4d Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 26 Mar 2008 00:04:45 +0000 Subject: [PATCH] support explicit default constructors for linmath --- panda/src/linmath/lmatrix3_src.h | 3 +-- panda/src/linmath/lmatrix4_src.h | 2 +- panda/src/linmath/luse.N | 34 ++++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 3 deletions(-) diff --git a/panda/src/linmath/lmatrix3_src.h b/panda/src/linmath/lmatrix3_src.h index fa4546127f..f5ffb16c3f 100644 --- a/panda/src/linmath/lmatrix3_src.h +++ b/panda/src/linmath/lmatrix3_src.h @@ -31,9 +31,8 @@ public: typedef const FLOATTYPE *iterator; typedef const FLOATTYPE *const_iterator; - INLINE_LINMATH FLOATNAME(LMatrix3)(); - PUBLISHED: + INLINE_LINMATH FLOATNAME(LMatrix3)(); INLINE_LINMATH FLOATNAME(LMatrix3)(const FLOATNAME(LMatrix3) &other); INLINE_LINMATH FLOATNAME(LMatrix3) &operator = ( const FLOATNAME(LMatrix3) &other); diff --git a/panda/src/linmath/lmatrix4_src.h b/panda/src/linmath/lmatrix4_src.h index c6e2327577..7e96c7a1fb 100644 --- a/panda/src/linmath/lmatrix4_src.h +++ b/panda/src/linmath/lmatrix4_src.h @@ -26,8 +26,8 @@ public: typedef const FLOATTYPE *iterator; typedef const FLOATTYPE *const_iterator; - INLINE_LINMATH FLOATNAME(LMatrix4)(); PUBLISHED: + INLINE_LINMATH FLOATNAME(LMatrix4)(); INLINE_LINMATH FLOATNAME(LMatrix4)(const FLOATNAME(LMatrix4) &other); INLINE_LINMATH FLOATNAME(LMatrix4) &operator = (const FLOATNAME(LMatrix4) &other); INLINE_LINMATH FLOATNAME(LMatrix4) &operator = (FLOATTYPE fill_value); diff --git a/panda/src/linmath/luse.N b/panda/src/linmath/luse.N index 4430f08ffb..55f572d7cf 100644 --- a/panda/src/linmath/luse.N +++ b/panda/src/linmath/luse.N @@ -33,6 +33,40 @@ renametype LQuaterniond LQuaterniond renametype LRotationd LRotationd renametype LOrientationd LOrientationd +defconstruct LPoint2f new LPoint2f(0.0f) +defconstruct LPoint3f new LPoint3f(0.0f) +defconstruct LPoint4f new LPoint4f(0.0f) +defconstruct LPoint2d new LPoint2d(0.0f) +defconstruct LPoint3d new LPoint3d(0.0f) +defconstruct LPoint4d new LPoint4d(0.0f) + +defconstruct LVecBase2f new LVecBase2f(0.0f) +defconstruct LVecBase3f new LVecBase3f(0.0f) +defconstruct LVecBase4f new LVecBase4f(0.0f) +defconstruct LVecBase2d new LVecBase2d(0.0f) +defconstruct LVecBase3d new LVecBase3d(0.0f) +defconstruct LVecBase4d new LVecBase4d(0.0f) + +defconstruct LVector2f new LVector2f(0.0f) +defconstruct LVector3f new LVector3f(0.0f) +defconstruct LVector4f new LVector4f(0.0f) +defconstruct LVector2d new LVector2d(0.0f) +defconstruct LVector3d new LVector3d(0.0f) +defconstruct LVector4d new LVector4d(0.0f) + +defconstruct LMatrix3f new LMatrix3f(LMatrix3f::ident_mat()) +defconstruct LMatrix4f new LMatrix4f(LMatrix4f::ident_mat()) +defconstruct LMatrix3d new LMatrix3d(LMatrix3d::ident_mat()) +defconstruct LMatrix4d new LMatrix4d(LMatrix4d::ident_mat()) + +defconstruct LQuaternionf new LQuaternionf(LQuaternionf::ident_quat()) +defconstruct LRotationf new LRotationf(LQuaternionf::ident_quat()) +defconstruct LOrientationf new LOrientationf(LQuaternionf::ident_quat()) + +defconstruct LQuaterniond new LQuaterniond(LQuaterniond::ident_quat()) +defconstruct LRotationd new LRotationd(LQuaterniond::ident_quat()) +defconstruct LOrientationd new LOrientationd(LQuaterniond::ident_quat()) + # We don't want to accidentally include any of the _src files in the # generated output, since these files aren't intended to be included by # anything but their associated .h file.