Bullet Physics Block Toy
Game Physics with a 3D Physics Engine
Loading...
Searching...
No Matches
GameDefines.h File Reference

Game specific defines. More...

#include "SageDefines.h"
#include "btBulletDynamicsCommon.h"
Include dependency graph for GameDefines.h:
This graph shows which files directly or indirectly include this file:

Enumerations

enum class  eMesh {
  BigSphere , Sphere , Plane , Box ,
  Tetrahedron , Teapot , Icosahedron , Dodecahedron ,
  Model , Unknown , Size
}
 Mesh type. More...
 
enum class  eModel { Container , Crate , Unknown }
 Model type. More...
 
enum class  eObject {
  Moon , Ball , Floor , Box ,
  Tetrahedron , Teapot , Icosahedron , Dodecahedron ,
  Container , Crate , Unknown , Size
}
 Object type. More...
 
enum class  eCollisionShape { Sphere , Box , ConvexHull , None }
 Collision shape type. More...
 
enum class  eSound {
  Clang , Click , TapLight , TapHard ,
  ThumpLight , ThumpMedium , ThumpHard
}
 Sound enumerated type. More...
 

Functions

float PW2RW (btScalar x)
 Physics World to Render World units for a float. Physics World to Render World units for a float.
 
Vector3 PW2RW (const btVector3 &v)
 Physics World to Render World units for a 3D vector. Physics World to Render World units for a 3D vector.
 
Quaternion PW2RW (const btQuaternion &q)
 Physics World to Render World units for a quaternion. Physics World to Render World units for a quaternion.
 
btScalar RW2PW (float x)
 Render World to Physics World units for a float. Render World to Physics World units for a float.
 
btScalar RW2PW (int x)
 Render World to Physics World units for an int. Render World to Physics World units for an integer.
 
btVector3 RW2PW (int x, int y, int z)
 Render World to Physics World units for a pair of integers. Render World to Physics World units for a 2D vector provided as an integer triple.
 
btVector3 RW2PW (const Vector3 &v)
 Physics World to Render World units for a 3D vector.
 
btQuaternion RW2PW (const Quaternion &q)
 Render World to Physics World units for a quaternion. Render World to Physics World units for a quaternion.
 

Variables

const float fPRV = 1.0f
 Physics World to Render World rescale value.
 

Detailed Description

Various enumerated types and functions that map between Physics World and Render World.

Enumeration Type Documentation

◆ eCollisionShape

enum class eCollisionShape
strong

Collision shape enumerated type.

◆ eMesh

enum class eMesh
strong

Mesh enumerated type.

◆ eModel

enum class eModel
strong

Model enumerated type.

◆ eObject

enum class eObject
strong

Object enumerated type.

◆ eSound

enum class eSound
strong

An enumerated type for the sounds, which will be cast to an unsigned integer and used for the index of the corresponding sample. Size must be last.

Function Documentation

◆ PW2RW() [1/3]

float PW2RW ( btScalar x)
inline
Parameters
xA floating point value in Physics World units.
Returns
The equivalent value in Render World units.
Here is the caller graph for this function:

◆ PW2RW() [2/3]

Quaternion PW2RW ( const btQuaternion & q)
inline
Parameters
qA quaternion in Physics World units.
Returns
The equivalent quaternion in Render World units.

◆ PW2RW() [3/3]

Vector3 PW2RW ( const btVector3 & v)
inline
Parameters
vA 3D vector in Physics World units.
Returns
The equivalent vector in Render World units.

◆ RW2PW() [1/5]

btQuaternion RW2PW ( const Quaternion & q)
inline
Parameters
qA quaternion in Render World units.
Returns
The equivalent quaternion in Physics World units.

◆ RW2PW() [2/5]

btVector3 RW2PW ( const Vector3 & v)
inline
Parameters
vA 3D vector in Render World units.
Returns
The equivalent 3D vector in Physics World units.

◆ RW2PW() [3/5]

btScalar RW2PW ( float x)
inline
Parameters
xA floating point value in Render World units.
Returns
The equivalent value in Physics World units.
Here is the caller graph for this function:

◆ RW2PW() [4/5]

btScalar RW2PW ( int x)
inline
Parameters
xAn integer value in Render World units.
Returns
The equivalent floating point value in Physics World units.

◆ RW2PW() [5/5]

btVector3 RW2PW ( int x,
int y,
int z )
inline
Parameters
xAn integer value in Render World units.
yAn integer value in Render World units.
zAn integer value in Render World units.
Returns
The equivalent 3D vector in Physics World units.