Panda3D

bulletSoftBodyNode.I

00001 // Filename: bulletSoftBodyNode.I
00002 // Created by:  enn0x (27Dec10)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 
00016 ////////////////////////////////////////////////////////////////////
00017 //     Function: BulletSoftBodyNode::Destructor
00018 //       Access: Published
00019 //  Description:
00020 ////////////////////////////////////////////////////////////////////
00021 INLINE BulletSoftBodyNode::
00022 ~BulletSoftBodyNode() {
00023 
00024   delete _soft;
00025 }
00026 
00027 ////////////////////////////////////////////////////////////////////
00028 //     Function: BulletSoftBodyNodeElement::Destructor
00029 //       Access: Published
00030 //  Description:
00031 ////////////////////////////////////////////////////////////////////
00032 INLINE BulletSoftBodyNodeElement::
00033 ~BulletSoftBodyNodeElement() {
00034 
00035 }
00036 
00037 ////////////////////////////////////////////////////////////////////
00038 //     Function: BulletSoftBodyNodeElement::empty
00039 //       Access: Published
00040 //  Description: Named constructor intended to be used for asserts
00041 //               with have to return a concrete value.
00042 ////////////////////////////////////////////////////////////////////
00043 INLINE BulletSoftBodyNodeElement BulletSoftBodyNodeElement::
00044 empty() {
00045 
00046   static btSoftBody::Node node;
00047 
00048   return BulletSoftBodyNodeElement(node);
00049 }
00050 
00051 ////////////////////////////////////////////////////////////////////
00052 //     Function: BulletSoftBodyNodeElement::get_pos
00053 //       Access: Published
00054 //  Description:
00055 ////////////////////////////////////////////////////////////////////
00056 INLINE LPoint3 BulletSoftBodyNodeElement::
00057 get_pos() const {
00058 
00059   return btVector3_to_LPoint3(_node.m_x);
00060 }
00061 
00062 ////////////////////////////////////////////////////////////////////
00063 //     Function: BulletSoftBodyNodeElement::get_normal
00064 //       Access: Published
00065 //  Description:
00066 ////////////////////////////////////////////////////////////////////
00067 INLINE LVector3 BulletSoftBodyNodeElement::
00068 get_normal() const {
00069 
00070   return btVector3_to_LVector3(_node.m_n);
00071 }
00072 
00073 ////////////////////////////////////////////////////////////////////
00074 //     Function: BulletSoftBodyNodeElement::get_velocity
00075 //       Access: Published
00076 //  Description:
00077 ////////////////////////////////////////////////////////////////////
00078 INLINE LVector3 BulletSoftBodyNodeElement::
00079 get_velocity() const {
00080 
00081   return btVector3_to_LVector3(_node.m_v);
00082 }
00083 
00084 ////////////////////////////////////////////////////////////////////
00085 //     Function: BulletSoftBodyNodeElement::get_inv_mass
00086 //       Access: Published
00087 //  Description:
00088 ////////////////////////////////////////////////////////////////////
00089 INLINE PN_stdfloat BulletSoftBodyNodeElement::
00090 get_inv_mass() const {
00091 
00092   return (PN_stdfloat)_node.m_im;
00093 }
00094 
00095 ////////////////////////////////////////////////////////////////////
00096 //     Function: BulletSoftBodyNodeElement::get_area
00097 //       Access: Published
00098 //  Description:
00099 ////////////////////////////////////////////////////////////////////
00100 INLINE PN_stdfloat BulletSoftBodyNodeElement::
00101 get_area() const {
00102 
00103   return (PN_stdfloat)_node.m_area;
00104 }
00105 
00106 ////////////////////////////////////////////////////////////////////
00107 //     Function: BulletSoftBodyNodeElement::is_attached
00108 //       Access: Published
00109 //  Description:
00110 ////////////////////////////////////////////////////////////////////
00111 INLINE int BulletSoftBodyNodeElement::
00112 is_attached() const {
00113 
00114   return (PN_stdfloat)_node.m_battach;
00115 }
00116 
 All Classes Functions Variables Enumerations