OGRE-Next: Ogre::Volume::MeshBuilder Class Reference

| OGRE-Next 3.0.0 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
Ogre::Volume::MeshBuilder Class Reference

Class to build up a mesh with vertices and indices. More...

`#include <OgreVolumeMeshBuilder.h>`

Inheritance diagram for Ogre::Volume::MeshBuilder:
[legend]

## Public Member Functions
| MeshBuilder ()
| Constructor.
void | addTriangle (const Vector3 &v0, const Vector3 &n0, const Vector3 &v1, const Vector3 &n1, const Vector3 &v2, const Vector3 &n2)
| Adds a triangle to the mesh with reusing already existent vertices via their index.
void | executeCallback (MeshBuilderCallback *callback, const SimpleRenderable *simpleRenderable, size_t level, int inProcess) const
| Executes a MeshBuilderCallback on this instance.
size_t | generateBuffers (RenderOperation &operation)
| Generates the vertex- and indexbuffer of this mesh on the given RenderOperation.
Entity * | generateWithManualObject (SceneManager *sceneManager, const String &name, const String &material)
| Generates an entity via a ManualObject.
AxisAlignedBox | getBoundingBox ()
| Gets the bounding box of the mesh.

## Static Public Member Functions
static void | addCubeToManualObject (ManualObject *manual, const Vector3 &c0, const Vector3 &c1, const Vector3 &c2, const Vector3 &c3, const Vector3 &c4, const Vector3 &c5, const Vector3 &c6, const Vector3 &c7, uint32 &baseIndex)
| Adds a cube to a manual object rendering lines.

## Detailed Description

Class to build up a mesh with vertices and indices.

## Constructor & Destructor Documentation

## ◆ MeshBuilder()

Ogre::Volume::MeshBuilder::MeshBuilder | ( |  | ) |

Constructor.

## Member Function Documentation

## ◆ addCubeToManualObject()

static void Ogre::Volume::MeshBuilder::addCubeToManualObject | ( | ManualObject * | manual,
|  | const Vector3 & | c0,
|  | const Vector3 & | c1,
|  | const Vector3 & | c2,
|  | const Vector3 & | c3,
|  | const Vector3 & | c4,
|  | const Vector3 & | c5,
|  | const Vector3 & | c6,
|  | const Vector3 & | c7,
|  | uint32 & | baseIndex )
| inlinestatic

Adds a cube to a manual object rendering lines.

Corner numeration: 4 5 7 6 0 1 3 2

Parameters

  manual | The manual for the cube lines.
  c0 | The corner 0.
  c1 | The corner 1.
  c2 | The corner 2.
  c3 | The corner 3.
  c4 | The corner 4.
  c5 | The corner 5.
  c6 | The corner 6.
  c7 | The corner 7.
  baseIndex | The next free index of this manual object. Is incremented by 8 in this function.

References Ogre::ManualObject::index(), and Ogre::ManualObject::position().

## ◆ addTriangle()

void Ogre::Volume::MeshBuilder::addTriangle | ( | const Vector3 & | v0,
|  | const Vector3 & | n0,
|  | const Vector3 & | v1,
|  | const Vector3 & | n1,
|  | const Vector3 & | v2,
|  | const Vector3 & | n2 )
| inline

Adds a triangle to the mesh with reusing already existent vertices via their index.

Parameters

  v0 | The first vertex of the triangle.
  n0 | The normal of the first vertex.
  v1 | The second vertex of the triangle.
  n1 | The normal of the second vertex.
  v2 | The third vertex of the triangle.
  n2 | The normal of the third vertex.

## ◆ executeCallback()

void Ogre::Volume::MeshBuilder::executeCallback | ( | MeshBuilderCallback * | callback,
|  | const SimpleRenderable * | simpleRenderable,
|  | size_t | level,
|  | int | inProcess ) const

Executes a MeshBuilderCallback on this instance.

Parameters

  callback | The callback to execute.
  simpleRenderable | Contains the SimpleRenderable for which the triangles were built.
  level | The LOD level of this mesh.
  inProcess | The amount of other meshes/LOD-Chunks still to be loaded.

## ◆ generateBuffers()

size_t Ogre::Volume::MeshBuilder::generateBuffers | ( | RenderOperation & | operation | ) |

Generates the vertex- and indexbuffer of this mesh on the given RenderOperation.

Parameters

  operation | The RenderOperation for the buffers.

Returns
  The amount of generated triangles.

## ◆ generateWithManualObject()

Entity * Ogre::Volume::MeshBuilder::generateWithManualObject | ( | SceneManager * | sceneManager,
|  | const String & | name,
|  | const String & | material )

Generates an entity via a ManualObject.

Parameters

  sceneManager | The creating sceneManager.
  name | The name for the entity.
  material | The material to use.

Returns
  The created entity.

## ◆ getBoundingBox()

AxisAlignedBox Ogre::Volume::MeshBuilder::getBoundingBox | ( |  | ) |

Gets the bounding box of the mesh.

Returns
  The bounding box.

The documentation for this class was generated from the following file:

- OgreVolumeMeshBuilder.h