Panda3D

physxBoxControllerDesc.cxx

00001 // Filename: physxBoxControllerDesc.cxx
00002 // Created by:  enn0x (22Sep09)
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 "physxBoxControllerDesc.h"
00016 #include "physxManager.h"
00017 
00018 ////////////////////////////////////////////////////////////////////
00019 //     Function: PhysxBoxControllerDesc::set_extents
00020 //       Access: Published
00021 //  Description: Sets the dimensions of the box.
00022 //
00023 //               The dimensions are the 'radii' of the box,
00024 //               meaning 1/2 extents in x dimension, 1/2 extents
00025 //               in y dimension, 1/2 extents in z dimension.
00026 ////////////////////////////////////////////////////////////////////
00027 void PhysxBoxControllerDesc::
00028 set_extents(const LVector3f &extents) {
00029 
00030   _desc.extents = PhysxManager::vec3_to_nxVec3(extents);
00031 }
00032 
00033 ////////////////////////////////////////////////////////////////////
00034 //     Function: PhysxBoxControllerDesc::get_extents
00035 //       Access: Published
00036 //  Description: Returns the dimensions of the box.
00037 ////////////////////////////////////////////////////////////////////
00038 LVector3f PhysxBoxControllerDesc::
00039 get_extents() const {
00040 
00041   return PhysxManager::nxVec3_to_vec3(_desc.extents);
00042 }
00043 
 All Classes Functions Variables Enumerations