Skip to main content

Geoset

Struct Geoset 

Source
pub struct Geoset { /* private fields */ }
Expand description

Mesh geometry

A geoset is a complete mesh with vertices, normals, faces, and skinning data. Models can have multiple geosets with different materials or LOD levels.

Implementations§

Source§

impl Geoset

Source

pub fn new() -> Self

§Panics

Panics if the native allocation fails.

Source

pub fn vertex_positions(&self) -> &[Vector3f]

Vertex positions Zero-copy view of the underlying std::vector.

Source

pub fn vertex_positions_mut(&mut self) -> &mut [Vector3f]

Zero-copy mutable view. Resize first — the borrow forbids it after.

Source

pub fn set_vertex_positions(&mut self, values: &[Vector3f])

Source

pub fn resize_vertex_positions(&mut self, count: usize)

Source

pub fn vertex_normals(&self) -> &[Vector3f]

Vertex normals Zero-copy view of the underlying std::vector.

Source

pub fn vertex_normals_mut(&mut self) -> &mut [Vector3f]

Zero-copy mutable view. Resize first — the borrow forbids it after.

Source

pub fn set_vertex_normals(&mut self, values: &[Vector3f])

Source

pub fn resize_vertex_normals(&mut self, count: usize)

Source

pub fn face_type_groups(&self) -> &[u32]

Face type groups (4 = triangles) Zero-copy view of the underlying std::vector.

Source

pub fn face_type_groups_mut(&mut self) -> &mut [u32]

Zero-copy mutable view. Resize first — the borrow forbids it after.

Source

pub fn set_face_type_groups(&mut self, values: &[u32])

Source

pub fn resize_face_type_groups(&mut self, count: usize)

Source

pub fn face_groups(&self) -> &[u32]

Number of indices per group Zero-copy view of the underlying std::vector.

Source

pub fn face_groups_mut(&mut self) -> &mut [u32]

Zero-copy mutable view. Resize first — the borrow forbids it after.

Source

pub fn set_face_groups(&mut self, values: &[u32])

Source

pub fn resize_face_groups(&mut self, count: usize)

Source

pub fn faces(&self) -> &[u16]

Vertex indices (triangles) Zero-copy view of the underlying std::vector.

Source

pub fn faces_mut(&mut self) -> &mut [u16]

Zero-copy mutable view. Resize first — the borrow forbids it after.

Source

pub fn set_faces(&mut self, values: &[u16])

Source

pub fn resize_faces(&mut self, count: usize)

Source

pub fn vertex_groups(&self) -> &[u8]

Bone groups per vertex Zero-copy view of the underlying std::vector.

Source

pub fn vertex_groups_mut(&mut self) -> &mut [u8]

Zero-copy mutable view. Resize first — the borrow forbids it after.

Source

pub fn set_vertex_groups(&mut self, values: &[u8])

Source

pub fn resize_vertex_groups(&mut self, count: usize)

Source

pub fn matrix_groups(&self) -> &[u32]

Number of matrices per group Zero-copy view of the underlying std::vector.

Source

pub fn matrix_groups_mut(&mut self) -> &mut [u32]

Zero-copy mutable view. Resize first — the borrow forbids it after.

Source

pub fn set_matrix_groups(&mut self, values: &[u32])

Source

pub fn resize_matrix_groups(&mut self, count: usize)

Source

pub fn matrix_indices(&self) -> &[u32]

Bone indices Zero-copy view of the underlying std::vector.

Source

pub fn matrix_indices_mut(&mut self) -> &mut [u32]

Zero-copy mutable view. Resize first — the borrow forbids it after.

Source

pub fn set_matrix_indices(&mut self, values: &[u32])

Source

pub fn resize_matrix_indices(&mut self, count: usize)

Source

pub fn material_id(&self) -> u32

Material index

Source

pub fn set_material_id(&mut self, value: u32)

Source

pub fn selection_group(&self) -> u32

Selection group (for editor)

Source

pub fn set_selection_group(&mut self, value: u32)

Source

pub fn selection_flags(&self) -> u32

Selection flags

Source

pub fn set_selection_flags(&mut self, value: u32)

Source

pub fn lod(&self) -> u32

Level of detail index

Source

pub fn set_lod(&mut self, value: u32)

Source

pub fn lod_name(&self) -> String

LOD name

Source

pub fn set_lod_name(&mut self, value: &str)

Source

pub fn extent(&self) -> Ref<'_, Extent>

Bounding volume Borrows the field in place — no copy, no allocation.

Source

pub fn extent_mut(&mut self) -> RefMut<'_, Extent>

Source

pub fn sequence_extents_len(&self) -> usize

Per-sequence bounding volumes

Source

pub fn sequence_extents(&self, index: usize) -> Option<Ref<'_, Extent>>

Borrows element index in place. None when out of range.

Source

pub fn sequence_extents_mut( &mut self, index: usize, ) -> Option<RefMut<'_, Extent>>

Source

pub fn sequence_extents_iter( &self, ) -> impl ExactSizeIterator<Item = Ref<'_, Extent>>

Iterate the elements, borrowing each in turn.

Source

pub fn resize_sequence_extents(&mut self, count: usize)

Source

pub fn tangents(&self) -> &[Vector4f]

Tangent vectors (for normal mapping) Zero-copy view of the underlying std::vector.

Source

pub fn tangents_mut(&mut self) -> &mut [Vector4f]

Zero-copy mutable view. Resize first — the borrow forbids it after.

Source

pub fn set_tangents(&mut self, values: &[Vector4f])

Source

pub fn resize_tangents(&mut self, count: usize)

Source

pub fn skin_data(&self) -> &[u8]

Bone indices and weights Zero-copy view of the underlying std::vector.

Source

pub fn skin_data_mut(&mut self) -> &mut [u8]

Zero-copy mutable view. Resize first — the borrow forbids it after.

Source

pub fn set_skin_data(&mut self, values: &[u8])

Source

pub fn resize_skin_data(&mut self, count: usize)

Source

pub fn texture_coordinate_sets_len(&self) -> usize

UV coordinates (multiple sets) Number of inner sequences.

Source

pub fn texture_coordinate_sets(&self, outer: usize) -> &[Vector2f]

Zero-copy view of inner sequence outer. Empty when out of range.

Each inner vector is contiguous on its own, but the outer one is a vector of vectors — so this borrows per sequence rather than handing back one flat slice.

Source

pub fn texture_coordinate_sets_mut(&mut self, outer: usize) -> &mut [Vector2f]

Source

pub fn set_texture_coordinate_sets(&mut self, outer: usize, values: &[Vector2f])

Source

pub fn resize_texture_coordinate_sets(&mut self, count: usize)

Resize the outer sequence. Do this before taking any borrow.

Source

pub fn resize_texture_coordinate_sets_inner( &mut self, outer: usize, count: usize, )

Trait Implementations§

Source§

impl Debug for Geoset

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Geoset

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Drop for Geoset

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl Send for Geoset

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.