UGDK  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ugdk::action::mode3d::Physics Class Reference

#include <ugdk/action/3D/physics.h>

Public Member Functions

 Physics (const btVector3 &grav, Scene3D *scene)
 
 ~Physics ()
 
void Update (double dt)
 
void AddBody (component::PhysicsBody *obj)
 
void RemoveBody (component::PhysicsBody *obj)
 
std::forward_list
< std::weak_ptr< Element > > 
ContactQuery (short collision_groups, const btVector3 &pos, double radius)
 
bool debug_draw_enabled ()
 
void set_debug_draw_enabled (bool enable)
 

Constructor & Destructor Documentation

ugdk::action::mode3d::Physics::Physics ( const btVector3 &  grav,
Scene3D scene 
)
ugdk::action::mode3d::Physics::~Physics ( )

Member Function Documentation

void ugdk::action::mode3d::Physics::AddBody ( component::PhysicsBody obj)
std::forward_list<std::weak_ptr<Element> > ugdk::action::mode3d::Physics::ContactQuery ( short  collision_groups,
const btVector3 &  pos,
double  radius 
)

Performs a spherical contact/collision query on the physics world, returning a list with the objects in contact (inside the sphere).

bool ugdk::action::mode3d::Physics::debug_draw_enabled ( )

If physics debug drawing is enabled. If it is, UGDK will render a wireframe model of the collision objects.

void ugdk::action::mode3d::Physics::RemoveBody ( component::PhysicsBody obj)
void ugdk::action::mode3d::Physics::set_debug_draw_enabled ( bool  enable)
void ugdk::action::mode3d::Physics::Update ( double  dt)

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