Panda3D
|
00001 // Filename: odeBoxGeom.I 00002 // Created by: joswilso (27Dec06) 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 INLINE void OdeBoxGeom:: 00016 set_lengths(dReal lx, dReal ly, dReal lz) { 00017 dGeomBoxSetLengths(_id, lx, ly, lz); 00018 } 00019 00020 INLINE void OdeBoxGeom:: 00021 set_lengths(const LVecBase3f &size) { 00022 set_lengths(size[0], size[1], size[2]); 00023 } 00024 00025 INLINE LVecBase3f OdeBoxGeom:: 00026 get_lengths() { 00027 dVector3 res; 00028 dGeomBoxGetLengths(_id, res); 00029 return LVecBase3f(res[0], res[1], res[2]); 00030 } 00031 00032 INLINE dReal OdeBoxGeom:: 00033 get_point_depth(dReal x, dReal y, dReal z) { 00034 return dGeomBoxPointDepth(_id, x, y, z); 00035 } 00036 00037 INLINE dReal OdeBoxGeom:: 00038 get_point_depth(const LPoint3f &p) { 00039 return get_point_depth(p[0], p[1], p[2]); 00040 } 00041