28#ifndef __SubEntity_H__
29#define __SubEntity_H__
A viewpoint from which the scene will be rendered.
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.
static String AUTODETECT_RESOURCE_GROUP_NAME
Special resource group name which causes resource group to be automatically determined based on searc...
virtual ushort getRenderQueuePriority(void) const
Gets the queue group for this entity, see setRenderQueueGroup for full details.
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.
const LightList & getLights(void) const
Gets a list of lights, ordered relative to how close they are to this renderable.
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.
Entity * getParent(void) const
Accessor to get parent Entity.
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.
VertexData * _getSoftwareVertexAnimVertexData(void)
Advanced method to get the temporarily blended software morph vertex information.
friend class SceneManager
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.
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.
const MaterialPtr & getMaterial(void) const
Overridden - see Renderable.
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.
Technique * getTechnique(void) const
Overridden - see Renderable.
VertexData * _getHardwareVertexAnimVertexData(void)
Advanced method to get the hardware morph vertex information.
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.
SubMesh * getSubMesh(void)
Accessor method to read mesh data.
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.
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.
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.
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.
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.
const String & getMaterialName() const
Gets the name of the Material in use by this instance.
TempBlendedBufferInfo * _getVertexAnimTempBufferInfo(void)
Advanced method to get the temp buffer information for software morph animation.
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.
TempBlendedBufferInfo * _getSkelAnimTempBufferInfo(void)
Advanced method to get the temp buffer information for software skeletal animation.
void _restoreBuffersForUnusedAnimation(bool hardwareAnimation)
Internal method to copy original vertex data to the morph structures should there be no active animat...
VertexData * _getSkelAnimVertexData(void)
Advanced method to get the temporarily blended vertex information for entities which are software ski...
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.
HashedVector< Light * > LightList
SceneObjAllocatedObject SubEntityAlloc
SharedPtr< Material > MaterialPtr
float Real
Software floating point type.