Panda3D
bulletWheel.I
1 // Filename: bulletWheel.I
2 // Created by: enn0x (17Feb10)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 ////////////////////////////////////////////////////////////////////
16 // Function: BulletWheel::Destructor
17 // Access: Published
18 // Description:
19 ////////////////////////////////////////////////////////////////////
20 INLINE BulletWheel::
21 ~BulletWheel() {
22 
23 }
24 
25 ////////////////////////////////////////////////////////////////////
26 // Function: BulletWheelRaycastInfo::Destructor
27 // Access: Published
28 // Description:
29 ////////////////////////////////////////////////////////////////////
30 INLINE BulletWheelRaycastInfo::
31 ~BulletWheelRaycastInfo() {
32 
33 }
34 
35 ////////////////////////////////////////////////////////////////////
36 // Function: BulletWheel::empty
37 // Access: Public
38 // Description: Named constructor intended to be used for asserts
39 // with have to return a concrete value.
40 ////////////////////////////////////////////////////////////////////
42 empty() {
43 
44  btWheelInfoConstructionInfo ci;
45  btWheelInfo info(ci);
46 
47  return BulletWheel(info);
48 }
49 
50 ////////////////////////////////////////////////////////////////////
51 // Function: BulletWheelRaycastInfo::is_in_contact
52 // Access: Public
53 // Description:
54 ////////////////////////////////////////////////////////////////////
55 INLINE bool BulletWheelRaycastInfo::
56 is_in_contact() const {
57 
58  return _info.m_isInContact;
59 }
60 
61 ////////////////////////////////////////////////////////////////////
62 // Function: BulletWheelRaycastInfo::get_suspension_length
63 // Access: Public
64 // Description:
65 ////////////////////////////////////////////////////////////////////
66 INLINE PN_stdfloat BulletWheelRaycastInfo::
67 get_suspension_length() const {
68 
69  return _info.m_suspensionLength;
70 }
71 
72 ////////////////////////////////////////////////////////////////////
73 // Function: BulletWheelRaycastInfo::get_contact_point_ws
74 // Access: Public
75 // Description:
76 ////////////////////////////////////////////////////////////////////
77 INLINE LPoint3 BulletWheelRaycastInfo::
78 get_contact_point_ws() const {
79 
80  return btVector3_to_LPoint3(_info.m_contactPointWS);
81 }
82 
83 ////////////////////////////////////////////////////////////////////
84 // Function: BulletWheelRaycastInfo::get_hard_point_ws
85 // Access: Public
86 // Description:
87 ////////////////////////////////////////////////////////////////////
88 INLINE LPoint3 BulletWheelRaycastInfo::
89 get_hard_point_ws() const {
90 
91  return btVector3_to_LPoint3(_info.m_hardPointWS);
92 }
93 
94 ////////////////////////////////////////////////////////////////////
95 // Function: BulletWheelRaycastInfo::get_contact_normal_ws
96 // Access: Public
97 // Description:
98 ////////////////////////////////////////////////////////////////////
99 INLINE LVector3 BulletWheelRaycastInfo::
100 get_contact_normal_ws() const {
101 
102  return btVector3_to_LVector3(_info.m_contactNormalWS);
103 }
104 
105 ////////////////////////////////////////////////////////////////////
106 // Function: BulletWheelRaycastInfo::get_wheel_direction_ws
107 // Access: Public
108 // Description:
109 ////////////////////////////////////////////////////////////////////
110 INLINE LVector3 BulletWheelRaycastInfo::
111 get_wheel_direction_ws() const {
112 
113  return btVector3_to_LVector3(_info.m_wheelDirectionWS);
114 }
115 
116 ////////////////////////////////////////////////////////////////////
117 // Function: BulletWheelRaycastInfo::get_wheel_axle_ws
118 // Access: Public
119 // Description:
120 ////////////////////////////////////////////////////////////////////
121 INLINE LVector3 BulletWheelRaycastInfo::
122 get_wheel_axle_ws() const {
123 
124  return btVector3_to_LVector3(_info.m_wheelAxleWS);
125 }
126 
127 ////////////////////////////////////////////////////////////////////
128 // Function: BulletWheelRaycastInfo::get_ground_object
129 // Access: Public
130 // Description:
131 ////////////////////////////////////////////////////////////////////
132 INLINE PandaNode *BulletWheelRaycastInfo::
133 get_ground_object() const {
134 
135  return _info.m_groundObject ? (PandaNode *)_info.m_groundObject : NULL;
136 }
137 
A basic node of the scene graph or data graph.
Definition: pandaNode.h:72
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
Definition: lvector3.h:100
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
Definition: lpoint3.h:99
static BulletWheel empty()
Named constructor intended to be used for asserts with have to return a concrete value.
Definition: bulletWheel.I:42
One wheel of a BulletVehicle.
Definition: bulletWheel.h:57