rewb0rn
25-02-2007 23:04:22
Hi!
At the moment im writing an object system to wrap all the ogreode classes. I want to create a trianglemesh geometry for an object like athene from ogre demo but the geometry doesnt fit the model. I have made a screenshot for this:
Is there a way to solve this without a Transform Geometry? You can see it works fine for SphereGeometry (and for BoxGeometry, too) so I wonder why it changes the position for a trianglemesh geometry...... (the position differ by the position node set for the object (which is used for the entity, the body and the geometry, so if i set the objects position to 0,0,0 the geometry and the model fit.)
Except the creation of the geometry all objects are totally created the same.
Here is some code.
SphereGeometry:
TrimeshGeometry:
At the moment im writing an object system to wrap all the ogreode classes. I want to create a trianglemesh geometry for an object like athene from ogre demo but the geometry doesnt fit the model. I have made a screenshot for this:
Is there a way to solve this without a Transform Geometry? You can see it works fine for SphereGeometry (and for BoxGeometry, too) so I wonder why it changes the position for a trianglemesh geometry...... (the position differ by the position node set for the object (which is used for the entity, the body and the geometry, so if i set the objects position to 0,0,0 the geometry and the model fit.)
Except the creation of the geometry all objects are totally created the same.
Here is some code.
SphereGeometry:
Geometry = static_cast<OgreOde::Geometry*>(new OgreOde::SphereGeometry(Radius, HardwareManager::Get()->GetSpace()));
if (!Geometry) return false;
TrimeshGeometry:
OgreOde::EntityInformer* EntityInformer = new OgreOde::EntityInformer(Entity, Position->_getFullTransform());
Geometry = EntityInformer->createStaticTriangleMesh(HardwareManager::Get()->GetSpace());