Panda3D
Loading...
Searching...
No Matches
physxSoftBodyMeshDesc.h
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.h
10 * @author enn0x
11 * @date 2010-09-12
12 */
13
14#ifndef PHYSXSOFTBODYMESHDESC_H
15#define PHYSXSOFTBODYMESHDESC_H
16
17#include "pandabase.h"
18#include "luse.h"
19
20#include "physx_includes.h"
21
22/**
23 *
24 */
25class EXPCL_PANDAPHYSX PhysxSoftBodyMeshDesc {
26
27PUBLISHED:
28 INLINE PhysxSoftBodyMeshDesc();
29 INLINE ~PhysxSoftBodyMeshDesc();
30
31 INLINE bool is_valid() const;
32
33 void set_num_vertices(unsigned int n);
34 void set_vertex(unsigned int idx,
35 const LPoint3f &vert);
36
37 void set_num_tetrahedra(unsigned int n);
38 void set_tetrahedron(unsigned int idx,
39 unsigned int i1,
40 unsigned int i2,
41 unsigned int i3,
42 unsigned int i4);
43
44public:
45 INLINE const NxSoftBodyMeshDesc &get_desc() const;
46
47private:
48 NxSoftBodyMeshDesc _desc;
49 NxVec3 *_vertices;
50 NxU32 *_tetrahedra;
51};
52
54
55#endif // PHYSXSOFTBODYMESHDESC_H
void set_num_vertices(unsigned int n)
Sets the number of vertices to be stored within this soft body mesh.
void set_vertex(unsigned int idx, const LPoint3f &vert)
Sets a single vertex.
bool is_valid() const
Returns true if the descriptor is valid.
void set_tetrahedron(unsigned int idx, unsigned int i1, unsigned int i2, unsigned int i3, unsigned int i4)
Sets a single tetrahedron, by providing the three indices i1, i2, i3, i4.
void set_num_tetrahedra(unsigned int n)
Sets the number of tetrahedra to be stored in this soft body mesh.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.