Project

General

Profile

SO3Engine

#include <SO3Physics.h>

Public Member Functions

 SPhysicWorld (SScene *scene)
 
 ~SPhysicWorld ()
 
OgreNewt::WorldGetPhysicWorld ()
 
const SSceneGetScene ()
 
bool GetPhysicWorldEnable ()
 
void SetPhysicWorldEnable (const bool &enable)
 
bool GetPhysicDebugEnable ()
 
void SetPhysicDebugEnable (const bool &enable)
 
void SetPhysicFPS (const int &fps)
 
int GetPhysicFPS ()
 
void UpdatePhysic (const float &frameTime)
 
OgreNewt::DebuggerGetPhysicDebugger ()
 
void ResetPhysicWorld ()
 
void SetPhysicBodiesInitialState ()
 
void SetPhysicSolverModel (const int &mod)
 
int GetPhysicSolverModel ()
 
void SetPhysicPlatformArchitecture (const int &mod)
 
int GetPhysicPlatformArchitecture ()
 
void SetPhysicGravity (const Ogre::Vector3 &gravity)
 
Ogre::Vector3 GetPhysicGravity ()
 
bool GetResetPhysicWorld ()
 
void SetResetPhysicWorld (const bool &state)
 
SBodyPhysicsRayCast (const Ogre::Vector3 &src, const Ogre::Vector3 &dir, const Ogre::Real &maxdist, Ogre::Real &hitdistance, Ogre::Vector3 &hitnormal)
 
std::vector< MRAYINFOPhysicsRayCast (const Ogre::Vector3 &src, const Ogre::Vector3 &dir, const Ogre::Real &maxdist)
 
void SetPhysicWorldSize (const Ogre::Vector3 &minsize, const Ogre::Vector3 &maxsize)
 
void GetPhysicWorldSize (Ogre::Vector3 &minsize, Ogre::Vector3 &maxsize)
 
SMaterialIDCreatePhysicMaterialID (const std::string &materialIdName)
 
void DeletePhysicMaterialID (SMaterialID *matID)
 
unsigned int GetMaxBodyPair ()
 
SMaterialPairCreatePhysicMaterialPair (SMaterialID *mat1, SMaterialID *mat2)
 
void DeletePhysicMaterialPair (SMaterialPair *matpair)
 
bool GetBodyPairExist (SBody *b0, SBody *b1)
 
unsigned int GetBodyPairSize ()
 
void AddBodyPair (std::string name, SBody **pair)
 
void RemoveBodyPair (SBody *body)
 
void AddPhysicContraint (SPhysicContraint *contraint)
 
void ClearPhysicContraint ()
 
PhysicContraintList GetPhysicContraintList ()
 
void RemovePhysicContraint (SPhysicContraint *contraint)
 
void RemoveBodyContraint (SBody *body)
 
void ClearBodyPairs ()
 
void ClearContactOverlapStart ()
 
void AddContactOverlapStart (std::string name, MCOLL *coll)
 
void ClearContactActivated ()
 
void SetContactActivated (SBody *b0, SBody *b1, MCOLL *coll)
 
void ApplyImpulsePoint (Ogre::Vector3 pos, Ogre::Real radius, Ogre::Real strength)
 

Static Public Member Functions

static void PreUpdate (const NewtonWorld *const world, void *const listenerUserData, dFloat timestep)
 
static void PostUpdate (const NewtonWorld *const world, void *const listenerUserData, dFloat timestep)
 
static int ImpulsePointCallback (const NewtonBody *const body, void *const userData)
 

Public Attributes

bool showPhysicsLine
 
SMaterialPairMap listOfPhysicsMaterialPair
 
SMaterialIDMap listOfMaterialID
 

Protected Member Functions

void LeaveWorldCallBack (OgreNewt::Body *, int threadIndex)
 

Protected Attributes

std::mutex mutexUpdate
 

Detailed Description

Definition at line 99 of file SO3Physics.h.

Constructor & Destructor Documentation

◆ SPhysicWorld()

SO3::SPhysicWorld::SPhysicWorld ( SScene scene)

Constructor.

Definition at line 35 of file SO3Physics.cpp.

◆ ~SPhysicWorld()

SO3::SPhysicWorld::~SPhysicWorld ( )

Destructor.

Definition at line 41 of file SO3Physics.cpp.

Member Function Documentation

◆ AddBodyPair()

void SO3::SPhysicWorld::AddBodyPair ( std::string  name,
SBody **  pair 
)

Definition at line 624 of file SO3Physics.cpp.

◆ AddContactOverlapStart()

void SO3::SPhysicWorld::AddContactOverlapStart ( std::string  name,
MCOLL coll 
)

Definition at line 733 of file SO3Physics.cpp.

◆ AddPhysicContraint()

void SO3::SPhysicWorld::AddPhysicContraint ( SPhysicContraint contraint)

Definition at line 670 of file SO3Physics.cpp.

