Struct physx::height_field::HeightField
source · pub struct HeightField { /* private fields */ }
Implementations§
source§impl HeightField
impl HeightField
sourcepub fn save_cells(&self) -> Vec<HeightFieldSample>
pub fn save_cells(&self) -> Vec<HeightFieldSample>
Writes out the sample data array.
sourcepub fn modify_samples(
&mut self,
start_col: i32,
start_row: i32,
subfield_desc: &PxHeightFieldDesc,
shrink_bounds: bool
) -> bool
pub fn modify_samples( &mut self, start_col: i32, start_row: i32, subfield_desc: &PxHeightFieldDesc, shrink_bounds: bool ) -> bool
Replaces a rectangular subfield in the sample data array.
sourcepub fn get_nb_rows(&self) -> u32
pub fn get_nb_rows(&self) -> u32
Retrieves the number of sample rows in the samples array.
sourcepub fn get_nb_columns(&self) -> u32
pub fn get_nb_columns(&self) -> u32
Retrieves the number of sample columns in the samples array.
sourcepub fn get_format(&self) -> HeightFieldFormat
pub fn get_format(&self) -> HeightFieldFormat
Retrieves the format of the sample data.
sourcepub fn get_sample_stride(&self) -> u32
pub fn get_sample_stride(&self) -> u32
Retrieves the offset in bytes between consecutive samples in the array.
sourcepub fn get_convex_edge_threshold(&self) -> f32
pub fn get_convex_edge_threshold(&self) -> f32
Retrieves the convex edge threshold.
sourcepub fn get_flags(&self) -> HeightFieldFlags
pub fn get_flags(&self) -> HeightFieldFlags
Retrieves the flags bits, combined from values of the enum HeightFieldFlag.
sourcepub fn get_height(&self, x: f32, z: f32) -> f32
pub fn get_height(&self, x: f32, z: f32) -> f32
Retrieves the height at the given coordinates in grid space.
sourcepub fn get_triangle_material_index(&self, triangle_index: u32) -> u16
pub fn get_triangle_material_index(&self, triangle_index: u32) -> u16
Returns material table index of given triangle.
sourcepub fn get_triangle_normal(&self, triangle_index: u32) -> PxVec3
pub fn get_triangle_normal(&self, triangle_index: u32) -> PxVec3
Returns a triangle face normal for a given triangle index.
sourcepub fn get_sample(&self, row: u32, column: u32) -> Option<&HeightFieldSample>
pub fn get_sample(&self, row: u32, column: u32) -> Option<&HeightFieldSample>
Returns heightfield sample of given row and column.
sourcepub fn get_timestamp(&self) -> u32
pub fn get_timestamp(&self) -> u32
Returns the number of times the heightfield data has been modified.
Trait Implementations§
source§impl Class<PxBase> for HeightField
impl Class<PxBase> for HeightField
source§fn as_ptr(&self) -> *const PxBase
fn as_ptr(&self) -> *const PxBase
Returns a raw const pointer to the wrapped type.
Retrieving a raw pointer is safe. However, pretty much any use of a raw pointer is unsafe.
In particular: this pointer should not be used to construct a second owning wrapper around the pointer.
source§fn as_mut_ptr(&mut self) -> *mut PxBase
fn as_mut_ptr(&mut self) -> *mut PxBase
Returns a raw mut pointer to the wrapped type.
Retrieving a raw pointer is safe. However, pretty much any use of a raw pointer is unsafe.
In particular: this pointer should not be used to construct a second owning wrapper around the pointer.
source§impl Class<PxHeightField> for HeightField
impl Class<PxHeightField> for HeightField
source§fn as_ptr(&self) -> *const PxHeightField
fn as_ptr(&self) -> *const PxHeightField
Returns a raw const pointer to the wrapped type.
Retrieving a raw pointer is safe. However, pretty much any use of a raw pointer is unsafe.
In particular: this pointer should not be used to construct a second owning wrapper around the pointer.
source§fn as_mut_ptr(&mut self) -> *mut PxHeightField
fn as_mut_ptr(&mut self) -> *mut PxHeightField
Returns a raw mut pointer to the wrapped type.
Retrieving a raw pointer is safe. However, pretty much any use of a raw pointer is unsafe.
In particular: this pointer should not be used to construct a second owning wrapper around the pointer.
source§impl Drop for HeightField
impl Drop for HeightField
impl Send for HeightField
impl Sync for HeightField
Auto Trait Implementations§
Blanket Implementations§
source§impl<T> Base for Twhere
T: Class<PxBase>,
impl<T> Base for Twhere T: Class<PxBase>,
source§fn get_concrete_type_name(&self) -> Option<&str>
fn get_concrete_type_name(&self) -> Option<&str>
Get the name of the real type referenced by this pointer, or None if the returned string is not valid
source§fn get_concrete_type(&self) -> ConcreteType
fn get_concrete_type(&self) -> ConcreteType
Returns an enumerated value identifying the type. Read more
source§fn set_base_flag(&mut self, flag: BaseFlag, value: bool)
fn set_base_flag(&mut self, flag: BaseFlag, value: bool)
Set or unset the specified flag on this object.
source§fn set_base_flags(&mut self, in_flags: BaseFlags)
fn set_base_flags(&mut self, in_flags: BaseFlags)
Set the BaseFlags of this object. Note that replaces all flags currently
on the object. Use
set_base_flag
to set individual flags.source§fn get_base_flags(&self) -> BaseFlags
fn get_base_flags(&self) -> BaseFlags
Read the BaseFlags of this object
source§fn is_releasable(&self) -> bool
fn is_releasable(&self) -> bool
Returns true if this object can be released, i.e., it is not subordinate.
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more