Panda3D
physxCcdSkeletonDesc.I
1 // Filename: physxCcdSkeletonDesc.I
2 // Created by: enn0x (01May12)
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: PhysxCcdSkeletonDesc::Constructor
18 // Access: Public
19 // Description:
20 ////////////////////////////////////////////////////////////////////
21 INLINE PhysxCcdSkeletonDesc::
22 PhysxCcdSkeletonDesc() {
23 
24  _desc.flags = 0;
25  _desc.pointStrideBytes = sizeof(NxVec3);
26  _desc.triangleStrideBytes = 3*sizeof(NxU32);
27  _desc.points = NULL;
28  _desc.triangles = NULL;
29 
30  _vertices = NULL;
31  _triangles = NULL;
32 }
33 
34 ////////////////////////////////////////////////////////////////////
35 // Function: PhysxCcdSkeletonDesc::Destructor
36 // Access: Public
37 // Description:
38 ////////////////////////////////////////////////////////////////////
39 INLINE PhysxCcdSkeletonDesc::
40 ~PhysxCcdSkeletonDesc() {
41 
42  if (_vertices) {
43  delete [] _vertices;
44  }
45 
46  if (_triangles) {
47  delete [] _triangles;
48  }
49 }
50 
51 ////////////////////////////////////////////////////////////////////
52 // Function: PhysxCcdSkeletonDesc::is_valid
53 // Access: Published
54 // Description: Returns true if the descriptor is valid.
55 ////////////////////////////////////////////////////////////////////
56 INLINE bool PhysxCcdSkeletonDesc::
57 is_valid() const {
58 
59  return _desc.isValid();
60 }
61 
bool is_valid() const
Returns true if the descriptor is valid.