From 5ae60423ecc86c6fb2e3af69d672d7f64d4bf97b Mon Sep 17 00:00:00 2001 From: Dave Schuyler Date: Thu, 2 Feb 2006 23:25:29 +0000 Subject: [PATCH] added multiply by scalar --- panda/src/linmath/lrotation_src.I | 20 ++++++++++++++++++++ panda/src/linmath/lrotation_src.h | 3 +++ 2 files changed, 23 insertions(+) diff --git a/panda/src/linmath/lrotation_src.I b/panda/src/linmath/lrotation_src.I index 31f62837f9..2f68620343 100644 --- a/panda/src/linmath/lrotation_src.I +++ b/panda/src/linmath/lrotation_src.I @@ -92,6 +92,26 @@ FLOATNAME(LRotation)(FLOATTYPE h, FLOATTYPE p, FLOATTYPE r) { set_hpr(FLOATNAME(LVecBase3)(h, p, r)); } +//////////////////////////////////////////////////////////////////// +// Function: LRotation::rotation * scalar +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +INLINE_LINMATH FLOATNAME(LRotation) FLOATNAME(LRotation):: +operator * (FLOATTYPE scalar) const { + return FLOATNAME(LVecBase4)::operator * (scalar); +} + +//////////////////////////////////////////////////////////////////// +// Function: LRotation::rotation / scalar +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +INLINE_LINMATH FLOATNAME(LRotation) FLOATNAME(LRotation):: +operator / (FLOATTYPE scalar) const { + return FLOATNAME(LVecBase4)::operator / (scalar); +} + //////////////////////////////////////////////////////////////////// // Function: LRotation::operator * // Access: public diff --git a/panda/src/linmath/lrotation_src.h b/panda/src/linmath/lrotation_src.h index 4c6262d2f0..b4f87ffa07 100644 --- a/panda/src/linmath/lrotation_src.h +++ b/panda/src/linmath/lrotation_src.h @@ -30,6 +30,9 @@ PUBLISHED: INLINE_LINMATH FLOATNAME(LRotation)(const FLOATNAME(LMatrix4) &); INLINE_LINMATH FLOATNAME(LRotation)(FLOATTYPE, FLOATTYPE, FLOATTYPE); + INLINE_LINMATH FLOATNAME(LRotation) operator * (FLOATTYPE scalar) const; + INLINE_LINMATH FLOATNAME(LRotation) operator / (FLOATTYPE scalar) const; + INLINE_LINMATH FLOATNAME(LRotation) operator*(const FLOATNAME(LRotation)& other) const;