Remove pre-C++17 Eigen alignment code

pull/1273/head
Andrew Tribick 2021-12-15 15:14:58 +01:00 committed by ajtribick
parent 9651e9e265
commit d7b896c013
32 changed files with 4 additions and 85 deletions

View File

@ -80,8 +80,6 @@ class M3DMeshMaterialGroup
class M3DTriangleMesh class M3DTriangleMesh
{ {
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
M3DTriangleMesh() = default; M3DTriangleMesh() = default;
~M3DTriangleMesh() = default; ~M3DTriangleMesh() = default;
M3DTriangleMesh(const M3DTriangleMesh&) = delete; M3DTriangleMesh(const M3DTriangleMesh&) = delete;
@ -114,7 +112,7 @@ class M3DTriangleMesh
private: private:
std::vector<Eigen::Vector3f> points{}; std::vector<Eigen::Vector3f> points{};
std::vector<Eigen::Vector2f, Eigen::aligned_allocator<Eigen::Vector2f>> texCoords{}; std::vector<Eigen::Vector2f> texCoords{};
std::vector<std::uint16_t> faces{}; std::vector<std::uint16_t> faces{};
std::vector<std::uint32_t> smoothingGroups{}; std::vector<std::uint32_t> smoothingGroups{};
std::vector<M3DMeshMaterialGroup> meshMaterialGroups{}; std::vector<M3DMeshMaterialGroup> meshMaterialGroups{};

View File

@ -122,8 +122,6 @@ class RingSystem
class Body : public AstroObject class Body : public AstroObject
{ {
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
Body(PlanetarySystem*, const std::string& name); Body(PlanetarySystem*, const std::string& name);
virtual ~Body(); virtual ~Body();

View File

@ -46,8 +46,6 @@ class Renderer;
class Console : public std::ostream class Console : public std::ostream
{ {
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
static constexpr const int PageRows = 10; static constexpr const int PageRows = 10;

View File

@ -158,8 +158,6 @@ static inline bool frustumCull(const Vector4d& curvePoint,
class HighPrec_VertexBuffer class HighPrec_VertexBuffer
{ {
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
HighPrec_VertexBuffer() : HighPrec_VertexBuffer() :
currentPosition(0), currentPosition(0),
capacity(4096), capacity(4096),
@ -389,7 +387,6 @@ private:
unsigned int capacity; unsigned int capacity;
struct Vertex struct Vertex
{ {
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
Vector4f position; Vector4f position;
Vector4f color; Vector4f color;
float scale; float scale;

View File

@ -36,8 +36,6 @@ class OpenCluster;
class DeepSkyObject : public AstroObject class DeepSkyObject : public AstroObject
{ {
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
virtual Selection toSelection(); virtual Selection toSelection();
DeepSkyObject() = default; DeepSkyObject() = default;
virtual ~DeepSkyObject() = default; virtual ~DeepSkyObject() = default;

View File

@ -69,8 +69,6 @@ class ReferenceFrame
class CachingFrame : public ReferenceFrame class CachingFrame : public ReferenceFrame
{ {
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
SHARED_TYPES(CachingFrame) SHARED_TYPES(CachingFrame)
CachingFrame(Selection _center); CachingFrame(Selection _center);
@ -180,8 +178,6 @@ class BodyMeanEquatorFrame : public ReferenceFrame
class FrameVector class FrameVector
{ {
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
FrameVector(const FrameVector& fv); FrameVector(const FrameVector& fv);
~FrameVector() = default; ~FrameVector() = default;
FrameVector& operator=(const FrameVector&); FrameVector& operator=(const FrameVector&);

View File

@ -52,7 +52,7 @@ bool operator< (const Blob& b1, const Blob& b2)
return (b1.position.squaredNorm() < b2.position.squaredNorm()); return (b1.position.squaredNorm() < b2.position.squaredNorm());
} }
typedef vector<Blob, aligned_allocator<Blob> > BlobVector; typedef vector<Blob> BlobVector;
class GalacticForm class GalacticForm
{ {
public: public:
@ -291,8 +291,6 @@ void Galaxy::render(const Vector3f& offset,
struct GalaxyVertex struct GalaxyVertex
{ {
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
Vector4f position; Vector4f position;
Matrix<GLushort, 4, 1> texCoord; // texCoord.x = x, texCoord.y = y, texCoord.z = color index, texCoord.w = alpha Matrix<GLushort, 4, 1> texCoord; // texCoord.x = x, texCoord.y = y, texCoord.z = color index, texCoord.w = alpha
}; };

View File

@ -27,8 +27,6 @@ class Renderer;
struct Blob struct Blob
{ {
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
Eigen::Vector4f position; Eigen::Vector4f position;
unsigned int colorIndex; unsigned int colorIndex;
float brightness; float brightness;
@ -39,8 +37,6 @@ class GalacticForm;
class Galaxy : public DeepSkyObject class Galaxy : public DeepSkyObject
{ {
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
const char* getType() const override; const char* getType() const override;
void setType(const std::string&) override; void setType(const std::string&) override;
std::string getDescription() const override; std::string getDescription() const override;

View File

@ -44,8 +44,6 @@ struct GlobularForm
class Globular : public DeepSkyObject class Globular : public DeepSkyObject
{ {
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
Globular(); Globular();
const char* getType() const override; const char* getType() const override;

View File

@ -41,8 +41,6 @@ public:
class EclipseShadow class EclipseShadow
{ {
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
const Body* caster; const Body* caster;
Eigen::Quaternionf casterOrientation; Eigen::Quaternionf casterOrientation;
Eigen::Vector3f origin; Eigen::Vector3f origin;
@ -55,8 +53,6 @@ public:
class RingShadow class RingShadow
{ {
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
RingSystem* ringSystem; RingSystem* ringSystem;
Eigen::Quaternionf casterOrientation; Eigen::Quaternionf casterOrientation;
Eigen::Vector3f origin; Eigen::Vector3f origin;
@ -67,9 +63,7 @@ public:
class LightingState class LightingState
{ {
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef std::vector<EclipseShadow> EclipseShadowVector;
typedef std::vector<EclipseShadow, Eigen::aligned_allocator<EclipseShadow> > EclipseShadowVector;
LightingState() : LightingState() :
nLights(0), nLights(0),

View File

@ -16,8 +16,6 @@
class Nebula : public DeepSkyObject class Nebula : public DeepSkyObject
{ {
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
Nebula() = default; Nebula() = default;
const char* getType() const override; const char* getType() const override;

View File

@ -107,8 +107,6 @@ private:
class Observer class Observer
{ {
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
static constexpr const double JourneyDuration = 5.0; static constexpr const double JourneyDuration = 5.0;
static constexpr const double StartInterpolation = 0.25; static constexpr const double StartInterpolation = 0.25;
static constexpr const double EndInterpolation = 0.75; static constexpr const double EndInterpolation = 0.75;
@ -236,7 +234,6 @@ public:
struct JourneyParams struct JourneyParams
{ {
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
double duration; double duration;
double startTime; double startTime;
UniversalCoord from; UniversalCoord from;

View File

@ -18,8 +18,6 @@
class OpenCluster : public DeepSkyObject class OpenCluster : public DeepSkyObject
{ {
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
OpenCluster() = default; OpenCluster() = default;
const char* getType() const override; const char* getType() const override;

View File

@ -56,8 +56,6 @@ class OverlayStreamBuf : public std::streambuf
class Overlay : public std::ostream class Overlay : public std::ostream
{ {
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
Overlay(Renderer&); Overlay(Renderer&);
Overlay() = delete; Overlay() = delete;
~Overlay() = default; ~Overlay() = default;

View File

@ -44,8 +44,6 @@ struct ParticleVertex
class ParticleEmitter class ParticleEmitter
{ {
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
ParticleEmitter(); ParticleEmitter();
~ParticleEmitter(); ~ParticleEmitter();

View File

@ -28,8 +28,6 @@ class Renderer;
class RenderContext class RenderContext
{ {
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
RenderContext(const cmod::Material*); RenderContext(const cmod::Material*);
RenderContext(Renderer*); RenderContext(Renderer*);
virtual ~RenderContext() = default; virtual ~RenderContext() = default;
@ -96,8 +94,6 @@ class Shadow_RenderContext : public RenderContext
class GLSL_RenderContext : public RenderContext class GLSL_RenderContext : public RenderContext
{ {
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
GLSL_RenderContext(Renderer* r, GLSL_RenderContext(Renderer* r,
const LightingState& ls, const LightingState& ls,
float _objRadius, float _objRadius,

View File

@ -109,8 +109,6 @@ enum class RenderMode
class Renderer class Renderer
{ {
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
Renderer(); Renderer();
~Renderer(); ~Renderer();
@ -486,8 +484,6 @@ class Renderer
struct RenderProperties struct RenderProperties
{ {
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
Surface* surface{ nullptr }; Surface* surface{ nullptr };
const Atmosphere* atmosphere{ nullptr }; const Atmosphere* atmosphere{ nullptr };
RingSystem* rings{ nullptr }; RingSystem* rings{ nullptr };

View File

@ -21,8 +21,6 @@ class Texture;
struct RenderInfo struct RenderInfo
{ {
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
#ifdef HDR_COMPRESS #ifdef HDR_COMPRESS
Color color{ 0.5f, 0.5f, 0.5f }; Color color{ 0.5f, 0.5f, 0.5f };
#else #else

View File

@ -18,8 +18,6 @@ class ReferenceMark;
struct RenderListEntry struct RenderListEntry
{ {
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
enum RenderableType enum RenderableType
{ {
RenderableStar, RenderableStar,

View File

@ -25,8 +25,6 @@ class Observer;
class SkyGrid class SkyGrid
{ {
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
enum LongitudeUnits enum LongitudeUnits
{ {
LongitudeDegrees, LongitudeDegrees,

View File

@ -87,8 +87,6 @@ class RotationModel
class CachingRotationModel : public RotationModel class CachingRotationModel : public RotationModel
{ {
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
CachingRotationModel(); CachingRotationModel();
virtual ~CachingRotationModel() = default; virtual ~CachingRotationModel() = default;
@ -119,8 +117,6 @@ private:
class ConstantOrientation : public RotationModel class ConstantOrientation : public RotationModel
{ {
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
ConstantOrientation(const Eigen::Quaterniond& q); ConstantOrientation(const Eigen::Quaterniond& q);
virtual ~ConstantOrientation() = default; virtual ~ConstantOrientation() = default;

View File

@ -28,13 +28,11 @@ using namespace celmath;
struct OrientationSample struct OrientationSample
{ {
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
Eigen::Quaternionf q; Eigen::Quaternionf q;
double t; double t;
}; };
typedef vector<OrientationSample, aligned_allocator<OrientationSample> > OrientationSampleVector; typedef vector<OrientationSample> OrientationSampleVector;
/*! /*!
* Sampled orientation files are ASCII text files containing a sequence of * Sampled orientation files are ASCII text files containing a sequence of

View File

@ -20,7 +20,6 @@ struct lua_State;
class ScriptedRotation : public RotationModel class ScriptedRotation : public RotationModel
{ {
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
ScriptedRotation() = default; ScriptedRotation() = default;
~ScriptedRotation() = default; ~ScriptedRotation() = default;

View File

@ -28,8 +28,6 @@ class CelestiaCore;
class CelestiaState class CelestiaState
{ {
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
CelestiaState() = default; CelestiaState() = default;
CelestiaState(CelestiaCore* appCore); CelestiaState(CelestiaCore* appCore);
~CelestiaState() = default; ~CelestiaState() = default;

View File

@ -19,8 +19,6 @@
struct FavoritesEntry struct FavoritesEntry
{ {
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
std::string name; std::string name;
std::string selectionName; std::string selectionName;

View File

@ -23,8 +23,6 @@ class CelestiaCore;
class Url class Url
{ {
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
constexpr static int CurrentVersion = 3; constexpr static int CurrentVersion = 3;
/*! The TimeSource specifies what the time will be set to when the user /*! The TimeSource specifies what the time will be set to when the user

View File

@ -17,8 +17,6 @@ template<class T>
class Ellipsoid class Ellipsoid
{ {
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
/*! Default Ellipsoid constructor. Create a unit sphere centered /*! Default Ellipsoid constructor. Create a unit sphere centered
* at the origin. * at the origin.
*/ */

View File

@ -19,8 +19,6 @@ namespace celmath
class Frustum class Frustum
{ {
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
using PlaneType = Eigen::Hyperplane<float, 3>; using PlaneType = Eigen::Hyperplane<float, 3>;
Frustum(float fov, float aspectRatio, float nearDist); Frustum(float fov, float aspectRatio, float nearDist);

View File

@ -17,8 +17,6 @@ namespace celmath
template<class T> class Sphere template<class T> class Sphere
{ {
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
Sphere() : Sphere() :
center(Eigen::Matrix<T, 3, 1>::Zero()), center(Eigen::Matrix<T, 3, 1>::Zero()),
radius(static_cast<T>(1)) radius(static_cast<T>(1))

View File

@ -114,8 +114,6 @@ class CommandGotoLongLat : public InstantaneousCommand
class CommandGotoLocation : public InstantaneousCommand class CommandGotoLocation : public InstantaneousCommand
{ {
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
CommandGotoLocation(double t, CommandGotoLocation(double t,
const Eigen::Vector3d& translation, const Eigen::Vector3d& translation,
const Eigen::Quaterniond& rotation); const Eigen::Quaterniond& rotation);
@ -339,8 +337,6 @@ class CommandSetPosition : public InstantaneousCommand
class CommandSetOrientation : public InstantaneousCommand class CommandSetOrientation : public InstantaneousCommand
{ {
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
CommandSetOrientation(const Eigen::Quaternionf&); CommandSetOrientation(const Eigen::Quaternionf&);
void process(ExecutionEnvironment&) override; void process(ExecutionEnvironment&) override;

View File

@ -54,8 +54,6 @@ struct UnicodeBlock
struct TextureFontPrivate struct TextureFontPrivate
{ {
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
struct FontVertex struct FontVertex
{ {
FontVertex(float _x, float _y, float _u, float _v) : FontVertex(float _x, float _y, float _u, float _v) :

View File

@ -143,8 +143,6 @@ class ModelViewWidget : public QGLWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
ModelViewWidget(QWidget *parent); ModelViewWidget(QWidget *parent);
~ModelViewWidget(); ~ModelViewWidget();