Panda3D
Loading...
Searching...
No Matches
bulletConstraint.cxx
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 bulletConstraint.cxx
10 * @author enn0x
11 * @date 2010-03-01
12 */
13
14#include "bulletConstraint.h"
15
16#include "bulletRigidBodyNode.h"
17#include "bulletShape.h"
18
19TypeHandle BulletConstraint::_type_handle;
20
21/**
22 *
23 */
24void BulletConstraint::
25enable_feedback(bool value) {
26
27 ptr()->enableFeedback(value);
28}
29
30/**
31 *
32 */
33PN_stdfloat BulletConstraint::
34get_applied_impulse() const {
35
36 return (PN_stdfloat)ptr()->getAppliedImpulse();
37}
38
39/**
40 *
41 */
42void BulletConstraint::
43set_debug_draw_size(PN_stdfloat size) {
44
45 ptr()->setDbgDrawSize((btScalar)size);
46}
47
48/**
49 *
50 */
51PN_stdfloat BulletConstraint::
52get_debug_draw_size() {
53
54 return (PN_stdfloat)ptr()->getDbgDrawSize();
55}
56
57/**
58 *
59 */
60BulletRigidBodyNode *BulletConstraint::
61get_rigid_body_a() {
62
63 return (BulletRigidBodyNode *)ptr()->getRigidBodyA().getUserPointer();
64}
65
66/**
67 *
68 */
69BulletRigidBodyNode *BulletConstraint::
70get_rigid_body_b() {
71
72 return (BulletRigidBodyNode *)ptr()->getRigidBodyB().getUserPointer();
73}
74
75/**
76 *
77 */
78void BulletConstraint::
79set_param(ConstraintParam num, PN_stdfloat value, int axis) {
80
81 ptr()->setParam((btConstraintParams)num, (btScalar)value, axis);
82}
83
84/**
85 *
86 */
87PN_stdfloat BulletConstraint::
88get_param(ConstraintParam num, int axis) {
89
90 return (PN_stdfloat)ptr()->getParam((btConstraintParams)num, axis);
91}
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81