30 #include "BulletDynamics/Dynamics/btRigidBody.h"
31 #include "btBulletDynamicsCommon.h"
37 double f,
double rf,
double res) :
45 if (
density < 0.0) {
throw std::range_error(
"Negative density"); }
46 if (
width < 0.0) {
throw std::range_error(
"Negative width"); }
47 if (
height < 0.0) {
throw std::range_error(
"Negative height"); }
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"); }
61 tgBox::tgBox(btRigidBody* pRigidBody,
67 if (pRigidBody == NULL)
69 throw std::invalid_argument(
"Pointer to btRigidBody is NULL");
94 bool tgBox::invariant()
const
const double rollFriction
Create a box shape as an obstacle or add it to your tensegrity.
btRigidBody * m_pRigidBody
virtual void render(const tgRod &rod) const
Contains the definition of interface class tgModelVisitor.
Config(double w=1.0, double h=1.0, double d=1.0, double f=1.0, double rf=0.0, double res=0.2)
virtual void onVisit(const tgModelVisitor &v) const