Panda3D
Loading...
Searching...
No Matches
physxBoxControllerDesc.cxx
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file physxBoxControllerDesc.cxx
10 * @author enn0x
11 * @date 2009-09-22
12 */
13
15#include "physxManager.h"
16
17/**
18 * Sets the dimensions of the box.
19 *
20 * The dimensions are the 'radii' of the box, meaning 1/2 extents in x
21 * dimension, 1/2 extents in y dimension, 1/2 extents in z dimension.
22 */
24set_extents(const LVector3f &extents) {
25
26 _desc.extents = PhysxManager::vec3_to_nxVec3(extents);
27}
28
29/**
30 * Returns the dimensions of the box.
31 */
33get_extents() const {
34
35 return PhysxManager::nxVec3_to_vec3(_desc.extents);
36}
LVector3f get_extents() const
Returns the dimensions of the box.
void set_extents(const LVector3f &extents)
Sets the dimensions of the box.
static NxVec3 vec3_to_nxVec3(const LVector3f &v)
Converts from LVector3f to NxVec3.
static LVector3f nxVec3_to_vec3(const NxVec3 &v)
Converts from NxVec3 to LVector3f.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.