Assign method for CVector3f

This commit is contained in:
Jack Andersen 2015-11-25 14:23:29 -10:00
parent 8d54a3c7b5
commit dc5c903a0d
1 changed files with 4 additions and 2 deletions

View File

@ -34,15 +34,17 @@ public:
#endif #endif
#endif #endif
CVector3f(float xyz) {splat(xyz);} CVector3f(float xyz) {splat(xyz);}
CVector3f(float x, float y, float z) {v[0] = x; v[1] = y; v[2] = z; v[3] = 0.0;} void assign(float x, float y, float z) {v[0] = x; v[1] = y; v[2] = z; v[3] = 0.0;}
CVector3f(float x, float y, float z) {assign(x, y, z);}
#if ZE_ATHENA_TYPES #if ZE_ATHENA_TYPES
CVector3f(Athena::io::IStreamReader& input) void read(Athena::io::IStreamReader& input)
{ {
x = input.readFloat(); x = input.readFloat();
y = input.readFloat(); y = input.readFloat();
z = input.readFloat(); z = input.readFloat();
v[3] = 0.0f; v[3] = 0.0f;
} }
CVector3f(Athena::io::IStreamReader& input) {read(input);}
#endif #endif
CVector3f(const CVector2f& other) CVector3f(const CVector2f& other)
{ {