◆ ApplyImpulsePoint()

void SO3::SPhysicWorld::ApplyImpulsePoint ( Ogre::Vector3  pos,
Ogre::Real  radius,
Ogre::Real  strength 
)

Definition at line 805 of file SO3Physics.cpp.

◆ ClearBodyPairs()

void SO3::SPhysicWorld::ClearBodyPairs ( )

Definition at line 657 of file SO3Physics.cpp.

◆ ClearContactActivated()

void SO3::SPhysicWorld::ClearContactActivated ( )

Definition at line 739 of file SO3Physics.cpp.

◆ ClearContactOverlapStart()

void SO3::SPhysicWorld::ClearContactOverlapStart ( )

Definition at line 717 of file SO3Physics.cpp.

◆ ClearPhysicContraint()

void SO3::SPhysicWorld::ClearPhysicContraint ( )

Definition at line 686 of file SO3Physics.cpp.

◆ CreatePhysicMaterialID()

SMaterialID * SO3::SPhysicWorld::CreatePhysicMaterialID ( const std::string &  materialIdName)

Create a new physic SMaterialID

Definition at line 530 of file SO3Physics.cpp.

◆ CreatePhysicMaterialPair()

SMaterialPair * SO3::SPhysicWorld::CreatePhysicMaterialPair ( SMaterialID mat1,
SMaterialID mat2 
)

Create a new physic SMaterialPair

Definition at line 574 of file SO3Physics.cpp.

◆ DeletePhysicMaterialID()

void SO3::SPhysicWorld::DeletePhysicMaterialID ( SMaterialID matID)

Delete a physic SMaterialID

Definition at line 539 of file SO3Physics.cpp.

◆ DeletePhysicMaterialPair()

void SO3::SPhysicWorld::DeletePhysicMaterialPair ( SMaterialPair matpair)

Delete a physic SMaterialPair

Definition at line 583 of file SO3Physics.cpp.

◆ GetBodyPairExist()

bool SO3::SPhysicWorld::GetBodyPairExist ( SBody b0,
SBody b1 
)

Definition at line 611 of file SO3Physics.cpp.

◆ GetBodyPairSize()

unsigned int SO3::SPhysicWorld::GetBodyPairSize ( )

Definition at line 630 of file SO3Physics.cpp.

◆ GetMaxBodyPair()

unsigned int SO3::SPhysicWorld::GetMaxBodyPair ( )

Definition at line 606 of file SO3Physics.cpp.

◆ GetPhysicContraintList()

PhysicContraintList SO3::SPhysicWorld::GetPhysicContraintList ( )

Definition at line 681 of file SO3Physics.cpp.

◆ GetPhysicDebugEnable()

bool SO3::SPhysicWorld::GetPhysicDebugEnable ( )

Definition at line 148 of file SO3Physics.cpp.

◆ GetPhysicDebugger()

OgreNewt::Debugger * SO3::SPhysicWorld::GetPhysicDebugger ( )

Definition at line 181 of file SO3Physics.cpp.

◆ GetPhysicFPS()

int SO3::SPhysicWorld::GetPhysicFPS ( )

Definition at line 454 of file SO3Physics.cpp.

◆ GetPhysicGravity()

Ogre::Vector3 SO3::SPhysicWorld::GetPhysicGravity ( )

Definition at line 437 of file SO3Physics.cpp.

◆ GetPhysicPlatformArchitecture()

int SO3::SPhysicWorld::GetPhysicPlatformArchitecture ( )

Definition at line 426 of file SO3Physics.cpp.

◆ GetPhysicSolverModel()

int SO3::SPhysicWorld::GetPhysicSolverModel ( )

Definition at line 416 of file SO3Physics.cpp.

◆ GetPhysicWorld()

OgreNewt::World * SO3::SPhysicWorld::GetPhysicWorld ( )

Definition at line 93 of file SO3Physics.cpp.

◆ GetPhysicWorldEnable()

bool SO3::SPhysicWorld::GetPhysicWorldEnable ( )

Definition at line 122 of file SO3Physics.cpp.

◆ GetPhysicWorldSize()

void SO3::SPhysicWorld::GetPhysicWorldSize ( Ogre::Vector3 &  minsize,
Ogre::Vector3 &  maxsize 
)

Definition at line 523 of file SO3Physics.cpp.

◆ GetResetPhysicWorld()

bool SO3::SPhysicWorld::GetResetPhysicWorld ( )

Definition at line 459 of file SO3Physics.cpp.

◆ GetScene()

const SScene * SO3::SPhysicWorld::GetScene ( )

Definition at line 98 of file SO3Physics.cpp.

◆ ImpulsePointCallback()

int SO3::SPhysicWorld::ImpulsePointCallback ( const NewtonBody *const  body,
void *const  userData 
)
static

Definition at line 773 of file SO3Physics.cpp.

◆ LeaveWorldCallBack()

