32#ifndef __SO3PHYSICS_H__
33#define __SO3PHYSICS_H__
63 normal = Ogre::Vector3::ZERO;
64 force = Ogre::Vector3::ZERO;
79 normal = Ogre::Vector3::ZERO;
92 position = Ogre::Vector3(0.0f, 0.0f, 0.0f);
113 bool worldDebuggerIsInit;
114 Ogre::Vector3 mGravity;
117 unsigned int maxBodyPair;
118 bool mResetPhysicWorld;
217 SBody*
PhysicsRayCast(
const Ogre::Vector3& src,
const Ogre::Vector3& dir,
const Ogre::Real& maxdist, Ogre::Real& hitdistance, Ogre::Vector3& hitnormal);
221 std::vector<MRAYINFO>
PhysicsRayCast(
const Ogre::Vector3& src,
const Ogre::Vector3& dir,
const Ogre::Real& maxdist);
311 static void PreUpdate(
const NewtonWorld*
const world,
void*
const listenerUserData, dFloat timestep);
312 static void PostUpdate(
const NewtonWorld*
const world,
void*
const listenerUserData, dFloat timestep);
315 void ApplyImpulsePoint(Ogre::Vector3 pos, Ogre::Real radius, Ogre::Real strength);
329 void initNewtonWorld();
float mod(float _a, float _b)
main class for all Rigid Bodies in the system.
For viewing the Newton rigid bodies visually.
represents a physics world.
const SScene * GetScene()
SMaterialPair * CreatePhysicMaterialPair(SMaterialID *mat1, SMaterialID *mat2)
static void PostUpdate(const NewtonWorld *const world, void *const listenerUserData, dFloat timestep)
bool GetPhysicDebugEnable()
SMaterialPairMap listOfPhysicsMaterialPair
static int ImpulsePointCallback(const NewtonBody *const body, void *const userData)
void SetPhysicWorldSize(const Ogre::Vector3 &minsize, const Ogre::Vector3 &maxsize)
void ClearContactActivated()
void LeaveWorldCallBack(OgreNewt::Body *, int threadIndex)
static void PreUpdate(const NewtonWorld *const world, void *const listenerUserData, dFloat timestep)
void RemoveBodyPair(SBody *body)
void AddBodyPair(std::string name, SBody **pair)
void SetPhysicDebugEnable(const bool &enable)
void UpdatePhysic(const float &frameTime)
void AddPhysicContraint(SPhysicContraint *contraint)
SMaterialID * CreatePhysicMaterialID(const std::string &materialIdName)
void ClearContactOverlapStart()
void SetPhysicPlatformArchitecture(const int &mod)
void SetPhysicSolverModel(const int &mod)
void GetPhysicWorldSize(Ogre::Vector3 &minsize, Ogre::Vector3 &maxsize)
bool GetPhysicWorldEnable()
void SetContactActivated(SBody *b0, SBody *b1, MCOLL *coll)
unsigned int GetBodyPairSize()
bool GetBodyPairExist(SBody *b0, SBody *b1)
void SetPhysicWorldEnable(const bool &enable)
void SetPhysicFPS(const int &fps)
void SetResetPhysicWorld(const bool &state)
void ApplyImpulsePoint(Ogre::Vector3 pos, Ogre::Real radius, Ogre::Real strength)
SMaterialIDMap listOfMaterialID
void RemovePhysicContraint(SPhysicContraint *contraint)
OgreNewt::Debugger * GetPhysicDebugger()
PhysicContraintList GetPhysicContraintList()
int GetPhysicSolverModel()
int GetPhysicPlatformArchitecture()
OgreNewt::World * GetPhysicWorld()
void SetPhysicBodiesInitialState()
SBody * PhysicsRayCast(const Ogre::Vector3 &src, const Ogre::Vector3 &dir, const Ogre::Real &maxdist, Ogre::Real &hitdistance, Ogre::Vector3 &hitnormal)
bool GetResetPhysicWorld()
void RemoveBodyContraint(SBody *body)
void ClearPhysicContraint()
Ogre::Vector3 GetPhysicGravity()
void SetPhysicGravity(const Ogre::Vector3 &gravity)
void AddContactOverlapStart(std::string name, MCOLL *coll)
void DeletePhysicMaterialID(SMaterialID *matID)
void DeletePhysicMaterialPair(SMaterialPair *matpair)
unsigned int GetMaxBodyPair()
std::unordered_set< SMaterialPair * > SMaterialPairMap
std::set< SPhysicContraint * > PhysicContraintList
std::unordered_map< std::string, MCOLL * > PhysicContactMap
std::unordered_map< std::string, SBody ** > BodyPairMap
std::unordered_map< std::string, SMaterialID * > SMaterialIDMap