Rigs of Rods 2026.01
Soft-body Physics Simulation
Loading...
Searching...
No Matches
Public Member Functions
AngelOgre::ManualObject Class Reference

Description

Geometry built by the script, vertex by vertex.

Binding of Ogre::ManualObject.

Remarks
Create one with SceneManager::createManualObject() and attach it to a SceneNode. Each section is defined by begin(), followed by vertices (position() first, then optionally normal(), textureCoord(), colour()), optionally index()es, and finally end().
It is a MovableObject - the handle converts implicitly, and MovableObject handles can be cast back.

Definition at line 20 of file AngelOgre_ManualObject.h.

Public Member Functions

void begin (const string &in materialName, RenderOperation opType, const string &in rg)
 
void beginUpdate ()
 
void position (const vector3 &in pos)
 
void normal (const vector3 &in norm)
 
void textureCoord (float u, float v)
 
void textureCoord (const vector2 &in uv)
 
void textureCoord (const vector3 &in uvw)
 
void colour (const color &in col)
 
void index (uint32 idx)
 
void end ()
 
uint getCurrentVertexCount ()
 
void getCurrentIndexCount ()
 
MeshPtr convertToMesh (const string &in name, const string &in group='General')
 

Member Function Documentation

◆ begin()

void AngelOgre::ManualObject::begin ( const string &in  materialName,
RenderOperation  opType,
const string &in  rg 
)

Starts defining a new section.

Parameters
materialNameMaterial to use for this section.
opTypeType of primitives, see RenderOperation.
rgResource group of the material.

◆ beginUpdate()

void AngelOgre::ManualObject::beginUpdate ( )

Starts re-defining an existing section (the next one), for dynamic geometry.

◆ colour()

void AngelOgre::ManualObject::colour ( const color &in  col)

Sets the colour of the current vertex.

◆ convertToMesh()

MeshPtr AngelOgre::ManualObject::convertToMesh ( const string &in  name,
const string &in  group = 'General' 
)

Converts the geometry to a mesh, which can then be used to create entities.

Parameters
nameName of the new mesh.
groupResource group of the new mesh.

◆ end()

void AngelOgre::ManualObject::end ( )

Finishes the current section.

◆ getCurrentIndexCount()

void AngelOgre::ManualObject::getCurrentIndexCount ( )

Number of indices in the section being defined.

Warning
Currently broken - the binding is declared to return void.

◆ getCurrentVertexCount()

uint AngelOgre::ManualObject::getCurrentVertexCount ( )

Number of vertices in the section being defined.

◆ index()

void AngelOgre::ManualObject::index ( uint32  idx)

Adds a vertex index; if you don't add any, vertices are used in order.

◆ normal()

void AngelOgre::ManualObject::normal ( const vector3 &in  norm)

Sets the normal of the current vertex.

◆ position()

void AngelOgre::ManualObject::position ( const vector3 &in  pos)

Adds a vertex at the given position; call the other vertex attribute methods after this.

◆ textureCoord() [1/3]

void AngelOgre::ManualObject::textureCoord ( const vector2 &in  uv)

Sets a 2D texture coordinate of the current vertex.

◆ textureCoord() [2/3]

void AngelOgre::ManualObject::textureCoord ( const vector3 &in  uvw)

Sets a 3D texture coordinate of the current vertex.

◆ textureCoord() [3/3]

void AngelOgre::ManualObject::textureCoord ( float  u,
float  v 
)

Sets a 2D texture coordinate of the current vertex.


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