acidrainstudios / TrueReality

True Reality (TR) is an open source LGPL Game and Simulation Engine written entirely in Standard C++ and OpenGL. It runs on all Windows platforms and GNU/Linux. OpenSceneGraph is used as its graphics engine, along with many other open source projects for support of various features.
GNU Lesser General Public License v3.0
12 stars 7 forks source link

Matrix / Vector template implementation #110

Open AODQ opened 5 years ago

AODQ commented 5 years ago

Not really a need to have multiple header implementations of matrix / vectors. There should only be one implementation of matrix / vector, of course OSG makes this difficult but hopefully it is possible.

Example vector implementation

template <size_t Len, typename T> struct Vec {
  std::array<T, Len> data;
};

template <typename T> struct Vec<3, T> final : Vec<0, T> {
  Vec3<3, T> normalized();
};