Files
RCBASIC4/rcbasic_runtime/rc_physics3D_base.h

36 lines
683 B
C

#ifndef RC_PHYSICS3D_BASE_H_INCLUDED
#define RC_PHYSICS3D_BASE_H_INCLUDED
#include "rc_gfx_core.h"
//Set Gravity
void rc_setGravity3D(double x, double y, double z)
{
rc_physics3D.world->setGravity(irr::core::vector3d<f32>(x, y, z));
}
void rc_getGravity3D(double* x, double* y, double* z)
{
btVector3 v = rc_physics3D.world->getPointer()->getGravity();
*x = v.getX();
*y = v.getY();
*z = v.getZ();
}
void rc_setWorld3DDeltaTime(double dt)
{
rc_physics3D.DeltaTime = dt;
}
void rc_setWorld3DMaxSubSteps(double steps)
{
rc_physics3D.maxSubSteps = steps;
}
void rc_setWorld3DTimeStep(double ts)
{
rc_physics3D.fixedTimeStep = ts;
}
#endif // RC_PHYSICS3D_BASE_H_INCLUDED