first commit
This commit is contained in:
51
include/modules/physic_bullet/bullet_constraint.h
Normal file
51
include/modules/physic_bullet/bullet_constraint.h
Normal file
@ -0,0 +1,51 @@
|
||||
/* -----------------------------------------------------------------------------
|
||||
GSFramework
|
||||
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
|
||||
----------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
#ifndef __NBULLET_CONSTRAINT__
|
||||
#define __NBULLET_CONSTRAINT__
|
||||
|
||||
|
||||
#include "physic/physic_constraint.h"
|
||||
|
||||
|
||||
class btDiscreteDynamicsWorld;
|
||||
class btTypedConstraint;
|
||||
|
||||
namespace GS {
|
||||
namespace S3D {
|
||||
|
||||
/*
|
||||
@short Bullet physic constraint.
|
||||
@author Emmanuel Julien (ejulien@gsworks.fr)
|
||||
*/
|
||||
class BulletConstraint : public PhysicConstraint
|
||||
{
|
||||
friend class BulletWorld;
|
||||
|
||||
btDiscreteDynamicsWorld *world;
|
||||
btTypedConstraint *constraint;
|
||||
|
||||
public:
|
||||
void setLimitHinge(float low, float high, float _softness = 0.9f, float _biasFactor = 0.3f, float _relaxationFactor = 1.0f);
|
||||
|
||||
|
||||
void SetPivotA(const Matrix4 &);
|
||||
void SetPivotB(const Matrix4 &);
|
||||
|
||||
bool SetupConstraint(const PhysicConstraintDesc &);
|
||||
void DeleteConstraint();
|
||||
|
||||
void Enable(bool = true);
|
||||
|
||||
BulletConstraint(btDiscreteDynamicsWorld *);
|
||||
virtual ~BulletConstraint();
|
||||
};
|
||||
|
||||
} // S3D
|
||||
} // GS
|
||||
|
||||
|
||||
#endif // __NBULLET_CONSTRAINT__
|
||||
Reference in New Issue
Block a user