mirror of
https://github.com/zeldaret/ss
synced 2026-06-23 08:59:51 -04:00
mVec3_c rework to get copy working
This commit is contained in:
+14
-12
@@ -93,27 +93,29 @@ protected:
|
||||
public:
|
||||
/* 8002c3b0 */ dAcBase_c();
|
||||
|
||||
void setPostion(mVec3_c *r) {
|
||||
position.set(r->x, r->y, r->z);
|
||||
void setPostion(mVec3_c &r) {
|
||||
position = r;
|
||||
}
|
||||
void setScale(f32 x, f32 y, f32 z) {
|
||||
scale.set(x, y, z);
|
||||
void SetScale(mVec3_c &r) {
|
||||
scale = r;
|
||||
}
|
||||
void setScale(mVec3_c *r) {
|
||||
scale.set(r->x, r->y, r->z);
|
||||
}
|
||||
void setRotation(mAng3_c *r) {
|
||||
rotation = *r;
|
||||
void SetRotation(mAng3_c &r) {
|
||||
rotation = r;
|
||||
}
|
||||
|
||||
void copyPosition() {
|
||||
pos_copy.x = position.x;
|
||||
pos_copy.y = position.y;
|
||||
pos_copy.z = position.z;
|
||||
pos_copy = position;
|
||||
}
|
||||
|
||||
const mVec3_c &GetPostion() const {
|
||||
return position;
|
||||
}
|
||||
void copyRotation() {
|
||||
rot_copy = rotation;
|
||||
}
|
||||
mVec3_c GetPostionDifference(const dAcBase_c *other) {
|
||||
return position - other->position;
|
||||
}
|
||||
|
||||
public:
|
||||
// funcs found in TU
|
||||
|
||||
+3
-17
@@ -9,7 +9,7 @@ class mVec3_c : public EGG::Vector3f {
|
||||
public:
|
||||
/// @brief Constructs an empty vector.
|
||||
/* 80009ee0 */ mVec3_c() {}
|
||||
/* 80007460 */ ~mVec3_c() {}
|
||||
// /* 80007460 */ ~mVec3_c() {}
|
||||
|
||||
/// @brief Constructs a vector from a float array.
|
||||
mVec3_c(const f32 *p) {
|
||||
@@ -17,6 +17,7 @@ public:
|
||||
y = p[1];
|
||||
z = p[2];
|
||||
}
|
||||
|
||||
mVec3_c(const mVec3_c &other) {
|
||||
x = other.x;
|
||||
y = other.y;
|
||||
@@ -30,15 +31,8 @@ public:
|
||||
z = fz;
|
||||
}
|
||||
|
||||
void set(f32 fx, f32 fy, f32 fz) {
|
||||
x = fx;
|
||||
y = fy;
|
||||
z = fz;
|
||||
}
|
||||
mVec3_c &operator=(const mVec3_c &r) {
|
||||
x = r.x;
|
||||
y = r.y;
|
||||
z = r.z;
|
||||
set(r.x, r.y, r.z);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -86,14 +80,6 @@ public:
|
||||
return (const nw4r::math::VEC3 *)&x;
|
||||
}
|
||||
|
||||
/// @brief Augmented addition operator.
|
||||
mVec3_c &operator+=(const mVec3_c &v) {
|
||||
x += v.x;
|
||||
y += v.y;
|
||||
z += v.z;
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// @brief Augmented subtraction operator.
|
||||
mVec3_c &operator-=(const mVec3_c &v) {
|
||||
x -= v.x;
|
||||
|
||||
Reference in New Issue
Block a user