pub struct WmoEditor { /* private fields */ }Expand description
WMO editor for modifying WMO files
Implementations§
Source§impl WmoEditor
impl WmoEditor
Sourcepub fn group_mut(&mut self, index: usize) -> Option<&mut WmoGroup>
pub fn group_mut(&mut self, index: usize) -> Option<&mut WmoGroup>
Get a mutable reference to a specific group
Sourcepub fn group_count(&self) -> usize
pub fn group_count(&self) -> usize
Get the number of groups
Sourcepub fn is_group_loaded(&self, index: usize) -> bool
pub fn is_group_loaded(&self, index: usize) -> bool
Check if a specific group has been loaded
Sourcepub fn is_group_modified(&self, index: usize) -> bool
pub fn is_group_modified(&self, index: usize) -> bool
Check if a specific group has been modified
Sourcepub fn is_root_modified(&self) -> bool
pub fn is_root_modified(&self) -> bool
Check if the root has been modified
Sourcepub fn convert_to_version(&mut self, target_version: WmoVersion) -> Result<()>
pub fn convert_to_version(&mut self, target_version: WmoVersion) -> Result<()>
Convert to a specific version
Sourcepub fn original_version(&self) -> WmoVersion
pub fn original_version(&self) -> WmoVersion
Get the original version of the WMO
Sourcepub fn current_version(&self) -> WmoVersion
pub fn current_version(&self) -> WmoVersion
Get the current version of the WMO
Sourcepub fn save_root<W: Write + Seek>(&self, writer: &mut W) -> Result<()>
pub fn save_root<W: Write + Seek>(&self, writer: &mut W) -> Result<()>
Save the root WMO to a writer
Sourcepub fn save_group<W: Write + Seek>(
&self,
writer: &mut W,
index: usize,
) -> Result<()>
pub fn save_group<W: Write + Seek>( &self, writer: &mut W, index: usize, ) -> Result<()>
Save a specific group to a writer
Sourcepub fn add_material(&mut self, material: WmoMaterial) -> usize
pub fn add_material(&mut self, material: WmoMaterial) -> usize
Add a new material
Sourcepub fn remove_material(&mut self, index: usize) -> Result<WmoMaterial>
pub fn remove_material(&mut self, index: usize) -> Result<WmoMaterial>
Remove a material
Sourcepub fn material(&self, index: usize) -> Option<&WmoMaterial>
pub fn material(&self, index: usize) -> Option<&WmoMaterial>
Get a reference to a material
Sourcepub fn material_mut(&mut self, index: usize) -> Option<&mut WmoMaterial>
pub fn material_mut(&mut self, index: usize) -> Option<&mut WmoMaterial>
Get a mutable reference to a material
Sourcepub fn add_texture(&mut self, texture: String) -> usize
pub fn add_texture(&mut self, texture: String) -> usize
Add a new texture
Sourcepub fn remove_texture(&mut self, index: usize) -> Result<String>
pub fn remove_texture(&mut self, index: usize) -> Result<String>
Remove a texture
Sourcepub fn texture_mut(&mut self, index: usize) -> Option<&mut String>
pub fn texture_mut(&mut self, index: usize) -> Option<&mut String>
Get a mutable reference to a texture
Sourcepub fn create_group(&mut self, name: String) -> usize
pub fn create_group(&mut self, name: String) -> usize
Create a new group
Sourcepub fn remove_group(&mut self, index: usize) -> Result<WmoGroupInfo>
pub fn remove_group(&mut self, index: usize) -> Result<WmoGroupInfo>
Remove a group
Sourcepub fn add_vertex(&mut self, group_index: usize, vertex: Vec3) -> Result<usize>
pub fn add_vertex(&mut self, group_index: usize, vertex: Vec3) -> Result<usize>
Add a vertex to a group
Sourcepub fn remove_vertex(
&mut self,
group_index: usize,
vertex_index: usize,
) -> Result<Vec3>
pub fn remove_vertex( &mut self, group_index: usize, vertex_index: usize, ) -> Result<Vec3>
Remove a vertex from a group
Sourcepub fn recalculate_group_bounding_box(
&mut self,
group_index: usize,
) -> Result<()>
pub fn recalculate_group_bounding_box( &mut self, group_index: usize, ) -> Result<()>
Recalculate the bounding box for a group
Sourcepub fn recalculate_global_bounding_box(&mut self) -> Result<()>
pub fn recalculate_global_bounding_box(&mut self) -> Result<()>
Recalculate the global bounding box
Sourcepub fn add_doodad(&mut self, doodad: WmoDoodadDef) -> usize
pub fn add_doodad(&mut self, doodad: WmoDoodadDef) -> usize
Add a doodad definition
Sourcepub fn remove_doodad(&mut self, index: usize) -> Result<WmoDoodadDef>
pub fn remove_doodad(&mut self, index: usize) -> Result<WmoDoodadDef>
Remove a doodad definition
Sourcepub fn add_doodad_set(&mut self, set: WmoDoodadSet) -> usize
pub fn add_doodad_set(&mut self, set: WmoDoodadSet) -> usize
Doodad set manipulation methods Add a doodad set
Sourcepub fn remove_doodad_set(&mut self, index: usize) -> Result<WmoDoodadSet>
pub fn remove_doodad_set(&mut self, index: usize) -> Result<WmoDoodadSet>
Remove a doodad set