Panda3D
 All Classes Functions Variables Enumerations
bulletSoftBodyNode.I
1 // Filename: bulletSoftBodyNode.I
2 // Created by: enn0x (27Dec10)
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 ////////////////////////////////////////////////////////////////////
17 // Function: BulletSoftBodyNode::Destructor
18 // Access: Published
19 // Description:
20 ////////////////////////////////////////////////////////////////////
21 INLINE BulletSoftBodyNode::
22 ~BulletSoftBodyNode() {
23 
24  delete _soft;
25 }
26 
27 ////////////////////////////////////////////////////////////////////
28 // Function: BulletSoftBodyNodeElement::Destructor
29 // Access: Published
30 // Description:
31 ////////////////////////////////////////////////////////////////////
32 INLINE BulletSoftBodyNodeElement::
33 ~BulletSoftBodyNodeElement() {
34 
35 }
36 
37 ////////////////////////////////////////////////////////////////////
38 // Function: BulletSoftBodyNodeElement::empty
39 // Access: Published
40 // Description: Named constructor intended to be used for asserts
41 // with have to return a concrete value.
42 ////////////////////////////////////////////////////////////////////
44 empty() {
45 
46  static btSoftBody::Node node;
47 
48  return BulletSoftBodyNodeElement(node);
49 }
50 
51 ////////////////////////////////////////////////////////////////////
52 // Function: BulletSoftBodyNodeElement::get_pos
53 // Access: Published
54 // Description:
55 ////////////////////////////////////////////////////////////////////
56 INLINE LPoint3 BulletSoftBodyNodeElement::
57 get_pos() const {
58 
59  return btVector3_to_LPoint3(_node.m_x);
60 }
61 
62 ////////////////////////////////////////////////////////////////////
63 // Function: BulletSoftBodyNodeElement::get_normal
64 // Access: Published
65 // Description:
66 ////////////////////////////////////////////////////////////////////
67 INLINE LVector3 BulletSoftBodyNodeElement::
68 get_normal() const {
69 
70  return btVector3_to_LVector3(_node.m_n);
71 }
72 
73 ////////////////////////////////////////////////////////////////////
74 // Function: BulletSoftBodyNodeElement::get_velocity
75 // Access: Published
76 // Description:
77 ////////////////////////////////////////////////////////////////////
78 INLINE LVector3 BulletSoftBodyNodeElement::
79 get_velocity() const {
80 
81  return btVector3_to_LVector3(_node.m_v);
82 }
83 
84 ////////////////////////////////////////////////////////////////////
85 // Function: BulletSoftBodyNodeElement::get_inv_mass
86 // Access: Published
87 // Description:
88 ////////////////////////////////////////////////////////////////////
89 INLINE PN_stdfloat BulletSoftBodyNodeElement::
90 get_inv_mass() const {
91 
92  return (PN_stdfloat)_node.m_im;
93 }
94 
95 ////////////////////////////////////////////////////////////////////
96 // Function: BulletSoftBodyNodeElement::get_area
97 // Access: Published
98 // Description:
99 ////////////////////////////////////////////////////////////////////
100 INLINE PN_stdfloat BulletSoftBodyNodeElement::
101 get_area() const {
102 
103  return (PN_stdfloat)_node.m_area;
104 }
105 
106 ////////////////////////////////////////////////////////////////////
107 // Function: BulletSoftBodyNodeElement::is_attached
108 // Access: Published
109 // Description:
110 ////////////////////////////////////////////////////////////////////
111 INLINE int BulletSoftBodyNodeElement::
112 is_attached() const {
113 
114  return (PN_stdfloat)_node.m_battach;
115 }
116 
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 BulletSoftBodyNodeElement empty()
Named constructor intended to be used for asserts with have to return a concrete value.