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