Panda3D
Loading...
Searching...
No Matches
bulletTranslationalLimitMotor.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 bulletTranslationalLimitMotor.h
10 * @author enn0x
11 * @date 2013-03-03
12 */
13
14#ifndef __BULLET_TRANSLATIONAL_LIMIT_MOTOR_H__
15#define __BULLET_TRANSLATIONAL_LIMIT_MOTOR_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 * Rotation Limit structure for generic joints.
26 */
27class EXPCL_PANDABULLET BulletTranslationalLimitMotor {
28
29PUBLISHED:
30 BulletTranslationalLimitMotor(const BulletTranslationalLimitMotor &copy);
31 INLINE ~BulletTranslationalLimitMotor();
32
33 void set_motor_enabled(int axis, bool enable);
34 void set_low_limit(const LVecBase3 &limit);
35 void set_high_limit(const LVecBase3 &limit);
36 void set_target_velocity(const LVecBase3 &velocity);
37 void set_max_motor_force(const LVecBase3 &force);
38 void set_damping(PN_stdfloat damping);
39 void set_softness(PN_stdfloat softness);
40 void set_restitution(PN_stdfloat restitution);
41 void set_normal_cfm(const LVecBase3 &cfm);
42 void set_stop_erp(const LVecBase3 &erp);
43 void set_stop_cfm(const LVecBase3 &cfm);
44
45 bool is_limited(int axis) const;
46 bool get_motor_enabled(int axis) const;
47 int get_current_limit(int axis) const;
48 LVector3 get_current_error() const;
49 LPoint3 get_current_diff() const;
50 LVector3 get_accumulated_impulse() const;
51
52 MAKE_PROPERTY(current_error, get_current_error);
53 MAKE_PROPERTY(current_diff, get_current_diff);
54 MAKE_PROPERTY(accumulated_impulse, get_accumulated_impulse);
55
56public:
57 BulletTranslationalLimitMotor(btTranslationalLimitMotor &motor);
58
59private:
60 btTranslationalLimitMotor &_motor;
61};
62
64
65#endif // __BULLET_TRANSLATIONAL_LIMIT_MOTOR_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.
int get_current_limit(int axis) const
Retrieves the current value of angle: 0 = free, 1 = at low limit, 2 = at high limit.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.