ManualObject - return/read section index

Minor issues with the Ogre API that can be trivial to fix
User avatar
Beauty
OGRE Community Helper
OGRE Community Helper
Posts: 767
Joined: Wed Oct 10, 2007 2:36 pm
Location: Germany
x 39

ManualObject - return/read section index

Post by Beauty »

It would be useful to have an option to receive the section index number of a ManualObjects section.
It's needed for ManualObject.BeginUpdate(sectionNumber).

First way would be:
ManualObject.Update() returns the value as integer.

Second way would be:
ManualObjectSection would have a property (or get method) to receive the section number.

By the way - here is a related quote with an usage example:
SpaceDude wrote: I was just looking through the ManualObject class and I thought it would be nice if the function:

void Ogre::ManualObject::begin

would return an int which refers to the section number so that it can subsequently be passed to

void Ogre::ManualObject::beginUpdate(size_t sectionIndex)



So the following code would be possible:

Code: Select all

int iHeadSection = ManObj->begin(...);
// create head section...
ManObj->end(...);

int iBodySection = ManObj->begin(...);
// create body section...
ManObj->end(...);

ManObj->beginUpdate(iHeadSection);
// update body section...
ManObj->end(...);

Help to add information to the wiki. Also tiny edits will let it grow ... :idea:
Add your country to your profile ... it's interesting to know from where of the world you are.