Dotsceneoctree and OgreOpcode

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Dotsceneoctree and OgreOpcode

Post by jacmoe »

I am toying with the idea of creating a DotsceneOctreeCollisionShape in OgreOpcode.
I found the following functions:

Code: Select all

int DotSceneManager::GetNumMeshes( char* name ); 
float* DotSceneManager::GetVerticesPtr( char* name, int MeshIndex  ); 
int*  DotSceneManager::GetIndexPtr( char* name, int MeshIndex ); 
int DotSceneManager::GetNumVertices( char* name, int MeshIndex  ); 
int DotSceneManager::GetNumIndex( char* name, int MeshIndex );
If GetNumMeshes returns the number of meshes in the octree, I can generate all needed collision shapes for the level easily.

But how do I know which *mesh* the camera is currently in?
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

I suppose I could use something like this for each DotsceneOctree collisionShape:

Code: Select all

camera->isVisible( node->_getWorldAABB() ) 
Isn't there a more efficient way?
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Post Reply