mirror of
https://codeberg.org/icewind/vmdl.git
synced 2026-06-03 16:44:11 +02:00
rename transform
This commit is contained in:
parent
8efdc90210
commit
01f24876a0
3 changed files with 4 additions and 9 deletions
|
|
@ -172,11 +172,9 @@ impl Model {
|
|||
self.mdl.pose_parameters.iter()
|
||||
}
|
||||
|
||||
pub fn vertex_to_world_space(&self, vertex: &Vertex) -> Vector {
|
||||
pub fn apply_root_transform(&self, vec: Vector) -> Vector {
|
||||
let transform = self.idle_transform() * self.root_transform();
|
||||
transform
|
||||
.transform_vector(Vector3::from(vertex.position))
|
||||
.into()
|
||||
transform.transform_vector(Vector3::from(vec)).into()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -225,10 +225,7 @@ impl<'a> FrameValues<'a> {
|
|||
data: &self.data[offset..],
|
||||
};
|
||||
if next_header.total == 0 {
|
||||
return Err(ModelError::OutOfBounds {
|
||||
data: "animation value",
|
||||
offset,
|
||||
});
|
||||
return Ok(0);
|
||||
}
|
||||
next.get(index - self.header.total)
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue