SO3Engine
|
OgreNewt_CollisionSerializer.cpp
Go to the documentation of this file.
18 void CollisionSerializer::exportCollision(const CollisionPtr& collision, const Ogre::String& filename)
21 OGRE_EXCEPT(Ogre::Exception::ERR_INVALIDPARAMS, "Argument collision is NULL","CollisionSerializer::exportCollision");
28 OGRE_EXCEPT(Ogre::Exception::ERR_INVALIDPARAMS, "Unable to open file " + filename + " for writing","CollisionSerializer::exportCollision");
31 NewtonCollisionSerialize(collision->getWorld()->getNewtonWorld(), collision->m_col, &CollisionSerializer::_newtonSerializeCallback, this);
37 NewtonCollisionSerialize(collision->getWorld()->getNewtonWorld(), collision->m_col, &CollisionSerializer::_newtonSerializeCallback, this);
49 //CollisionPtr CollisionSerializer::importCollision(Ogre::DataStreamPtr& stream, OgreNewt::World* world)
50 CollisionPtr CollisionSerializer::importCollision(Ogre::DataStream& stream, OgreNewt::World* world)
54 NewtonCollision* col = NewtonCreateCollisionFromSerialization(world->getNewtonWorld(), &CollisionSerializer::_newtonDeserializeCallback, &stream);
101 void CollisionSerializer::_newtonSerializeCallback(void* serializeHandle, const void* buffer, int size)
108 void CollisionSerializer::_newtonDeserializeCallback(void* deserializeHandle, void* buffer, int size)
CollisionPrimitiveType getCollisionPrimitiveType() const
Returns the Collisiontype for this Collision.
Definition OgreNewt_Collision.h:95
standard primitive Box.
Definition OgreNewt_CollisionPrimitives.h:45
standard primitive capsule.
Definition OgreNewt_CollisionPrimitives.h:126
filled-donut shape primitive.
Definition OgreNewt_CollisionPrimitives.h:182
create a compound from several collision pieces.
Definition OgreNewt_CollisionPrimitives.h:432
standard primitive cone.
Definition OgreNewt_CollisionPrimitives.h:154
ConvexHull primitive.
Definition OgreNewt_CollisionPrimitives.h:213
standard primitive cylinder.
Definition OgreNewt_CollisionPrimitives.h:98
standard primitive Ellipsoid.
Definition OgreNewt_CollisionPrimitives.h:71
null collision (results in no collision)
Definition OgreNewt_CollisionPrimitives.h:33
TreeCollision - complex polygonal collision.
Definition OgreNewt_CollisionPrimitives.h:305
OgreNewt::CollisionPtr importCollision(Ogre::DataStream &stream, OgreNewt::World *world)
Definition OgreNewt_CollisionSerializer.cpp:50
void exportCollision(const OgreNewt::CollisionPtr &collision, const Ogre::String &filename)
Definition OgreNewt_CollisionSerializer.cpp:18
NewtonWorld * getNewtonWorld() const
retrieves a pointer to the NewtonWorld
Definition OgreNewt_World.h:284
@ CompoundCollisionPrimitiveType
Definition OgreNewt_Collision.h:31
@ ChamferCylinderPrimitiveType
Definition OgreNewt_Collision.h:33
Generated by 1.9.8