Panda3D
Loading...
Searching...
No Matches
bulletSoftBodyControl.h
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file bulletSoftBodyControl.h
10 * @author enn0x
11 * @date 2010-03-04
12 */
13
14#ifndef __BULLET_SOFT_BODY_CONTROL_H__
15#define __BULLET_SOFT_BODY_CONTROL_H__
16
17#include "pandabase.h"
18
19#include "bullet_includes.h"
20#include "bullet_utils.h"
21
22#include "luse.h"
23
24/**
25 *
26 */
27class EXPCL_PANDABULLET BulletSoftBodyControl : public btSoftBody::AJoint::IControl {
28
29PUBLISHED:
31 virtual ~BulletSoftBodyControl();
32
33 // Motor
34 INLINE void set_goal(PN_stdfloat goal);
35 INLINE void set_max_torque(PN_stdfloat maxtorque);
36
37 // INLINE PN_stdfloat get_goal() const; INLINE PN_stdfloat get_max_torque()
38 // const;
39
40 // Steer
41 INLINE void set_angle(PN_stdfloat angle);
42 INLINE void set_sign(PN_stdfloat sign);
43
44 // INLINE PN_stdfloat get_angle() const; INLINE PN_stdfloat get_sign()
45 // const;
46
47public:
48 void Prepare(btSoftBody::AJoint* joint);
49 btScalar Speed(btSoftBody::AJoint *joint, btScalar current);
50
51private:
52 // Motor
53 btScalar _goal;
54 btScalar _maxtorque;
55
56 // Steer
57 btScalar _angle;
58 btScalar _sign;
59};
60
62
63#endif // __BULLET_SOFT_BODY_CONTROL_H__
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.