mirror of
https://github.com/g-truc/glm.git
synced 2024-11-10 12:41:54 +00:00
Renamed gentype::null into gentype::_null for Tizen, #78
This commit is contained in:
parent
31805bcd79
commit
c795562f67
@ -50,7 +50,7 @@ namespace glm
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/abs.xml">GLSL abs man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
template <typename genType>
|
||||
genType abs(genType const & x);
|
||||
|
||||
/// Returns 1.0 if x > 0, 0.0 if x == 0, or -1.0 if x < 0.
|
||||
@ -59,7 +59,7 @@ namespace glm
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sign.xml">GLSL sign man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
template <typename genType>
|
||||
genType sign(genType const & x);
|
||||
|
||||
/// Returns a value equal to the nearest integer that is less then or equal to x.
|
||||
@ -68,52 +68,52 @@ namespace glm
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floor.xml">GLSL floor man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
template <typename genType>
|
||||
genType floor(genType const & x);
|
||||
|
||||
/// Returns a value equal to the nearest integer to x
|
||||
/// whose absolute value is not larger than the absolute value of x.
|
||||
/// Returns a value equal to the nearest integer to x
|
||||
/// whose absolute value is not larger than the absolute value of x.
|
||||
///
|
||||
/// @tparam genType Floating-point scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/trunc.xml">GLSL trunc man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
template <typename genType>
|
||||
genType trunc(genType const & x);
|
||||
|
||||
/// Returns a value equal to the nearest integer to x.
|
||||
/// The fraction 0.5 will round in a direction chosen by the
|
||||
/// implementation, presumably the direction that is fastest.
|
||||
/// This includes the possibility that round(x) returns the
|
||||
/// same value as roundEven(x) for all values of x.
|
||||
/// Returns a value equal to the nearest integer to x.
|
||||
/// The fraction 0.5 will round in a direction chosen by the
|
||||
/// implementation, presumably the direction that is fastest.
|
||||
/// This includes the possibility that round(x) returns the
|
||||
/// same value as roundEven(x) for all values of x.
|
||||
///
|
||||
/// @tparam genType Floating-point scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/round.xml">GLSL round man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
template <typename genType>
|
||||
genType round(genType const & x);
|
||||
|
||||
/// Returns a value equal to the nearest integer to x.
|
||||
/// A fractional part of 0.5 will round toward the nearest even
|
||||
/// integer. (Both 3.5 and 4.5 for x will return 4.0.)
|
||||
/// integer. (Both 3.5 and 4.5 for x will return 4.0.)
|
||||
///
|
||||
/// @tparam genType Floating-point scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/roundEven.xml">GLSL roundEven man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
/// @see <a href="http://developer.amd.com/documentation/articles/pages/New-Round-to-Even-Technique.aspx">New round to even technique</a>
|
||||
template <typename genType>
|
||||
template <typename genType>
|
||||
genType roundEven(genType const & x);
|
||||
|
||||
/// Returns a value equal to the nearest integer
|
||||
/// that is greater than or equal to x.
|
||||
/// Returns a value equal to the nearest integer
|
||||
/// that is greater than or equal to x.
|
||||
///
|
||||
/// @tparam genType Floating-point scalar or vector types.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/ceil.xml">GLSL ceil man page</a>
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
|
||||
template <typename genType>
|
||||
template <typename genType>
|
||||
genType ceil(genType const & x);
|
||||
|
||||
/// Return x - floor(x).
|
||||
|
@ -38,7 +38,7 @@ namespace glm
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::type<typename matType::value_type>::is_float, "'matrixCompMult' only accept floating-point inputs");
|
||||
|
||||
matType result(matType::null);
|
||||
matType result(matType::_null);
|
||||
for(typename matType::size_type i = 0; i < matType::row_size(); ++i)
|
||||
result[i] = x[i] * y[i];
|
||||
return result;
|
||||
@ -230,7 +230,7 @@ namespace glm
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::type<T>::is_float, "'transpose' only accept floating-point inputs");
|
||||
|
||||
detail::tmat2x2<T, P> result(detail::tmat2x2<T, P>::null);
|
||||
detail::tmat2x2<T, P> result(detail::tmat2x2<T, P>::_null);
|
||||
result[0][0] = m[0][0];
|
||||
result[0][1] = m[1][0];
|
||||
result[1][0] = m[0][1];
|
||||
@ -246,7 +246,7 @@ namespace glm
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::type<T>::is_float, "'transpose' only accept floating-point inputs");
|
||||
|
||||
detail::tmat3x3<T, P> result(detail::tmat3x3<T, P>::null);
|
||||
detail::tmat3x3<T, P> result(detail::tmat3x3<T, P>::_null);
|
||||
result[0][0] = m[0][0];
|
||||
result[0][1] = m[1][0];
|
||||
result[0][2] = m[2][0];
|
||||
@ -269,7 +269,7 @@ namespace glm
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::type<T>::is_float, "'transpose' only accept floating-point inputs");
|
||||
|
||||
detail::tmat4x4<T, P> result(detail::tmat4x4<T, P>::null);
|
||||
detail::tmat4x4<T, P> result(detail::tmat4x4<T, P>::_null);
|
||||
result[0][0] = m[0][0];
|
||||
result[0][1] = m[1][0];
|
||||
result[0][2] = m[2][0];
|
||||
@ -300,7 +300,7 @@ namespace glm
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::type<T>::is_float, "'transpose' only accept floating-point inputs");
|
||||
|
||||
detail::tmat2x3<T, P> result(detail::tmat2x3<T, P>::null);
|
||||
detail::tmat2x3<T, P> result(detail::tmat2x3<T, P>::_null);
|
||||
result[0][0] = m[0][0];
|
||||
result[0][1] = m[1][0];
|
||||
result[0][2] = m[2][0];
|
||||
@ -318,7 +318,7 @@ namespace glm
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::type<T>::is_float, "'transpose' only accept floating-point inputs");
|
||||
|
||||
detail::tmat3x2<T, P> result(detail::tmat3x2<T, P>::null);
|
||||
detail::tmat3x2<T, P> result(detail::tmat3x2<T, P>::_null);
|
||||
result[0][0] = m[0][0];
|
||||
result[0][1] = m[1][0];
|
||||
result[1][0] = m[0][1];
|
||||
@ -336,7 +336,7 @@ namespace glm
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::type<T>::is_float, "'transpose' only accept floating-point inputs");
|
||||
|
||||
detail::tmat2x4<T, P> result(detail::tmat2x4<T, P>::null);
|
||||
detail::tmat2x4<T, P> result(detail::tmat2x4<T, P>::_null);
|
||||
result[0][0] = m[0][0];
|
||||
result[0][1] = m[1][0];
|
||||
result[0][2] = m[2][0];
|
||||
@ -356,7 +356,7 @@ namespace glm
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::type<T>::is_float, "'transpose' only accept floating-point inputs");
|
||||
|
||||
detail::tmat4x2<T, P> result(detail::tmat4x2<T, P>::null);
|
||||
detail::tmat4x2<T, P> result(detail::tmat4x2<T, P>::_null);
|
||||
result[0][0] = m[0][0];
|
||||
result[0][1] = m[1][0];
|
||||
result[1][0] = m[0][1];
|
||||
@ -376,7 +376,7 @@ namespace glm
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::type<T>::is_float, "'transpose' only accept floating-point inputs");
|
||||
|
||||
detail::tmat3x4<T, P> result(detail::tmat3x4<T, P>::null);
|
||||
detail::tmat3x4<T, P> result(detail::tmat3x4<T, P>::_null);
|
||||
result[0][0] = m[0][0];
|
||||
result[0][1] = m[1][0];
|
||||
result[0][2] = m[2][0];
|
||||
@ -400,7 +400,7 @@ namespace glm
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::type<T>::is_float, "'transpose' only accept floating-point inputs");
|
||||
|
||||
detail::tmat4x3<T, P> result(detail::tmat4x3<T, P>::null);
|
||||
detail::tmat4x3<T, P> result(detail::tmat4x3<T, P>::_null);
|
||||
result[0][0] = m[0][0];
|
||||
result[0][1] = m[1][0];
|
||||
result[0][2] = m[2][0];
|
||||
@ -502,7 +502,7 @@ namespace glm
|
||||
|
||||
T Determinant = determinant(m);
|
||||
|
||||
detail::tmat3x3<T, P> Inverse(detail::tmat3x3<T, P>::null);
|
||||
detail::tmat3x3<T, P> Inverse(detail::tmat3x3<T, P>::_null);
|
||||
Inverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]);
|
||||
Inverse[1][0] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]);
|
||||
Inverse[2][0] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]);
|
||||
|
@ -41,7 +41,7 @@ namespace glm
|
||||
"Invalid template instantiation of 'lessThan', GLM vector types required floating-point or integer value types vectors");
|
||||
assert(x.length() == y.length());
|
||||
|
||||
typename vecType<bool, P>::bool_type Result(vecType<bool, P>::null);
|
||||
typename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);
|
||||
for(typename vecType<bool, P>::size_type i = 0; i < x.length(); ++i)
|
||||
Result[i] = x[i] < y[i];
|
||||
|
||||
@ -61,7 +61,7 @@ namespace glm
|
||||
"Invalid template instantiation of 'lessThanEqual', GLM vector types required floating-point or integer value types vectors");
|
||||
assert(x.length() == y.length());
|
||||
|
||||
typename vecType<bool, P>::bool_type Result(vecType<bool, P>::null);
|
||||
typename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);
|
||||
for(typename vecType<bool, P>::size_type i = 0; i < x.length(); ++i)
|
||||
Result[i] = x[i] <= y[i];
|
||||
return Result;
|
||||
@ -80,7 +80,7 @@ namespace glm
|
||||
"Invalid template instantiation of 'greaterThan', GLM vector types required floating-point or integer value types vectors");
|
||||
assert(x.length() == y.length());
|
||||
|
||||
typename vecType<bool, P>::bool_type Result(vecType<bool, P>::null);
|
||||
typename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);
|
||||
for(typename vecType<bool, P>::size_type i = 0; i < x.length(); ++i)
|
||||
Result[i] = x[i] > y[i];
|
||||
return Result;
|
||||
@ -99,7 +99,7 @@ namespace glm
|
||||
"Invalid template instantiation of 'greaterThanEqual', GLM vector types required floating-point or integer value types vectors");
|
||||
assert(x.length() == y.length());
|
||||
|
||||
typename vecType<bool, P>::bool_type Result(vecType<bool, P>::null);
|
||||
typename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);
|
||||
for(typename vecType<bool, P>::size_type i = 0; i < x.length(); ++i)
|
||||
Result[i] = x[i] >= y[i];
|
||||
return Result;
|
||||
@ -116,7 +116,7 @@ namespace glm
|
||||
// "Invalid template instantiation of 'equal', GLM vector types required");
|
||||
assert(x.length() == y.length());
|
||||
|
||||
typename vecType<bool, P>::bool_type Result(vecType<bool, P>::null);
|
||||
typename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);
|
||||
for(typename vecType<bool, P>::size_type i = 0; i < x.length(); ++i)
|
||||
Result[i] = x[i] == y[i];
|
||||
return Result;
|
||||
@ -133,7 +133,7 @@ namespace glm
|
||||
// "Invalid template instantiation of 'notEqual', GLM vector types required");
|
||||
assert(x.length() == y.length());
|
||||
|
||||
typename vecType<bool, P>::bool_type Result(vecType<bool, P>::null);
|
||||
typename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);
|
||||
for(typename vecType<bool, P>::size_type i = 0; i < x.length(); ++i)
|
||||
Result[i] = x[i] != y[i];
|
||||
return Result;
|
||||
@ -169,7 +169,7 @@ namespace glm
|
||||
//GLM_STATIC_ASSERT(detail::is_vector<vecType<bool, P> >::_YES,
|
||||
// "Invalid template instantiation of 'not_', GLM vector types required");
|
||||
|
||||
typename vecType<bool, P>::bool_type Result(vecType<bool, P>::null);
|
||||
typename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);
|
||||
for(typename vecType<bool, P>::size_type i = 0; i < v.length(); ++i)
|
||||
Result[i] = !v[i];
|
||||
return Result;
|
||||
|
@ -39,7 +39,7 @@ namespace detail
|
||||
struct tmat2x2
|
||||
{
|
||||
// Implementation detail
|
||||
enum ctor{null};
|
||||
enum ctor{_null};
|
||||
typedef T value_type;
|
||||
typedef std::size_t size_type;
|
||||
typedef tvec2<T, P> col_type;
|
||||
|
@ -38,7 +38,7 @@ namespace detail
|
||||
template <typename T, precision P>
|
||||
struct tmat2x3
|
||||
{
|
||||
enum ctor{null};
|
||||
enum ctor{_null};
|
||||
typedef T value_type;
|
||||
typedef std::size_t size_type;
|
||||
typedef tvec3<T, P> col_type;
|
||||
|
@ -38,7 +38,7 @@ namespace detail
|
||||
template <typename T, precision P>
|
||||
struct tmat2x4
|
||||
{
|
||||
enum ctor{null};
|
||||
enum ctor{_null};
|
||||
typedef T value_type;
|
||||
typedef std::size_t size_type;
|
||||
typedef tvec4<T, P> col_type;
|
||||
|
@ -38,7 +38,7 @@ namespace detail
|
||||
template <typename T, precision P>
|
||||
struct tmat3x2
|
||||
{
|
||||
enum ctor{null};
|
||||
enum ctor{_null};
|
||||
typedef T value_type;
|
||||
typedef std::size_t size_type;
|
||||
typedef tvec2<T, P> col_type;
|
||||
|
@ -38,7 +38,7 @@ namespace detail
|
||||
template <typename T, precision P>
|
||||
struct tmat3x3
|
||||
{
|
||||
enum ctor{null};
|
||||
enum ctor{_null};
|
||||
typedef T value_type;
|
||||
typedef std::size_t size_type;
|
||||
typedef tvec3<T, P> col_type;
|
||||
|
@ -639,7 +639,7 @@ namespace detail
|
||||
typename tmat3x3<T, P>::value_type const SrcB21 = m2[2][1];
|
||||
typename tmat3x3<T, P>::value_type const SrcB22 = m2[2][2];
|
||||
|
||||
tmat3x3<T, P> Result(tmat3x3<T, P>::null);
|
||||
tmat3x3<T, P> Result(tmat3x3<T, P>::_null);
|
||||
Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02;
|
||||
Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02;
|
||||
Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01 + SrcA22 * SrcB02;
|
||||
|
@ -38,7 +38,7 @@ namespace detail
|
||||
template <typename T, precision P>
|
||||
struct tmat3x4
|
||||
{
|
||||
enum ctor{null};
|
||||
enum ctor{_null};
|
||||
typedef T value_type;
|
||||
typedef std::size_t size_type;
|
||||
typedef tvec4<T, P> col_type;
|
||||
|
@ -38,7 +38,7 @@ namespace detail
|
||||
template <typename T, precision P>
|
||||
struct tmat4x2
|
||||
{
|
||||
enum ctor{null};
|
||||
enum ctor{_null};
|
||||
typedef T value_type;
|
||||
typedef std::size_t size_type;
|
||||
typedef tvec2<T, P> col_type;
|
||||
|
@ -38,7 +38,7 @@ namespace detail
|
||||
template <typename T, precision P>
|
||||
struct tmat4x3
|
||||
{
|
||||
enum ctor{null};
|
||||
enum ctor{_null};
|
||||
typedef T value_type;
|
||||
typedef std::size_t size_type;
|
||||
typedef tvec3<T, P> col_type;
|
||||
|
@ -38,7 +38,7 @@ namespace detail
|
||||
template <typename T, precision P>
|
||||
struct tmat4x4
|
||||
{
|
||||
enum ctor{null};
|
||||
enum ctor{_null};
|
||||
typedef T value_type;
|
||||
typedef std::size_t size_type;
|
||||
typedef tvec4<T, P> col_type;
|
||||
|
@ -770,7 +770,7 @@ namespace detail
|
||||
typename tmat4x4<T, P>::col_type const SrcB2 = m2[2];
|
||||
typename tmat4x4<T, P>::col_type const SrcB3 = m2[3];
|
||||
|
||||
tmat4x4<T, P> Result(tmat4x4<T, P>::null);
|
||||
tmat4x4<T, P> Result(tmat4x4<T, P>::_null);
|
||||
Result[0] = SrcA0 * SrcB0[0] + SrcA1 * SrcB0[1] + SrcA2 * SrcB0[2] + SrcA3 * SrcB0[3];
|
||||
Result[1] = SrcA0 * SrcB1[0] + SrcA1 * SrcB1[1] + SrcA2 * SrcB1[2] + SrcA3 * SrcB1[3];
|
||||
Result[2] = SrcA0 * SrcB2[0] + SrcA1 * SrcB2[1] + SrcA2 * SrcB2[2] + SrcA3 * SrcB2[3];
|
||||
|
@ -39,7 +39,7 @@ namespace detail
|
||||
template <typename T, precision P>
|
||||
struct tvec1
|
||||
{
|
||||
enum ctor{null};
|
||||
enum ctor{_null};
|
||||
|
||||
typedef T value_type;
|
||||
typedef std::size_t size_type;
|
||||
|
@ -39,7 +39,7 @@ namespace detail
|
||||
template <typename T, precision P>
|
||||
struct tvec2
|
||||
{
|
||||
enum ctor{null};
|
||||
enum ctor{_null};
|
||||
|
||||
typedef T value_type;
|
||||
typedef std::size_t size_type;
|
||||
|
@ -39,7 +39,7 @@ namespace detail
|
||||
template <typename T, precision P>
|
||||
struct tvec3
|
||||
{
|
||||
enum ctor{null};
|
||||
enum ctor{_null};
|
||||
|
||||
typedef T value_type;
|
||||
typedef std::size_t size_type;
|
||||
|
@ -39,7 +39,7 @@ namespace detail
|
||||
template <typename T, precision P>
|
||||
struct tvec4
|
||||
{
|
||||
enum ctor{null};
|
||||
enum ctor{_null};
|
||||
|
||||
typedef T value_type;
|
||||
typedef std::size_t size_type;
|
||||
|
@ -60,7 +60,7 @@ namespace glm
|
||||
|
||||
detail::tvec3<T, P> temp = (T(1) - c) * axis;
|
||||
|
||||
detail::tmat4x4<T, P> Rotate(detail::tmat4x4<T, P>::null);
|
||||
detail::tmat4x4<T, P> Rotate(detail::tmat4x4<T, P>::_null);
|
||||
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];
|
||||
@ -73,7 +73,7 @@ namespace glm
|
||||
Rotate[2][1] = 0 + temp[2] * axis[1] - s * axis[0];
|
||||
Rotate[2][2] = c + temp[2] * axis[2];
|
||||
|
||||
detail::tmat4x4<T, P> Result(detail::tmat4x4<T, P>::null);
|
||||
detail::tmat4x4<T, P> Result(detail::tmat4x4<T, P>::_null);
|
||||
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];
|
||||
@ -88,7 +88,7 @@ namespace glm
|
||||
detail::tvec3<T, P> const & v
|
||||
)
|
||||
{
|
||||
detail::tmat4x4<T, P> Result(detail::tmat4x4<T, P>::null);
|
||||
detail::tmat4x4<T, P> Result(detail::tmat4x4<T, P>::_null);
|
||||
Result[0] = m[0] * v[0];
|
||||
Result[1] = m[1] * v[1];
|
||||
Result[2] = m[2] * v[2];
|
||||
|
Loading…
Reference in New Issue
Block a user