pub struct HeightField { /* private fields */ }

Implementations§

source§

impl HeightField

source

pub fn save_cells(&self) -> Vec<HeightFieldSample>

Writes out the sample data array.

source

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.

source

pub fn get_nb_rows(&self) -> u32

Retrieves the number of sample rows in the samples array.

source

pub fn get_nb_columns(&self) -> u32

Retrieves the number of sample columns in the samples array.

source

pub fn get_format(&self) -> HeightFieldFormat

Retrieves the format of the sample data.

source

pub fn get_sample_stride(&self) -> u32

Retrieves the offset in bytes between consecutive samples in the array.

source

pub fn get_convex_edge_threshold(&self) -> f32

Retrieves the convex edge threshold.

source

pub fn get_flags(&self) -> HeightFieldFlags

Retrieves the flags bits, combined from values of the enum HeightFieldFlag.

source

pub fn get_height(&self, x: f32, z: f32) -> f32

Retrieves the height at the given coordinates in grid space.

source

pub fn get_triangle_material_index(&self, triangle_index: u32) -> u16

Returns material table index of given triangle.

source

pub fn get_triangle_normal(&self, triangle_index: u32) -> PxVec3

Returns a triangle face normal for a given triangle index.

source

pub fn get_sample(&self, row: u32, column: u32) -> Option<&HeightFieldSample>

Returns heightfield sample of given row and column.

source

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

source§

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

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

source§

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

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

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl Send for HeightField

source§

impl Sync for HeightField

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Base for Twhere T: Class<PxBase>,

source§

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

Returns an enumerated value identifying the type. Read more
source§

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)

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

Read the BaseFlags of this object
source§

fn is_releasable(&self) -> bool

Returns true if this object can be released, i.e., it is not subordinate.
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.