Core/Misc: update g3dlite lib (#2904)

* Core/Misc: update g3dlite lib

* update

Co-authored-by: Francesco Borzì <borzifrancesco@gmail.com>
This commit is contained in:
Viste
2020-07-30 13:35:45 +03:00
committed by GitHub
parent 91bbbf08eb
commit fcaf91b8b2
183 changed files with 13258 additions and 8022 deletions
+27 -8
View File
@@ -1,14 +1,14 @@
/**
@file PhysicsFrame.h
\file PhysicsFrame.h
@maintainer Morgan McGuire, http://graphics.cs.williams.edu
\maintainer Morgan McGuire, http://graphics.cs.williams.edu
@created 2002-07-08
@edited 2006-01-10
\created 2002-07-08
\edited 2011-05-10
*/
#ifndef G3D_PHYSICSFRAME_H
#define G3D_PHYSICSFRAME_H
#ifndef G3D_PhysicsFrame_h
#define G3D_PhysicsFrame_h
#include "G3D/platform.h"
#include "G3D/Vector3.h"
@@ -33,9 +33,9 @@ public:
Quat rotation;
/**
Takes object space points to world space.
Origin of this reference frame in its parent's frame.
*/
Vector3 translation;
Point3 translation;
/**
Initializes to the identity frame.
@@ -51,6 +51,13 @@ public:
PhysicsFrame(const Matrix3& rot) : rotation(rot), translation(Vector3::zero()) {}
PhysicsFrame(const CoordinateFrame& coordinateFrame);
PhysicsFrame& operator=(const PhysicsFrame& p) {
rotation = p.rotation;
translation = p.translation;
return *this;
}
/**
- PhysicsFrame( [quat], [vec3] )
- Vector3( ... )
@@ -59,6 +66,8 @@ public:
*/
PhysicsFrame(const class Any& any);
Any toAny() const;
/** Compose: create the transformation that is <I>other</I> followed by <I>this</I>.*/
PhysicsFrame operator*(const PhysicsFrame& other) const;
@@ -100,6 +109,16 @@ public:
translation += f.translation;
return *this;
}
bool operator==(const PhysicsFrame& other) const {
return (translation == other.translation) &&
((rotation == other.rotation) || (rotation == -other.rotation));
}
bool operator!=(const PhysicsFrame& other) const {
return ! ((*this) == other);
}
};
typedef PhysicsFrame PFrame;