Go to the documentation of this file.
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;
88 virtual const MaterialPtr& getMaterial(
void)
const = 0;
124 { (void)sm; (void)rsys;
return true; }
129 { (void)sm; (void)rsys; }
143 virtual void getWorldTransforms(
Matrix4* xform)
const = 0;
166 mUseIdentityProjection = useIdentityProjection;
191 mUseIdentityView = useIdentityView;
210 virtual Real getSquaredViewDepth(
const Camera* cam)
const = 0;
216 virtual const LightList& getLights(
void)
const = 0;
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;
430 #endif //__Renderable_H__
bool hasCustomParameter(size_t index) const
Checks whether a custom value is associated with this Renderable at the given index.
virtual void setPolygonModeOverrideable(bool override)
Sets whether this renderable's chosen detail level can be overridden (downgraded) by the camera setti...
virtual ~Renderable()
Virtual destructor needed as class has virtual methods.
Defines the functionality of a 3D API.
bool mPolygonModeOverrideable
A viewpoint from which the scene will be rendered.
map< size_t, Vector4 >::type CustomParameterMap
UserObjectBindings & getUserObjectBindings()
Return an instance of user objects binding associated with this class.
virtual Technique * getTechnique(void) const
Retrieves a pointer to the Material Technique this renderable object uses.
void setUseIdentityProjection(bool useIdentityProjection)
Sets whether or not to use an 'identity' projection.
Structure recording the use of an automatic parameter.
virtual void _updateCustomGpuParameter(const GpuProgramParameters::AutoConstantEntry &constantEntry, GpuProgramParameters *params) const
Update a custom GpuProgramParameters constant which is derived from information only this Renderable ...
Variant type that can hold Any other type.
CustomParameterMap mCustomParameters
virtual bool preRender(SceneManager *sm, RenderSystem *rsys)
Called just prior to the Renderable being rendered.
void setUseIdentityView(bool useIdentityView)
Sets whether or not to use an 'identity' view.
Class representing an approach to rendering this particular Material.
bool mUseIdentityProjection
Class that provides convenient interface to establish a linkage between custom user application objec...
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 const OGRE_DEPRECATED Any & getUserAny(void) const
size_t elementCount
The number of elements per individual entry in this constant Used in case people used packed elements...
Class encapsulating a standard 4x4 homogeneous matrix.
Manages the organisation and rendering of a 'scene' i.e.
size_t physicalIndex
The target (physical) constant index.
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...
Collects together the program parameters used for a GpuProgram.
const Vector4 & getCustomParameter(size_t index) const
Gets the custom value associated with this Renderable at the given index.
virtual bool getCastsShadows(void) const
Method which reports whether this renderable would normally cast a shadow.
virtual bool getPolygonModeOverrideable(void) const
Gets whether this renderable's chosen detail level can be overridden (downgraded) by the camera setti...
virtual void setRenderSystemData(RenderSystemData *val) const
Sets RenderSystem private data.
virtual ~Visitor()
Virtual destructor needed as class has virtual methods.
virtual void postRender(SceneManager *sm, RenderSystem *rsys)
Called immediately after the Renderable has been rendered.
4-dimensional homogeneous vector.
virtual OGRE_DEPRECATED void setUserAny(const Any &anything)
Visitor object that can be used to iterate over a collection of Renderable instances abstractly.
An internal class that should be used only by a render system for internal use.
Abstract class defining the interface all renderable objects must implement.
virtual unsigned short getNumWorldTransforms(void) const
Returns the number of world transform matrices this renderable requires.
UserObjectBindings mUserObjectBindings
const UserObjectBindings & getUserObjectBindings() const
Return an instance of user objects binding associated with this class.
float Real
Software floating point type.
RenderSystemData * mRenderSystemData
User objects binding.
bool getUseIdentityView(void) const
Returns whether or not to use an 'identity' view.
#define OGRE_EXCEPT(num, desc, src)
void removeCustomParameter(size_t index)
Removes a custom value which is associated with this Renderable at the given index.
'New' rendering operation using vertex buffers.
virtual RenderSystemData * getRenderSystemData() const
Gets RenderSystem private data.
bool getUseIdentityProjection(void) const
Returns whether or not to use an 'identity' projection.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Tue Apr 13 2021 08:53:15