Panda3D
|
00001 // Filename: bulletTriangleMeshShape.I 00002 // Created by: enn0x (09Feb10) 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 // Function: BulletTriangleMeshShape::Copy Constructor 00017 // Access: Published 00018 // Description: 00019 //////////////////////////////////////////////////////////////////// 00020 INLINE BulletTriangleMeshShape:: 00021 BulletTriangleMeshShape(const BulletTriangleMeshShape ©) : 00022 _bvh_shape(copy._bvh_shape), 00023 _gimpact_shape(copy._gimpact_shape), 00024 _mesh(copy._mesh) { 00025 } 00026 00027 //////////////////////////////////////////////////////////////////// 00028 // Function: BulletTriangleMeshShape::Copy Assignment Operator 00029 // Access: Published 00030 // Description: 00031 //////////////////////////////////////////////////////////////////// 00032 INLINE void BulletTriangleMeshShape:: 00033 operator = (const BulletTriangleMeshShape ©) { 00034 00035 _bvh_shape = copy._bvh_shape; 00036 _gimpact_shape = copy._gimpact_shape; 00037 _mesh = copy._mesh; 00038 } 00039 00040 //////////////////////////////////////////////////////////////////// 00041 // Function: BulletTriangleMeshShape::Destructor 00042 // Access: Published 00043 // Description: 00044 //////////////////////////////////////////////////////////////////// 00045 INLINE BulletTriangleMeshShape:: 00046 ~BulletTriangleMeshShape() { 00047 00048 if (_bvh_shape) { 00049 delete _bvh_shape; 00050 } 00051 00052 if (_gimpact_shape) { 00053 delete _gimpact_shape; 00054 } 00055 } 00056 00057 //////////////////////////////////////////////////////////////////// 00058 // Function: BulletTriangleMeshShape::is_static 00059 // Access: Published 00060 // Description: 00061 //////////////////////////////////////////////////////////////////// 00062 INLINE bool BulletTriangleMeshShape:: 00063 is_static() const { 00064 00065 return (_bvh_shape != NULL); 00066 } 00067 00068 //////////////////////////////////////////////////////////////////// 00069 // Function: BulletTriangleMeshShape::is_dynamic 00070 // Access: Published 00071 // Description: 00072 //////////////////////////////////////////////////////////////////// 00073 INLINE bool BulletTriangleMeshShape:: 00074 is_dynamic() const { 00075 00076 return (_gimpact_shape != NULL); 00077 } 00078