28 #ifndef __Renderable_H__
29 #define __Renderable_H__
73 Renderable() : mPolygonModeOverrideable(true), mUseIdentityProjection(false), mUseIdentityView(false), mRenderSystemData(NULL) {}
77 if (mRenderSystemData)
79 delete mRenderSystemData;
80 mRenderSystemData = NULL;
124 { (void)sm; (void)rsys;
return true; }
129 { (void)sm; (void)rsys; }
166 mUseIdentityProjection = useIdentityProjection;
191 mUseIdentityView = useIdentityView;
243 mCustomParameters[index] = value;
252 mCustomParameters.erase(index);
261 return mCustomParameters.find(index) != mCustomParameters.end();
270 CustomParameterMap::const_iterator i = mCustomParameters.find(index);
271 if (i != mCustomParameters.end())
278 "Parameter at the given index was not found.",
279 "Renderable::getCustomParameter");
311 CustomParameterMap::const_iterator i = mCustomParameters.find(constantEntry.
data);
312 if (i != mCustomParameters.end())
326 mPolygonModeOverrideable =
override;
334 return mPolygonModeOverrideable;
401 return mRenderSystemData;
409 mRenderSystemData = val;
Variant type that can hold Any other type.
A viewpoint from which the scene will be rendered.
Structure recording the use of an automatic parameter.
size_t elementCount
The number of elements per individual entry in this constant Used in case people used packed elements...
size_t physicalIndex
The target (physical) constant index.
Collects together the program parameters used for a GpuProgram.
void _writeRawConstant(size_t physicalIndex, const Vector4 &vec, size_t count=4)
Write a 4-element floating-point parameter to the program directly to the underlying constants buffer...
Class encapsulating a standard 4x4 homogeneous matrix.
'New' rendering operation using vertex buffers.
Defines the functionality of a 3D API.
An internal class that should be used only by a render system for internal use.
Visitor object that can be used to iterate over a collection of Renderable instances abstractly.
virtual ~Visitor()
Virtual destructor needed as class has virtual methods.
virtual void visit(Renderable *rend, ushort lodIndex, bool isDebug, Any *pAny=0)=0
Generic visitor method.
Abstract class defining the interface all renderable objects must implement.
RenderSystemData * mRenderSystemData
User objects binding.
void removeCustomParameter(size_t index)
Removes a custom value which is associated with this Renderable at the given index.
virtual RenderSystemData * getRenderSystemData() const
Gets RenderSystem private data.
virtual void setPolygonModeOverrideable(bool override)
Sets whether this renderable's chosen detail level can be overridden (downgraded) by the camera setti...
bool mUseIdentityProjection
UserObjectBindings & getUserObjectBindings()
Return an instance of user objects binding associated with this class.
virtual Real getSquaredViewDepth(const Camera *cam) const =0
Returns the camera-relative squared depth of this renderable.
virtual void getRenderOperation(RenderOperation &op)=0
Gets the render operation required to send this object to the frame buffer.
virtual bool getCastsShadows(void) const
Method which reports whether this renderable would normally cast a shadow.
void setUseIdentityProjection(bool useIdentityProjection)
Sets whether or not to use an 'identity' projection.
const UserObjectBindings & getUserObjectBindings() const
Return an instance of user objects binding associated with this class.
virtual unsigned short getNumWorldTransforms(void) const
Returns the number of world transform matrices this renderable requires.
bool mPolygonModeOverrideable
void setCustomParameter(size_t index, const Vector4 &value)
Sets a custom parameter for this Renderable, which may be used to drive calculations for this specifi...
virtual bool getPolygonModeOverrideable(void) const
Gets whether this renderable's chosen detail level can be overridden (downgraded) by the camera setti...
virtual const MaterialPtr & getMaterial(void) const =0
Retrieves a weak reference to the material this renderable object uses.
virtual void _updateCustomGpuParameter(const GpuProgramParameters::AutoConstantEntry &constantEntry, GpuProgramParameters *params) const
Update a custom GpuProgramParameters constant which is derived from information only this Renderable ...
virtual void setRenderSystemData(RenderSystemData *val) const
Sets RenderSystem private data.
virtual void postRender(SceneManager *sm, RenderSystem *rsys)
Called immediately after the Renderable has been rendered.
CustomParameterMap mCustomParameters
bool hasCustomParameter(size_t index) const
Checks whether a custom value is associated with this Renderable at the given index.
bool getUseIdentityView(void) const
Returns whether or not to use an 'identity' view.
virtual void getWorldTransforms(Matrix4 *xform) const =0
Gets the world transform matrix / matrices for this renderable object.
virtual OGRE_DEPRECATED void setUserAny(const Any &anything)
virtual const LightList & getLights(void) const =0
Gets a list of lights, ordered relative to how close they are to this renderable.
map< size_t, Vector4 >::type CustomParameterMap
UserObjectBindings mUserObjectBindings
virtual Technique * getTechnique(void) const
Retrieves a pointer to the Material Technique this renderable object uses.
const Vector4 & getCustomParameter(size_t index) const
Gets the custom value associated with this Renderable at the given index.
void setUseIdentityView(bool useIdentityView)
Sets whether or not to use an 'identity' view.
virtual ~Renderable()
Virtual destructor needed as class has virtual methods.
virtual OGRE_DEPRECATED const Any & getUserAny(void) const
bool getUseIdentityProjection(void) const
Returns whether or not to use an 'identity' projection.
virtual bool preRender(SceneManager *sm, RenderSystem *rsys)
Called just prior to the Renderable being rendered.
Manages the organisation and rendering of a 'scene' i.e.
Class representing an approach to rendering this particular Material.
Class that provides convenient interface to establish a linkage between custom user application objec...
4-dimensional homogeneous vector.
#define OGRE_EXCEPT(num, desc, src)
float Real
Software floating point type.