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