26 _desc.shapeFlags = NX_SF_FEATURE_INDICES | NX_SF_VISUALIZATION;
27 _desc.meshFlags = NX_MESH_SMOOTH_SPHERE_COLLISIONS;
28 _desc.materialIndexHighBits = (NxMaterialIndex)0;
29 _desc.holeMaterial = (NxMaterialIndex)0;
41 _desc.holeMaterial = (NxMaterialIndex)index;
52 _desc.materialIndexHighBits = (NxMaterialIndex)index;
61 return (
unsigned short)_desc.holeMaterial;
71 return (
unsigned short)_desc.materialIndexHighBits;
77 void PhysxHeightFieldShapeDesc::
78 set_dimensions(
const LVector3f &dimensions) {
82 NxU32 nbRows = _desc.heightField->getNbRows();
83 NxU32 nbColumns = _desc.heightField->getNbColumns();
85 _desc.rowScale = dimensions.get_x() / nbRows;
86 _desc.columnScale = dimensions.get_y() / nbColumns;
87 _desc.heightScale = dimensions.get_z() / _64K;
93 void PhysxHeightFieldShapeDesc::
96 _desc.heightField = hf.ptr();
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static NxMat34 mat4_to_nxMat34(const LMatrix4f &m)
Converts from LMatrix4f to NxMat34.
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.
void set_to_default()
(re)sets the structure to the default.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
unsigned short get_hole_material() const
Returns the the material index that designates holes in the height field.
void set_name(const char *name)
Sets a possible debug name.
void set_hole_material(unsigned short index)
Sets the the material index that designates holes in the height field.