summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llagent.h')
-rw-r--r--indra/newview/llagent.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 4bb4d317e8..477ec88be4 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -189,6 +189,8 @@ private:
// Position
//--------------------------------------------------------------------
public:
+ typedef boost::signals2::signal<void(const LLVector3 &position_local, const LLVector3d &position_global)> position_signal_t;
+
LLVector3 getPosAgentFromGlobal(const LLVector3d &pos_global) const;
LLVector3d getPosGlobalFromAgent(const LLVector3 &pos_agent) const;
const LLVector3d &getPositionGlobal() const;
@@ -196,10 +198,16 @@ public:
// Call once per frame to update position, angles (radians).
void updateAgentPosition(const F32 dt, const F32 yaw, const S32 mouse_x, const S32 mouse_y);
void setPositionAgent(const LLVector3 &center);
+
+ boost::signals2::connection whenPositionChanged(position_signal_t::slot_type fn);
+
protected:
void propagate(const F32 dt); // ! BUG ! Should roll into updateAgentPosition
private:
- mutable LLVector3d mPositionGlobal;
+ mutable LLVector3d mPositionGlobal;
+
+ position_signal_t mOnPositionChanged;
+ LLVector3d mLastTestGlobal;
//--------------------------------------------------------------------
// Velocity