Sirikata
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
Sirikata::Graphics::ProxyEntity Class Reference

Ogre entities using ProxyObjects for their information. More...

#include <ProxyEntity.hpp>

Inheritance diagram for Sirikata::Graphics::ProxyEntity:
Collaboration diagram for Sirikata::Graphics::ProxyEntity:

List of all members.

Public Member Functions

 ProxyEntity (OgreRenderer *scene, const ProxyObjectPtr &ppo)
 NOTE that you *MUST* call initializeToProxy with the same ProxyObjectPtr immediately after.
virtual ~ProxyEntity ()
void initializeToProxy (const ProxyObjectPtr &ppo)
virtual BoundingSphere3f bounds ()
virtual void tick (const Time &t, const Duration &deltaTime)
virtual bool isDynamic () const
virtual bool isMobile () const
ProxyObjectgetProxy () const
const ProxyObjectPtrgetProxyPtr () const
virtual void updateLocation (ProxyObjectPtr proxy, const TimedMotionVector3f &newLocation, const TimedMotionQuaternion &newOrient, const AggregateBoundingInfo &newBounds, const SpaceObjectReference &sporef)
virtual void validated (ProxyObjectPtr proxy)
virtual void invalidated (ProxyObjectPtr proxy, bool permanent)
virtual void destroyed (ProxyObjectPtr proxy)
virtual void onSetMesh (ProxyObjectPtr proxy, Transfer::URI const &newMesh, const SpaceObjectReference &sporef)
virtual void onSetScale (ProxyObjectPtr proxy, float32 newScale, const SpaceObjectReference &sporef)
virtual void onSetIsAggregate (ProxyObjectPtr proxy, bool isAgg, const SpaceObjectReference &sporef)
void extrapolateLocation (TemporalValue< Location >::Time current)

Static Public Member Functions

static ProxyEntityfromMovableObject (Ogre::MovableObject *obj)

Protected Member Functions

void handleDestroyTimeout ()
void tryDelete ()

Protected Attributes

ProxyObjectPtr mProxy
bool mActive
Network::IOTimerPtr mDestroyTimer
bool mCanDestroy

Private Member Functions

void iUpdateLocation (ProxyObjectPtr proxy, const TimedMotionVector3f &newLocation, const TimedMotionQuaternion &newOrient, const AggregateBoundingInfo &newBounds, const SpaceObjectReference &sporef, Liveness::Token lt)
void iValidated (ProxyObjectPtr proxy, Liveness::Token lt)
void iInvalidated (ProxyObjectPtr proxy, bool permanent, Liveness::Token lt)
void iDestroyed (ProxyObjectPtr proxy, Liveness::Token lt)
void iOnSetMesh (ProxyObjectPtr proxy, Transfer::URI const &newMesh, const SpaceObjectReference &sporef, Liveness::Token lt)
void iOnSetScale (ProxyObjectPtr proxy, float32 newScale, const SpaceObjectReference &sporef, Liveness::Token lt)
void iOnSetIsAggregate (ProxyObjectPtr proxy, bool isAgg, const SpaceObjectReference &sporef, Liveness::Token lt)
void iHandleDestroyTimeout (Liveness::Token lt)

Detailed Description

Ogre entities using ProxyObjects for their information.


Constructor & Destructor Documentation

Sirikata::Graphics::ProxyEntity::ProxyEntity ( OgreRenderer scene,
const ProxyObjectPtr ppo 
)

NOTE that you *MUST* call initializeToProxy with the same ProxyObjectPtr immediately after.

We can't completely split the construction and initialization right now because Entity expects a name at construction, but to initialize we may need some virtual functions.

References Sirikata::Graphics::OgreRenderer::context(), Sirikata::Network::IOTimer::create(), handleDestroyTimeout(), Sirikata::Context::mainStrand, mDestroyTimer, and Sirikata::Graphics::Entity::mScene.

Sirikata::Graphics::ProxyEntity::~ProxyEntity ( ) [virtual]

Member Function Documentation

