- Added GLM_FORCE_NO_CTOR_INIT
This commit is contained in:
@@ -59,7 +59,7 @@ namespace glm
|
||||
tvec3<T, P> axis(normalize(v));
|
||||
tvec3<T, P> temp((T(1) - c) * axis);
|
||||
|
||||
tmat4x4<T, P> Rotate(tmat4x4<T, P>::_null);
|
||||
tmat4x4<T, P> Rotate(uninitialize);
|
||||
Rotate[0][0] = c + temp[0] * axis[0];
|
||||
Rotate[0][1] = 0 + temp[0] * axis[1] + s * axis[2];
|
||||
Rotate[0][2] = 0 + temp[0] * axis[2] - s * axis[1];
|
||||
@@ -72,7 +72,7 @@ namespace glm
|
||||
Rotate[2][1] = 0 + temp[2] * axis[1] - s * axis[0];
|
||||
Rotate[2][2] = c + temp[2] * axis[2];
|
||||
|
||||
tmat4x4<T, P> Result(tmat4x4<T, P>::_null);
|
||||
tmat4x4<T, P> Result(uninitialize);
|
||||
Result[0] = m[0] * Rotate[0][0] + m[1] * Rotate[0][1] + m[2] * Rotate[0][2];
|
||||
Result[1] = m[0] * Rotate[1][0] + m[1] * Rotate[1][1] + m[2] * Rotate[1][2];
|
||||
Result[2] = m[0] * Rotate[2][0] + m[1] * Rotate[2][1] + m[2] * Rotate[2][2];
|
||||
@@ -121,7 +121,7 @@ namespace glm
|
||||
tvec3<T, P> const & v
|
||||
)
|
||||
{
|
||||
tmat4x4<T, P> Result(tmat4x4<T, P>::_null);
|
||||
tmat4x4<T, P> Result(uninitialize);
|
||||
Result[0] = m[0] * v[0];
|
||||
Result[1] = m[1] * v[1];
|
||||
Result[2] = m[2] * v[2];
|
||||
|
||||
@@ -58,8 +58,6 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
struct tquat
|
||||
{
|
||||
enum ctor{_null};
|
||||
|
||||
typedef T value_type;
|
||||
typedef tvec4<bool, P> bool_type;
|
||||
|
||||
|
||||
@@ -60,34 +60,21 @@ namespace detail
|
||||
#endif
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tquat<T, P>::tquat() :
|
||||
x(0),
|
||||
y(0),
|
||||
z(0),
|
||||
w(1)
|
||||
GLM_FUNC_QUALIFIER tquat<T, P>::tquat()
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
: x(0), y(0), z(0), w(1)
|
||||
# endif
|
||||
{}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tquat<T, P>::tquat
|
||||
(
|
||||
tquat<T, P> const & q
|
||||
) :
|
||||
x(q.x),
|
||||
y(q.y),
|
||||
z(q.z),
|
||||
w(q.w)
|
||||
GLM_FUNC_QUALIFIER tquat<T, P>::tquat(tquat<T, P> const & q) :
|
||||
x(q.x), y(q.y), z(q.z), w(q.w)
|
||||
{}
|
||||
|
||||
template <typename T, precision P>
|
||||
template <precision Q>
|
||||
GLM_FUNC_QUALIFIER tquat<T, P>::tquat
|
||||
(
|
||||
tquat<T, Q> const & q
|
||||
) :
|
||||
x(q.x),
|
||||
y(q.y),
|
||||
z(q.z),
|
||||
w(q.w)
|
||||
GLM_FUNC_QUALIFIER tquat<T, P>::tquat(tquat<T, Q> const & q) :
|
||||
x(q.x), y(q.y), z(q.z), w(q.w)
|
||||
{}
|
||||
|
||||
template <typename T, precision P>
|
||||
@@ -746,7 +733,7 @@ namespace detail
|
||||
T biggestVal = sqrt(fourBiggestSquaredMinus1 + T(1)) * T(0.5);
|
||||
T mult = static_cast<T>(0.25) / biggestVal;
|
||||
|
||||
tquat<T, P> Result(tquat<T, P>::_null);
|
||||
tquat<T, P> Result(uninitialize);
|
||||
switch(biggestIndex)
|
||||
{
|
||||
case 0:
|
||||
@@ -819,7 +806,7 @@ namespace detail
|
||||
tvec3<T, P> const & v
|
||||
)
|
||||
{
|
||||
tquat<T, P> Result(tquat<T, P>::_null);
|
||||
tquat<T, P> Result(uninitialize);
|
||||
|
||||
T const a(angle);
|
||||
T const s = glm::sin(a * static_cast<T>(0.5));
|
||||
@@ -838,7 +825,7 @@ namespace detail
|
||||
tquat<T, P> const & y
|
||||
)
|
||||
{
|
||||
tvec4<bool, P> Result(tvec4<bool, P>::_null);
|
||||
tvec4<bool, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
|
||||
Result[i] = x[i] < y[i];
|
||||
return Result;
|
||||
@@ -851,7 +838,7 @@ namespace detail
|
||||
tquat<T, P> const & y
|
||||
)
|
||||
{
|
||||
tvec4<bool, P> Result(tvec4<bool, P>::_null);
|
||||
tvec4<bool, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
|
||||
Result[i] = x[i] <= y[i];
|
||||
return Result;
|
||||
@@ -864,7 +851,7 @@ namespace detail
|
||||
tquat<T, P> const & y
|
||||
)
|
||||
{
|
||||
tvec4<bool, P> Result(tvec4<bool, P>::_null);
|
||||
tvec4<bool, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
|
||||
Result[i] = x[i] > y[i];
|
||||
return Result;
|
||||
@@ -877,7 +864,7 @@ namespace detail
|
||||
tquat<T, P> const & y
|
||||
)
|
||||
{
|
||||
tvec4<bool, P> Result(tvec4<bool, P>::_null);
|
||||
tvec4<bool, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
|
||||
Result[i] = x[i] >= y[i];
|
||||
return Result;
|
||||
@@ -890,7 +877,7 @@ namespace detail
|
||||
tquat<T, P> const & y
|
||||
)
|
||||
{
|
||||
tvec4<bool, P> Result(tvec4<bool, P>::_null);
|
||||
tvec4<bool, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
|
||||
Result[i] = x[i] == y[i];
|
||||
return Result;
|
||||
@@ -903,7 +890,7 @@ namespace detail
|
||||
tquat<T, P> const & y
|
||||
)
|
||||
{
|
||||
tvec4<bool, P> Result(tvec4<bool, P>::_null);
|
||||
tvec4<bool, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
|
||||
Result[i] = x[i] != y[i];
|
||||
return Result;
|
||||
|
||||
@@ -227,7 +227,7 @@ namespace glm
|
||||
template<typename T, precision P, template<typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<T, P> next_float(vecType<T, P> const & x)
|
||||
{
|
||||
vecType<T, P> Result(vecType<T, P>::_null);
|
||||
vecType<T, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
|
||||
Result[i] = next_float(x[i]);
|
||||
return Result;
|
||||
@@ -262,7 +262,7 @@ namespace glm
|
||||
template<typename T, precision P, template<typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<T, P> prev_float(vecType<T, P> const & x)
|
||||
{
|
||||
vecType<T, P> Result(vecType<T, P>::_null);
|
||||
vecType<T, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
|
||||
Result[i] = prev_float(x[i]);
|
||||
return Result;
|
||||
@@ -280,7 +280,7 @@ namespace glm
|
||||
template<typename T, precision P, template<typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<T, P> next_float(vecType<T, P> const & x, vecType<uint, P> const & ulps)
|
||||
{
|
||||
vecType<T, P> Result(vecType<T, P>::_null);
|
||||
vecType<T, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
|
||||
Result[i] = next_float(x[i], ulps[i]);
|
||||
return Result;
|
||||
@@ -298,7 +298,7 @@ namespace glm
|
||||
template<typename T, precision P, template<typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<T, P> prev_float(vecType<T, P> const & x, vecType<uint, P> const & ulps)
|
||||
{
|
||||
vecType<T, P> Result(vecType<T, P>::_null);
|
||||
vecType<T, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
|
||||
Result[i] = prev_float(x[i], ulps[i]);
|
||||
return Result;
|
||||
@@ -338,7 +338,7 @@ namespace glm
|
||||
template<typename T, precision P, template<typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<uint, P> float_distance(vecType<T, P> const & x, vecType<T, P> const & y)
|
||||
{
|
||||
vecType<uint, P> Result(vecType<T, P>::_null);
|
||||
vecType<uint, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
|
||||
Result[i] = float_distance(x[i], y[i]);
|
||||
return Result;
|
||||
|
||||
Reference in New Issue
Block a user