28 #ifndef __SubEntity_H__
29 #define __SubEntity_H__
309 { mCachedCamera = 0; }
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
A viewpoint from which the scene will be rendered.
Defines an instance of a discrete, movable object based on a Mesh.
Structure recording the use of an automatic parameter.
Collects together the program parameters used for a GpuProgram.
Class encapsulating a standard 4x4 homogeneous matrix.
'New' rendering operation using vertex buffers.
Abstract class defining the interface all renderable objects must implement.
static String AUTODETECT_RESOURCE_GROUP_NAME
Special resource group name which causes resource group to be automatically determined based on searc...
Manages the organisation and rendering of a 'scene' i.e.
Utility class which defines the sub-parts of an Entity.
virtual ushort getRenderQueuePriority(void) const
Gets the queue group for this entity, see setRenderQueueGroup for full details.
Entity * getParent(void) const
Accessor to get parent Entity.
const Camera * mCachedCamera
The camera for which the cached distance is valid.
virtual void setRenderQueueGroup(uint8 queueID)
Sets the render queue group this SubEntity will be rendered through.
virtual void setVisible(bool visible)
Tells this SubEntity whether to be visible or not.
unsigned short mMaterialLodIndex
The LOD number of the material to use, calculated by Entity::_notifyCurrentCamera.
SubMesh * mSubMesh
Pointer to the SubMesh defining geometry.
size_t getIndexDataStartIndex() const
Returns the current value of the start index used for drawing.
virtual uint8 getRenderQueueGroup(void) const
Gets the queue group for this entity, see setRenderQueueGroup for full details.
VertexData * mSkelAnimVertexData
Blend buffer details for dedicated geometry.
size_t getIndexDataEndIndex() const
Returns the current value of the start index used for drawing.
void _markBuffersUsedForAnimation(void)
Mark all vertex data as animated.
virtual bool isRenderQueuePrioritySet(void) const
Gets the queue group for this entity, see setRenderQueueGroup for full details.
void resetIndexDataStartEndIndex()
Reset the custom start/end index to the default values.
VertexData * _getSkelAnimVertexData(void)
Advanced method to get the temporarily blended vertex information for entities which are software ski...
void setMaterial(const MaterialPtr &material)
Sets a Material to be used.
virtual bool isVisible(void) const
Returns whether or not this SubEntity is supposed to be visible.
unsigned short getNumWorldTransforms(void) const
Overridden - see Renderable.
void setIndexDataEndIndex(size_t end_index)
Tells this SubEntity to draw a subset of the SubMesh by adjusting the index buffer extents.
ushort mHardwarePoseCount
Number of hardware blended poses supported by material.
TempBlendedBufferInfo mTempSkelAnimInfo
Quick lookup of buffers.
size_t mIndexEnd
override the end index for the RenderOperation
MaterialPtr mMaterialPtr
Cached pointer to material.
Real mCachedCameraDist
Cached distance to last camera for getSquaredViewDepth.
TempBlendedBufferInfo mTempVertexAnimInfo
Temp buffer details for software Vertex anim geometry.
ushort mRenderQueuePriority
The render queue priority to use when rendering this renderable.
void _updateCustomGpuParameter(const GpuProgramParameters::AutoConstantEntry &constantEntry, GpuProgramParameters *params) const
Overridden from Renderable to provide some custom behaviour.
Technique * getTechnique(void) const
Overridden - see Renderable.
bool getCastsShadows(void) const
Method which reports whether this renderable would normally cast a shadow.
bool mRenderQueueIDSet
Flags whether the RenderQueue's default should be used.
bool mRenderQueuePrioritySet
Flags whether the RenderQueue's default should be used.
void getWorldTransforms(Matrix4 *xform) const
Overridden - see Renderable.
VertexData * getVertexDataForBinding(void)
Retrieve the VertexData which should be used for GPU binding.
void getRenderOperation(RenderOperation &op)
Overridden - see Renderable.
const MaterialPtr & getMaterial(void) const
Overridden - see Renderable.
TempBlendedBufferInfo * _getVertexAnimTempBufferInfo(void)
Advanced method to get the temp buffer information for software morph animation.
VertexData * _getHardwareVertexAnimVertexData(void)
Advanced method to get the hardware morph vertex information.
TempBlendedBufferInfo * _getSkelAnimTempBufferInfo(void)
Advanced method to get the temp buffer information for software skeletal animation.
bool _getBuffersMarkedForAnimation(void) const
Are buffers already marked as vertex animated?
size_t mIndexStart
override the start index for the RenderOperation
Entity * mParentEntity
Pointer to parent.
void prepareTempBlendBuffers(void)
Internal method for preparing this Entity for use in animation.
SubEntity(Entity *parent, SubMesh *subMeshBasis)
Private constructor - don't allow creation by anybody else.
virtual void setRenderQueueGroupAndPriority(uint8 queueID, ushort priority)
Sets the render queue group and group priority this SubEntity will be rendered through.
const LightList & getLights(void) const
Gets a list of lights, ordered relative to how close they are to this renderable.
void setMaterialName(const String &name, const String &groupName=ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME)
Sets the name of the Material to be used.
VertexData * mSoftwareVertexAnimVertexData
Vertex data details for software Vertex anim of shared geometry.
SubMesh * getSubMesh(void)
Accessor method to read mesh data.
virtual bool isRenderQueueGroupSet(void) const
Gets the queue group for this entity, see setRenderQueueGroup for full details.
void _invalidateCameraCache()
Invalidate the camera distance cache.
void _markBuffersUnusedForAnimation(void)
Mark all vertex data as so far unanimated.
void setIndexDataStartIndex(size_t start_index)
Tells this SubEntity to draw a subset of the SubMesh by adjusting the index buffer extents.
const String & getMaterialName() const
Gets the name of the Material in use by this instance.
VertexData * _getSoftwareVertexAnimVertexData(void)
Advanced method to get the temporarily blended software morph vertex information.
Real getSquaredViewDepth(const Camera *cam) const
Overridden, see Renderable.
virtual ~SubEntity()
Private destructor.
VertexData * mHardwareVertexAnimVertexData
Vertex data details for hardware Vertex anim of shared geometry.
bool mVertexAnimationAppliedThisFrame
Have we applied any vertex animation to geometry?
bool mVisible
Is this SubEntity visible?
uint8 mRenderQueueID
The render queue to use when rendering this renderable.
void _restoreBuffersForUnusedAnimation(bool hardwareAnimation)
Internal method to copy original vertex data to the morph structures should there be no active animat...
Defines a part of a complete mesh.
Class representing an approach to rendering this particular Material.
Structure for recording the use of temporary blend buffers.
Summary class collecting together vertex source information.
float Real
Software floating point type.