Panda3D
Loading...
Searching...
No Matches
physxSoftBodyMeshDesc.I
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 physxSoftBodyMeshDesc.I
10 * @author enn0x
11 * @date 2010-09-12
12 */
13
14/**
15 *
16 */
17INLINE PhysxSoftBodyMeshDesc::
18PhysxSoftBodyMeshDesc() {
19
20 _desc.flags = 0;
21 _desc.vertexStrideBytes = sizeof(NxVec3);
22 _desc.tetrahedronStrideBytes = 4*sizeof(NxU32);
23 _desc.vertices = nullptr;
24 _desc.tetrahedra = nullptr;
25
26 _vertices = nullptr;
27 _tetrahedra = nullptr;
28}
29
30/**
31 *
32 */
33INLINE PhysxSoftBodyMeshDesc::
34~PhysxSoftBodyMeshDesc() {
35
36 if (_vertices) {
37 delete [] _vertices;
38 }
39
40 if (_tetrahedra) {
41 delete [] _tetrahedra;
42 }
43}
44
45/**
46 * Returns true if the descriptor is valid.
47 */
49is_valid() const {
50
51 return _desc.isValid();
52}
53
54/**
55 *
56 */
57INLINE const NxSoftBodyMeshDesc &PhysxSoftBodyMeshDesc::
58get_desc() const {
59
60 return _desc;
61}
bool is_valid() const
Returns true if the descriptor is valid.