15 #include "physxHeightFieldShapeDesc.h" 16 #include "physxHeightField.h" 29 _desc.shapeFlags = NX_SF_FEATURE_INDICES | NX_SF_VISUALIZATION;
30 _desc.meshFlags = NX_MESH_SMOOTH_SPHERE_COLLISIONS;
31 _desc.materialIndexHighBits = (NxMaterialIndex)0;
32 _desc.holeMaterial = (NxMaterialIndex)0;
48 _desc.holeMaterial = (NxMaterialIndex)index;
62 _desc.materialIndexHighBits = (NxMaterialIndex)index;
74 return (
unsigned short)_desc.holeMaterial;
86 return (
unsigned short)_desc.materialIndexHighBits;
94 void PhysxHeightFieldShapeDesc::
95 set_dimensions(
const LVector3f &dimensions) {
99 NxU32 nbRows = _desc.heightField->getNbRows();
100 NxU32 nbColumns = _desc.heightField->getNbColumns();
102 _desc.rowScale = dimensions.get_x() / nbRows;
103 _desc.columnScale = dimensions.get_y() / nbColumns;
104 _desc.heightScale = dimensions.get_z() / _64K;
112 void PhysxHeightFieldShapeDesc::
115 _desc.heightField = hf.ptr();
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
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...
static const LMatrix4f & y_to_z_up_mat()
Returns a matrix that transforms from the Y-up coordinate system to the Z-up coordinate system...
void set_to_default()
(re)sets the structure to the default.
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.