mirror of
https://codeberg.org/icewind/vmdl.git
synced 2026-06-03 16:44:11 +02:00
update threed
This commit is contained in:
parent
9765b2171a
commit
89529579be
4 changed files with 133 additions and 102 deletions
|
|
@ -3,7 +3,7 @@ use arrayvec::ArrayString;
|
|||
use bytemuck::{Pod, Zeroable};
|
||||
use std::fmt;
|
||||
use std::fmt::{Display, Formatter};
|
||||
use std::ops::Add;
|
||||
use std::ops::{Add, Mul};
|
||||
use cgmath::Vector3;
|
||||
|
||||
#[derive(Debug, Clone, Copy, Zeroable, Pod)]
|
||||
|
|
@ -74,6 +74,18 @@ impl Add<Vector> for Vector {
|
|||
}
|
||||
}
|
||||
|
||||
impl Mul<f32> for Vector {
|
||||
type Output = Vector;
|
||||
|
||||
fn mul(self, rhs: f32) -> Self::Output {
|
||||
Self {
|
||||
x: self.x * rhs,
|
||||
y: self.y * rhs,
|
||||
z: self.z * rhs,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, Zeroable, Pod)]
|
||||
#[repr(C)]
|
||||
pub struct Quaternion {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue