Panda3D
panda
src
physx
physxBoxForceFieldShapeDesc.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 physxBoxForceFieldShapeDesc.cxx
10
* @author enn0x
11
* @date 2009-11-06
12
*/
13
14
#include "
physxBoxForceFieldShapeDesc.h
"
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
*/
23
void
PhysxBoxForceFieldShapeDesc::
24
set_dimensions
(
const
LVector3f &dimensions) {
25
26
nassertv(!dimensions.is_nan());
27
_desc.dimensions =
PhysxManager::vec3_to_nxVec3
(dimensions);
28
}
29
30
/**
31
* Returns the dimensions of the box.
32
*/
33
LVector3f
PhysxBoxForceFieldShapeDesc::
34
get_dimensions
()
const
{
35
36
return
PhysxManager::nxVec3_to_vec3
(_desc.dimensions);
37
}
PhysxManager::vec3_to_nxVec3
static NxVec3 vec3_to_nxVec3(const LVector3f &v)
Converts from LVector3f to NxVec3.
Definition:
physxManager.I:27
physxBoxForceFieldShapeDesc.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PhysxBoxForceFieldShapeDesc::set_dimensions
void set_dimensions(const LVector3f &dimensions)
Sets the dimensions of the box.
Definition:
physxBoxForceFieldShapeDesc.cxx:24
physxManager.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PhysxBoxForceFieldShapeDesc::get_dimensions
LVector3f get_dimensions() const
Returns the dimensions of the box.
Definition:
physxBoxForceFieldShapeDesc.cxx:34
PhysxManager::nxVec3_to_vec3
static LVector3f nxVec3_to_vec3(const NxVec3 &v)
Converts from NxVec3 to LVector3f.
Definition:
physxManager.I:36
Generated on Sun Dec 27 2020 13:23:13 for Panda3D by
1.8.20