Go to the documentation of this file.
29 #ifndef __OgreManualObject_H__
30 #define __OgreManualObject_H__
398 bool extrudeVertices,
Real extrusionDist,
unsigned long flags = 0);
459 bool createSeparateLightCap,
bool isLightCap =
false);
476 bool debugRenderables =
false);
EdgeData * getEdgeList(void)
Implement this method to enable stencil shadows.
virtual ManualObjectSection * end(void)
Finish defining the object and compile the final renderable version.
Temporary vertex structure.
void setMaterialName(const String &name, const String &groupName=ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME)
update the material name in use
virtual void triangle(uint32 i1, uint32 i2, uint32 i3)
Add a set of 3 vertex indices to construct a triangle; this is a shortcut to calling index() 3 times.
virtual void clear(void)
Completely clear the contents of the object.
bool mFirstVertex
First vertex indicator.
ManualObject(const String &name)
virtual size_t getCurrentIndexCount() const
Get the number of indices in the section currently being defined (returns 0 if no section is in progr...
size_t mTempIndexSize
System memory allocation size, in bytes.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
bool get32BitIndices() const
Get whether we need 32-bit indices.
virtual void resizeTempIndexBufferIfNeeded(size_t numInds)
Resize the temp index buffer?
Real getSquaredViewDepth(const Ogre::Camera *) const
virtual void beginUpdate(size_t sectionIndex)
Start the definition of an update to a part of the object.
vector< ShadowRenderable * >::type ShadowRenderableList
A viewpoint from which the scene will be rendered.
void getRenderOperation(RenderOperation &op)
virtual void textureCoord(Real u, Real v, Real w)
Add a texture coordinate to the current vertex.
void getWorldTransforms(Matrix4 *xform) const
Overridden from ShadowRenderable.
virtual void textureCoord(Real x, Real y, Real z, Real w)
Add a texture coordinate to the current vertex.
virtual void resetTempAreas(void)
Delete temp buffers and reset init counts.
ushort mTexCoordIndex
Current texture coordinate.
Real mRadius
Bounding sphere.
bool mAnyIndexed
Any indexed geometry on any sections?
virtual size_t getCurrentVertexCount() const
Get the number of vertices in the section currently being defined (returns 0 if no section is in prog...
Class which represents the renderable aspects of a set of shadow volume faces.
Real getBoundingRadius(void) const
ShadowTechnique
An enumeration of broad shadow techniques.
Concrete IteratorWrapper for nonconst access to the underlying container.
Representation of a dynamic light source in the scene.
virtual void textureCoord(const Vector3 &uvw)
Add a texture coordinate to the current vertex.
~ManualObjectSectionShadowRenderable()
bool getUseIdentityView(void) const
Returns whether or not to use an 'identity' view.
Abstract class defining a movable object in a scene.
void setUseIdentityProjection(bool useIdentityProjection)
Sets whether or not to use an 'identity' projection.
Shared pointer implementation used to share index buffers.
Nested class to allow shadows.
static String AUTODETECT_RESOURCE_GROUP_NAME
Special resource group name which causes resource group to be automatically determined based on searc...
virtual ~ManualObjectSection()
EdgeData * mEdgeList
Edge list, used if stencil shadow casting is enabled.
Class providing a much simplified interface to generating manual objects with custom geometry.
char * mTempVertexBuffer
System-memory buffer whilst we establish the size required.
const String & getMaterialGroup(void) const
Retrieve the material group in use.
HardwareVertexBufferSharedPtr getPositionBuffer(void)
HardwareVertexBufferSharedPtr mPositionBuffer
virtual void copyTempVertexToBuffer(void)
Copy current temp vertex into buffer.
Interface definition for a factory class which produces a certain kind of MovableObject,...
bool getKeepDeclarationOrder() const
Gets whether or not the declaration order is to be kept or not.
size_t mEstVertexCount
Estimated vertex count.
@ OT_TRIANGLE_LIST
A list of triangles, 3 vertices per triangle.
const String & getMovableType(void) const
void visitRenderables(Renderable::Visitor *visitor, bool debugRenderables=false)
Method to allow a caller to abstractly iterate over the Renderable instances that this MovableObject ...
bool mCurrentUpdating
Are we updating?
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
ManualObjectSection * mCurrentSection
Current section.
HardwareVertexBufferSharedPtr mWBuffer
Built, renderable section of geometry.
virtual void rebindIndexBuffer(const HardwareIndexBufferSharedPtr &indexBuffer)
Overridden from ShadowRenderable.
const String & getType(void) const
Get the type of the object to be created.
Summary class collecting together vertex source information.
virtual void textureCoord(Real u, Real v)
Add a texture coordinate to the current vertex.
void setUseIdentityView(bool useIdentityView)
Sets whether or not to use an 'identity' view.
bool mKeepDeclarationOrder
Keep declaration order or let the queue optimize it.
virtual bool getDynamic() const
Gets whether this object is marked as dynamic.
ManualObjectSection(ManualObject *parent, const String &materialName, RenderOperation::OperationType opType, const String &groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME)
virtual void estimateIndexCount(size_t icount)
Estimate the number of indices ahead of time.
#define OGRE_MAX_TEXTURE_COORD_SETS
Define number of texture coordinate sets allowed per vertex.
static String FACTORY_TYPE_NAME
Class encapsulating a standard 4x4 homogeneous matrix.
bool hasEdgeList(void)
Overridden member from ShadowCaster.
void set32BitIndices(bool n32)
Set whether we need 32-bit indices.
bool getUseIdentityProjection(void) const
Returns whether or not to use an 'identity' projection.
bool mUseIdentityProjection
Whether to use identity projection for sections.
Shared pointer implementation used to share vertex buffers.
RenderOperation * getRenderOperation(void)
Retrieve render operation for manipulation.
SectionList mSectionList
List of subsections.
ManualObjectSectionShadowRenderable(ManualObject *parent, HardwareIndexBufferSharedPtr *indexBuffer, const VertexData *vertexData, bool createSeparateLightCap, bool isLightCap=false)
size_t mTempVertexSize
System memory allocation size, in bytes.
static String DEFAULT_RESOURCE_GROUP_NAME
Default resource group name.
const MaterialPtr & getMaterial(void) const
const String & getMaterialName(void) const
Retrieve the material name in use.
size_t mDeclSize
Current declaration vertex size.
A 3D box aligned with the x/y/z axes.
void setBoundingBox(const AxisAlignedBox &box)
Sets the bounding box.
RenderOperation mRenderOperation
virtual void estimateVertexCount(size_t vcount)
Estimate the number of vertices ahead of time.
Factory object for creating ManualObject instances.
virtual void index(uint32 idx)
Add a vertex index to construct faces / lines / points via indexing rather than just by a simple list...
virtual void resizeTempVertexBufferIfNeeded(size_t numVerts)
Resize the temp vertex buffer?
virtual void normal(const Vector3 &norm)
Add a vertex normal to the current vertex.
size_t mEstIndexCount
Estimated index count.
AxisAlignedBox mAABB
Bounding box.
virtual void colour(Real r, Real g, Real b, Real a=1.0f)
Add a vertex colour to a vertex.
ShadowRenderableList mShadowRenderables
List of shadow renderables.
Class representing colour.
virtual void tangent(Real x, Real y, Real z)
Add a vertex tangent to the current vertex.
virtual void position(Real x, Real y, Real z)
Add a vertex position, starting a new vertex at the same time.
4-dimensional homogeneous vector.
ManualObjectSection * getSection(unsigned int index) const
Gets a pointer to a ManualObjectSection, i.e.
Standard 2-dimensional vector.
virtual void colour(const ColourValue &col)
Add a vertex colour to a vertex.
Visitor object that can be used to iterate over a collection of Renderable instances abstractly.
virtual void normal(Real x, Real y, Real z)
Add a vertex normal to the current vertex.
virtual void setMaterialName(size_t subIndex, const String &name, const String &group=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME)
Alter the material for a subsection of this object after it has been specified.
virtual void begin(const String &materialName, RenderOperation::OperationType opType=RenderOperation::OT_TRIANGLE_LIST, const String &groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME)
Start defining a part of the object.
Abstract class defining the interface all renderable objects must implement.
virtual void textureCoord(const Vector4 &xyzw)
Add a texture coordinate to the current vertex.
bool mUseIdentityView
Whether to use identity view for sections.
void setKeepDeclarationOrder(bool keepOrder)
Sets whether or not to keep the original declaration order when queuing the renderables.
const AxisAlignedBox & getBoundingBox(void) const
vector< ManualObjectSection * >::type SectionList
virtual void textureCoord(const Vector2 &uv)
Add a texture coordinate to the current vertex.
float Real
Software floating point type.
const LightList & getLights(void) const
MovableObject * createInstanceImpl(const String &name, const NameValuePairList *params)
Internal implementation of create method - must be overridden.
void destroyInstance(MovableObject *obj)
Destroy an instance of the object.
void getWorldTransforms(Matrix4 *xform) const
This class contains the information required to describe the edge connectivity of a given set of vert...
ShadowRenderableListIterator getShadowVolumeRenderableIterator(ShadowTechnique shadowTechnique, const Light *light, HardwareIndexBufferSharedPtr *indexBuffer, size_t *indexBufferUsedSize, bool extrudeVertices, Real extrusionDist, unsigned long flags=0)
Implement this method to enable stencil shadows.
bool mTempVertexPending
Temp vertex data to copy?
OperationType
The rendering operation type to perform.
virtual void setDynamic(bool dyn)
Use before defining geometry to indicate that you intend to update the geometry regularly and want th...
HardwareVertexBufferSharedPtr getWBuffer(void)
virtual void tangent(const Vector3 &tan)
Add a vertex tangent to the current vertex.
unsigned int getNumSections(void) const
Retrieves the number of ManualObjectSection objects making up this ManualObject.
TempVertex mTempVertex
Temp storage.
void _updateRenderQueue(RenderQueue *queue)
Standard 3-dimensional vector.
virtual void quad(uint32 i1, uint32 i2, uint32 i3, uint32 i4)
Add a set of 4 vertex indices to construct a quad (out of 2 triangles); this is a shortcut to calling...
'New' rendering operation using vertex buffers.
virtual void textureCoord(Real u)
Add a texture coordinate to the current vertex.
Class to manage the scene object rendering queue.
virtual void position(const Vector3 &pos)
Add a vertex position, starting a new vertex at the same time.
uint32 * mTempIndexBuffer
System-memory buffer whilst we establish the size required.
virtual MeshPtr convertToMesh(const String &meshName, const String &groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME)
Convert this object to a Mesh.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.