30 #include "BulletDynamics/Dynamics/btRigidBody.h"
31 #include "btBulletDynamicsCommon.h"
39 double f,
double rf,
double res) :
46 if (
density < 0.0) {
throw std::range_error(
"Negative density"); }
47 if (
radius < 0.0) {
throw std::range_error(
"Negative radius"); }
48 if (
friction < 0.0) {
throw std::range_error(
"Negative friction"); }
49 if (
rollFriction < 0.0) {
throw std::range_error(
"Negative roll friction"); }
50 if (
restitution < 0.0) {
throw std::range_error(
"Negative restitution"); }
51 if (
restitution > 1.0) {
throw std::range_error(
"Restitution > 1"); }
60 tgRod::tgRod(btRigidBody* pRigidBody,
66 if (pRigidBody == NULL)
68 throw std::invalid_argument(
"Pointer to btRigidBody is NULL");
93 bool tgRod::invariant()
const
Config(double r=0.5, double d=1.0, double f=1.0, double rf=0.0, double res=0.2)
btRigidBody * m_pRigidBody
const double rollFriction
virtual void render(const tgRod &rod) const
Contains the definition of interface class tgModelVisitor.
Contains the definition of class tgRod.
virtual void onVisit(const tgModelVisitor &v) const