Fix linux build.
This commit is contained in:
parent
a6d92e142f
commit
9e1d951520
50 changed files with 1586 additions and 1192 deletions
45
src/base/geometry/Rotation.h
Normal file
45
src/base/geometry/Rotation.h
Normal file
|
@ -0,0 +1,45 @@
|
|||
#pragma once
|
||||
|
||||
#include "Point.h"
|
||||
#include "Vector.h"
|
||||
#include "Matrix.h"
|
||||
|
||||
class Rotation
|
||||
{
|
||||
public:
|
||||
enum class Axis
|
||||
{
|
||||
X,
|
||||
Y,
|
||||
Z,
|
||||
USER
|
||||
};
|
||||
|
||||
Rotation(double angle = 0.0, Axis axis = Axis::Z, const Point& loc = {}, const Vector& customAxis = {});
|
||||
|
||||
const Matrix& getMatrix() const;
|
||||
|
||||
bool isIdentity() const;
|
||||
|
||||
bool isEqual(const Rotation& rotation) const;
|
||||
|
||||
bool operator==(const Rotation& rhs) const
|
||||
{
|
||||
return isEqual(rhs);
|
||||
}
|
||||
|
||||
bool operator!=(const Rotation& rhs) const
|
||||
{
|
||||
return !operator==(rhs);
|
||||
}
|
||||
|
||||
private:
|
||||
void updateMatrix();
|
||||
|
||||
double mAngle{ 0 };
|
||||
Axis mAxis{ Axis::Z };
|
||||
Point mPoint;
|
||||
Vector mCustomAxis;
|
||||
|
||||
Matrix mMatrix;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue