summaryrefslogtreecommitdiff
path: root/include/JSystem/JGeometry.h
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2021-12-24 13:01:37 -0800
committerJasper St. Pierre <jstpierre@mecheye.net>2021-12-24 13:01:37 -0800
commitb9a53e816975978d060446be054cc384cbddd3df (patch)
tree15c47ee2276227ea9a87f52c2addcf9e5d6ab9bc /include/JSystem/JGeometry.h
parente4e6a51a5ae4d88ba4b0e6eacc1374e877040f9f (diff)
JPAChildShape, more work on JPADynamicsBlock
Diffstat (limited to 'include/JSystem/JGeometry.h')
-rw-r--r--include/JSystem/JGeometry.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/JSystem/JGeometry.h b/include/JSystem/JGeometry.h
index fc2d86cd9b..a4c0ca50ed 100644
--- a/include/JSystem/JGeometry.h
+++ b/include/JSystem/JGeometry.h
@@ -33,6 +33,22 @@ struct TVec3<f32> {
y = other.y;
z = other.z;
}
+
+ void set(f32 x_, f32 y_, f32 z_) {
+ x = x_;
+ y = y_;
+ z = z_;
+ }
+
+ void zero() {
+ x = y = z = 0.0f;
+ }
+
+ void mul(const TVec3<f32>& a, const TVec3<f32>& b) {
+ x = a.x * b.x;
+ y = a.y * b.y;
+ z = a.z * b.z;
+ }
};
template <typename T>