More tests

This commit is contained in:
Christophe Riccio 2018-08-13 21:51:47 +02:00
parent 6c436efacd
commit 15fe4e84cc
11 changed files with 33 additions and 17 deletions

View File

@ -19,11 +19,10 @@
#pragma once #pragma once
// Dependencies // Dependencies
#include "../mat4x4.hpp"
#include "../vec2.hpp"
#include "../vec3.hpp"
#include "../vec4.hpp"
#include "../gtc/constants.hpp" #include "../gtc/constants.hpp"
#include "../geometric.hpp"
#include "../trigonometric.hpp"
#include "../matrix.hpp"
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_EXT_matrix_transform extension included") # pragma message("GLM: GLM_EXT_matrix_transform extension included")

View File

@ -1,7 +1,3 @@
#include "../geometric.hpp"
#include "../trigonometric.hpp"
#include "../matrix.hpp"
namespace glm namespace glm
{ {
template<typename genType> template<typename genType>

View File

@ -2,7 +2,7 @@
/// @file glm/ext/quaternion_relational.hpp /// @file glm/ext/quaternion_relational.hpp
/// ///
/// @defgroup ext_quaternion_relational GLM_EXT_quaternion_relational /// @defgroup ext_quaternion_relational GLM_EXT_quaternion_relational
/// @ingroup gtc /// @ingroup ext
/// ///
/// Include <glm/ext/quaternion_relational.hpp> to use the features of this extension. /// Include <glm/ext/quaternion_relational.hpp> to use the features of this extension.
/// ///

View File

@ -3,7 +3,7 @@
/// ///
/// @see core (dependence) /// @see core (dependence)
/// ///
/// @defgroup ext_quaternion_common GLM_EXT_quaternion_transform /// @defgroup ext_quaternion_transform GLM_EXT_quaternion_transform
/// @ingroup ext /// @ingroup ext
/// ///
/// Include <glm/ext/quaternion_transform.hpp> to use the features of this extension. /// Include <glm/ext/quaternion_transform.hpp> to use the features of this extension.
@ -31,7 +31,9 @@ namespace glm
/// @param q Source orientation /// @param q Source orientation
/// @param angle Angle expressed in radians. /// @param angle Angle expressed in radians.
/// @param axis Axis of the rotation /// @param axis Axis of the rotation
/// @tparam T Floating-point scalar types. ///
/// @tparam T Floating-point scalar types
/// @tparam Q Value from qualifier enum
/// ///
/// @see ext_quaternion_transform /// @see ext_quaternion_transform
template<typename T, qualifier Q> template<typename T, qualifier Q>

View File

@ -12,9 +12,9 @@ glmCreateTestGTC(ext_scalar_int_sized)
glmCreateTestGTC(ext_scalar_uint_sized) glmCreateTestGTC(ext_scalar_uint_sized)
glmCreateTestGTC(ext_scalar_relational) glmCreateTestGTC(ext_scalar_relational)
glmCreateTestGTC(ext_vec1) glmCreateTestGTC(ext_vec1)
glmCreateTestGTC(ext_vector_vec1) glmCreateTestGTC(ext_vector_bool1)
glmCreateTestGTC(ext_vector_bvec1) glmCreateTestGTC(ext_vector_float1)
glmCreateTestGTC(ext_vector_dvec1) glmCreateTestGTC(ext_vector_double1)
glmCreateTestGTC(ext_vector_ivec1) glmCreateTestGTC(ext_vector_int1)
glmCreateTestGTC(ext_vector_uvec1) glmCreateTestGTC(ext_vector_uint1)
glmCreateTestGTC(ext_vector_relational) glmCreateTestGTC(ext_vector_relational)

View File

@ -1,10 +1,29 @@
#include <glm/ext/matrix_relational.hpp> #include <glm/ext/matrix_relational.hpp>
//#include <glm/ext/matrix_transform.hpp> #include <glm/ext/matrix_transform.hpp>
#include <glm/ext/matrix_float4x4.hpp>
#include <glm/ext/vector_relational.hpp>
#include <glm/ext/vector_float4.hpp>
#include <glm/ext/vector_float3.hpp>
static int test_translate()
{
int Error = 0;
glm::mat4 const M(1.0f);
glm::vec3 const V(1.0f);
glm::mat4 const T = glm::translate(M, V);
Error += glm::all(glm::equal(T[3], glm::vec4(1.0f), glm::epsilon<float>())) ? 0 : 1;
return Error;
}
int main() int main()
{ {
int Error = 0; int Error = 0;
Error += test_translate();
return Error; return Error;
} }