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
impl Geoset
Sourcepub fn vertex_positions(&self) -> &[Vector3f]
pub fn vertex_positions(&self) -> &[Vector3f]
Vertex positions
Zero-copy view of the underlying std::vector.
Sourcepub fn vertex_positions_mut(&mut self) -> &mut [Vector3f]
pub fn vertex_positions_mut(&mut self) -> &mut [Vector3f]
Zero-copy mutable view. Resize first — the borrow forbids it after.
pub fn set_vertex_positions(&mut self, values: &[Vector3f])
pub fn resize_vertex_positions(&mut self, count: usize)
Sourcepub fn vertex_normals(&self) -> &[Vector3f]
pub fn vertex_normals(&self) -> &[Vector3f]
Vertex normals
Zero-copy view of the underlying std::vector.
Sourcepub fn vertex_normals_mut(&mut self) -> &mut [Vector3f]
pub fn vertex_normals_mut(&mut self) -> &mut [Vector3f]
Zero-copy mutable view. Resize first — the borrow forbids it after.
pub fn set_vertex_normals(&mut self, values: &[Vector3f])
pub fn resize_vertex_normals(&mut self, count: usize)
Sourcepub fn face_type_groups(&self) -> &[u32]
pub fn face_type_groups(&self) -> &[u32]
Face type groups (4 = triangles)
Zero-copy view of the underlying std::vector.
Sourcepub fn face_type_groups_mut(&mut self) -> &mut [u32]
pub fn face_type_groups_mut(&mut self) -> &mut [u32]
Zero-copy mutable view. Resize first — the borrow forbids it after.
pub fn set_face_type_groups(&mut self, values: &[u32])
pub fn resize_face_type_groups(&mut self, count: usize)
Sourcepub fn face_groups(&self) -> &[u32]
pub fn face_groups(&self) -> &[u32]
Number of indices per group
Zero-copy view of the underlying std::vector.
Sourcepub fn face_groups_mut(&mut self) -> &mut [u32]
pub fn face_groups_mut(&mut self) -> &mut [u32]
Zero-copy mutable view. Resize first — the borrow forbids it after.
pub fn set_face_groups(&mut self, values: &[u32])
pub fn resize_face_groups(&mut self, count: usize)
Sourcepub fn faces(&self) -> &[u16]
pub fn faces(&self) -> &[u16]
Vertex indices (triangles)
Zero-copy view of the underlying std::vector.
Sourcepub fn faces_mut(&mut self) -> &mut [u16]
pub fn faces_mut(&mut self) -> &mut [u16]
Zero-copy mutable view. Resize first — the borrow forbids it after.
pub fn set_faces(&mut self, values: &[u16])
pub fn resize_faces(&mut self, count: usize)
Sourcepub fn vertex_groups(&self) -> &[u8] ⓘ
pub fn vertex_groups(&self) -> &[u8] ⓘ
Bone groups per vertex
Zero-copy view of the underlying std::vector.
Sourcepub fn vertex_groups_mut(&mut self) -> &mut [u8] ⓘ
pub fn vertex_groups_mut(&mut self) -> &mut [u8] ⓘ
Zero-copy mutable view. Resize first — the borrow forbids it after.
pub fn set_vertex_groups(&mut self, values: &[u8])
pub fn resize_vertex_groups(&mut self, count: usize)
Sourcepub fn matrix_groups(&self) -> &[u32]
pub fn matrix_groups(&self) -> &[u32]
Number of matrices per group
Zero-copy view of the underlying std::vector.
Sourcepub fn matrix_groups_mut(&mut self) -> &mut [u32]
pub fn matrix_groups_mut(&mut self) -> &mut [u32]
Zero-copy mutable view. Resize first — the borrow forbids it after.
pub fn set_matrix_groups(&mut self, values: &[u32])
pub fn resize_matrix_groups(&mut self, count: usize)
Sourcepub fn matrix_indices(&self) -> &[u32]
pub fn matrix_indices(&self) -> &[u32]
Bone indices
Zero-copy view of the underlying std::vector.
Sourcepub fn matrix_indices_mut(&mut self) -> &mut [u32]
pub fn matrix_indices_mut(&mut self) -> &mut [u32]
Zero-copy mutable view. Resize first — the borrow forbids it after.
pub fn set_matrix_indices(&mut self, values: &[u32])
pub fn resize_matrix_indices(&mut self, count: usize)
Sourcepub fn material_id(&self) -> u32
pub fn material_id(&self) -> u32
Material index
pub fn set_material_id(&mut self, value: u32)
Sourcepub fn selection_group(&self) -> u32
pub fn selection_group(&self) -> u32
Selection group (for editor)
pub fn set_selection_group(&mut self, value: u32)
Sourcepub fn selection_flags(&self) -> u32
pub fn selection_flags(&self) -> u32
Selection flags
pub fn set_selection_flags(&mut self, value: u32)
pub fn set_lod(&mut self, value: u32)
pub fn set_lod_name(&mut self, value: &str)
Sourcepub fn extent(&self) -> Ref<'_, Extent>
pub fn extent(&self) -> Ref<'_, Extent>
Bounding volume Borrows the field in place — no copy, no allocation.
pub fn extent_mut(&mut self) -> RefMut<'_, Extent>
Sourcepub fn sequence_extents_len(&self) -> usize
pub fn sequence_extents_len(&self) -> usize
Per-sequence bounding volumes
Sourcepub fn sequence_extents(&self, index: usize) -> Option<Ref<'_, Extent>>
pub fn sequence_extents(&self, index: usize) -> Option<Ref<'_, Extent>>
Borrows element index in place. None when out of range.
pub fn sequence_extents_mut( &mut self, index: usize, ) -> Option<RefMut<'_, Extent>>
Sourcepub fn sequence_extents_iter(
&self,
) -> impl ExactSizeIterator<Item = Ref<'_, Extent>>
pub fn sequence_extents_iter( &self, ) -> impl ExactSizeIterator<Item = Ref<'_, Extent>>
Iterate the elements, borrowing each in turn.
pub fn resize_sequence_extents(&mut self, count: usize)
Sourcepub fn tangents(&self) -> &[Vector4f]
pub fn tangents(&self) -> &[Vector4f]
Tangent vectors (for normal mapping)
Zero-copy view of the underlying std::vector.
Sourcepub fn tangents_mut(&mut self) -> &mut [Vector4f]
pub fn tangents_mut(&mut self) -> &mut [Vector4f]
Zero-copy mutable view. Resize first — the borrow forbids it after.
pub fn set_tangents(&mut self, values: &[Vector4f])
pub fn resize_tangents(&mut self, count: usize)
Sourcepub fn skin_data(&self) -> &[u8] ⓘ
pub fn skin_data(&self) -> &[u8] ⓘ
Bone indices and weights
Zero-copy view of the underlying std::vector.
Sourcepub fn skin_data_mut(&mut self) -> &mut [u8] ⓘ
pub fn skin_data_mut(&mut self) -> &mut [u8] ⓘ
Zero-copy mutable view. Resize first — the borrow forbids it after.
pub fn set_skin_data(&mut self, values: &[u8])
pub fn resize_skin_data(&mut self, count: usize)
Sourcepub fn texture_coordinate_sets_len(&self) -> usize
pub fn texture_coordinate_sets_len(&self) -> usize
UV coordinates (multiple sets) Number of inner sequences.
Sourcepub fn texture_coordinate_sets(&self, outer: usize) -> &[Vector2f]
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.
pub fn texture_coordinate_sets_mut(&mut self, outer: usize) -> &mut [Vector2f]
pub fn set_texture_coordinate_sets(&mut self, outer: usize, values: &[Vector2f])
Sourcepub fn resize_texture_coordinate_sets(&mut self, count: usize)
pub fn resize_texture_coordinate_sets(&mut self, count: usize)
Resize the outer sequence. Do this before taking any borrow.