29 #ifndef __MovableObject_H__
30 #define __MovableObject_H__
46 class MovableObjectFactory;
193 virtual const String& getMovableType(
void)
const = 0;
201 virtual Node* getParentNode(
void)
const;
210 virtual SceneNode* getParentSceneNode(
void)
const;
217 virtual void _notifyAttached(
Node* parent,
bool isTagPoint =
false);
220 virtual bool isAttached(
void)
const;
223 virtual void detachFromParent(
void);
228 virtual bool isInScene(
void)
const;
232 virtual void _notifyMoved(
void);
239 virtual void _notifyCurrentCamera(
Camera* cam);
250 virtual Real getBoundingRadius(
void)
const = 0;
253 virtual const AxisAlignedBox& getWorldBoundingBox(
bool derive =
false)
const;
255 virtual const Sphere& getWorldBoundingSphere(
bool derive =
false)
const;
261 virtual void _updateRenderQueue(
RenderQueue* queue) = 0;
277 virtual void setVisible(
bool visible);
283 virtual bool getVisible(
void)
const;
289 virtual bool isVisible(
void)
const;
296 mUpperDistance = dist;
297 mSquaredUpperDistance = mUpperDistance * mUpperDistance;
310 virtual void setUserAny(
const Any& anything) { getUserObjectBindings().setUserAny(anything); }
315 virtual const Any&
getUserAny(
void)
const {
return getUserObjectBindings().getUserAny(); }
341 virtual void setRenderQueueGroup(
uint8 queueID);
358 virtual void setRenderQueueGroupAndPriority(
uint8 queueID,
ushort priority);
361 virtual uint8 getRenderQueueGroup(
void)
const;
364 virtual const Matrix4& _getParentNodeFullTransform(
void)
const;
451 virtual const LightList& queryLights(
void)
const;
464 virtual void setLightMask(
uint32 lightMask);
479 ShadowRenderableListIterator getShadowVolumeRenderableIterator(
482 bool extrudeVertices,
Real extrusionDist,
unsigned long flags = 0);
506 bool getReceivesShadows();
509 Real getPointExtrusionDistance(
const Light* l)
const;
520 virtual uint32 getTypeFlags(
void)
const;
534 bool debugRenderables =
false) = 0;
572 virtual const String& getType(
void)
const = 0;
A viewpoint from which the scene will be rendered.
virtual void objectDetached(MovableObject *)
MovableObject has been detached from a node.
Class encapsulating a standard 4x4 homogeneous matrix.
virtual bool requestTypeFlags(void) const
Does this factory require the allocation of a 'type flag', used to selectively include / exclude this...
Sphere mWorldBoundingSphere
float Real
Software floating point type.
virtual void addVisibilityFlags(uint32 flags)
As setVisibilityFlags, except the flags passed as parameters are appended to the existing flags on th...
Variant type that can hold Any other type.
UserObjectBindings & getUserObjectBindings()
Return an instance of user objects binding associated with this class.
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
UserObjectBindings mUserObjectBindings
User objects binding.
EdgeData * getEdgeList(void)
Define a default implementation of method from ShadowCaster which implements no shadows.
static uint32 getDefaultVisibilityFlags()
Get the default visibility flags for all future MovableObject instances.
bool mDebugDisplay
Is debug display enabled?
virtual ~MovableObjectFactory()
virtual void _notifyManager(SceneManager *man)
Notify the object of it's manager (internal use only)
virtual void objectAttached(MovableObject *)
MovableObject has been attached to a node.
Manages the organisation and rendering of a 'scene' i.e.
bool mRenderQueueIDSet
Flags whether the RenderQueue's default should be used.
Real mUpperDistance
Upper distance to still render.
virtual uint32 getLightMask() const
Get a bitwise mask which will filter the lights affecting this object.
const UserObjectBindings & getUserObjectBindings() const
Return an instance of user objects binding associated with this class.
virtual void setListener(Listener *listener)
Sets a listener for this object.
A 3D box aligned with the x/y/z axes.
MovableObjectFactory * mCreator
Creator of this object (if created by a factory)
virtual void removeVisibilityFlags(uint32 flags)
As setVisibilityFlags, except the flags passed as parameters are removed from the existing flags on t...
virtual void setVisibilityFlags(uint32 flags)
Sets the visiblity flags for this object.
Defines an interface to classes which have one or more AnimableValue instances to expose...
virtual void objectDestroyed(MovableObject *)
MovableObject is being destroyed.
Interface definition for a factory class which produces a certain kind of MovableObject, and can be registered with Root in order to allow all clients to produce new instances of this object, integrated with the standard Ogre processing.
bool hasEdgeList(void)
Define a default implementation of method from ShadowCaster which implements no shadows.
uint32 mLightMask
the light mask defined for this movable. This will be taken into consideration when deciding which li...
Listener which gets called back on MovableObject events.
Abstract class defining a movable object in a scene.
virtual const LightList * objectQueryLights(const MovableObject *)
Called when the movable object needs to query a light list.
Class representing a node in the scene graph.
static uint32 msDefaultVisibilityFlags
Default visibility flags.
bool mCastShadows
Does this object cast shadows?
virtual void setDebugDisplayEnabled(bool enabled)
Sets whether or not the debug display of this object is enabled.
virtual Real getRenderingDistance(void) const
Gets the distance at which batches are no longer rendered.
bool mBeyondFarDistance
Hidden because of distance?
Shared pointer implementation used to share index buffers.
Representation of a dynamic light source in the scene.
virtual bool isDebugDisplayEnabled(void) const
Gets whether debug display of this object is enabled.
uint32 mVisibilityFlags
Flags determining whether this object is visible (compared to SceneManager mask)
virtual LightList * _getLightList()
Returns a pointer to the current list of lights for this object.
ShadowTechnique
An enumeration of broad shadow techniques.
static uint32 getDefaultQueryFlags()
Get the default query flags for all future MovableObject instances.
virtual const Any & getUserAny(void) const
virtual void setQueryFlags(uint32 flags)
Sets the query flags for this object.
void _notifyTypeFlags(unsigned long flag)
Notify this factory of the type mask to apply.
virtual bool isParentTagPoint() const
Gets whether the parent node is a TagPoint (or a SceneNode)
virtual bool objectRendering(const MovableObject *, const Camera *)
Called when the movable object of the camera to be used for rendering.
static void setDefaultVisibilityFlags(uint32 flags)
Set the default visibility flags for all future MovableObject instances.
A sphere primitive, mostly used for bounds checking.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
static uint32 msDefaultQueryFlags
Default query flags.
Visitor object that can be used to iterate over a collection of Renderable instances abstractly...
bool mRenderingDisabled
Does rendering this object disabled by listener?
virtual void removeQueryFlags(uint32 flags)
As setQueryFlags, except the flags passed as parameters are removed from the existing flags on this o...
uint32 mQueryFlags
Flags determining whether this object is included / excluded from scene queries.
uint32 getTypeFlags(void) const
Gets the type flag for this factory.
SceneManager * mManager
SceneManager holding this object (if applicable)
bool mRenderQueuePrioritySet
Flags whether the RenderQueue's default should be used.
virtual MovableObjectFactory * _getCreator(void) const
Get the creator of this object, if any (internal use only)
uint8 mRenderQueueID
The render queue to use when rendering this object.
virtual uint32 getVisibilityFlags(void) const
Returns the visibility flags relevant for this object.
bool getCastShadows(void) const
Returns whether shadow casting is enabled for this object.
LightList mLightList
List of lights for this object.
virtual uint32 getQueryFlags(void) const
Returns the query flags relevant for this object.
virtual Listener * getListener(void) const
Gets the current listener for this object.
Class to manage the scene object rendering queue.
virtual SceneManager * _getManager(void) const
Get the manager of this object, if any (internal use only)
static void setDefaultQueryFlags(uint32 flags)
Set the default query flags for all future MovableObject instances.
This class contains the information required to describe the edge connectivity of a given set of vert...
virtual void _notifyCreator(MovableObjectFactory *fact)
Notify the object of it's creator (internal use only)
bool mVisible
Is this object visible?
virtual void objectMoved(MovableObject *)
MovableObject has been moved.
virtual const String & getName(void) const
Returns the name of this object.
virtual void setUserAny(const Any &anything)
Real mSquaredUpperDistance
Node * mParentNode
node to which this object is attached
This class defines the interface that must be implemented by shadow casters.
String mName
Name of this object.
AxisAlignedBox mWorldAABB
Cached world AABB of this object.
void setCastShadows(bool enabled)
Sets whether or not this object will cast shadows.
AxisAlignedBox mWorldDarkCapBounds
World space AABB of this object's dark cap.
ulong mLightListUpdated
The last frame that this light list was updated in.
virtual void setRenderingDistance(Real dist)
Sets the distance at which the object is no longer rendered.
Class representing a general-purpose node an articulated scene graph.
unsigned long mTypeFlag
Type flag, allocated if requested.
Listener * mListener
MovableObject listener - only one allowed (no list) for size & performance reasons. */.
Class that provide convenient interface to establish a linkage between custom user application object...
ushort mRenderQueuePriority
The render queue group to use when rendering this object.
virtual void addQueryFlags(uint32 flags)
As setQueryFlags, except the flags passed as parameters are appended to the existing flags on this ob...