mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 20:39:18 +02:00
serializacja e3d
This commit is contained in:
17
Float3d.h
17
Float3d.h
@@ -184,11 +184,12 @@ struct float8
|
||||
|
||||
class float4x4
|
||||
{ // macierz transformacji pojedynczej precyzji
|
||||
public:
|
||||
float e[16];
|
||||
|
||||
public:
|
||||
void deserialize_float32(std::istream &s);
|
||||
void deserialize_float64(std::istream &s);
|
||||
void deserialize_float32(std::istream&);
|
||||
void deserialize_float64(std::istream&);
|
||||
void serialize_float32(std::ostream&);
|
||||
float4x4(void){};
|
||||
float4x4(float f[16])
|
||||
{
|
||||
@@ -282,6 +283,16 @@ inline float4x4 &float4x4::Rotation(double angle, float3 axis)
|
||||
return *this;
|
||||
};
|
||||
|
||||
inline bool operator==(const float4x4& v1, const float4x4& v2)
|
||||
{
|
||||
for (size_t i = 0; i < 16; i++)
|
||||
{
|
||||
if (v1.e[i] != v2.e[i])
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
inline float4x4 operator*(const float4x4 &m1, const float4x4 &m2)
|
||||
{ // iloczyn macierzy
|
||||
float4x4 retVal;
|
||||
|
||||
Reference in New Issue
Block a user