BoundingSphere3f Sirikata::Graphics::ProxyEntity::bounds ( ) [virtual]
void Sirikata::Graphics::ProxyEntity::destroyed ( ProxyObjectPtr  proxy) [virtual]
void Sirikata::Graphics::ProxyEntity::extrapolateLocation ( TemporalValue< Location >::Time  current)
ProxyEntity * Sirikata::Graphics::ProxyEntity::fromMovableObject ( Ogre::MovableObject *  obj) [static]
ProxyObject& Sirikata::Graphics::ProxyEntity::getProxy ( ) const [inline]
const ProxyObjectPtr& Sirikata::Graphics::ProxyEntity::getProxyPtr ( ) const [inline]
void Sirikata::Graphics::ProxyEntity::handleDestroyTimeout ( ) [protected]
void Sirikata::Graphics::ProxyEntity::iDestroyed ( ProxyObjectPtr  proxy,
Liveness::Token  lt 
) [private]

References mCanDestroy, mProxy, and tryDelete().

Referenced by destroyed().

void Sirikata::Graphics::ProxyEntity::iHandleDestroyTimeout ( Liveness::Token  lt) [private]
void Sirikata::Graphics::ProxyEntity::iInvalidated ( ProxyObjectPtr  proxy,
bool  permanent,
Liveness::Token  lt 
) [private]
void Sirikata::Graphics::ProxyEntity::initializeToProxy ( const ProxyObjectPtr ppo)

FIXME: ADDING AND REMOVING LISTENERS COULD INVALIDATE ITERATORS

References Sirikata::Graphics::Entity::checkDynamic(), mProxy, and Sirikata::Graphics::Entity::setIsAggregate().

Referenced by Sirikata::Graphics::OgreSystem::iOnCreateProxy().

void Sirikata::Graphics::ProxyEntity::invalidated ( ProxyObjectPtr  proxy,
bool  permanent 
) [virtual]
void Sirikata::Graphics::ProxyEntity::iOnSetIsAggregate ( ProxyObjectPtr  proxy,
bool  isAgg,
const SpaceObjectReference sporef,
Liveness::Token  lt 
) [private]
void Sirikata::Graphics::ProxyEntity::iOnSetMesh ( ProxyObjectPtr  proxy,
Transfer::URI const &  newMesh,
const SpaceObjectReference sporef,
Liveness::Token  lt 
) [private]
void Sirikata::Graphics::ProxyEntity::iOnSetScale ( ProxyObjectPtr  proxy,
float32  newScale,
const SpaceObjectReference sporef,
Liveness::Token  lt 
) [private]
bool Sirikata::Graphics::ProxyEntity::isDynamic ( ) const [virtual]

Reimplemented from Sirikata::Graphics::Entity.

References isMobile().

bool Sirikata::Graphics::ProxyEntity::isMobile ( ) const [virtual]
void Sirikata::Graphics::ProxyEntity::iUpdateLocation ( ProxyObjectPtr  proxy,
const TimedMotionVector3f newLocation,
const TimedMotionQuaternion newOrient,
const AggregateBoundingInfo newBounds,
const SpaceObjectReference sporef,
Liveness::Token  lt 
) [private]
void Sirikata::Graphics::ProxyEntity::iValidated ( ProxyObjectPtr  proxy,
Liveness::Token  lt 
) [private]
void Sirikata::Graphics::ProxyEntity::onSetIsAggregate ( ProxyObjectPtr  proxy,
bool  isAgg,
const SpaceObjectReference sporef 
) [virtual]
void Sirikata::Graphics::ProxyEntity::onSetMesh ( ProxyObjectPtr  proxy,
Transfer::URI const &  newMesh,
const SpaceObjectReference sporef 
) [virtual]
void Sirikata::Graphics::ProxyEntity::onSetScale ( ProxyObjectPtr  proxy,
float32  newScale,
const SpaceObjectReference sporef 
) [virtual]
void Sirikata::Graphics::ProxyEntity::tick ( const Time t,
const Duration deltaTime 
) [virtual]

Reimplemented from Sirikata::Graphics::Entity.

References extrapolateLocation().

void Sirikata::Graphics::ProxyEntity::tryDelete ( ) [protected]
void Sirikata::Graphics::ProxyEntity::updateLocation ( ProxyObjectPtr  proxy,
const TimedMotionVector3f newLocation,
const TimedMotionQuaternion newOrient,
const AggregateBoundingInfo newBounds,
const SpaceObjectReference sporef 
) [virtual]
void Sirikata::Graphics::ProxyEntity::validated ( ProxyObjectPtr  proxy) [virtual]

Member Data Documentation

Referenced by iDestroyed(), iValidated(), and tryDelete().


The documentation for this class was generated from the following files: