NLS Engine  v0.1
The Next Logical Step in game engine design.
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Defines
Classes | Typedefs | Enumerations | Functions | Variables
Physics Namespace Reference

Namespace to contain every item that is related to the physics engine. More...

Classes

struct  navPoint
class  ASTARMap
struct  ColliderSphereData
class  ColliderSphere
struct  ComponentLinearVelocityData
struct  SwapMarker
class  ComponentLinearVelocity
struct  HandlerData
class  GridMover
struct  BoundingSphere
struct  AABB
class  InterfaceCollider
class  InterfaceUpdateable
class  PhysicsModule

Typedefs

typedef std::map< Point, STATE > STATEGrid
typedef std::map< Point, navPointNavGrid
typedef std::shared_ptr
< ColliderSphereData
ColliderSphereDataPointer
typedef std::shared_ptr
< ComponentLinearVelocityData
ComponentLinearVelocityDataPointer
typedef Vector3D LINEAR_VELOCITY__VELOCITY_TYPE
typedef float SPHERE_COLLIDER__RADIUS_TYPE
typedef std::set
< ComponentInterface * > 
ComponentListType
typedef std::set
< InterfaceCollider * > 
CollidableListType
typedef std::set
< InterfaceUpdateable * > 
UpdateableListType
typedef D3DXVECTOR3 Vector3D

Enumerations

enum  STATE { SOLID, PICKUP, FREE }

Functions

const std::string GP_PHYSICS_PAUSE ("PhysicsPause")
template<typename T >
void getAttribute (const std::string type, std::map< std::string, boost::any > &attributes, const std::string key, boost::function< bool(T)> setter)
 For standard, single-parameter setters, provides a quick and easy way to reduce an immense number of lines of code in CreateComponent by centralizing all common operations.
template<typename T >
std::pair< bool, T > getAttributeAlt (const std::string type, std::map< std::string, boost::any > &attributes, const std::string key)
 For non-standard setters, provides a relatively quick and easy way to reduce an immense number of lines of code in CreateComponent by centralizing all common operations.
const Vector3D ZERO_VECTOR_3D (0.0f, 0.0f, 0.0f)

Variables

const std::string LINEAR_VELOCITY = "linearvelocity"
const std::string LINEAR_VELOCITY__VELOCITY = "velocity"
const std::string SPHERE_COLLIDER = "spherecollider"
const std::string SPHERE_COLLIDER__RADIUS = "radius"
const bool GP_PHYSICS_PAUSE_DEF = false
const unsigned int ACK_MODULE_LOADED = 3001
 Message sent from the module to indicate that the it has loaded.
const unsigned int MSG_MODULE_START = 3002
 Message sent to the module to start it up.
const unsigned int ACK_MODULE_START = 3003
 Message sent from the module with a status indicator bool that indicate whether the module sucessfully loaded.
const unsigned int MSG_ENTITY_COLLISION = 3100
 Message sent from the module to indicate a collision between the two referenced entities, with the direction and depth of the collision as a Vector3D.
const unsigned int MSG_RAY_CAST = 3500
 Directed message sent to the module to request a ray to be cast and the result to be the names of the collided entities. Sent format is uint raytype, Vector3D source_location, Vector3D direction. Direction doesn't have to be normalized. Ray type is one of the RAY_CAST_* values.
const unsigned int MSG_SCREEN_PICK = 3501
 Directed message sent to the module to request a ray to be cast from screen space and the result to be the names of the collided entities. Sent format is uint raytype, Vector3D source_location, Vector3D direction. Direction doesn't have to be normalized. Ray type is one of the RAY_CAST_* values.
const unsigned int RAY_CAST_ALL = 0
 Return all collisions.
const unsigned int RAY_CAST_NEAREST = 1
 Only return the nearest collision.

Detailed Description

Namespace to contain every item that is related to the physics engine.


Function Documentation

template<typename T >
void Physics::getAttribute ( const std::string  type,
std::map< std::string, boost::any > &  attributes,
const std::string  key,
boost::function< bool(T)>  setter 
) [inline]

For standard, single-parameter setters, provides a quick and easy way to reduce an immense number of lines of code in CreateComponent by centralizing all common operations.

Definition at line 37 of file PhysicsModuleComponents.cpp.

template<typename T >
std::pair<bool, T> Physics::getAttributeAlt ( const std::string  type,
std::map< std::string, boost::any > &  attributes,
const std::string  key 
) [inline]

For non-standard setters, provides a relatively quick and easy way to reduce an immense number of lines of code in CreateComponent by centralizing all common operations.

Definition at line 59 of file PhysicsModuleComponents.cpp.


Variable Documentation

const unsigned int Physics::ACK_MODULE_LOADED = 3001

Message sent from the module to indicate that the it has loaded.

Definition at line 16 of file Messages.h.

const unsigned int Physics::ACK_MODULE_START = 3003

Message sent from the module with a status indicator bool that indicate whether the module sucessfully loaded.

Definition at line 19 of file Messages.h.

const unsigned int Physics::MSG_ENTITY_COLLISION = 3100

Message sent from the module to indicate a collision between the two referenced entities, with the direction and depth of the collision as a Vector3D.

Definition at line 21 of file Messages.h.

const unsigned int Physics::MSG_MODULE_START = 3002

Message sent to the module to start it up.

Definition at line 18 of file Messages.h.

const unsigned int Physics::MSG_RAY_CAST = 3500

Directed message sent to the module to request a ray to be cast and the result to be the names of the collided entities. Sent format is uint raytype, Vector3D source_location, Vector3D direction. Direction doesn't have to be normalized. Ray type is one of the RAY_CAST_* values.

Definition at line 23 of file Messages.h.

const unsigned int Physics::MSG_SCREEN_PICK = 3501

Directed message sent to the module to request a ray to be cast from screen space and the result to be the names of the collided entities. Sent format is uint raytype, Vector3D source_location, Vector3D direction. Direction doesn't have to be normalized. Ray type is one of the RAY_CAST_* values.

Definition at line 24 of file Messages.h.

const unsigned int Physics::RAY_CAST_ALL = 0

Return all collisions.

Definition at line 25 of file Messages.h.

const unsigned int Physics::RAY_CAST_NEAREST = 1

Only return the nearest collision.

Definition at line 26 of file Messages.h.