Panda3D
physxPlaneShapeDesc.cxx
1 // Filename: physxPlaneShapeDesc.cxx
2 // Created by: enn0x (08Sep09)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #include "physxPlaneShapeDesc.h"
16 #include "physxManager.h"
17 
18 ////////////////////////////////////////////////////////////////////
19 // Function: PhysxPlaneShapeDesc::set_plane
20 // Access: Published
21 // Description: Sets the parameters of the plane equation.
22 // normal: Plane normal.
23 // d: The distance from the origin.
24 ////////////////////////////////////////////////////////////////////
26 set_plane(const LVector3f &normal, float d) {
27 
28  nassertv(!normal.is_nan());
29 
30  _desc.normal = PhysxManager::vec3_to_nxVec3(normal);
31  _desc.d = d;
32 }
33 
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
Definition: lvector3.h:100
bool is_nan() const
Returns true if any component of the vector is not-a-number, false otherwise.
Definition: lvecBase3.h:464
static NxVec3 vec3_to_nxVec3(const LVector3f &v)
Converts from LVector3f to NxVec3.
Definition: physxManager.I:33
void set_plane(const LVector3f &normal, float d)
Sets the parameters of the plane equation.