Panda3D
|
00001 // Filename: bulletShape.cxx 00002 // Created by: enn0x (23Jan10) 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 #include "bulletShape.h" 00016 #include "bullet_utils.h" 00017 00018 TypeHandle BulletShape::_type_handle; 00019 00020 //////////////////////////////////////////////////////////////////// 00021 // Function: BulletShape::get_name 00022 // Access: Published 00023 // Description: 00024 //////////////////////////////////////////////////////////////////// 00025 const char *BulletShape:: 00026 get_name() const { 00027 00028 return ptr()->getName(); 00029 } 00030 00031 //////////////////////////////////////////////////////////////////// 00032 // Function: BulletShape::get_margin 00033 // Access: Published 00034 // Description: 00035 //////////////////////////////////////////////////////////////////// 00036 PN_stdfloat BulletShape:: 00037 get_margin() const { 00038 00039 return ptr()->getMargin(); 00040 } 00041 00042 //////////////////////////////////////////////////////////////////// 00043 // Function: BulletShape::set_margin 00044 // Access: Published 00045 // Description: 00046 //////////////////////////////////////////////////////////////////// 00047 void BulletShape:: 00048 set_margin(PN_stdfloat margin) { 00049 00050 ptr()->setMargin(margin); 00051 } 00052 00053 //////////////////////////////////////////////////////////////////// 00054 // Function: BulletShape::get_local_scale 00055 // Access: Public 00056 // Description: 00057 //////////////////////////////////////////////////////////////////// 00058 LVecBase3 BulletShape:: 00059 get_local_scale() const { 00060 00061 return btVector3_to_LVecBase3(ptr()->getLocalScaling()); 00062 } 00063 00064 //////////////////////////////////////////////////////////////////// 00065 // Function: BulletShape::set_local_scale 00066 // Access: Public 00067 // Description: 00068 //////////////////////////////////////////////////////////////////// 00069 void BulletShape:: 00070 set_local_scale(const LVecBase3 &scale) { 00071 00072 nassertv(!scale.is_nan()); 00073 ptr()->setLocalScaling(LVecBase3_to_btVector3(scale)); 00074 } 00075