Panda3D
physxConvexMeshDesc.I
1 // Filename: physxConvexMeshDesc.I
2 // Created by: enn0x (11Oct09)
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 
16 ////////////////////////////////////////////////////////////////////
17 // Function: PhysxConvexMeshDesc::Constructor
18 // Access: Public
19 // Description:
20 ////////////////////////////////////////////////////////////////////
21 INLINE PhysxConvexMeshDesc::
22 PhysxConvexMeshDesc() {
23 
24  _desc.flags = NX_CF_COMPUTE_CONVEX;
25  _desc.pointStrideBytes = sizeof(NxVec3);
26  _desc.points = NULL;
27 
28  _vertices = NULL;
29 }
30 
31 ////////////////////////////////////////////////////////////////////
32 // Function: PhysxConvexMeshDesc::Destructor
33 // Access: Public
34 // Description:
35 ////////////////////////////////////////////////////////////////////
36 INLINE PhysxConvexMeshDesc::
37 ~PhysxConvexMeshDesc() {
38 
39  if (_vertices) {
40  delete [] _vertices;
41  }
42 }
43 
44 ////////////////////////////////////////////////////////////////////
45 // Function: PhysxConvexMeshDesc::is_valid
46 // Access: Published
47 // Description: Returns true if the descriptor is valid.
48 ////////////////////////////////////////////////////////////////////
49 INLINE bool PhysxConvexMeshDesc::
50 is_valid() const {
51 
52  return _desc.isValid();
53 }
54 
bool is_valid() const
Returns true if the descriptor is valid.