mirror of
https://github.com/g-truc/glm.git
synced 2025-04-15 01:18:14 +00:00
Wrap tvec3's static constants in GLM_STATIC_CONST_MEMBERS
- Fixed the indentation, too
This commit is contained in:
parent
4552ec737e
commit
8be318970c
3 changed files with 21 additions and 16 deletions
|
@ -58,6 +58,7 @@ namespace glm
|
|||
static GLM_RELAXED_CONSTEXPR precision prec = P;
|
||||
# endif//GLM_META_PROG_HELPERS
|
||||
|
||||
# ifdef GLM_STATIC_CONST_MEMBERS
|
||||
static const type ZERO;
|
||||
static const type X;
|
||||
static const type Y;
|
||||
|
@ -66,6 +67,7 @@ namespace glm
|
|||
static const type XZ;
|
||||
static const type YZ;
|
||||
static const type XYZ;
|
||||
# endif
|
||||
|
||||
// -- Data --
|
||||
|
||||
|
|
|
@ -32,30 +32,32 @@
|
|||
|
||||
namespace glm
|
||||
{
|
||||
template <typename T, precision P>
|
||||
const tvec3<T, P> tvec3<T, P>::ZERO = tvec3<T, P>(static_cast<T>(0), static_cast<T>(0), static_cast<T>(0));
|
||||
|
||||
template <typename T, precision P>
|
||||
const tvec3<T, P> tvec3<T, P>::X = tvec3<T, P>(static_cast<T>(1), static_cast<T>(0), static_cast<T>(0));
|
||||
# ifdef GLM_STATIC_CONST_MEMBERS
|
||||
template <typename T, precision P>
|
||||
const tvec3<T, P> tvec3<T, P>::ZERO = tvec3<T, P>(static_cast<T>(0), static_cast<T>(0), static_cast<T>(0));
|
||||
|
||||
template <typename T, precision P>
|
||||
const tvec3<T, P> tvec3<T, P>::Y = tvec3<T, P>(static_cast<T>(0), static_cast<T>(1), static_cast<T>(0));
|
||||
template <typename T, precision P>
|
||||
const tvec3<T, P> tvec3<T, P>::X = tvec3<T, P>(static_cast<T>(1), static_cast<T>(0), static_cast<T>(0));
|
||||
|
||||
template <typename T, precision P>
|
||||
const tvec3<T, P> tvec3<T, P>::Z = tvec3<T, P>(static_cast<T>(0), static_cast<T>(0), static_cast<T>(1));
|
||||
template <typename T, precision P>
|
||||
const tvec3<T, P> tvec3<T, P>::Y = tvec3<T, P>(static_cast<T>(0), static_cast<T>(1), static_cast<T>(0));
|
||||
|
||||
template <typename T, precision P>
|
||||
const tvec3<T, P> tvec3<T, P>::XY = tvec3<T, P>(static_cast<T>(1), static_cast<T>(1), static_cast<T>(0));
|
||||
template <typename T, precision P>
|
||||
const tvec3<T, P> tvec3<T, P>::Z = tvec3<T, P>(static_cast<T>(0), static_cast<T>(0), static_cast<T>(1));
|
||||
|
||||
template <typename T, precision P>
|
||||
const tvec3<T, P> tvec3<T, P>::XZ = tvec3<T, P>(static_cast<T>(1), static_cast<T>(0), static_cast<T>(1));
|
||||
template <typename T, precision P>
|
||||
const tvec3<T, P> tvec3<T, P>::XY = tvec3<T, P>(static_cast<T>(1), static_cast<T>(1), static_cast<T>(0));
|
||||
|
||||
template <typename T, precision P>
|
||||
const tvec3<T, P> tvec3<T, P>::YZ = tvec3<T, P>(static_cast<T>(0), static_cast<T>(1), static_cast<T>(1));
|
||||
template <typename T, precision P>
|
||||
const tvec3<T, P> tvec3<T, P>::XZ = tvec3<T, P>(static_cast<T>(1), static_cast<T>(0), static_cast<T>(1));
|
||||
|
||||
template <typename T, precision P>
|
||||
const tvec3<T, P> tvec3<T, P>::XYZ = tvec3<T, P>(static_cast<T>(1), static_cast<T>(1), static_cast<T>(1));
|
||||
template <typename T, precision P>
|
||||
const tvec3<T, P> tvec3<T, P>::YZ = tvec3<T, P>(static_cast<T>(0), static_cast<T>(1), static_cast<T>(1));
|
||||
|
||||
template <typename T, precision P>
|
||||
const tvec3<T, P> tvec3<T, P>::XYZ = tvec3<T, P>(static_cast<T>(1), static_cast<T>(1), static_cast<T>(1));
|
||||
# endif
|
||||
// -- Implicit basic constructors --
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
# define GLM_META_PROG_HELPERS
|
||||
#endif
|
||||
#define GLM_SWIZZLE
|
||||
#define GLM_STATIC_CONST_MEMBERS
|
||||
#include <glm/vector_relational.hpp>
|
||||
#include <glm/geometric.hpp>
|
||||
#include <glm/vec2.hpp>
|
||||
|
|
Loading…
Add table
Reference in a new issue