Panda3D
Loading...
Searching...
No Matches
physxHeightFieldShapeDesc.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 physxHeightFieldShapeDesc.h
10 * @author enn0x
11 * @date 2009-10-15
12 */
13
14#ifndef PHYSXHEIGHTFIELDSHAPEDESC_H
15#define PHYSXHEIGHTFIELDSHAPEDESC_H
16
17#include "pandabase.h"
18
19#include "physxShapeDesc.h"
20#include "physx_includes.h"
21
23
24/**
25 * Descriptor class for PhysxHeightFieldShape.
26 */
27class EXPCL_PANDAPHYSX PhysxHeightFieldShapeDesc : public PhysxShapeDesc {
28
29PUBLISHED:
30 INLINE PhysxHeightFieldShapeDesc();
31 INLINE ~PhysxHeightFieldShapeDesc();
32
33 void set_to_default();
34 INLINE bool is_valid() const;
35
36 void set_height_field(const PhysxHeightField &hf);
37 void set_dimensions(const LVector3f &dimensions);
38 void set_hole_material(unsigned short index);
39 void set_material_index_high_bits(unsigned short index);
40
41 unsigned short get_hole_material() const;
42 unsigned short get_material_index_hight_bits() const;
43
44public:
45 NxShapeDesc *ptr() const { return (NxShapeDesc *)&_desc; };
46 NxHeightFieldShapeDesc _desc;
47};
48
50
51#endif // PHYSXHEIGHTFIELDSHAPEDESC_H
void set_material_index_high_bits(unsigned short index)
Sets the high 9 bits of this number are used to complete the material indices in the samples.
unsigned short get_material_index_hight_bits() const
Returns the high 9 bits of this number are used to complete the material indices in the samples.
void set_to_default()
(re)sets the structure to the default.
void set_hole_material(unsigned short index)
Sets the the material index that designates holes in the height field.
unsigned short get_hole_material() const
Returns the the material index that designates holes in the height field.
bool is_valid() const
Returns true if the descriptor is valid.
A height field object.
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.