void SO3::SPhysicWorld::LeaveWorldCallBack ( OgreNewt::Body body,
int  threadIndex 
)
protected

Definition at line 590 of file SO3Physics.cpp.

◆ PhysicsRayCast() [1/2]

std::vector< MRAYINFO > SO3::SPhysicWorld::PhysicsRayCast ( const Ogre::Vector3 &  src,
const Ogre::Vector3 &  dir,
const Ogre::Real &  maxdist 
)

Definition at line 489 of file SO3Physics.cpp.

◆ PhysicsRayCast() [2/2]

SBody * SO3::SPhysicWorld::PhysicsRayCast ( const Ogre::Vector3 &  src,
const Ogre::Vector3 &  dir,
const Ogre::Real &  maxdist,
Ogre::Real &  hitdistance,
Ogre::Vector3 &  hitnormal 
)

Definition at line 469 of file SO3Physics.cpp.

◆ PostUpdate()

void SO3::SPhysicWorld::PostUpdate ( const NewtonWorld *const  world,
void *const  listenerUserData,
dFloat  timestep 
)
static

Definition at line 112 of file SO3Physics.cpp.

◆ PreUpdate()

void SO3::SPhysicWorld::PreUpdate ( const NewtonWorld *const  world,
void *const  listenerUserData,
dFloat  timestep 
)
static

Definition at line 103 of file SO3Physics.cpp.

◆ RemoveBodyContraint()

void SO3::SPhysicWorld::RemoveBodyContraint ( SBody body)

Definition at line 697 of file SO3Physics.cpp.

◆ RemoveBodyPair()

void SO3::SPhysicWorld::RemoveBodyPair ( SBody body)

Definition at line 635 of file SO3Physics.cpp.

◆ RemovePhysicContraint()

void SO3::SPhysicWorld::RemovePhysicContraint ( SPhysicContraint contraint)

Definition at line 675 of file SO3Physics.cpp.

◆ ResetPhysicWorld()

void SO3::SPhysicWorld::ResetPhysicWorld ( )

Definition at line 356 of file SO3Physics.cpp.

◆ SetContactActivated()

void SO3::SPhysicWorld::SetContactActivated ( SBody b0,
SBody b1,
MCOLL coll 
)

Definition at line 755 of file SO3Physics.cpp.

◆ SetPhysicBodiesInitialState()

void SO3::SPhysicWorld::SetPhysicBodiesInitialState ( )

Definition at line 394 of file SO3Physics.cpp.

◆ SetPhysicDebugEnable()

void SO3::SPhysicWorld::SetPhysicDebugEnable ( const bool &  enable)

Definition at line 153 of file SO3Physics.cpp.

◆ SetPhysicFPS()

void SO3::SPhysicWorld::SetPhysicFPS ( const int &  fps)

Definition at line 442 of file SO3Physics.cpp.

◆ SetPhysicGravity()

void SO3::SPhysicWorld::SetPhysicGravity ( const Ogre::Vector3 &  gravity)

Definition at line 432 of file SO3Physics.cpp.

◆ SetPhysicPlatformArchitecture()

void SO3::SPhysicWorld::SetPhysicPlatformArchitecture ( const int &  mod)

Definition at line 421 of file SO3Physics.cpp.

◆ SetPhysicSolverModel()

void SO3::SPhysicWorld::SetPhysicSolverModel ( const int &  mod)

Definition at line 410 of file SO3Physics.cpp.

◆ SetPhysicWorldEnable()

void SO3::SPhysicWorld::SetPhysicWorldEnable ( const bool &  enable)

Definition at line 127 of file SO3Physics.cpp.

◆ SetPhysicWorldSize()

void SO3::SPhysicWorld::SetPhysicWorldSize ( const Ogre::Vector3 &  minsize,
const Ogre::Vector3 &  maxsize 
)

Definition at line 517 of file SO3Physics.cpp.

◆ SetResetPhysicWorld()

void SO3::SPhysicWorld::SetResetPhysicWorld ( const bool &  state)

Definition at line 464 of file SO3Physics.cpp.

◆ UpdatePhysic()

void SO3::SPhysicWorld::UpdatePhysic ( const float &  frameTime)

Definition at line 186 of file SO3Physics.cpp.

Member Data Documentation

◆ listOfMaterialID

SMaterialIDMap SO3::SPhysicWorld::listOfMaterialID

Definition at line 104 of file SO3Physics.h.

◆ listOfPhysicsMaterialPair

SMaterialPairMap SO3::SPhysicWorld::listOfPhysicsMaterialPair

Definition at line 103 of file SO3Physics.h.

◆ mutexUpdate

std::mutex SO3::SPhysicWorld::mutexUpdate
protected

Definition at line 106 of file SO3Physics.h.

◆ showPhysicsLine

bool SO3::SPhysicWorld::showPhysicsLine

Definition at line 102 of file SO3Physics.h.


The documentation for this class was generated from the following files: