From 9ac35805f9613f4c1b7b98e74e9f25335769a404 Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 17 Jan 2007 19:22:38 +0000 Subject: [PATCH] add get_sample_pos, get_sample_hpr --- direct/src/deadrec/smoothMover.I | 28 ++++++++++++++++++++++++++++ direct/src/deadrec/smoothMover.h | 3 +++ 2 files changed, 31 insertions(+) diff --git a/direct/src/deadrec/smoothMover.I b/direct/src/deadrec/smoothMover.I index 88ce1c5f7d..e672373385 100644 --- a/direct/src/deadrec/smoothMover.I +++ b/direct/src/deadrec/smoothMover.I @@ -236,6 +236,34 @@ set_r(float r) { return result; } +//////////////////////////////////////////////////////////////////// +// Function: SmoothMover::get_sample_pos +// Access: Published +// Description: Returns the current position of the working sample +// point. This position is updated periodically by +// set_x(), set_y(), etc., and its current value is +// copied to the sample point table when +// mark_position() is called. +//////////////////////////////////////////////////////////////////// +INLINE const LPoint3f &SmoothMover:: +get_sample_pos() const { + return _sample._pos; +} + +//////////////////////////////////////////////////////////////////// +// Function: SmoothMover::get_sample_hpr +// Access: Published +// Description: Returns the current orientation of the working sample +// point. This orientation is updated periodically by +// set_h(), set_p(), etc., and its current value is +// copied to the sample point table when +// mark_position() is called. +//////////////////////////////////////////////////////////////////// +INLINE const LVecBase3f &SmoothMover:: +get_sample_hpr() const { + return _sample._hpr; +} + //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_phony_timestamp // Access: Published diff --git a/direct/src/deadrec/smoothMover.h b/direct/src/deadrec/smoothMover.h index 1aaad08429..27763fa66e 100644 --- a/direct/src/deadrec/smoothMover.h +++ b/direct/src/deadrec/smoothMover.h @@ -79,6 +79,9 @@ PUBLISHED: INLINE bool set_p(float p); INLINE bool set_r(float r); + INLINE const LPoint3f &get_sample_pos() const; + INLINE const LVecBase3f &get_sample_hpr() const; + bool set_mat(const LMatrix4f &mat); INLINE void set_phony_timestamp();