From c4b531ed5eca8f5dfb97532262776dcc1cf37f26 Mon Sep 17 00:00:00 2001 From: fgenesis Date: Sun, 12 Jul 2015 22:07:27 +0200 Subject: [PATCH] Add glm 0.9.2 --- ExternalLibs/glm/CMakeLists.txt | 43 + ExternalLibs/glm/core/_detail.hpp | 356 ++++ ExternalLibs/glm/core/_fixes.hpp | 18 + ExternalLibs/glm/core/_swizzle.hpp | 1085 ++++++++++++ ExternalLibs/glm/core/_swizzle.inl | 20 + ExternalLibs/glm/core/dummy.cpp | 20 + ExternalLibs/glm/core/func_common.hpp | 343 ++++ ExternalLibs/glm/core/func_common.inl | 1577 +++++++++++++++++ ExternalLibs/glm/core/func_exponential.hpp | 90 + ExternalLibs/glm/core/func_exponential.inl | 358 ++++ ExternalLibs/glm/core/func_geometric.hpp | 113 ++ ExternalLibs/glm/core/func_geometric.inl | 290 +++ ExternalLibs/glm/core/func_integer.hpp | 162 ++ ExternalLibs/glm/core/func_integer.inl | 597 +++++++ ExternalLibs/glm/core/func_matrix.hpp | 115 ++ ExternalLibs/glm/core/func_matrix.inl | 571 ++++++ ExternalLibs/glm/core/func_noise.hpp | 66 + ExternalLibs/glm/core/func_noise.inl | 21 + ExternalLibs/glm/core/func_packing.hpp | 136 ++ ExternalLibs/glm/core/func_packing.inl | 94 + ExternalLibs/glm/core/func_trigonometric.hpp | 160 ++ ExternalLibs/glm/core/func_trigonometric.inl | 745 ++++++++ .../glm/core/func_vector_relational.hpp | 219 +++ .../glm/core/func_vector_relational.inl | 20 + ExternalLibs/glm/core/hint.hpp | 21 + ExternalLibs/glm/core/intrinsic_common.hpp | 70 + ExternalLibs/glm/core/intrinsic_common.inl | 277 +++ .../glm/core/intrinsic_exponential.hpp | 60 + .../glm/core/intrinsic_exponential.inl | 0 ExternalLibs/glm/core/intrinsic_geometric.hpp | 57 + ExternalLibs/glm/core/intrinsic_geometric.inl | 123 ++ ExternalLibs/glm/core/intrinsic_matrix.hpp | 50 + ExternalLibs/glm/core/intrinsic_matrix.inl | 1075 +++++++++++ .../glm/core/intrinsic_trigonometric.hpp | 29 + .../glm/core/intrinsic_trigonometric.inl | 0 .../glm/core/intrinsic_vector_relational.hpp | 29 + .../glm/core/intrinsic_vector_relational.inl | 347 ++++ ExternalLibs/glm/core/setup.hpp | 478 +++++ ExternalLibs/glm/core/type.hpp | 322 ++++ ExternalLibs/glm/core/type_float.hpp | 74 + ExternalLibs/glm/core/type_gentype.hpp | 150 ++ ExternalLibs/glm/core/type_gentype.inl | 347 ++++ ExternalLibs/glm/core/type_half.hpp | 87 + ExternalLibs/glm/core/type_half.inl | 357 ++++ ExternalLibs/glm/core/type_int.hpp | 114 ++ ExternalLibs/glm/core/type_mat.hpp | 56 + ExternalLibs/glm/core/type_mat.inl | 0 ExternalLibs/glm/core/type_mat2x2.hpp | 251 +++ ExternalLibs/glm/core/type_mat2x2.inl | 610 +++++++ ExternalLibs/glm/core/type_mat2x3.hpp | 218 +++ ExternalLibs/glm/core/type_mat2x3.inl | 541 ++++++ ExternalLibs/glm/core/type_mat2x4.hpp | 215 +++ ExternalLibs/glm/core/type_mat2x4.inl | 569 ++++++ ExternalLibs/glm/core/type_mat3x2.hpp | 217 +++ ExternalLibs/glm/core/type_mat3x2.inl | 575 ++++++ ExternalLibs/glm/core/type_mat3x3.hpp | 250 +++ ExternalLibs/glm/core/type_mat3x3.inl | 704 ++++++++ ExternalLibs/glm/core/type_mat3x4.hpp | 217 +++ ExternalLibs/glm/core/type_mat3x4.inl | 609 +++++++ ExternalLibs/glm/core/type_mat4x2.hpp | 222 +++ ExternalLibs/glm/core/type_mat4x2.inl | 618 +++++++ ExternalLibs/glm/core/type_mat4x3.hpp | 222 +++ ExternalLibs/glm/core/type_mat4x3.inl | 623 +++++++ ExternalLibs/glm/core/type_mat4x4.hpp | 250 +++ ExternalLibs/glm/core/type_mat4x4.inl | 759 ++++++++ ExternalLibs/glm/core/type_size.hpp | 24 + ExternalLibs/glm/core/type_vec.hpp | 22 + ExternalLibs/glm/core/type_vec.inl | 0 ExternalLibs/glm/core/type_vec1.hpp | 178 ++ ExternalLibs/glm/core/type_vec1.inl | 885 +++++++++ ExternalLibs/glm/core/type_vec2.hpp | 266 +++ ExternalLibs/glm/core/type_vec2.inl | 1011 +++++++++++ ExternalLibs/glm/core/type_vec3.hpp | 271 +++ ExternalLibs/glm/core/type_vec3.inl | 1098 ++++++++++++ ExternalLibs/glm/core/type_vec4.hpp | 290 +++ ExternalLibs/glm/core/type_vec4.inl | 1227 +++++++++++++ ExternalLibs/glm/ext.hpp | 97 + ExternalLibs/glm/glm.hpp | 101 ++ ExternalLibs/glm/gtc/half_float.hpp | 365 ++++ ExternalLibs/glm/gtc/half_float.inl | 975 ++++++++++ ExternalLibs/glm/gtc/matrix_access.hpp | 70 + ExternalLibs/glm/gtc/matrix_access.inl | 59 + ExternalLibs/glm/gtc/matrix_integer.hpp | 204 +++ ExternalLibs/glm/gtc/matrix_inverse.hpp | 51 + ExternalLibs/glm/gtc/matrix_inverse.inl | 139 ++ ExternalLibs/glm/gtc/matrix_transform.hpp | 158 ++ ExternalLibs/glm/gtc/matrix_transform.inl | 397 +++++ ExternalLibs/glm/gtc/quaternion.hpp | 229 +++ ExternalLibs/glm/gtc/quaternion.inl | 570 ++++++ ExternalLibs/glm/gtc/swizzle.hpp | 354 ++++ ExternalLibs/glm/gtc/swizzle.inl | 177 ++ ExternalLibs/glm/gtc/type_precision.hpp | 220 +++ ExternalLibs/glm/gtc/type_precision.inl | 13 + ExternalLibs/glm/gtc/type_ptr.hpp | 449 +++++ ExternalLibs/glm/gtc/type_ptr.inl | 0 ExternalLibs/glm/gtx/associated_min_max.hpp | 82 + ExternalLibs/glm/gtx/associated_min_max.inl | 916 ++++++++++ ExternalLibs/glm/gtx/bit.hpp | 107 ++ ExternalLibs/glm/gtx/bit.inl | 743 ++++++++ ExternalLibs/glm/gtx/closest_point.hpp | 47 + ExternalLibs/glm/gtx/closest_point.inl | 41 + ExternalLibs/glm/gtx/color_cast.hpp | 107 ++ ExternalLibs/glm/gtx/color_cast.inl | 739 ++++++++ ExternalLibs/glm/gtx/color_space.hpp | 77 + ExternalLibs/glm/gtx/color_space.inl | 154 ++ ExternalLibs/glm/gtx/color_space_YCoCg.hpp | 65 + ExternalLibs/glm/gtx/color_space_YCoCg.inl | 69 + ExternalLibs/glm/gtx/compatibility.hpp | 170 ++ ExternalLibs/glm/gtx/compatibility.inl | 141 ++ ExternalLibs/glm/gtx/component_wise.hpp | 63 + ExternalLibs/glm/gtx/component_wise.inl | 52 + ExternalLibs/glm/gtx/epsilon.hpp | 57 + ExternalLibs/glm/gtx/epsilon.inl | 204 +++ ExternalLibs/glm/gtx/euler_angles.hpp | 141 ++ ExternalLibs/glm/gtx/euler_angles.inl | 249 +++ ExternalLibs/glm/gtx/extend.hpp | 47 + ExternalLibs/glm/gtx/extend.inl | 60 + ExternalLibs/glm/gtx/extented_min_max.hpp | 175 ++ ExternalLibs/glm/gtx/extented_min_max.inl | 182 ++ ExternalLibs/glm/gtx/fast_exponential.hpp | 81 + ExternalLibs/glm/gtx/fast_exponential.inl | 294 +++ ExternalLibs/glm/gtx/fast_square_root.hpp | 68 + ExternalLibs/glm/gtx/fast_square_root.inl | 237 +++ ExternalLibs/glm/gtx/fast_trigonometry.hpp | 81 + ExternalLibs/glm/gtx/fast_trigonometry.inl | 272 +++ ExternalLibs/glm/gtx/gradient_paint.hpp | 55 + ExternalLibs/glm/gtx/gradient_paint.inl | 44 + .../glm/gtx/handed_coordinate_space.hpp | 55 + .../glm/gtx/handed_coordinate_space.inl | 34 + ExternalLibs/glm/gtx/inertia.hpp | 95 + ExternalLibs/glm/gtx/inertia.inl | 103 ++ ExternalLibs/glm/gtx/int_10_10_10_2.hpp | 47 + ExternalLibs/glm/gtx/int_10_10_10_2.inl | 21 + ExternalLibs/glm/gtx/integer.hpp | 56 + ExternalLibs/glm/gtx/integer.inl | 90 + ExternalLibs/glm/gtx/intersect.hpp | 73 + ExternalLibs/glm/gtx/intersect.inl | 201 +++ ExternalLibs/glm/gtx/log_base.hpp | 47 + ExternalLibs/glm/gtx/log_base.inl | 92 + ExternalLibs/glm/gtx/matrix_cross_product.hpp | 51 + ExternalLibs/glm/gtx/matrix_cross_product.inl | 44 + ExternalLibs/glm/gtx/matrix_interpolation.hpp | 66 + ExternalLibs/glm/gtx/matrix_interpolation.inl | 117 ++ ExternalLibs/glm/gtx/matrix_major_storage.hpp | 123 ++ ExternalLibs/glm/gtx/matrix_major_storage.inl | 176 ++ ExternalLibs/glm/gtx/matrix_operation.hpp | 93 + ExternalLibs/glm/gtx/matrix_operation.inl | 129 ++ ExternalLibs/glm/gtx/matrix_query.hpp | 95 + ExternalLibs/glm/gtx/matrix_query.inl | 144 ++ ExternalLibs/glm/gtx/mixed_product.hpp | 46 + ExternalLibs/glm/gtx/mixed_product.inl | 36 + ExternalLibs/glm/gtx/multiple.hpp | 53 + ExternalLibs/glm/gtx/multiple.inl | 191 ++ ExternalLibs/glm/gtx/noise.hpp | 63 + ExternalLibs/glm/gtx/noise.inl | 792 +++++++++ ExternalLibs/glm/gtx/norm.hpp | 143 ++ ExternalLibs/glm/gtx/norm.inl | 130 ++ ExternalLibs/glm/gtx/normal.hpp | 47 + ExternalLibs/glm/gtx/normal.inl | 27 + ExternalLibs/glm/gtx/normalize_dot.hpp | 59 + ExternalLibs/glm/gtx/normalize_dot.inl | 120 ++ ExternalLibs/glm/gtx/number_precision.hpp | 69 + ExternalLibs/glm/gtx/number_precision.inl | 13 + ExternalLibs/glm/gtx/ocl_type.hpp | 110 ++ ExternalLibs/glm/gtx/ocl_type.inl | 0 ExternalLibs/glm/gtx/optimum_pow.hpp | 70 + ExternalLibs/glm/gtx/optimum_pow.inl | 63 + ExternalLibs/glm/gtx/orthonormalize.hpp | 52 + ExternalLibs/glm/gtx/orthonormalize.inl | 49 + ExternalLibs/glm/gtx/perpendicular.hpp | 62 + ExternalLibs/glm/gtx/perpendicular.inl | 40 + ExternalLibs/glm/gtx/polar_coordinates.hpp | 49 + ExternalLibs/glm/gtx/polar_coordinates.inl | 42 + ExternalLibs/glm/gtx/projection.hpp | 60 + ExternalLibs/glm/gtx/projection.inl | 40 + ExternalLibs/glm/gtx/quaternion.hpp | 217 +++ ExternalLibs/glm/gtx/quaternion.inl | 303 ++++ ExternalLibs/glm/gtx/random.hpp | 89 + ExternalLibs/glm/gtx/random.inl | 536 ++++++ ExternalLibs/glm/gtx/raw_data.hpp | 58 + ExternalLibs/glm/gtx/raw_data.inl | 11 + ExternalLibs/glm/gtx/reciprocal.hpp | 99 ++ ExternalLibs/glm/gtx/reciprocal.inl | 593 +++++++ ExternalLibs/glm/gtx/rotate_vector.hpp | 114 ++ ExternalLibs/glm/gtx/rotate_vector.inl | 149 ++ ExternalLibs/glm/gtx/simd_mat4.hpp | 183 ++ ExternalLibs/glm/gtx/simd_mat4.inl | 309 ++++ ExternalLibs/glm/gtx/simd_vec4.hpp | 474 +++++ ExternalLibs/glm/gtx/simd_vec4.inl | 730 ++++++++ ExternalLibs/glm/gtx/simplex.hpp | 70 + ExternalLibs/glm/gtx/simplex.inl | 0 ExternalLibs/glm/gtx/spline.hpp | 73 + ExternalLibs/glm/gtx/spline.inl | 74 + ExternalLibs/glm/gtx/std_based_type.hpp | 72 + ExternalLibs/glm/gtx/std_based_type.inl | 13 + ExternalLibs/glm/gtx/string_cast.hpp | 57 + ExternalLibs/glm/gtx/string_cast.inl | 597 +++++++ ExternalLibs/glm/gtx/transform.hpp | 103 ++ ExternalLibs/glm/gtx/transform.inl | 94 + ExternalLibs/glm/gtx/transform2.hpp | 118 ++ ExternalLibs/glm/gtx/transform2.inl | 159 ++ ExternalLibs/glm/gtx/ulp.hpp | 70 + ExternalLibs/glm/gtx/ulp.inl | 396 +++++ ExternalLibs/glm/gtx/unsigned_int.hpp | 59 + ExternalLibs/glm/gtx/unsigned_int.inl | 45 + ExternalLibs/glm/gtx/vec1.hpp | 121 ++ ExternalLibs/glm/gtx/vec1.inl | 0 ExternalLibs/glm/gtx/vector_access.hpp | 66 + ExternalLibs/glm/gtx/vector_access.inl | 58 + ExternalLibs/glm/gtx/vector_angle.hpp | 72 + ExternalLibs/glm/gtx/vector_angle.inl | 58 + ExternalLibs/glm/gtx/vector_query.hpp | 95 + ExternalLibs/glm/gtx/vector_query.inl | 174 ++ ExternalLibs/glm/gtx/verbose_operator.hpp | 64 + ExternalLibs/glm/gtx/verbose_operator.inl | 129 ++ ExternalLibs/glm/gtx/wrap.hpp | 54 + ExternalLibs/glm/gtx/wrap.inl | 173 ++ ExternalLibs/glm/virtrev/xstream.hpp | 148 ++ 218 files changed, 46187 insertions(+) create mode 100644 ExternalLibs/glm/CMakeLists.txt create mode 100644 ExternalLibs/glm/core/_detail.hpp create mode 100644 ExternalLibs/glm/core/_fixes.hpp create mode 100644 ExternalLibs/glm/core/_swizzle.hpp create mode 100644 ExternalLibs/glm/core/_swizzle.inl create mode 100644 ExternalLibs/glm/core/dummy.cpp create mode 100644 ExternalLibs/glm/core/func_common.hpp create mode 100644 ExternalLibs/glm/core/func_common.inl create mode 100644 ExternalLibs/glm/core/func_exponential.hpp create mode 100644 ExternalLibs/glm/core/func_exponential.inl create mode 100644 ExternalLibs/glm/core/func_geometric.hpp create mode 100644 ExternalLibs/glm/core/func_geometric.inl create mode 100644 ExternalLibs/glm/core/func_integer.hpp create mode 100644 ExternalLibs/glm/core/func_integer.inl create mode 100644 ExternalLibs/glm/core/func_matrix.hpp create mode 100644 ExternalLibs/glm/core/func_matrix.inl create mode 100644 ExternalLibs/glm/core/func_noise.hpp create mode 100644 ExternalLibs/glm/core/func_noise.inl create mode 100644 ExternalLibs/glm/core/func_packing.hpp create mode 100644 ExternalLibs/glm/core/func_packing.inl create mode 100644 ExternalLibs/glm/core/func_trigonometric.hpp create mode 100644 ExternalLibs/glm/core/func_trigonometric.inl create mode 100644 ExternalLibs/glm/core/func_vector_relational.hpp create mode 100644 ExternalLibs/glm/core/func_vector_relational.inl create mode 100644 ExternalLibs/glm/core/hint.hpp create mode 100644 ExternalLibs/glm/core/intrinsic_common.hpp create mode 100644 ExternalLibs/glm/core/intrinsic_common.inl create mode 100644 ExternalLibs/glm/core/intrinsic_exponential.hpp create mode 100644 ExternalLibs/glm/core/intrinsic_exponential.inl create mode 100644 ExternalLibs/glm/core/intrinsic_geometric.hpp create mode 100644 ExternalLibs/glm/core/intrinsic_geometric.inl create mode 100644 ExternalLibs/glm/core/intrinsic_matrix.hpp create mode 100644 ExternalLibs/glm/core/intrinsic_matrix.inl create mode 100644 ExternalLibs/glm/core/intrinsic_trigonometric.hpp create mode 100644 ExternalLibs/glm/core/intrinsic_trigonometric.inl create mode 100644 ExternalLibs/glm/core/intrinsic_vector_relational.hpp create mode 100644 ExternalLibs/glm/core/intrinsic_vector_relational.inl create mode 100644 ExternalLibs/glm/core/setup.hpp create mode 100644 ExternalLibs/glm/core/type.hpp create mode 100644 ExternalLibs/glm/core/type_float.hpp create mode 100644 ExternalLibs/glm/core/type_gentype.hpp create mode 100644 ExternalLibs/glm/core/type_gentype.inl create mode 100644 ExternalLibs/glm/core/type_half.hpp create mode 100644 ExternalLibs/glm/core/type_half.inl create mode 100644 ExternalLibs/glm/core/type_int.hpp create mode 100644 ExternalLibs/glm/core/type_mat.hpp create mode 100644 ExternalLibs/glm/core/type_mat.inl create mode 100644 ExternalLibs/glm/core/type_mat2x2.hpp create mode 100644 ExternalLibs/glm/core/type_mat2x2.inl create mode 100644 ExternalLibs/glm/core/type_mat2x3.hpp create mode 100644 ExternalLibs/glm/core/type_mat2x3.inl create mode 100644 ExternalLibs/glm/core/type_mat2x4.hpp create mode 100644 ExternalLibs/glm/core/type_mat2x4.inl create mode 100644 ExternalLibs/glm/core/type_mat3x2.hpp create mode 100644 ExternalLibs/glm/core/type_mat3x2.inl create mode 100644 ExternalLibs/glm/core/type_mat3x3.hpp create mode 100644 ExternalLibs/glm/core/type_mat3x3.inl create mode 100644 ExternalLibs/glm/core/type_mat3x4.hpp create mode 100644 ExternalLibs/glm/core/type_mat3x4.inl create mode 100644 ExternalLibs/glm/core/type_mat4x2.hpp create mode 100644 ExternalLibs/glm/core/type_mat4x2.inl create mode 100644 ExternalLibs/glm/core/type_mat4x3.hpp create mode 100644 ExternalLibs/glm/core/type_mat4x3.inl create mode 100644 ExternalLibs/glm/core/type_mat4x4.hpp create mode 100644 ExternalLibs/glm/core/type_mat4x4.inl create mode 100644 ExternalLibs/glm/core/type_size.hpp create mode 100644 ExternalLibs/glm/core/type_vec.hpp create mode 100644 ExternalLibs/glm/core/type_vec.inl create mode 100644 ExternalLibs/glm/core/type_vec1.hpp create mode 100644 ExternalLibs/glm/core/type_vec1.inl create mode 100644 ExternalLibs/glm/core/type_vec2.hpp create mode 100644 ExternalLibs/glm/core/type_vec2.inl create mode 100644 ExternalLibs/glm/core/type_vec3.hpp create mode 100644 ExternalLibs/glm/core/type_vec3.inl create mode 100644 ExternalLibs/glm/core/type_vec4.hpp create mode 100644 ExternalLibs/glm/core/type_vec4.inl create mode 100644 ExternalLibs/glm/ext.hpp create mode 100644 ExternalLibs/glm/glm.hpp create mode 100644 ExternalLibs/glm/gtc/half_float.hpp create mode 100644 ExternalLibs/glm/gtc/half_float.inl create mode 100644 ExternalLibs/glm/gtc/matrix_access.hpp create mode 100644 ExternalLibs/glm/gtc/matrix_access.inl create mode 100644 ExternalLibs/glm/gtc/matrix_integer.hpp create mode 100644 ExternalLibs/glm/gtc/matrix_inverse.hpp create mode 100644 ExternalLibs/glm/gtc/matrix_inverse.inl create mode 100644 ExternalLibs/glm/gtc/matrix_transform.hpp create mode 100644 ExternalLibs/glm/gtc/matrix_transform.inl create mode 100644 ExternalLibs/glm/gtc/quaternion.hpp create mode 100644 ExternalLibs/glm/gtc/quaternion.inl create mode 100644 ExternalLibs/glm/gtc/swizzle.hpp create mode 100644 ExternalLibs/glm/gtc/swizzle.inl create mode 100644 ExternalLibs/glm/gtc/type_precision.hpp create mode 100644 ExternalLibs/glm/gtc/type_precision.inl create mode 100644 ExternalLibs/glm/gtc/type_ptr.hpp create mode 100644 ExternalLibs/glm/gtc/type_ptr.inl create mode 100644 ExternalLibs/glm/gtx/associated_min_max.hpp create mode 100644 ExternalLibs/glm/gtx/associated_min_max.inl create mode 100644 ExternalLibs/glm/gtx/bit.hpp create mode 100644 ExternalLibs/glm/gtx/bit.inl create mode 100644 ExternalLibs/glm/gtx/closest_point.hpp create mode 100644 ExternalLibs/glm/gtx/closest_point.inl create mode 100644 ExternalLibs/glm/gtx/color_cast.hpp create mode 100644 ExternalLibs/glm/gtx/color_cast.inl create mode 100644 ExternalLibs/glm/gtx/color_space.hpp create mode 100644 ExternalLibs/glm/gtx/color_space.inl create mode 100644 ExternalLibs/glm/gtx/color_space_YCoCg.hpp create mode 100644 ExternalLibs/glm/gtx/color_space_YCoCg.inl create mode 100644 ExternalLibs/glm/gtx/compatibility.hpp create mode 100644 ExternalLibs/glm/gtx/compatibility.inl create mode 100644 ExternalLibs/glm/gtx/component_wise.hpp create mode 100644 ExternalLibs/glm/gtx/component_wise.inl create mode 100644 ExternalLibs/glm/gtx/epsilon.hpp create mode 100644 ExternalLibs/glm/gtx/epsilon.inl create mode 100644 ExternalLibs/glm/gtx/euler_angles.hpp create mode 100644 ExternalLibs/glm/gtx/euler_angles.inl create mode 100644 ExternalLibs/glm/gtx/extend.hpp create mode 100644 ExternalLibs/glm/gtx/extend.inl create mode 100644 ExternalLibs/glm/gtx/extented_min_max.hpp create mode 100644 ExternalLibs/glm/gtx/extented_min_max.inl create mode 100644 ExternalLibs/glm/gtx/fast_exponential.hpp create mode 100644 ExternalLibs/glm/gtx/fast_exponential.inl create mode 100644 ExternalLibs/glm/gtx/fast_square_root.hpp create mode 100644 ExternalLibs/glm/gtx/fast_square_root.inl create mode 100644 ExternalLibs/glm/gtx/fast_trigonometry.hpp create mode 100644 ExternalLibs/glm/gtx/fast_trigonometry.inl create mode 100644 ExternalLibs/glm/gtx/gradient_paint.hpp create mode 100644 ExternalLibs/glm/gtx/gradient_paint.inl create mode 100644 ExternalLibs/glm/gtx/handed_coordinate_space.hpp create mode 100644 ExternalLibs/glm/gtx/handed_coordinate_space.inl create mode 100644 ExternalLibs/glm/gtx/inertia.hpp create mode 100644 ExternalLibs/glm/gtx/inertia.inl create mode 100644 ExternalLibs/glm/gtx/int_10_10_10_2.hpp create mode 100644 ExternalLibs/glm/gtx/int_10_10_10_2.inl create mode 100644 ExternalLibs/glm/gtx/integer.hpp create mode 100644 ExternalLibs/glm/gtx/integer.inl create mode 100644 ExternalLibs/glm/gtx/intersect.hpp create mode 100644 ExternalLibs/glm/gtx/intersect.inl create mode 100644 ExternalLibs/glm/gtx/log_base.hpp create mode 100644 ExternalLibs/glm/gtx/log_base.inl create mode 100644 ExternalLibs/glm/gtx/matrix_cross_product.hpp create mode 100644 ExternalLibs/glm/gtx/matrix_cross_product.inl create mode 100644 ExternalLibs/glm/gtx/matrix_interpolation.hpp create mode 100644 ExternalLibs/glm/gtx/matrix_interpolation.inl create mode 100644 ExternalLibs/glm/gtx/matrix_major_storage.hpp create mode 100644 ExternalLibs/glm/gtx/matrix_major_storage.inl create mode 100644 ExternalLibs/glm/gtx/matrix_operation.hpp create mode 100644 ExternalLibs/glm/gtx/matrix_operation.inl create mode 100644 ExternalLibs/glm/gtx/matrix_query.hpp create mode 100644 ExternalLibs/glm/gtx/matrix_query.inl create mode 100644 ExternalLibs/glm/gtx/mixed_product.hpp create mode 100644 ExternalLibs/glm/gtx/mixed_product.inl create mode 100644 ExternalLibs/glm/gtx/multiple.hpp create mode 100644 ExternalLibs/glm/gtx/multiple.inl create mode 100644 ExternalLibs/glm/gtx/noise.hpp create mode 100644 ExternalLibs/glm/gtx/noise.inl create mode 100644 ExternalLibs/glm/gtx/norm.hpp create mode 100644 ExternalLibs/glm/gtx/norm.inl create mode 100644 ExternalLibs/glm/gtx/normal.hpp create mode 100644 ExternalLibs/glm/gtx/normal.inl create mode 100644 ExternalLibs/glm/gtx/normalize_dot.hpp create mode 100644 ExternalLibs/glm/gtx/normalize_dot.inl create mode 100644 ExternalLibs/glm/gtx/number_precision.hpp create mode 100644 ExternalLibs/glm/gtx/number_precision.inl create mode 100644 ExternalLibs/glm/gtx/ocl_type.hpp create mode 100644 ExternalLibs/glm/gtx/ocl_type.inl create mode 100644 ExternalLibs/glm/gtx/optimum_pow.hpp create mode 100644 ExternalLibs/glm/gtx/optimum_pow.inl create mode 100644 ExternalLibs/glm/gtx/orthonormalize.hpp create mode 100644 ExternalLibs/glm/gtx/orthonormalize.inl create mode 100644 ExternalLibs/glm/gtx/perpendicular.hpp create mode 100644 ExternalLibs/glm/gtx/perpendicular.inl create mode 100644 ExternalLibs/glm/gtx/polar_coordinates.hpp create mode 100644 ExternalLibs/glm/gtx/polar_coordinates.inl create mode 100644 ExternalLibs/glm/gtx/projection.hpp create mode 100644 ExternalLibs/glm/gtx/projection.inl create mode 100644 ExternalLibs/glm/gtx/quaternion.hpp create mode 100644 ExternalLibs/glm/gtx/quaternion.inl create mode 100644 ExternalLibs/glm/gtx/random.hpp create mode 100644 ExternalLibs/glm/gtx/random.inl create mode 100644 ExternalLibs/glm/gtx/raw_data.hpp create mode 100644 ExternalLibs/glm/gtx/raw_data.inl create mode 100644 ExternalLibs/glm/gtx/reciprocal.hpp create mode 100644 ExternalLibs/glm/gtx/reciprocal.inl create mode 100644 ExternalLibs/glm/gtx/rotate_vector.hpp create mode 100644 ExternalLibs/glm/gtx/rotate_vector.inl create mode 100644 ExternalLibs/glm/gtx/simd_mat4.hpp create mode 100644 ExternalLibs/glm/gtx/simd_mat4.inl create mode 100644 ExternalLibs/glm/gtx/simd_vec4.hpp create mode 100644 ExternalLibs/glm/gtx/simd_vec4.inl create mode 100644 ExternalLibs/glm/gtx/simplex.hpp create mode 100644 ExternalLibs/glm/gtx/simplex.inl create mode 100644 ExternalLibs/glm/gtx/spline.hpp create mode 100644 ExternalLibs/glm/gtx/spline.inl create mode 100644 ExternalLibs/glm/gtx/std_based_type.hpp create mode 100644 ExternalLibs/glm/gtx/std_based_type.inl create mode 100644 ExternalLibs/glm/gtx/string_cast.hpp create mode 100644 ExternalLibs/glm/gtx/string_cast.inl create mode 100644 ExternalLibs/glm/gtx/transform.hpp create mode 100644 ExternalLibs/glm/gtx/transform.inl create mode 100644 ExternalLibs/glm/gtx/transform2.hpp create mode 100644 ExternalLibs/glm/gtx/transform2.inl create mode 100644 ExternalLibs/glm/gtx/ulp.hpp create mode 100644 ExternalLibs/glm/gtx/ulp.inl create mode 100644 ExternalLibs/glm/gtx/unsigned_int.hpp create mode 100644 ExternalLibs/glm/gtx/unsigned_int.inl create mode 100644 ExternalLibs/glm/gtx/vec1.hpp create mode 100644 ExternalLibs/glm/gtx/vec1.inl create mode 100644 ExternalLibs/glm/gtx/vector_access.hpp create mode 100644 ExternalLibs/glm/gtx/vector_access.inl create mode 100644 ExternalLibs/glm/gtx/vector_angle.hpp create mode 100644 ExternalLibs/glm/gtx/vector_angle.inl create mode 100644 ExternalLibs/glm/gtx/vector_query.hpp create mode 100644 ExternalLibs/glm/gtx/vector_query.inl create mode 100644 ExternalLibs/glm/gtx/verbose_operator.hpp create mode 100644 ExternalLibs/glm/gtx/verbose_operator.inl create mode 100644 ExternalLibs/glm/gtx/wrap.hpp create mode 100644 ExternalLibs/glm/gtx/wrap.inl create mode 100644 ExternalLibs/glm/virtrev/xstream.hpp diff --git a/ExternalLibs/glm/CMakeLists.txt b/ExternalLibs/glm/CMakeLists.txt new file mode 100644 index 0000000..d5ba209 --- /dev/null +++ b/ExternalLibs/glm/CMakeLists.txt @@ -0,0 +1,43 @@ +set(NAME glm) + +file(GLOB ROOT_SOURCE *.cpp) +file(GLOB ROOT_INLINE *.inl) +file(GLOB ROOT_HEADER *.hpp) + +file(GLOB_RECURSE CORE_SOURCE ./core/*.cpp) +file(GLOB_RECURSE CORE_INLINE ./core/*.inl) +file(GLOB_RECURSE CORE_HEADER ./core/*.hpp) + +file(GLOB_RECURSE GTC_SOURCE ./gtc/*.cpp) +file(GLOB_RECURSE GTC_INLINE ./gtc/*.inl) +file(GLOB_RECURSE GTC_HEADER ./gtc/*.hpp) + +file(GLOB_RECURSE GTX_SOURCE ./gtx/*.cpp) +file(GLOB_RECURSE GTX_INLINE ./gtx/*.inl) +file(GLOB_RECURSE GTX_HEADER ./gtx/*.hpp) + +file(GLOB_RECURSE VIRTREV_SOURCE ./virtrev/*.cpp) +file(GLOB_RECURSE VIRTREV_INLINE ./virtrev/*.inl) +file(GLOB_RECURSE VIRTREV_HEADER ./virtrev/*.hpp) + +source_group("Core Files" FILES ${CORE_SOURCE}) +source_group("Core Files" FILES ${CORE_INLINE}) +source_group("Core Files" FILES ${CORE_HEADER}) +source_group("GTC Files" FILES ${GTC_SOURCE}) +source_group("GTC Files" FILES ${GTC_INLINE}) +source_group("GTC Files" FILES ${GTC_HEADER}) +source_group("GTX Files" FILES ${GTX_SOURCE}) +source_group("GTX Files" FILES ${GTX_INLINE}) +source_group("GTX Files" FILES ${GTX_HEADER}) +source_group("VIRTREV Files" FILES ${VIRTREV_SOURCE}) +source_group("VIRTREV Files" FILES ${VIRTREV_INLINE}) +source_group("VIRTREV Files" FILES ${VIRTREV_HEADER}) + +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..) + +add_executable(${NAME} + ${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER} + ${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER} + ${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER} + ${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER} + ${VIRTREV_SOURCE} ${VIRTREV_INLINE} ${VIRTREV_HEADER}) diff --git a/ExternalLibs/glm/core/_detail.hpp b/ExternalLibs/glm/core/_detail.hpp new file mode 100644 index 0000000..8f8a1c5 --- /dev/null +++ b/ExternalLibs/glm/core/_detail.hpp @@ -0,0 +1,356 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-07-24 +// Updated : 2008-08-31 +// Licence : This source is under MIT License +// File : glm/core/_detail.hpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_detail +#define glm_core_detail + +#include "setup.hpp" +#include + +namespace glm{ +namespace detail +{ + class thalf; + +#if(__STDC_VERSION__ >= 199901L) // C99 detected, 64 bit types available + typedef int64_t sint64; + typedef uint64_t uint64; +#elif(GLM_COMPILER & GLM_COMPILER_VC) + typedef signed __int64 sint64; + typedef unsigned __int64 uint64; +#elif(GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM_GCC | GLM_COMPILER_CLANG)) + __extension__ typedef signed long long sint64; + __extension__ typedef unsigned long long uint64; +#elif(GLM_COMPILER & GLM_COMPILER_BC) + typedef Int64 sint64; + typedef Uint64 uint64; +#else//unknown compiler + typedef signed long long sint64; + typedef unsigned long long uint64; +#endif//GLM_COMPILER + + template + struct If + { + template + static GLM_FUNC_QUALIFIER T apply(F functor, const T& val) + { + return functor(val); + } + }; + + template<> + struct If + { + template + static GLM_FUNC_QUALIFIER T apply(F, const T& val) + { + return val; + } + }; + + //template + //struct traits + //{ + // static const bool is_signed = false; + // static const bool is_float = false; + // static const bool is_vector = false; + // static const bool is_matrix = false; + // static const bool is_genType = false; + // static const bool is_genIType = false; + // static const bool is_genUType = false; + //}; + + //template <> + //struct traits + //{ + // static const bool is_float = true; + // static const bool is_genType = true; + //}; + + //template <> + //struct traits + //{ + // static const bool is_float = true; + // static const bool is_genType = true; + //}; + + //template <> + //struct traits + //{ + // static const bool is_float = true; + // static const bool is_genType = true; + //}; + + //template + //struct desc + //{ + // typedef genType type; + // typedef genType * pointer; + // typedef genType const* const_pointer; + // typedef genType const *const const_pointer_const; + // typedef genType *const pointer_const; + // typedef genType & reference; + // typedef genType const& const_reference; + // typedef genType const& param_type; + + // typedef typename genType::value_type value_type; + // typedef typename genType::size_type size_type; + // static const typename size_type value_size; + //}; + + //template + //const typename desc::size_type desc::value_size = genType::value_size(); + + union uif32 + { + GLM_FUNC_QUALIFIER uif32() : + i(0) + {} + + GLM_FUNC_QUALIFIER uif32(float f) : + f(f) + {} + + GLM_FUNC_QUALIFIER uif32(unsigned int i) : + i(i) + {} + + float f; + unsigned int i; + }; + + union uif64 + { + GLM_FUNC_QUALIFIER uif64() : + i(0) + {} + + GLM_FUNC_QUALIFIER uif64(double f) : + f(f) + {} + + GLM_FUNC_QUALIFIER uif64(uint64 i) : + i(i) + {} + + double f; + uint64 i; + }; + + typedef uif32 uif; + + ////////////////// + // int + + template + struct is_int + { + enum is_int_enum + { + _YES = 0, + _NO = 1 + }; + }; + +#define GLM_DETAIL_IS_INT(T) \ + template <> \ + struct is_int \ + { \ + enum is_int_enum \ + { \ + _YES = 1, \ + _NO = 0 \ + }; \ + } + + ////////////////// + // uint + + template + struct is_uint + { + enum is_uint_enum + { + _YES = 0, + _NO = 1 + }; + }; + +#define GLM_DETAIL_IS_UINT(T) \ + template <> \ + struct is_uint \ + { \ + enum is_uint_enum \ + { \ + _YES = 1, \ + _NO = 0 \ + }; \ + } + + //GLM_DETAIL_IS_UINT(unsigned long long) + + ////////////////// + // float + + template + struct is_float + { + enum is_float_enum + { + _YES = 0, + _NO = 1 + }; + }; + +#define GLM_DETAIL_IS_FLOAT(T) \ + template <> \ + struct is_float \ + { \ + enum is_float_enum \ + { \ + _YES = 1, \ + _NO = 0 \ + }; \ + } + + ////////////////// + // bool + + template + struct is_bool + { + enum is_bool_enum + { + _YES = 0, + _NO = 1 + }; + }; + + template <> + struct is_bool + { + enum is_bool_enum + { + _YES = 1, + _NO = 0 + }; + }; + + ////////////////// + // vector + + template + struct is_vector + { + enum is_vector_enum + { + _YES = 0, + _NO = 1 + }; + }; + +# define GLM_DETAIL_IS_VECTOR(TYPE) \ + template \ + struct is_vector > \ + { \ + enum is_vector_enum \ + { \ + _YES = 1, \ + _NO = 0 \ + }; \ + } + + ////////////////// + // matrix + + template + struct is_matrix + { + enum is_matrix_enum + { + _YES = 0, + _NO = 1 + }; + }; + +#define GLM_DETAIL_IS_MATRIX(T) \ + template <> \ + struct is_matrix \ + { \ + enum is_matrix_enum \ + { \ + _YES = 1, \ + _NO = 0 \ + }; \ + } + + ////////////////// + // type + + template + struct type + { + enum type_enum + { + is_float = is_float::_YES, + is_int = is_int::_YES, + is_uint = is_uint::_YES, + is_bool = is_bool::_YES + }; + }; + + ////////////////// + // type + + typedef signed char int8; + typedef signed short int16; + typedef signed int int32; + typedef detail::sint64 int64; + + typedef unsigned char uint8; + typedef unsigned short uint16; + typedef unsigned int uint32; + typedef detail::uint64 uint64; + + typedef detail::thalf float16; + typedef float float32; + typedef double float64; + +}//namespace detail +}//namespace glm + +#if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2005)) +# define GLM_DEPRECATED __declspec(deprecated) +# define GLM_ALIGN(x) __declspec(align(x)) +# define GLM_ALIGNED_STRUCT(x) __declspec(align(x)) struct +# define GLM_RESTRICT __declspec(restrict) +# define GLM_RESTRICT_VAR __restrict +#elif((GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM_GCC)) && (GLM_COMPILER >= GLM_COMPILER_GCC31)) +# define GLM_DEPRECATED __attribute__((__deprecated__)) +# define GLM_ALIGN(x) __attribute__((aligned(x))) +# define GLM_ALIGNED_STRUCT(x) struct __attribute__((aligned(x))) +# if(GLM_COMPILER >= GLM_COMPILER_GCC33) +# define GLM_RESTRICT __restrict__ +# define GLM_RESTRICT_VAR __restrict__ +# else +# define GLM_RESTRICT +# define GLM_RESTRICT_VAR +# endif +# define GLM_RESTRICT __restrict__ +# define GLM_RESTRICT_VAR __restrict__ +#else +# define GLM_DEPRECATED +# define GLM_ALIGN +# define GLM_ALIGNED_STRUCT(x) +# define GLM_RESTRICT +# define GLM_RESTRICT_VAR +#endif//GLM_COMPILER + +#endif//glm_core_detail diff --git a/ExternalLibs/glm/core/_fixes.hpp b/ExternalLibs/glm/core/_fixes.hpp new file mode 100644 index 0000000..ba70800 --- /dev/null +++ b/ExternalLibs/glm/core/_fixes.hpp @@ -0,0 +1,18 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2011-02-21 +// Updated : 2011-02-21 +// Licence : This source is under MIT License +// File : glm/core/_fixes.hpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +//! Workaround for compatibility with other libraries +#ifdef max +#undef max +#endif + +//! Workaround for compatibility with other libraries +#ifdef min +#undef min +#endif diff --git a/ExternalLibs/glm/core/_swizzle.hpp b/ExternalLibs/glm/core/_swizzle.hpp new file mode 100644 index 0000000..34dabfa --- /dev/null +++ b/ExternalLibs/glm/core/_swizzle.hpp @@ -0,0 +1,1085 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2006-04-20 +// Updated : 2008-08-22 +// Licence : This source is under MIT License +// File : glm/core/_swizzle.hpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_swizzle +#define glm_core_swizzle + +namespace glm +{ + enum comp + { + X = 0, + R = 0, + S = 0, + Y = 1, + G = 1, + T = 1, + Z = 2, + B = 2, + P = 2, + W = 3, + A = 3, + Q = 3 + }; +}//namespace glm + +#if(defined(GLM_SWIZZLE_XYZW) || defined(GLM_SWIZZLE)) + +#define xx swizzle(glm::X, glm::X) +#define yx swizzle(glm::Y, glm::X) +#define zx swizzle(glm::Z, glm::X) +#define wx swizzle(glm::W, glm::X) +#define xy swizzle(glm::X, glm::Y) +#define yy swizzle(glm::Y, glm::Y) +#define zy swizzle(glm::Z, glm::Y) +#define wy swizzle(glm::W, glm::Y) +#define xz swizzle(glm::X, glm::Z) +#define yz swizzle(glm::Y, glm::Z) +#define zz swizzle(glm::Z, glm::Z) +#define wz swizzle(glm::W, glm::Z) +#define xw swizzle(glm::X, glm::W) +#define yw swizzle(glm::Y, glm::W) +#define zw swizzle(glm::Z, glm::W) +#define ww swizzle(glm::W, glm::W) + +#endif + +#if(defined(GLM_SWIZZLE_RGBA) || defined(GLM_SWIZZLE)) + +#define rr swizzle(glm::X, glm::X) +#define gr swizzle(glm::Y, glm::X) +#define br swizzle(glm::Z, glm::X) +#define ar swizzle(glm::W, glm::X) +#define rg swizzle(glm::X, glm::Y) +#define gg swizzle(glm::Y, glm::Y) +#define bg swizzle(glm::Z, glm::Y) +#define ag swizzle(glm::W, glm::Y) +#define rb swizzle(glm::X, glm::Z) +#define gb swizzle(glm::Y, glm::Z) +#define bb swizzle(glm::Z, glm::Z) +#define ab swizzle(glm::W, glm::Z) +#define ra swizzle(glm::X, glm::W) +#define ga swizzle(glm::Y, glm::W) +#define ba swizzle(glm::Z, glm::W) +#define aa swizzle(glm::W, glm::W) + +#endif + +#if(defined(GLM_FORCE_SWIZZLE_STPQ) || defined(GLM_SWIZZLE)) + +#define ss swizzle(glm::X, glm::X) +#define ts swizzle(glm::Y, glm::X) +#define ps swizzle(glm::Z, glm::X) +#define qs swizzle(glm::W, glm::X) +#define st swizzle(glm::X, glm::Y) +#define tt swizzle(glm::Y, glm::Y) +#define pt swizzle(glm::Z, glm::Y) +#define qt swizzle(glm::W, glm::Y) +#define sp swizzle(glm::X, glm::Z) +#define tp swizzle(glm::Y, glm::Z) +#define pp swizzle(glm::Z, glm::Z) +#define qp swizzle(glm::W, glm::Z) +#define sq swizzle(glm::X, glm::W) +#define tq swizzle(glm::Y, glm::W) +#define pq swizzle(glm::Z, glm::W) +#define qq swizzle(glm::W, glm::W) + +#endif + +#if(defined(GLM_SWIZZLE_XYZW) || defined(GLM_SWIZZLE)) + +#define xxx swizzle(glm::X, glm::X, glm::X) +#define yxx swizzle(glm::Y, glm::X, glm::X) +#define zxx swizzle(glm::Z, glm::X, glm::X) +#define wxx swizzle(glm::W, glm::X, glm::X) +#define xyx swizzle(glm::X, glm::Y, glm::X) +#define yyx swizzle(glm::Y, glm::Y, glm::X) +#define zyx swizzle(glm::Z, glm::Y, glm::X) +#define wyx swizzle(glm::W, glm::Y, glm::X) +#define xzx swizzle(glm::X, glm::Z, glm::X) +#define yzx swizzle(glm::Y, glm::Z, glm::X) +#define zzx swizzle(glm::Z, glm::Z, glm::X) +#define wzx swizzle(glm::W, glm::Z, glm::X) +#define xwx swizzle(glm::X, glm::W, glm::X) +#define ywx swizzle(glm::Y, glm::W, glm::X) +#define zwx swizzle(glm::Z, glm::W, glm::X) +#define wwx swizzle(glm::W, glm::W, glm::X) +#define xxy swizzle(glm::X, glm::X, glm::Y) +#define yxy swizzle(glm::Y, glm::X, glm::Y) +#define zxy swizzle(glm::Z, glm::X, glm::Y) +#define wxy swizzle(glm::W, glm::X, glm::Y) +#define xyy swizzle(glm::X, glm::Y, glm::Y) +#define yyy swizzle(glm::Y, glm::Y, glm::Y) +#define zyy swizzle(glm::Z, glm::Y, glm::Y) +#define wyy swizzle(glm::W, glm::Y, glm::Y) +#define xzy swizzle(glm::X, glm::Z, glm::Y) +#define yzy swizzle(glm::Y, glm::Z, glm::Y) +#define zzy swizzle(glm::Z, glm::Z, glm::Y) +#define wzy swizzle(glm::W, glm::Z, glm::Y) +#define xwy swizzle(glm::X, glm::W, glm::Y) +#define ywy swizzle(glm::Y, glm::W, glm::Y) +#define zwy swizzle(glm::Z, glm::W, glm::Y) +#define wwy swizzle(glm::W, glm::W, glm::Y) +#define xxz swizzle(glm::X, glm::X, glm::Z) +#define yxz swizzle(glm::Y, glm::X, glm::Z) +#define zxz swizzle(glm::Z, glm::X, glm::Z) +#define wxz swizzle(glm::W, glm::X, glm::Z) +#define xyz swizzle(glm::X, glm::Y, glm::Z) +#define yyz swizzle(glm::Y, glm::Y, glm::Z) +#define zyz swizzle(glm::Z, glm::Y, glm::Z) +#define wyz swizzle(glm::W, glm::Y, glm::Z) +#define xzz swizzle(glm::X, glm::Z, glm::Z) +#define yzz swizzle(glm::Y, glm::Z, glm::Z) +#define zzz swizzle(glm::Z, glm::Z, glm::Z) +#define wzz swizzle(glm::W, glm::Z, glm::Z) +#define xwz swizzle(glm::X, glm::W, glm::Z) +#define ywz swizzle(glm::Y, glm::W, glm::Z) +#define zwz swizzle(glm::Z, glm::W, glm::Z) +#define wwz swizzle(glm::W, glm::W, glm::Z) +#define xxw swizzle(glm::X, glm::X, glm::W) +#define yxw swizzle(glm::Y, glm::X, glm::W) +#define zxw swizzle(glm::Z, glm::X, glm::W) +#define wxw swizzle(glm::W, glm::X, glm::W) +#define xyw swizzle(glm::X, glm::Y, glm::W) +#define yyw swizzle(glm::Y, glm::Y, glm::W) +#define zyw swizzle(glm::Z, glm::Y, glm::W) +#define wyw swizzle(glm::W, glm::Y, glm::W) +#define xzw swizzle(glm::X, glm::Z, glm::W) +#define yzw swizzle(glm::Y, glm::Z, glm::W) +#define zzw swizzle(glm::Z, glm::Z, glm::W) +#define wzw swizzle(glm::W, glm::Z, glm::W) +#define xww swizzle(glm::X, glm::W, glm::W) +#define yww swizzle(glm::Y, glm::W, glm::W) +#define zww swizzle(glm::Z, glm::W, glm::W) +#define www swizzle(glm::W, glm::W, glm::W) + +#endif + +#if(defined(GLM_SWIZZLE_RGBA) || defined(GLM_SWIZZLE)) + +#define rrr swizzle(glm::X, glm::X, glm::X) +#define grr swizzle(glm::Y, glm::X, glm::X) +#define brr swizzle(glm::Z, glm::X, glm::X) +#define arr swizzle(glm::W, glm::X, glm::X) +#define rgr swizzle(glm::X, glm::Y, glm::X) +#define ggr swizzle(glm::Y, glm::Y, glm::X) +#define bgr swizzle(glm::Z, glm::Y, glm::X) +#define agr swizzle(glm::W, glm::Y, glm::X) +#define rbr swizzle(glm::X, glm::Z, glm::X) +#define gbr swizzle(glm::Y, glm::Z, glm::X) +#define bbr swizzle(glm::Z, glm::Z, glm::X) +#define abr swizzle(glm::W, glm::Z, glm::X) +#define rar swizzle(glm::X, glm::W, glm::X) +#define gar swizzle(glm::Y, glm::W, glm::X) +#define bar swizzle(glm::Z, glm::W, glm::X) +#define aar swizzle(glm::W, glm::W, glm::X) +#define rrg swizzle(glm::X, glm::X, glm::Y) +#define grg swizzle(glm::Y, glm::X, glm::Y) +#define brg swizzle(glm::Z, glm::X, glm::Y) +#define arg swizzle(glm::W, glm::X, glm::Y) +#define rgg swizzle(glm::X, glm::Y, glm::Y) +#define ggg swizzle(glm::Y, glm::Y, glm::Y) +#define bgg swizzle(glm::Z, glm::Y, glm::Y) +#define agg swizzle(glm::W, glm::Y, glm::Y) +#define rbg swizzle(glm::X, glm::Z, glm::Y) +#define gbg swizzle(glm::Y, glm::Z, glm::Y) +#define bbg swizzle(glm::Z, glm::Z, glm::Y) +#define abg swizzle(glm::W, glm::Z, glm::Y) +#define rag swizzle(glm::X, glm::W, glm::Y) +#define gag swizzle(glm::Y, glm::W, glm::Y) +#define bag swizzle(glm::Z, glm::W, glm::Y) +#define aag swizzle(glm::W, glm::W, glm::Y) +#define rrb swizzle(glm::X, glm::X, glm::Z) +#define grb swizzle(glm::Y, glm::X, glm::Z) +#define brb swizzle(glm::Z, glm::X, glm::Z) +#define arb swizzle(glm::W, glm::X, glm::Z) +#define rgb swizzle(glm::X, glm::Y, glm::Z) +#define ggb swizzle(glm::Y, glm::Y, glm::Z) +#define bgb swizzle(glm::Z, glm::Y, glm::Z) +#define agb swizzle(glm::W, glm::Y, glm::Z) +#define rbb swizzle(glm::X, glm::Z, glm::Z) +#define gbb swizzle(glm::Y, glm::Z, glm::Z) +#define bbb swizzle(glm::Z, glm::Z, glm::Z) +#define abb swizzle(glm::W, glm::Z, glm::Z) +#define rab swizzle(glm::X, glm::W, glm::Z) +#define gab swizzle(glm::Y, glm::W, glm::Z) +#define bab swizzle(glm::Z, glm::W, glm::Z) +#define aab swizzle(glm::W, glm::W, glm::Z) +#define rra swizzle(glm::X, glm::X, glm::W) +#define gra swizzle(glm::Y, glm::X, glm::W) +#define bra swizzle(glm::Z, glm::X, glm::W) +#define ara swizzle(glm::W, glm::X, glm::W) +#define rga swizzle(glm::X, glm::Y, glm::W) +#define gga swizzle(glm::Y, glm::Y, glm::W) +#define bga swizzle(glm::Z, glm::Y, glm::W) +#define aga swizzle(glm::W, glm::Y, glm::W) +#define rba swizzle(glm::X, glm::Z, glm::W) +#define gba swizzle(glm::Y, glm::Z, glm::W) +#define bba swizzle(glm::Z, glm::Z, glm::W) +#define aba swizzle(glm::W, glm::Z, glm::W) +#define raa swizzle(glm::X, glm::W, glm::W) +#define gaa swizzle(glm::Y, glm::W, glm::W) +#define baa swizzle(glm::Z, glm::W, glm::W) +#define aaa swizzle(glm::W, glm::W, glm::W) + +#endif + +#if(defined(GLM_FORCE_SWIZZLE_STPQ) || defined(GLM_SWIZZLE)) + +#define sss swizzle(glm::X, glm::X, glm::X) +#define tss swizzle(glm::Y, glm::X, glm::X) +#define pss swizzle(glm::Z, glm::X, glm::X) +#define qss swizzle(glm::W, glm::X, glm::X) +#define sts swizzle(glm::X, glm::Y, glm::X) +#define tts swizzle(glm::Y, glm::Y, glm::X) +#define pts swizzle(glm::Z, glm::Y, glm::X) +#define qts swizzle(glm::W, glm::Y, glm::X) +#define sps swizzle(glm::X, glm::Z, glm::X) +#define tps swizzle(glm::Y, glm::Z, glm::X) +#define pps swizzle(glm::Z, glm::Z, glm::X) +#define qps swizzle(glm::W, glm::Z, glm::X) +#define sqs swizzle(glm::X, glm::W, glm::X) +#define tqs swizzle(glm::Y, glm::W, glm::X) +#define pqs swizzle(glm::Z, glm::W, glm::X) +#define qqs swizzle(glm::W, glm::W, glm::X) +#define sst swizzle(glm::X, glm::X, glm::Y) +#define tst swizzle(glm::Y, glm::X, glm::Y) +#define pst swizzle(glm::Z, glm::X, glm::Y) +#define qst swizzle(glm::W, glm::X, glm::Y) +#define stt swizzle(glm::X, glm::Y, glm::Y) +#define ttt swizzle(glm::Y, glm::Y, glm::Y) +#define ptt swizzle(glm::Z, glm::Y, glm::Y) +#define qtt swizzle(glm::W, glm::Y, glm::Y) +#define spt swizzle(glm::X, glm::Z, glm::Y) +#define tpt swizzle(glm::Y, glm::Z, glm::Y) +#define ppt swizzle(glm::Z, glm::Z, glm::Y) +#define qpt swizzle(glm::W, glm::Z, glm::Y) +#define sqt swizzle(glm::X, glm::W, glm::Y) +#define tqt swizzle(glm::Y, glm::W, glm::Y) +#define pqt swizzle(glm::Z, glm::W, glm::Y) +#define qqt swizzle(glm::W, glm::W, glm::Y) +#define ssp swizzle(glm::X, glm::X, glm::Z) +#define tsp swizzle(glm::Y, glm::X, glm::Z) +#define psp swizzle(glm::Z, glm::X, glm::Z) +#define qsp swizzle(glm::W, glm::X, glm::Z) +#define stp swizzle(glm::X, glm::Y, glm::Z) +#define ttp swizzle(glm::Y, glm::Y, glm::Z) +#define ptp swizzle(glm::Z, glm::Y, glm::Z) +#define qtp swizzle(glm::W, glm::Y, glm::Z) +#define spp swizzle(glm::X, glm::Z, glm::Z) +#define tpp swizzle(glm::Y, glm::Z, glm::Z) +#define ppp swizzle(glm::Z, glm::Z, glm::Z) +#define qpp swizzle(glm::W, glm::Z, glm::Z) +#define sqp swizzle(glm::X, glm::W, glm::Z) +#define tqp swizzle(glm::Y, glm::W, glm::Z) +#define pqp swizzle(glm::Z, glm::W, glm::Z) +#define qqp swizzle(glm::W, glm::W, glm::Z) +#define ssq swizzle(glm::X, glm::X, glm::W) +#define tsq swizzle(glm::Y, glm::X, glm::W) +#define psq swizzle(glm::Z, glm::X, glm::W) +#define qsq swizzle(glm::W, glm::X, glm::W) +#define stq swizzle(glm::X, glm::Y, glm::W) +#define ttq swizzle(glm::Y, glm::Y, glm::W) +#define ptq swizzle(glm::Z, glm::Y, glm::W) +#define qtq swizzle(glm::W, glm::Y, glm::W) +#define spq swizzle(glm::X, glm::Z, glm::W) +#define tpq swizzle(glm::Y, glm::Z, glm::W) +#define ppq swizzle(glm::Z, glm::Z, glm::W) +#define qpq swizzle(glm::W, glm::Z, glm::W) +#define sqq swizzle(glm::X, glm::W, glm::W) +#define tqq swizzle(glm::Y, glm::W, glm::W) +#define pqq swizzle(glm::Z, glm::W, glm::W) +#define qqq swizzle(glm::W, glm::W, glm::W) + +#endif + +#if(defined(GLM_SWIZZLE_XYZW) || defined(GLM_SWIZZLE)) + +#define xxxx swizzle(glm::X, glm::X, glm::X, glm::X) +#define yxxx swizzle(glm::Y, glm::X, glm::X, glm::X) +#define zxxx swizzle(glm::Z, glm::X, glm::X, glm::X) +#define wxxx swizzle(glm::W, glm::X, glm::X, glm::X) +#define xyxx swizzle(glm::X, glm::Y, glm::X, glm::X) +#define yyxx swizzle(glm::Y, glm::Y, glm::X, glm::X) +#define zyxx swizzle(glm::Z, glm::Y, glm::X, glm::X) +#define wyxx swizzle(glm::W, glm::Y, glm::X, glm::X) +#define xzxx swizzle(glm::X, glm::Z, glm::X, glm::X) +#define yzxx swizzle(glm::Y, glm::Z, glm::X, glm::X) +#define zzxx swizzle(glm::Z, glm::Z, glm::X, glm::X) +#define wzxx swizzle(glm::W, glm::Z, glm::X, glm::X) +#define xwxx swizzle(glm::X, glm::W, glm::X, glm::X) +#define ywxx swizzle(glm::Y, glm::W, glm::X, glm::X) +#define zwxx swizzle(glm::Z, glm::W, glm::X, glm::X) +#define wwxx swizzle(glm::W, glm::W, glm::X, glm::X) +#define xxyx swizzle(glm::X, glm::X, glm::Y, glm::X) +#define yxyx swizzle(glm::Y, glm::X, glm::Y, glm::X) +#define zxyx swizzle(glm::Z, glm::X, glm::Y, glm::X) +#define wxyx swizzle(glm::W, glm::X, glm::Y, glm::X) +#define xyyx swizzle(glm::X, glm::Y, glm::Y, glm::X) +#define yyyx swizzle(glm::Y, glm::Y, glm::Y, glm::X) +#define zyyx swizzle(glm::Z, glm::Y, glm::Y, glm::X) +#define wyyx swizzle(glm::W, glm::Y, glm::Y, glm::X) +#define xzyx swizzle(glm::X, glm::Z, glm::Y, glm::X) +#define yzyx swizzle(glm::Y, glm::Z, glm::Y, glm::X) +#define zzyx swizzle(glm::Z, glm::Z, glm::Y, glm::X) +#define wzyx swizzle(glm::W, glm::Z, glm::Y, glm::X) +#define xwyx swizzle(glm::X, glm::W, glm::Y, glm::X) +#define ywyx swizzle(glm::Y, glm::W, glm::Y, glm::X) +#define zwyx swizzle(glm::Z, glm::W, glm::Y, glm::X) +#define wwyx swizzle(glm::W, glm::W, glm::Y, glm::X) +#define xxzx swizzle(glm::X, glm::X, glm::Z, glm::X) +#define yxzx swizzle(glm::Y, glm::X, glm::Z, glm::X) +#define zxzx swizzle(glm::Z, glm::X, glm::Z, glm::X) +#define wxzx swizzle(glm::W, glm::X, glm::Z, glm::X) +#define xyzx swizzle(glm::X, glm::Y, glm::Z, glm::X) +#define yyzx swizzle(glm::Y, glm::Y, glm::Z, glm::X) +#define zyzx swizzle(glm::Z, glm::Y, glm::Z, glm::X) +#define wyzx swizzle(glm::W, glm::Y, glm::Z, glm::X) +#define xzzx swizzle(glm::X, glm::Z, glm::Z, glm::X) +#define yzzx swizzle(glm::Y, glm::Z, glm::Z, glm::X) +#define zzzx swizzle(glm::Z, glm::Z, glm::Z, glm::X) +#define wzzx swizzle(glm::W, glm::Z, glm::Z, glm::X) +#define xwzx swizzle(glm::X, glm::W, glm::Z, glm::X) +#define ywzx swizzle(glm::Y, glm::W, glm::Z, glm::X) +#define zwzx swizzle(glm::Z, glm::W, glm::Z, glm::X) +#define wwzx swizzle(glm::W, glm::W, glm::Z, glm::X) +#define xxwx swizzle(glm::X, glm::X, glm::W, glm::X) +#define yxwx swizzle(glm::Y, glm::X, glm::W, glm::X) +#define zxwx swizzle(glm::Z, glm::X, glm::W, glm::X) +#define wxwx swizzle(glm::W, glm::X, glm::W, glm::X) +#define xywx swizzle(glm::X, glm::Y, glm::W, glm::X) +#define yywx swizzle(glm::Y, glm::Y, glm::W, glm::X) +#define zywx swizzle(glm::Z, glm::Y, glm::W, glm::X) +#define wywx swizzle(glm::W, glm::Y, glm::W, glm::X) +#define xzwx swizzle(glm::X, glm::Z, glm::W, glm::X) +#define yzwx swizzle(glm::Y, glm::Z, glm::W, glm::X) +#define zzwx swizzle(glm::Z, glm::Z, glm::W, glm::X) +#define wzwx swizzle(glm::W, glm::Z, glm::W, glm::X) +#define xwwx swizzle(glm::X, glm::W, glm::W, glm::X) +#define ywwx swizzle(glm::Y, glm::W, glm::W, glm::X) +#define zwwx swizzle(glm::Z, glm::W, glm::W, glm::X) +#define wwwx swizzle(glm::W, glm::W, glm::W, glm::X) +#define xxxy swizzle(glm::X, glm::X, glm::X, glm::Y) +#define yxxy swizzle(glm::Y, glm::X, glm::X, glm::Y) +#define zxxy swizzle(glm::Z, glm::X, glm::X, glm::Y) +#define wxxy swizzle(glm::W, glm::X, glm::X, glm::Y) +#define xyxy swizzle(glm::X, glm::Y, glm::X, glm::Y) +#define yyxy swizzle(glm::Y, glm::Y, glm::X, glm::Y) +#define zyxy swizzle(glm::Z, glm::Y, glm::X, glm::Y) +#define wyxy swizzle(glm::W, glm::Y, glm::X, glm::Y) +#define xzxy swizzle(glm::X, glm::Z, glm::X, glm::Y) +#define yzxy swizzle(glm::Y, glm::Z, glm::X, glm::Y) +#define zzxy swizzle(glm::Z, glm::Z, glm::X, glm::Y) +#define wzxy swizzle(glm::W, glm::Z, glm::X, glm::Y) +#define xwxy swizzle(glm::X, glm::W, glm::X, glm::Y) +#define ywxy swizzle(glm::Y, glm::W, glm::X, glm::Y) +#define zwxy swizzle(glm::Z, glm::W, glm::X, glm::Y) +#define wwxy swizzle(glm::W, glm::W, glm::X, glm::Y) +#define xxyy swizzle(glm::X, glm::X, glm::Y, glm::Y) +#define yxyy swizzle(glm::Y, glm::X, glm::Y, glm::Y) +#define zxyy swizzle(glm::Z, glm::X, glm::Y, glm::Y) +#define wxyy swizzle(glm::W, glm::X, glm::Y, glm::Y) +#define xyyy swizzle(glm::X, glm::Y, glm::Y, glm::Y) +#define yyyy swizzle(glm::Y, glm::Y, glm::Y, glm::Y) +#define zyyy swizzle(glm::Z, glm::Y, glm::Y, glm::Y) +#define wyyy swizzle(glm::W, glm::Y, glm::Y, glm::Y) +#define xzyy swizzle(glm::X, glm::Z, glm::Y, glm::Y) +#define yzyy swizzle(glm::Y, glm::Z, glm::Y, glm::Y) +#define zzyy swizzle(glm::Z, glm::Z, glm::Y, glm::Y) +#define wzyy swizzle(glm::W, glm::Z, glm::Y, glm::Y) +#define xwyy swizzle(glm::X, glm::W, glm::Y, glm::Y) +#define ywyy swizzle(glm::Y, glm::W, glm::Y, glm::Y) +#define zwyy swizzle(glm::Z, glm::W, glm::Y, glm::Y) +#define wwyy swizzle(glm::W, glm::W, glm::Y, glm::Y) +#define xxzy swizzle(glm::X, glm::X, glm::Z, glm::Y) +#define yxzy swizzle(glm::Y, glm::X, glm::Z, glm::Y) +#define zxzy swizzle(glm::Z, glm::X, glm::Z, glm::Y) +#define wxzy swizzle(glm::W, glm::X, glm::Z, glm::Y) +#define xyzy swizzle(glm::X, glm::Y, glm::Z, glm::Y) +#define yyzy swizzle(glm::Y, glm::Y, glm::Z, glm::Y) +#define zyzy swizzle(glm::Z, glm::Y, glm::Z, glm::Y) +#define wyzy swizzle(glm::W, glm::Y, glm::Z, glm::Y) +#define xzzy swizzle(glm::X, glm::Z, glm::Z, glm::Y) +#define yzzy swizzle(glm::Y, glm::Z, glm::Z, glm::Y) +#define zzzy swizzle(glm::Z, glm::Z, glm::Z, glm::Y) +#define wzzy swizzle(glm::W, glm::Z, glm::Z, glm::Y) +#define xwzy swizzle(glm::X, glm::W, glm::Z, glm::Y) +#define ywzy swizzle(glm::Y, glm::W, glm::Z, glm::Y) +#define zwzy swizzle(glm::Z, glm::W, glm::Z, glm::Y) +#define wwzy swizzle(glm::W, glm::W, glm::Z, glm::Y) +#define xxwy swizzle(glm::X, glm::X, glm::W, glm::Y) +#define yxwy swizzle(glm::Y, glm::X, glm::W, glm::Y) +#define zxwy swizzle(glm::Z, glm::X, glm::W, glm::Y) +#define wxwy swizzle(glm::W, glm::X, glm::W, glm::Y) +#define xywy swizzle(glm::X, glm::Y, glm::W, glm::Y) +#define yywy swizzle(glm::Y, glm::Y, glm::W, glm::Y) +#define zywy swizzle(glm::Z, glm::Y, glm::W, glm::Y) +#define wywy swizzle(glm::W, glm::Y, glm::W, glm::Y) +#define xzwy swizzle(glm::X, glm::Z, glm::W, glm::Y) +#define yzwy swizzle(glm::Y, glm::Z, glm::W, glm::Y) +#define zzwy swizzle(glm::Z, glm::Z, glm::W, glm::Y) +#define wzwy swizzle(glm::W, glm::Z, glm::W, glm::Y) +#define xwwy swizzle(glm::X, glm::W, glm::W, glm::Y) +#define ywwy swizzle(glm::Y, glm::W, glm::W, glm::Y) +#define zwwy swizzle(glm::Z, glm::W, glm::W, glm::Y) +#define wwwy swizzle(glm::W, glm::W, glm::W, glm::Y) +#define xxxz swizzle(glm::X, glm::X, glm::X, glm::Z) +#define yxxz swizzle(glm::Y, glm::X, glm::X, glm::Z) +#define zxxz swizzle(glm::Z, glm::X, glm::X, glm::Z) +#define wxxz swizzle(glm::W, glm::X, glm::X, glm::Z) +#define xyxz swizzle(glm::X, glm::Y, glm::X, glm::Z) +#define yyxz swizzle(glm::Y, glm::Y, glm::X, glm::Z) +#define zyxz swizzle(glm::Z, glm::Y, glm::X, glm::Z) +#define wyxz swizzle(glm::W, glm::Y, glm::X, glm::Z) +#define xzxz swizzle(glm::X, glm::Z, glm::X, glm::Z) +#define yzxz swizzle(glm::Y, glm::Z, glm::X, glm::Z) +#define zzxz swizzle(glm::Z, glm::Z, glm::X, glm::Z) +#define wzxz swizzle(glm::W, glm::Z, glm::X, glm::Z) +#define xwxz swizzle(glm::X, glm::W, glm::X, glm::Z) +#define ywxz swizzle(glm::Y, glm::W, glm::X, glm::Z) +#define zwxz swizzle(glm::Z, glm::W, glm::X, glm::Z) +#define wwxz swizzle(glm::W, glm::W, glm::X, glm::Z) +#define xxyz swizzle(glm::X, glm::X, glm::Y, glm::Z) +#define yxyz swizzle(glm::Y, glm::X, glm::Y, glm::Z) +#define zxyz swizzle(glm::Z, glm::X, glm::Y, glm::Z) +#define wxyz swizzle(glm::W, glm::X, glm::Y, glm::Z) +#define xyyz swizzle(glm::X, glm::Y, glm::Y, glm::Z) +#define yyyz swizzle(glm::Y, glm::Y, glm::Y, glm::Z) +#define zyyz swizzle(glm::Z, glm::Y, glm::Y, glm::Z) +#define wyyz swizzle(glm::W, glm::Y, glm::Y, glm::Z) +#define xzyz swizzle(glm::X, glm::Z, glm::Y, glm::Z) +#define yzyz swizzle(glm::Y, glm::Z, glm::Y, glm::Z) +#define zzyz swizzle(glm::Z, glm::Z, glm::Y, glm::Z) +#define wzyz swizzle(glm::W, glm::Z, glm::Y, glm::Z) +#define xwyz swizzle(glm::X, glm::W, glm::Y, glm::Z) +#define ywyz swizzle(glm::Y, glm::W, glm::Y, glm::Z) +#define zwyz swizzle(glm::Z, glm::W, glm::Y, glm::Z) +#define wwyz swizzle(glm::W, glm::W, glm::Y, glm::Z) +#define xxzz swizzle(glm::X, glm::X, glm::Z, glm::Z) +#define yxzz swizzle(glm::Y, glm::X, glm::Z, glm::Z) +#define zxzz swizzle(glm::Z, glm::X, glm::Z, glm::Z) +#define wxzz swizzle(glm::W, glm::X, glm::Z, glm::Z) +#define xyzz swizzle(glm::X, glm::Y, glm::Z, glm::Z) +#define yyzz swizzle(glm::Y, glm::Y, glm::Z, glm::Z) +#define zyzz swizzle(glm::Z, glm::Y, glm::Z, glm::Z) +#define wyzz swizzle(glm::W, glm::Y, glm::Z, glm::Z) +#define xzzz swizzle(glm::X, glm::Z, glm::Z, glm::Z) +#define yzzz swizzle(glm::Y, glm::Z, glm::Z, glm::Z) +#define zzzz swizzle(glm::Z, glm::Z, glm::Z, glm::Z) +#define wzzz swizzle(glm::W, glm::Z, glm::Z, glm::Z) +#define xwzz swizzle(glm::X, glm::W, glm::Z, glm::Z) +#define ywzz swizzle(glm::Y, glm::W, glm::Z, glm::Z) +#define zwzz swizzle(glm::Z, glm::W, glm::Z, glm::Z) +#define wwzz swizzle(glm::W, glm::W, glm::Z, glm::Z) +#define xxwz swizzle(glm::X, glm::X, glm::W, glm::Z) +#define yxwz swizzle(glm::Y, glm::X, glm::W, glm::Z) +#define zxwz swizzle(glm::Z, glm::X, glm::W, glm::Z) +#define wxwz swizzle(glm::W, glm::X, glm::W, glm::Z) +#define xywz swizzle(glm::X, glm::Y, glm::W, glm::Z) +#define yywz swizzle(glm::Y, glm::Y, glm::W, glm::Z) +#define zywz swizzle(glm::Z, glm::Y, glm::W, glm::Z) +#define wywz swizzle(glm::W, glm::Y, glm::W, glm::Z) +#define xzwz swizzle(glm::X, glm::Z, glm::W, glm::Z) +#define yzwz swizzle(glm::Y, glm::Z, glm::W, glm::Z) +#define zzwz swizzle(glm::Z, glm::Z, glm::W, glm::Z) +#define wzwz swizzle(glm::W, glm::Z, glm::W, glm::Z) +#define xwwz swizzle(glm::X, glm::W, glm::W, glm::Z) +#define ywwz swizzle(glm::Y, glm::W, glm::W, glm::Z) +#define zwwz swizzle(glm::Z, glm::W, glm::W, glm::Z) +#define wwwz swizzle(glm::W, glm::W, glm::W, glm::Z) +#define xxxw swizzle(glm::X, glm::X, glm::X, glm::W) +#define yxxw swizzle(glm::Y, glm::X, glm::X, glm::W) +#define zxxw swizzle(glm::Z, glm::X, glm::X, glm::W) +#define wxxw swizzle(glm::W, glm::X, glm::X, glm::W) +#define xyxw swizzle(glm::X, glm::Y, glm::X, glm::W) +#define yyxw swizzle(glm::Y, glm::Y, glm::X, glm::W) +#define zyxw swizzle(glm::Z, glm::Y, glm::X, glm::W) +#define wyxw swizzle(glm::W, glm::Y, glm::X, glm::W) +#define xzxw swizzle(glm::X, glm::Z, glm::X, glm::W) +#define yzxw swizzle(glm::Y, glm::Z, glm::X, glm::W) +#define zzxw swizzle(glm::Z, glm::Z, glm::X, glm::W) +#define wzxw swizzle(glm::W, glm::Z, glm::X, glm::W) +#define xwxw swizzle(glm::X, glm::W, glm::X, glm::W) +#define ywxw swizzle(glm::Y, glm::W, glm::X, glm::W) +#define zwxw swizzle(glm::Z, glm::W, glm::X, glm::W) +#define wwxw swizzle(glm::W, glm::W, glm::X, glm::W) +#define xxyw swizzle(glm::X, glm::X, glm::Y, glm::W) +#define yxyw swizzle(glm::Y, glm::X, glm::Y, glm::W) +#define zxyw swizzle(glm::Z, glm::X, glm::Y, glm::W) +#define wxyw swizzle(glm::W, glm::X, glm::Y, glm::W) +#define xyyw swizzle(glm::X, glm::Y, glm::Y, glm::W) +#define yyyw swizzle(glm::Y, glm::Y, glm::Y, glm::W) +#define zyyw swizzle(glm::Z, glm::Y, glm::Y, glm::W) +#define wyyw swizzle(glm::W, glm::Y, glm::Y, glm::W) +#define xzyw swizzle(glm::X, glm::Z, glm::Y, glm::W) +#define yzyw swizzle(glm::Y, glm::Z, glm::Y, glm::W) +#define zzyw swizzle(glm::Z, glm::Z, glm::Y, glm::W) +#define wzyw swizzle(glm::W, glm::Z, glm::Y, glm::W) +#define xwyw swizzle(glm::X, glm::W, glm::Y, glm::W) +#define ywyw swizzle(glm::Y, glm::W, glm::Y, glm::W) +#define zwyw swizzle(glm::Z, glm::W, glm::Y, glm::W) +#define wwyw swizzle(glm::W, glm::W, glm::Y, glm::W) +#define xxzw swizzle(glm::X, glm::X, glm::Z, glm::W) +#define yxzw swizzle(glm::Y, glm::X, glm::Z, glm::W) +#define zxzw swizzle(glm::Z, glm::X, glm::Z, glm::W) +#define wxzw swizzle(glm::W, glm::X, glm::Z, glm::W) +#define xyzw swizzle(glm::X, glm::Y, glm::Z, glm::W) +#define yyzw swizzle(glm::Y, glm::Y, glm::Z, glm::W) +#define zyzw swizzle(glm::Z, glm::Y, glm::Z, glm::W) +#define wyzw swizzle(glm::W, glm::Y, glm::Z, glm::W) +#define xzzw swizzle(glm::X, glm::Z, glm::Z, glm::W) +#define yzzw swizzle(glm::Y, glm::Z, glm::Z, glm::W) +#define zzzw swizzle(glm::Z, glm::Z, glm::Z, glm::W) +#define wzzw swizzle(glm::W, glm::Z, glm::Z, glm::W) +#define xwzw swizzle(glm::X, glm::W, glm::Z, glm::W) +#define ywzw swizzle(glm::Y, glm::W, glm::Z, glm::W) +#define zwzw swizzle(glm::Z, glm::W, glm::Z, glm::W) +#define wwzw swizzle(glm::W, glm::W, glm::Z, glm::W) +#define xxww swizzle(glm::X, glm::X, glm::W, glm::W) +#define yxww swizzle(glm::Y, glm::X, glm::W, glm::W) +#define zxww swizzle(glm::Z, glm::X, glm::W, glm::W) +#define wxww swizzle(glm::W, glm::X, glm::W, glm::W) +#define xyww swizzle(glm::X, glm::Y, glm::W, glm::W) +#define yyww swizzle(glm::Y, glm::Y, glm::W, glm::W) +#define zyww swizzle(glm::Z, glm::Y, glm::W, glm::W) +#define wyww swizzle(glm::W, glm::Y, glm::W, glm::W) +#define xzww swizzle(glm::X, glm::Z, glm::W, glm::W) +#define yzww swizzle(glm::Y, glm::Z, glm::W, glm::W) +#define zzww swizzle(glm::Z, glm::Z, glm::W, glm::W) +#define wzww swizzle(glm::W, glm::Z, glm::W, glm::W) +#define xwww swizzle(glm::X, glm::W, glm::W, glm::W) +#define ywww swizzle(glm::Y, glm::W, glm::W, glm::W) +#define zwww swizzle(glm::Z, glm::W, glm::W, glm::W) +#define wwww swizzle(glm::W, glm::W, glm::W, glm::W) + +#endif + +#if(defined(GLM_SWIZZLE_RGBA) || defined(GLM_SWIZZLE)) + +#define rrrr swizzle(glm::X, glm::X, glm::X, glm::X) +#define grrr swizzle(glm::Y, glm::X, glm::X, glm::X) +#define brrr swizzle(glm::Z, glm::X, glm::X, glm::X) +#define arrr swizzle(glm::W, glm::X, glm::X, glm::X) +#define rgrr swizzle(glm::X, glm::Y, glm::X, glm::X) +#define ggrr swizzle(glm::Y, glm::Y, glm::X, glm::X) +#define bgrr swizzle(glm::Z, glm::Y, glm::X, glm::X) +#define agrr swizzle(glm::W, glm::Y, glm::X, glm::X) +#define rbrr swizzle(glm::X, glm::Z, glm::X, glm::X) +#define gbrr swizzle(glm::Y, glm::Z, glm::X, glm::X) +#define bbrr swizzle(glm::Z, glm::Z, glm::X, glm::X) +#define abrr swizzle(glm::W, glm::Z, glm::X, glm::X) +#define rarr swizzle(glm::X, glm::W, glm::X, glm::X) +#define garr swizzle(glm::Y, glm::W, glm::X, glm::X) +#define barr swizzle(glm::Z, glm::W, glm::X, glm::X) +#define aarr swizzle(glm::W, glm::W, glm::X, glm::X) +#define rrgr swizzle(glm::X, glm::X, glm::Y, glm::X) +#define grgr swizzle(glm::Y, glm::X, glm::Y, glm::X) +#define brgr swizzle(glm::Z, glm::X, glm::Y, glm::X) +#define argr swizzle(glm::W, glm::X, glm::Y, glm::X) +#define rggr swizzle(glm::X, glm::Y, glm::Y, glm::X) +#define gggr swizzle(glm::Y, glm::Y, glm::Y, glm::X) +#define bggr swizzle(glm::Z, glm::Y, glm::Y, glm::X) +#define aggr swizzle(glm::W, glm::Y, glm::Y, glm::X) +#define rbgr swizzle(glm::X, glm::Z, glm::Y, glm::X) +#define gbgr swizzle(glm::Y, glm::Z, glm::Y, glm::X) +#define bbgr swizzle(glm::Z, glm::Z, glm::Y, glm::X) +#define abgr swizzle(glm::W, glm::Z, glm::Y, glm::X) +#define ragr swizzle(glm::X, glm::W, glm::Y, glm::X) +#define gagr swizzle(glm::Y, glm::W, glm::Y, glm::X) +#define bagr swizzle(glm::Z, glm::W, glm::Y, glm::X) +#define aagr swizzle(glm::W, glm::W, glm::Y, glm::X) +#define rrbr swizzle(glm::X, glm::X, glm::Z, glm::X) +#define grbr swizzle(glm::Y, glm::X, glm::Z, glm::X) +#define brbr swizzle(glm::Z, glm::X, glm::Z, glm::X) +#define arbr swizzle(glm::W, glm::X, glm::Z, glm::X) +#define rgbr swizzle(glm::X, glm::Y, glm::Z, glm::X) +#define ggbr swizzle(glm::Y, glm::Y, glm::Z, glm::X) +#define bgbr swizzle(glm::Z, glm::Y, glm::Z, glm::X) +#define agbr swizzle(glm::W, glm::Y, glm::Z, glm::X) +#define rbbr swizzle(glm::X, glm::Z, glm::Z, glm::X) +#define gbbr swizzle(glm::Y, glm::Z, glm::Z, glm::X) +#define bbbr swizzle(glm::Z, glm::Z, glm::Z, glm::X) +#define abbr swizzle(glm::W, glm::Z, glm::Z, glm::X) +#define rabr swizzle(glm::X, glm::W, glm::Z, glm::X) +#define gabr swizzle(glm::Y, glm::W, glm::Z, glm::X) +#define babr swizzle(glm::Z, glm::W, glm::Z, glm::X) +#define aabr swizzle(glm::W, glm::W, glm::Z, glm::X) +#define rrar swizzle(glm::X, glm::X, glm::W, glm::X) +#define grar swizzle(glm::Y, glm::X, glm::W, glm::X) +#define brar swizzle(glm::Z, glm::X, glm::W, glm::X) +#define arar swizzle(glm::W, glm::X, glm::W, glm::X) +#define rgar swizzle(glm::X, glm::Y, glm::W, glm::X) +#define ggar swizzle(glm::Y, glm::Y, glm::W, glm::X) +#define bgar swizzle(glm::Z, glm::Y, glm::W, glm::X) +#define agar swizzle(glm::W, glm::Y, glm::W, glm::X) +#define rbar swizzle(glm::X, glm::Z, glm::W, glm::X) +#define gbar swizzle(glm::Y, glm::Z, glm::W, glm::X) +#define bbar swizzle(glm::Z, glm::Z, glm::W, glm::X) +#define abar swizzle(glm::W, glm::Z, glm::W, glm::X) +#define raar swizzle(glm::X, glm::W, glm::W, glm::X) +#define gaar swizzle(glm::Y, glm::W, glm::W, glm::X) +#define baar swizzle(glm::Z, glm::W, glm::W, glm::X) +#define aaar swizzle(glm::W, glm::W, glm::W, glm::X) +#define rrrg swizzle(glm::X, glm::X, glm::X, glm::Y) +#define grrg swizzle(glm::Y, glm::X, glm::X, glm::Y) +#define brrg swizzle(glm::Z, glm::X, glm::X, glm::Y) +#define arrg swizzle(glm::W, glm::X, glm::X, glm::Y) +#define rgrg swizzle(glm::X, glm::Y, glm::X, glm::Y) +#define ggrg swizzle(glm::Y, glm::Y, glm::X, glm::Y) +#define bgrg swizzle(glm::Z, glm::Y, glm::X, glm::Y) +#define agrg swizzle(glm::W, glm::Y, glm::X, glm::Y) +#define rbrg swizzle(glm::X, glm::Z, glm::X, glm::Y) +#define gbrg swizzle(glm::Y, glm::Z, glm::X, glm::Y) +#define bbrg swizzle(glm::Z, glm::Z, glm::X, glm::Y) +#define abrg swizzle(glm::W, glm::Z, glm::X, glm::Y) +#define rarg swizzle(glm::X, glm::W, glm::X, glm::Y) +#define garg swizzle(glm::Y, glm::W, glm::X, glm::Y) +#define barg swizzle(glm::Z, glm::W, glm::X, glm::Y) +#define aarg swizzle(glm::W, glm::W, glm::X, glm::Y) +#define rrgg swizzle(glm::X, glm::X, glm::Y, glm::Y) +#define grgg swizzle(glm::Y, glm::X, glm::Y, glm::Y) +#define brgg swizzle(glm::Z, glm::X, glm::Y, glm::Y) +#define argg swizzle(glm::W, glm::X, glm::Y, glm::Y) +#define rggg swizzle(glm::X, glm::Y, glm::Y, glm::Y) +#define gggg swizzle(glm::Y, glm::Y, glm::Y, glm::Y) +#define bggg swizzle(glm::Z, glm::Y, glm::Y, glm::Y) +#define aggg swizzle(glm::W, glm::Y, glm::Y, glm::Y) +#define rbgg swizzle(glm::X, glm::Z, glm::Y, glm::Y) +#define gbgg swizzle(glm::Y, glm::Z, glm::Y, glm::Y) +#define bbgg swizzle(glm::Z, glm::Z, glm::Y, glm::Y) +#define abgg swizzle(glm::W, glm::Z, glm::Y, glm::Y) +#define ragg swizzle(glm::X, glm::W, glm::Y, glm::Y) +#define gagg swizzle(glm::Y, glm::W, glm::Y, glm::Y) +#define bagg swizzle(glm::Z, glm::W, glm::Y, glm::Y) +#define aagg swizzle(glm::W, glm::W, glm::Y, glm::Y) +#define rrbg swizzle(glm::X, glm::X, glm::Z, glm::Y) +#define grbg swizzle(glm::Y, glm::X, glm::Z, glm::Y) +#define brbg swizzle(glm::Z, glm::X, glm::Z, glm::Y) +#define arbg swizzle(glm::W, glm::X, glm::Z, glm::Y) +#define rgbg swizzle(glm::X, glm::Y, glm::Z, glm::Y) +#define ggbg swizzle(glm::Y, glm::Y, glm::Z, glm::Y) +#define bgbg swizzle(glm::Z, glm::Y, glm::Z, glm::Y) +#define agbg swizzle(glm::W, glm::Y, glm::Z, glm::Y) +#define rbbg swizzle(glm::X, glm::Z, glm::Z, glm::Y) +#define gbbg swizzle(glm::Y, glm::Z, glm::Z, glm::Y) +#define bbbg swizzle(glm::Z, glm::Z, glm::Z, glm::Y) +#define abbg swizzle(glm::W, glm::Z, glm::Z, glm::Y) +#define rabg swizzle(glm::X, glm::W, glm::Z, glm::Y) +#define gabg swizzle(glm::Y, glm::W, glm::Z, glm::Y) +#define babg swizzle(glm::Z, glm::W, glm::Z, glm::Y) +#define aabg swizzle(glm::W, glm::W, glm::Z, glm::Y) +#define rrag swizzle(glm::X, glm::X, glm::W, glm::Y) +#define grag swizzle(glm::Y, glm::X, glm::W, glm::Y) +#define brag swizzle(glm::Z, glm::X, glm::W, glm::Y) +#define arag swizzle(glm::W, glm::X, glm::W, glm::Y) +#define rgag swizzle(glm::X, glm::Y, glm::W, glm::Y) +#define ggag swizzle(glm::Y, glm::Y, glm::W, glm::Y) +#define bgag swizzle(glm::Z, glm::Y, glm::W, glm::Y) +#define agag swizzle(glm::W, glm::Y, glm::W, glm::Y) +#define rbag swizzle(glm::X, glm::Z, glm::W, glm::Y) +#define gbag swizzle(glm::Y, glm::Z, glm::W, glm::Y) +#define bbag swizzle(glm::Z, glm::Z, glm::W, glm::Y) +#define abag swizzle(glm::W, glm::Z, glm::W, glm::Y) +#define raag swizzle(glm::X, glm::W, glm::W, glm::Y) +#define gaag swizzle(glm::Y, glm::W, glm::W, glm::Y) +#define baag swizzle(glm::Z, glm::W, glm::W, glm::Y) +#define aaag swizzle(glm::W, glm::W, glm::W, glm::Y) +#define rrrb swizzle(glm::X, glm::X, glm::X, glm::Z) +#define grrb swizzle(glm::Y, glm::X, glm::X, glm::Z) +#define brrb swizzle(glm::Z, glm::X, glm::X, glm::Z) +#define arrb swizzle(glm::W, glm::X, glm::X, glm::Z) +#define rgrb swizzle(glm::X, glm::Y, glm::X, glm::Z) +#define ggrb swizzle(glm::Y, glm::Y, glm::X, glm::Z) +#define bgrb swizzle(glm::Z, glm::Y, glm::X, glm::Z) +#define agrb swizzle(glm::W, glm::Y, glm::X, glm::Z) +#define rbrb swizzle(glm::X, glm::Z, glm::X, glm::Z) +#define gbrb swizzle(glm::Y, glm::Z, glm::X, glm::Z) +#define bbrb swizzle(glm::Z, glm::Z, glm::X, glm::Z) +#define abrb swizzle(glm::W, glm::Z, glm::X, glm::Z) +#define rarb swizzle(glm::X, glm::W, glm::X, glm::Z) +#define garb swizzle(glm::Y, glm::W, glm::X, glm::Z) +#define barb swizzle(glm::Z, glm::W, glm::X, glm::Z) +#define aarb swizzle(glm::W, glm::W, glm::X, glm::Z) +#define rrgb swizzle(glm::X, glm::X, glm::Y, glm::Z) +#define grgb swizzle(glm::Y, glm::X, glm::Y, glm::Z) +#define brgb swizzle(glm::Z, glm::X, glm::Y, glm::Z) +#define argb swizzle(glm::W, glm::X, glm::Y, glm::Z) +#define rggb swizzle(glm::X, glm::Y, glm::Y, glm::Z) +#define gggb swizzle(glm::Y, glm::Y, glm::Y, glm::Z) +#define bggb swizzle(glm::Z, glm::Y, glm::Y, glm::Z) +#define aggb swizzle(glm::W, glm::Y, glm::Y, glm::Z) +#define rbgb swizzle(glm::X, glm::Z, glm::Y, glm::Z) +#define gbgb swizzle(glm::Y, glm::Z, glm::Y, glm::Z) +#define bbgb swizzle(glm::Z, glm::Z, glm::Y, glm::Z) +#define abgb swizzle(glm::W, glm::Z, glm::Y, glm::Z) +#define ragb swizzle(glm::X, glm::W, glm::Y, glm::Z) +#define gagb swizzle(glm::Y, glm::W, glm::Y, glm::Z) +#define bagb swizzle(glm::Z, glm::W, glm::Y, glm::Z) +#define aagb swizzle(glm::W, glm::W, glm::Y, glm::Z) +#define rrbb swizzle(glm::X, glm::X, glm::Z, glm::Z) +#define grbb swizzle(glm::Y, glm::X, glm::Z, glm::Z) +#define brbb swizzle(glm::Z, glm::X, glm::Z, glm::Z) +#define arbb swizzle(glm::W, glm::X, glm::Z, glm::Z) +#define rgbb swizzle(glm::X, glm::Y, glm::Z, glm::Z) +#define ggbb swizzle(glm::Y, glm::Y, glm::Z, glm::Z) +#define bgbb swizzle(glm::Z, glm::Y, glm::Z, glm::Z) +#define agbb swizzle(glm::W, glm::Y, glm::Z, glm::Z) +#define rbbb swizzle(glm::X, glm::Z, glm::Z, glm::Z) +#define gbbb swizzle(glm::Y, glm::Z, glm::Z, glm::Z) +#define bbbb swizzle(glm::Z, glm::Z, glm::Z, glm::Z) +#define abbb swizzle(glm::W, glm::Z, glm::Z, glm::Z) +#define rabb swizzle(glm::X, glm::W, glm::Z, glm::Z) +#define gabb swizzle(glm::Y, glm::W, glm::Z, glm::Z) +#define babb swizzle(glm::Z, glm::W, glm::Z, glm::Z) +#define aabb swizzle(glm::W, glm::W, glm::Z, glm::Z) +#define rrab swizzle(glm::X, glm::X, glm::W, glm::Z) +#define grab swizzle(glm::Y, glm::X, glm::W, glm::Z) +#define brab swizzle(glm::Z, glm::X, glm::W, glm::Z) +#define arab swizzle(glm::W, glm::X, glm::W, glm::Z) +#define rgab swizzle(glm::X, glm::Y, glm::W, glm::Z) +#define ggab swizzle(glm::Y, glm::Y, glm::W, glm::Z) +#define bgab swizzle(glm::Z, glm::Y, glm::W, glm::Z) +#define agab swizzle(glm::W, glm::Y, glm::W, glm::Z) +#define rbab swizzle(glm::X, glm::Z, glm::W, glm::Z) +#define gbab swizzle(glm::Y, glm::Z, glm::W, glm::Z) +#define bbab swizzle(glm::Z, glm::Z, glm::W, glm::Z) +#define abab swizzle(glm::W, glm::Z, glm::W, glm::Z) +#define raab swizzle(glm::X, glm::W, glm::W, glm::Z) +#define gaab swizzle(glm::Y, glm::W, glm::W, glm::Z) +#define baab swizzle(glm::Z, glm::W, glm::W, glm::Z) +#define aaab swizzle(glm::W, glm::W, glm::W, glm::Z) +#define rrra swizzle(glm::X, glm::X, glm::X, glm::W) +#define grra swizzle(glm::Y, glm::X, glm::X, glm::W) +#define brra swizzle(glm::Z, glm::X, glm::X, glm::W) +#define arra swizzle(glm::W, glm::X, glm::X, glm::W) +#define rgra swizzle(glm::X, glm::Y, glm::X, glm::W) +#define ggra swizzle(glm::Y, glm::Y, glm::X, glm::W) +#define bgra swizzle(glm::Z, glm::Y, glm::X, glm::W) +#define agra swizzle(glm::W, glm::Y, glm::X, glm::W) +#define rbra swizzle(glm::X, glm::Z, glm::X, glm::W) +#define gbra swizzle(glm::Y, glm::Z, glm::X, glm::W) +#define bbra swizzle(glm::Z, glm::Z, glm::X, glm::W) +#define abra swizzle(glm::W, glm::Z, glm::X, glm::W) +#define rara swizzle(glm::X, glm::W, glm::X, glm::W) +#define gara swizzle(glm::Y, glm::W, glm::X, glm::W) +#define bara swizzle(glm::Z, glm::W, glm::X, glm::W) +#define aara swizzle(glm::W, glm::W, glm::X, glm::W) +#define rrga swizzle(glm::X, glm::X, glm::Y, glm::W) +#define grga swizzle(glm::Y, glm::X, glm::Y, glm::W) +#define brga swizzle(glm::Z, glm::X, glm::Y, glm::W) +#define arga swizzle(glm::W, glm::X, glm::Y, glm::W) +#define rgga swizzle(glm::X, glm::Y, glm::Y, glm::W) +#define ggga swizzle(glm::Y, glm::Y, glm::Y, glm::W) +#define bgga swizzle(glm::Z, glm::Y, glm::Y, glm::W) +#define agga swizzle(glm::W, glm::Y, glm::Y, glm::W) +#define rbga swizzle(glm::X, glm::Z, glm::Y, glm::W) +#define gbga swizzle(glm::Y, glm::Z, glm::Y, glm::W) +#define bbga swizzle(glm::Z, glm::Z, glm::Y, glm::W) +#define abga swizzle(glm::W, glm::Z, glm::Y, glm::W) +#define raga swizzle(glm::X, glm::W, glm::Y, glm::W) +#define gaga swizzle(glm::Y, glm::W, glm::Y, glm::W) +#define baga swizzle(glm::Z, glm::W, glm::Y, glm::W) +#define aaga swizzle(glm::W, glm::W, glm::Y, glm::W) +#define rrba swizzle(glm::X, glm::X, glm::Z, glm::W) +#define grba swizzle(glm::Y, glm::X, glm::Z, glm::W) +#define brba swizzle(glm::Z, glm::X, glm::Z, glm::W) +#define arba swizzle(glm::W, glm::X, glm::Z, glm::W) +#define rgba swizzle(glm::X, glm::Y, glm::Z, glm::W) +#define ggba swizzle(glm::Y, glm::Y, glm::Z, glm::W) +#define bgba swizzle(glm::Z, glm::Y, glm::Z, glm::W) +#define agba swizzle(glm::W, glm::Y, glm::Z, glm::W) +#define rbba swizzle(glm::X, glm::Z, glm::Z, glm::W) +#define gbba swizzle(glm::Y, glm::Z, glm::Z, glm::W) +#define bbba swizzle(glm::Z, glm::Z, glm::Z, glm::W) +#define abba swizzle(glm::W, glm::Z, glm::Z, glm::W) +#define raba swizzle(glm::X, glm::W, glm::Z, glm::W) +#define gaba swizzle(glm::Y, glm::W, glm::Z, glm::W) +#define baba swizzle(glm::Z, glm::W, glm::Z, glm::W) +#define aaba swizzle(glm::W, glm::W, glm::Z, glm::W) +#define rraa swizzle(glm::X, glm::X, glm::W, glm::W) +#define graa swizzle(glm::Y, glm::X, glm::W, glm::W) +#define braa swizzle(glm::Z, glm::X, glm::W, glm::W) +#define araa swizzle(glm::W, glm::X, glm::W, glm::W) +#define rgaa swizzle(glm::X, glm::Y, glm::W, glm::W) +#define ggaa swizzle(glm::Y, glm::Y, glm::W, glm::W) +#define bgaa swizzle(glm::Z, glm::Y, glm::W, glm::W) +#define agaa swizzle(glm::W, glm::Y, glm::W, glm::W) +#define rbaa swizzle(glm::X, glm::Z, glm::W, glm::W) +#define gbaa swizzle(glm::Y, glm::Z, glm::W, glm::W) +#define bbaa swizzle(glm::Z, glm::Z, glm::W, glm::W) +#define abaa swizzle(glm::W, glm::Z, glm::W, glm::W) +#define raaa swizzle(glm::X, glm::W, glm::W, glm::W) +#define gaaa swizzle(glm::Y, glm::W, glm::W, glm::W) +#define baaa swizzle(glm::Z, glm::W, glm::W, glm::W) +#define aaaa swizzle(glm::W, glm::W, glm::W, glm::W) + +#endif + +#if(defined(GLM_FORCE_SWIZZLE_STPQ) || defined(GLM_SWIZZLE)) + +#define ssss swizzle(glm::X, glm::X, glm::X, glm::X) +#define tsss swizzle(glm::Y, glm::X, glm::X, glm::X) +#define psss swizzle(glm::Z, glm::X, glm::X, glm::X) +#define qsss swizzle(glm::W, glm::X, glm::X, glm::X) +#define stss swizzle(glm::X, glm::Y, glm::X, glm::X) +#define ttss swizzle(glm::Y, glm::Y, glm::X, glm::X) +#define ptss swizzle(glm::Z, glm::Y, glm::X, glm::X) +#define qtss swizzle(glm::W, glm::Y, glm::X, glm::X) +#define spss swizzle(glm::X, glm::Z, glm::X, glm::X) +#define tpss swizzle(glm::Y, glm::Z, glm::X, glm::X) +#define ppss swizzle(glm::Z, glm::Z, glm::X, glm::X) +#define qpss swizzle(glm::W, glm::Z, glm::X, glm::X) +#define sqss swizzle(glm::X, glm::W, glm::X, glm::X) +#define tqss swizzle(glm::Y, glm::W, glm::X, glm::X) +#define pqss swizzle(glm::Z, glm::W, glm::X, glm::X) +#define qqss swizzle(glm::W, glm::W, glm::X, glm::X) +#define ssts swizzle(glm::X, glm::X, glm::Y, glm::X) +#define tsts swizzle(glm::Y, glm::X, glm::Y, glm::X) +#define psts swizzle(glm::Z, glm::X, glm::Y, glm::X) +#define qsts swizzle(glm::W, glm::X, glm::Y, glm::X) +#define stts swizzle(glm::X, glm::Y, glm::Y, glm::X) +#define ttts swizzle(glm::Y, glm::Y, glm::Y, glm::X) +#define ptts swizzle(glm::Z, glm::Y, glm::Y, glm::X) +#define qtts swizzle(glm::W, glm::Y, glm::Y, glm::X) +#define spts swizzle(glm::X, glm::Z, glm::Y, glm::X) +#define tpts swizzle(glm::Y, glm::Z, glm::Y, glm::X) +#define ppts swizzle(glm::Z, glm::Z, glm::Y, glm::X) +#define qpts swizzle(glm::W, glm::Z, glm::Y, glm::X) +#define sqts swizzle(glm::X, glm::W, glm::Y, glm::X) +#define tqts swizzle(glm::Y, glm::W, glm::Y, glm::X) +#define pqts swizzle(glm::Z, glm::W, glm::Y, glm::X) +#define qqts swizzle(glm::W, glm::W, glm::Y, glm::X) +#define ssps swizzle(glm::X, glm::X, glm::Z, glm::X) +#define tsps swizzle(glm::Y, glm::X, glm::Z, glm::X) +#define psps swizzle(glm::Z, glm::X, glm::Z, glm::X) +#define qsps swizzle(glm::W, glm::X, glm::Z, glm::X) +#define stps swizzle(glm::X, glm::Y, glm::Z, glm::X) +#define ttps swizzle(glm::Y, glm::Y, glm::Z, glm::X) +#define ptps swizzle(glm::Z, glm::Y, glm::Z, glm::X) +#define qtps swizzle(glm::W, glm::Y, glm::Z, glm::X) +#define spps swizzle(glm::X, glm::Z, glm::Z, glm::X) +#define tpps swizzle(glm::Y, glm::Z, glm::Z, glm::X) +#define ppps swizzle(glm::Z, glm::Z, glm::Z, glm::X) +#define qpps swizzle(glm::W, glm::Z, glm::Z, glm::X) +#define sqps swizzle(glm::X, glm::W, glm::Z, glm::X) +#define tqps swizzle(glm::Y, glm::W, glm::Z, glm::X) +#define pqps swizzle(glm::Z, glm::W, glm::Z, glm::X) +#define qqps swizzle(glm::W, glm::W, glm::Z, glm::X) +#define ssqs swizzle(glm::X, glm::X, glm::W, glm::X) +#define tsqs swizzle(glm::Y, glm::X, glm::W, glm::X) +#define psqs swizzle(glm::Z, glm::X, glm::W, glm::X) +#define qsqs swizzle(glm::W, glm::X, glm::W, glm::X) +#define stqs swizzle(glm::X, glm::Y, glm::W, glm::X) +#define ttqs swizzle(glm::Y, glm::Y, glm::W, glm::X) +#define ptqs swizzle(glm::Z, glm::Y, glm::W, glm::X) +#define qtqs swizzle(glm::W, glm::Y, glm::W, glm::X) +#define spqs swizzle(glm::X, glm::Z, glm::W, glm::X) +#define tpqs swizzle(glm::Y, glm::Z, glm::W, glm::X) +#define ppqs swizzle(glm::Z, glm::Z, glm::W, glm::X) +#define qpqs swizzle(glm::W, glm::Z, glm::W, glm::X) +#define sqqs swizzle(glm::X, glm::W, glm::W, glm::X) +#define tqqs swizzle(glm::Y, glm::W, glm::W, glm::X) +#define pqqs swizzle(glm::Z, glm::W, glm::W, glm::X) +#define qqqs swizzle(glm::W, glm::W, glm::W, glm::X) +#define ssst swizzle(glm::X, glm::X, glm::X, glm::Y) +#define tsst swizzle(glm::Y, glm::X, glm::X, glm::Y) +#define psst swizzle(glm::Z, glm::X, glm::X, glm::Y) +#define qsst swizzle(glm::W, glm::X, glm::X, glm::Y) +#define stst swizzle(glm::X, glm::Y, glm::X, glm::Y) +#define ttst swizzle(glm::Y, glm::Y, glm::X, glm::Y) +#define ptst swizzle(glm::Z, glm::Y, glm::X, glm::Y) +#define qtst swizzle(glm::W, glm::Y, glm::X, glm::Y) +#define spst swizzle(glm::X, glm::Z, glm::X, glm::Y) +#define tpst swizzle(glm::Y, glm::Z, glm::X, glm::Y) +#define ppst swizzle(glm::Z, glm::Z, glm::X, glm::Y) +#define qpst swizzle(glm::W, glm::Z, glm::X, glm::Y) +#define sqst swizzle(glm::X, glm::W, glm::X, glm::Y) +#define tqst swizzle(glm::Y, glm::W, glm::X, glm::Y) +#define pqst swizzle(glm::Z, glm::W, glm::X, glm::Y) +#define qqst swizzle(glm::W, glm::W, glm::X, glm::Y) +#define sstt swizzle(glm::X, glm::X, glm::Y, glm::Y) +#define tstt swizzle(glm::Y, glm::X, glm::Y, glm::Y) +#define pstt swizzle(glm::Z, glm::X, glm::Y, glm::Y) +#define qstt swizzle(glm::W, glm::X, glm::Y, glm::Y) +#define sttt swizzle(glm::X, glm::Y, glm::Y, glm::Y) +#define tttt swizzle(glm::Y, glm::Y, glm::Y, glm::Y) +#define pttt swizzle(glm::Z, glm::Y, glm::Y, glm::Y) +#define qttt swizzle(glm::W, glm::Y, glm::Y, glm::Y) +#define sptt swizzle(glm::X, glm::Z, glm::Y, glm::Y) +#define tptt swizzle(glm::Y, glm::Z, glm::Y, glm::Y) +#define pptt swizzle(glm::Z, glm::Z, glm::Y, glm::Y) +#define qptt swizzle(glm::W, glm::Z, glm::Y, glm::Y) +#define sqtt swizzle(glm::X, glm::W, glm::Y, glm::Y) +#define tqtt swizzle(glm::Y, glm::W, glm::Y, glm::Y) +#define pqtt swizzle(glm::Z, glm::W, glm::Y, glm::Y) +#define qqtt swizzle(glm::W, glm::W, glm::Y, glm::Y) +#define sspt swizzle(glm::X, glm::X, glm::Z, glm::Y) +#define tspt swizzle(glm::Y, glm::X, glm::Z, glm::Y) +#define pspt swizzle(glm::Z, glm::X, glm::Z, glm::Y) +#define qspt swizzle(glm::W, glm::X, glm::Z, glm::Y) +#define stpt swizzle(glm::X, glm::Y, glm::Z, glm::Y) +#define ttpt swizzle(glm::Y, glm::Y, glm::Z, glm::Y) +#define ptpt swizzle(glm::Z, glm::Y, glm::Z, glm::Y) +#define qtpt swizzle(glm::W, glm::Y, glm::Z, glm::Y) +#define sppt swizzle(glm::X, glm::Z, glm::Z, glm::Y) +#define tppt swizzle(glm::Y, glm::Z, glm::Z, glm::Y) +#define pppt swizzle(glm::Z, glm::Z, glm::Z, glm::Y) +#define qppt swizzle(glm::W, glm::Z, glm::Z, glm::Y) +#define sqpt swizzle(glm::X, glm::W, glm::Z, glm::Y) +#define tqpt swizzle(glm::Y, glm::W, glm::Z, glm::Y) +#define pqpt swizzle(glm::Z, glm::W, glm::Z, glm::Y) +#define qqpt swizzle(glm::W, glm::W, glm::Z, glm::Y) +#define ssqt swizzle(glm::X, glm::X, glm::W, glm::Y) +#define tsqt swizzle(glm::Y, glm::X, glm::W, glm::Y) +#define psqt swizzle(glm::Z, glm::X, glm::W, glm::Y) +#define qsqt swizzle(glm::W, glm::X, glm::W, glm::Y) +#define stqt swizzle(glm::X, glm::Y, glm::W, glm::Y) +#define ttqt swizzle(glm::Y, glm::Y, glm::W, glm::Y) +#define ptqt swizzle(glm::Z, glm::Y, glm::W, glm::Y) +#define qtqt swizzle(glm::W, glm::Y, glm::W, glm::Y) +#define spqt swizzle(glm::X, glm::Z, glm::W, glm::Y) +#define tpqt swizzle(glm::Y, glm::Z, glm::W, glm::Y) +#define ppqt swizzle(glm::Z, glm::Z, glm::W, glm::Y) +#define qpqt swizzle(glm::W, glm::Z, glm::W, glm::Y) +#define sqqt swizzle(glm::X, glm::W, glm::W, glm::Y) +#define tqqt swizzle(glm::Y, glm::W, glm::W, glm::Y) +#define pqqt swizzle(glm::Z, glm::W, glm::W, glm::Y) +#define qqqt swizzle(glm::W, glm::W, glm::W, glm::Y) +#define sssp swizzle(glm::X, glm::X, glm::X, glm::Z) +#define tssp swizzle(glm::Y, glm::X, glm::X, glm::Z) +#define pssp swizzle(glm::Z, glm::X, glm::X, glm::Z) +#define qssp swizzle(glm::W, glm::X, glm::X, glm::Z) +#define stsp swizzle(glm::X, glm::Y, glm::X, glm::Z) +#define ttsp swizzle(glm::Y, glm::Y, glm::X, glm::Z) +#define ptsp swizzle(glm::Z, glm::Y, glm::X, glm::Z) +#define qtsp swizzle(glm::W, glm::Y, glm::X, glm::Z) +#define spsp swizzle(glm::X, glm::Z, glm::X, glm::Z) +#define tpsp swizzle(glm::Y, glm::Z, glm::X, glm::Z) +#define ppsp swizzle(glm::Z, glm::Z, glm::X, glm::Z) +#define qpsp swizzle(glm::W, glm::Z, glm::X, glm::Z) +#define sqsp swizzle(glm::X, glm::W, glm::X, glm::Z) +#define tqsp swizzle(glm::Y, glm::W, glm::X, glm::Z) +#define pqsp swizzle(glm::Z, glm::W, glm::X, glm::Z) +#define qqsp swizzle(glm::W, glm::W, glm::X, glm::Z) +#define sstp swizzle(glm::X, glm::X, glm::Y, glm::Z) +#define tstp swizzle(glm::Y, glm::X, glm::Y, glm::Z) +#define pstp swizzle(glm::Z, glm::X, glm::Y, glm::Z) +#define qstp swizzle(glm::W, glm::X, glm::Y, glm::Z) +#define sttp swizzle(glm::X, glm::Y, glm::Y, glm::Z) +#define tttp swizzle(glm::Y, glm::Y, glm::Y, glm::Z) +#define pttp swizzle(glm::Z, glm::Y, glm::Y, glm::Z) +#define qttp swizzle(glm::W, glm::Y, glm::Y, glm::Z) +#define sptp swizzle(glm::X, glm::Z, glm::Y, glm::Z) +#define tptp swizzle(glm::Y, glm::Z, glm::Y, glm::Z) +#define pptp swizzle(glm::Z, glm::Z, glm::Y, glm::Z) +#define qptp swizzle(glm::W, glm::Z, glm::Y, glm::Z) +#define sqtp swizzle(glm::X, glm::W, glm::Y, glm::Z) +#define tqtp swizzle(glm::Y, glm::W, glm::Y, glm::Z) +#define pqtp swizzle(glm::Z, glm::W, glm::Y, glm::Z) +#define qqtp swizzle(glm::W, glm::W, glm::Y, glm::Z) +#define sspp swizzle(glm::X, glm::X, glm::Z, glm::Z) +#define tspp swizzle(glm::Y, glm::X, glm::Z, glm::Z) +#define pspp swizzle(glm::Z, glm::X, glm::Z, glm::Z) +#define qspp swizzle(glm::W, glm::X, glm::Z, glm::Z) +#define stpp swizzle(glm::X, glm::Y, glm::Z, glm::Z) +#define ttpp swizzle(glm::Y, glm::Y, glm::Z, glm::Z) +#define ptpp swizzle(glm::Z, glm::Y, glm::Z, glm::Z) +#define qtpp swizzle(glm::W, glm::Y, glm::Z, glm::Z) +#define sppp swizzle(glm::X, glm::Z, glm::Z, glm::Z) +#define tppp swizzle(glm::Y, glm::Z, glm::Z, glm::Z) +#define pppp swizzle(glm::Z, glm::Z, glm::Z, glm::Z) +#define qppp swizzle(glm::W, glm::Z, glm::Z, glm::Z) +#define sqpp swizzle(glm::X, glm::W, glm::Z, glm::Z) +#define tqpp swizzle(glm::Y, glm::W, glm::Z, glm::Z) +#define pqpp swizzle(glm::Z, glm::W, glm::Z, glm::Z) +#define qqpp swizzle(glm::W, glm::W, glm::Z, glm::Z) +#define ssqp swizzle(glm::X, glm::X, glm::W, glm::Z) +#define tsqp swizzle(glm::Y, glm::X, glm::W, glm::Z) +#define psqp swizzle(glm::Z, glm::X, glm::W, glm::Z) +#define qsqp swizzle(glm::W, glm::X, glm::W, glm::Z) +#define stqp swizzle(glm::X, glm::Y, glm::W, glm::Z) +#define ttqp swizzle(glm::Y, glm::Y, glm::W, glm::Z) +#define ptqp swizzle(glm::Z, glm::Y, glm::W, glm::Z) +#define qtqp swizzle(glm::W, glm::Y, glm::W, glm::Z) +#define spqp swizzle(glm::X, glm::Z, glm::W, glm::Z) +#define tpqp swizzle(glm::Y, glm::Z, glm::W, glm::Z) +#define ppqp swizzle(glm::Z, glm::Z, glm::W, glm::Z) +#define qpqp swizzle(glm::W, glm::Z, glm::W, glm::Z) +#define sqqp swizzle(glm::X, glm::W, glm::W, glm::Z) +#define tqqp swizzle(glm::Y, glm::W, glm::W, glm::Z) +#define pqqp swizzle(glm::Z, glm::W, glm::W, glm::Z) +#define qqqp swizzle(glm::W, glm::W, glm::W, glm::Z) +#define sssq swizzle(glm::X, glm::X, glm::X, glm::W) +#define tssq swizzle(glm::Y, glm::X, glm::X, glm::W) +#define pssq swizzle(glm::Z, glm::X, glm::X, glm::W) +#define qssq swizzle(glm::W, glm::X, glm::X, glm::W) +#define stsq swizzle(glm::X, glm::Y, glm::X, glm::W) +#define ttsq swizzle(glm::Y, glm::Y, glm::X, glm::W) +#define ptsq swizzle(glm::Z, glm::Y, glm::X, glm::W) +#define qtsq swizzle(glm::W, glm::Y, glm::X, glm::W) +#define spsq swizzle(glm::X, glm::Z, glm::X, glm::W) +#define tpsq swizzle(glm::Y, glm::Z, glm::X, glm::W) +#define ppsq swizzle(glm::Z, glm::Z, glm::X, glm::W) +#define qpsq swizzle(glm::W, glm::Z, glm::X, glm::W) +#define sqsq swizzle(glm::X, glm::W, glm::X, glm::W) +#define tqsq swizzle(glm::Y, glm::W, glm::X, glm::W) +#define pqsq swizzle(glm::Z, glm::W, glm::X, glm::W) +#define qqsq swizzle(glm::W, glm::W, glm::X, glm::W) +#define sstq swizzle(glm::X, glm::X, glm::Y, glm::W) +#define tstq swizzle(glm::Y, glm::X, glm::Y, glm::W) +#define pstq swizzle(glm::Z, glm::X, glm::Y, glm::W) +#define qstq swizzle(glm::W, glm::X, glm::Y, glm::W) +#define sttq swizzle(glm::X, glm::Y, glm::Y, glm::W) +#define tttq swizzle(glm::Y, glm::Y, glm::Y, glm::W) +#define pttq swizzle(glm::Z, glm::Y, glm::Y, glm::W) +#define qttq swizzle(glm::W, glm::Y, glm::Y, glm::W) +#define sptq swizzle(glm::X, glm::Z, glm::Y, glm::W) +#define tptq swizzle(glm::Y, glm::Z, glm::Y, glm::W) +#define pptq swizzle(glm::Z, glm::Z, glm::Y, glm::W) +#define qptq swizzle(glm::W, glm::Z, glm::Y, glm::W) +#define sqtq swizzle(glm::X, glm::W, glm::Y, glm::W) +#define tqtq swizzle(glm::Y, glm::W, glm::Y, glm::W) +#define pqtq swizzle(glm::Z, glm::W, glm::Y, glm::W) +#define qqtq swizzle(glm::W, glm::W, glm::Y, glm::W) +#define sspq swizzle(glm::X, glm::X, glm::Z, glm::W) +#define tspq swizzle(glm::Y, glm::X, glm::Z, glm::W) +#define pspq swizzle(glm::Z, glm::X, glm::Z, glm::W) +#define qspq swizzle(glm::W, glm::X, glm::Z, glm::W) +#define stpq swizzle(glm::X, glm::Y, glm::Z, glm::W) +#define ttpq swizzle(glm::Y, glm::Y, glm::Z, glm::W) +#define ptpq swizzle(glm::Z, glm::Y, glm::Z, glm::W) +#define qtpq swizzle(glm::W, glm::Y, glm::Z, glm::W) +#define sppq swizzle(glm::X, glm::Z, glm::Z, glm::W) +#define tppq swizzle(glm::Y, glm::Z, glm::Z, glm::W) +#define pppq swizzle(glm::Z, glm::Z, glm::Z, glm::W) +#define qppq swizzle(glm::W, glm::Z, glm::Z, glm::W) +#define sqpq swizzle(glm::X, glm::W, glm::Z, glm::W) +#define tqpq swizzle(glm::Y, glm::W, glm::Z, glm::W) +#define pqpq swizzle(glm::Z, glm::W, glm::Z, glm::W) +#define qqpq swizzle(glm::W, glm::W, glm::Z, glm::W) +#define ssqq swizzle(glm::X, glm::X, glm::W, glm::W) +#define tsqq swizzle(glm::Y, glm::X, glm::W, glm::W) +#define psqq swizzle(glm::Z, glm::X, glm::W, glm::W) +#define qsqq swizzle(glm::W, glm::X, glm::W, glm::W) +#define stqq swizzle(glm::X, glm::Y, glm::W, glm::W) +#define ttqq swizzle(glm::Y, glm::Y, glm::W, glm::W) +#define ptqq swizzle(glm::Z, glm::Y, glm::W, glm::W) +#define qtqq swizzle(glm::W, glm::Y, glm::W, glm::W) +#define spqq swizzle(glm::X, glm::Z, glm::W, glm::W) +#define tpqq swizzle(glm::Y, glm::Z, glm::W, glm::W) +#define ppqq swizzle(glm::Z, glm::Z, glm::W, glm::W) +#define qpqq swizzle(glm::W, glm::Z, glm::W, glm::W) +#define sqqq swizzle(glm::X, glm::W, glm::W, glm::W) +#define tqqq swizzle(glm::Y, glm::W, glm::W, glm::W) +#define pqqq swizzle(glm::Z, glm::W, glm::W, glm::W) +#define qqqq swizzle(glm::W, glm::W, glm::W, glm::W) + +#endif + +#endif//glm_core_swizzle diff --git a/ExternalLibs/glm/core/_swizzle.inl b/ExternalLibs/glm/core/_swizzle.inl new file mode 100644 index 0000000..8502d9e --- /dev/null +++ b/ExternalLibs/glm/core/_swizzle.inl @@ -0,0 +1,20 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2006-04-27 +// Updated : 2006-04-27 +// Licence : This source is under MIT License +// File : _swizzle.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef __swizzle_inl__ +#define __swizzle_inl__ + +#include "./_swizzle.h" + +namespace glm +{ + +} + +#endif//__swizzle_inl__ diff --git a/ExternalLibs/glm/core/dummy.cpp b/ExternalLibs/glm/core/dummy.cpp new file mode 100644 index 0000000..3c603ff --- /dev/null +++ b/ExternalLibs/glm/core/dummy.cpp @@ -0,0 +1,20 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2011-01-19 +// Updated : 2011-01-19 +// Licence : This source is under MIT License +// File : glm/setup.hpp +/////////////////////////////////////////////////////////////////////////////////////////////////// +// GLM is a header only library. There is nothing to compile. +// dummy.cpp exist only a wordaround for CMake file. + +#include "../glm.hpp" +#include "../ext.hpp" + +//#error "GLM is a header only library" + +int main() +{ + +} diff --git a/ExternalLibs/glm/core/func_common.hpp b/ExternalLibs/glm/core/func_common.hpp new file mode 100644 index 0000000..ec564bf --- /dev/null +++ b/ExternalLibs/glm/core/func_common.hpp @@ -0,0 +1,343 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-03-08 +// Updated : 2010-01-26 +// Licence : This source is under MIT License +// File : glm/core/func_common.hpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_func_common +#define glm_core_func_common + +#include "_fixes.hpp" + +namespace glm +{ + namespace test{ + void main_core_func_common(); + }//namespace test + + namespace core{ + namespace function{ + //! Define common functions from Section 8.3 of GLSL 1.30.8 specification. Included in glm namespace. + namespace common{ + + /// \addtogroup core_funcs + ///@{ + + //! Returns x if x >= 0; otherwise, it returns -x. + //! + //! \li GLSL abs man page + //! \li GLSL 1.30.08 specification, section 8.3 + template + genFIType abs(genFIType const & x); + + //! Returns 1.0 if x > 0, 0.0 if x == 0, or -1.0 if x < 0. + //! + //! \li GLSL sign man page + //! \li GLSL 1.30.08 specification, section 8.3 + template + genFIType sign(genFIType const & x); + + //! Returns a value equal to the nearest integer that is less then or equal to x. + //! + //! \li GLSL floor man page + //! \li GLSL 1.30.08 specification, section 8.3 + template + 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. + //! + //! \li GLSL trunc man page + //! \li GLSL 1.30.08 specification, section 8.3 + template + 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. + //! + //! \li GLSL round man page + //! \li GLSL 1.30.08 specification, section 8.3 + template + 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.) + //! + //! \li GLSL roundEven man page + //! \li GLSL 1.30.08 specification, section 8.3 + template + genType roundEven(genType const & x); + + //! Returns a value equal to the nearest integer + //! that is greater than or equal to x. + //! + //! \li GLSL ceil man page + //! \li GLSL 1.30.08 specification, section 8.3 + template + genType ceil(genType const & x); + + //! Return x - floor(x). + //! + //! \li GLSL fract man page + //! \li GLSL 1.30.08 specification, section 8.3 + template + genType fract(genType const & x); + + //! Modulus. Returns x - y * floor(x / y) + //! for each component in x using the floating point value y. + //! + //! \li GLSL mod man page + //! \li GLSL 1.30.08 specification, section 8.3 + template + genType mod( + genType const & x, + genType const & y); + + //! Modulus. Returns x - y * floor(x / y) + //! for each component in x using the floating point value y. + //! + //! \li GLSL mod man page + //! \li GLSL 1.30.08 specification, section 8.3 + template + genType mod( + genType const & x, + typename genType::value_type const & y); + + //! Returns the fractional part of x and sets i to the integer + //! part (as a whole number floating point value). Both the + //! return value and the output parameter will have the same + //! sign as x. + //! + //! \li GLSL modf man page + //! \li GLSL 1.30.08 specification, section 8.3 + template + genType modf( + genType const & x, + genType & i); + + //! Returns y if y < x; otherwise, it returns x. + //! + //! \li GLSL min man page + //! \li GLSL 1.30.08 specification, section 8.3 + template + genType min( + genType const & x, + genType const & y); + + template + genType min( + genType const & x, + typename genType::value_type const & y); + + //! Returns y if x < y; otherwise, it returns x. + //! + //! \li GLSL max man page + //! \li GLSL 1.30.08 specification, section 8.3 + template + genType max( + genType const & x, + genType const & y); + + template + genType max( + genType const & x, + typename genType::value_type const & y); + + //! Returns min(max(x, minVal), maxVal) for each component in x + //! using the floating-point values minVal and maxVal. + //! + //! \li GLSL clamp man page + //! \li GLSL 1.30.08 specification, section 8.3 + template + genType clamp( + genType const & x, + genType const & minVal, + genType const & maxVal); + + template + genType clamp( + genType const & x, + typename genType::value_type const & minVal, + typename genType::value_type const & maxVal); + + //! \return If genTypeU is a floating scalar or vector: + //! Returns x * (1.0 - a) + y * a, i.e., the linear blend of + //! x and y using the floating-point value a. + //! The value for a is not restricted to the range [0, 1]. + //! + //! \return If genTypeU is a boolean scalar or vector: + //! Selects which vector each returned component comes + //! from. For a component of a that is false, the + //! corresponding component of x is returned. For a + //! component of a that is true, the corresponding + //! component of y is returned. Components of x and y that + //! are not selected are allowed to be invalid floating point + //! values and will have no effect on the results. Thus, this + //! provides different functionality than + //! genType mix(genType x, genType y, genType(a)) + //! where a is a Boolean vector. + //! + //! \li GLSL mix man page + //! \li GLSL 1.30.08 specification, section 8.3 + //! + //! \param[in] x Floating point scalar or vector. + //! \param[in] y Floating point scalar or vector. + //! \param[in] a Floating point or boolean scalar or vector. + //! + // \todo Test when 'a' is a boolean. + template + genTypeT mix(genTypeT const & x, genTypeT const & y, genTypeU const & a); + + //! Returns 0.0 if x < edge, otherwise it returns 1.0. + //! + //! \li GLSL step man page + //! \li GLSL 1.30.08 specification, section 8.3 + template + genType step( + genType const & edge, + genType const & x); + + template + genType step( + typename genType::value_type const & edge, + genType const & x); + + //! Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and + //! performs smooth Hermite interpolation between 0 and 1 + //! when edge0 < x < edge1. This is useful in cases where + //! you would want a threshold function with a smooth + //! transition. This is equivalent to: + //! genType t; + //! t = clamp ((x – edge0) / (edge1 – edge0), 0, 1); + //! return t * t * (3 – 2 * t); + //! Results are undefined if edge0 >= edge1. + //! + //! \li GLSL smoothstep man page + //! \li GLSL 1.30.08 specification, section 8.3 + template + genType smoothstep( + genType const & edge0, + genType const & edge1, + genType const & x); + + template + genType smoothstep( + typename genType::value_type const & edge0, + typename genType::value_type const & edge1, + genType const & x); + + //! Returns true if x holds a NaN (not a number) + //! representation in the underlying implementation's set of + //! floating point representations. Returns false otherwise, + //! including for implementations with no NaN + //! representations. + //! + //! \li GLSL isnan man page + //! \li GLSL 1.30.08 specification, section 8.3 + template + typename genType::bool_type isnan(genType const & x); + + //! Returns true if x holds a positive infinity or negative + //! infinity representation in the underlying implementation's + //! set of floating point representations. Returns false + //! otherwise, including for implementations with no infinity + //! representations. + //! + //! \li GLSL isinf man page + //! \li GLSL 1.30.08 specification, section 8.3 + template + typename genType::bool_type isinf(genType const & x); + + //! Returns a signed integer value representing + //! the encoding of a floating-point value. The floatingpoint + //! value's bit-level representation is preserved. + //! + //! \li GLSL floatBitsToInt man page + //! \li GLSL 4.00.08 specification, section 8.3 + template + genIType floatBitsToInt(genType const & value); + + //! Returns a unsigned integer value representing + //! the encoding of a floating-point value. The floatingpoint + //! value's bit-level representation is preserved. + //! + //! \li GLSL floatBitsToUint man page + //! \li GLSL 4.00.08 specification, section 8.3 + template + genUType floatBitsToUint(genType const & value); + + //! Returns a floating-point value corresponding to a signed + //! integer encoding of a floating-point value. + //! If an inf or NaN is passed in, it will not signal, and the + //! resulting floating point value is unspecified. Otherwise, + //! the bit-level representation is preserved. + //! + //! \li GLSL intBitsToFloat man page + //! \li GLSL 4.00.08 specification, section 8.3 + template + genType intBitsToFloat(genIType const & value); + + //! Returns a floating-point value corresponding to a + //! unsigned integer encoding of a floating-point value. + //! If an inf or NaN is passed in, it will not signal, and the + //! resulting floating point value is unspecified. Otherwise, + //! the bit-level representation is preserved. + //! + //! \li GLSL uintBitsToFloat man page + //! \li GLSL 4.00.08 specification, section 8.3 + template + genType uintBitsToFloat(genUType const & value); + + //! Computes and returns a * b + c. + //! + //! \li GLSL fma man page + //! \li GLSL 4.00.08 specification, section 8.3 + template + genType fma(genType const & a, genType const & b, genType const & c); + + //! Splits x into a floating-point significand in the range + //! [0.5, 1.0) and an integral exponent of two, such that: + //! x = significand * exp(2, exponent) + //! + //! The significand is returned by the function and the + //! exponent is returned in the parameter exp. For a + //! floating-point value of zero, the significant and exponent + //! are both zero. For a floating-point value that is an + //! infinity or is not a number, the results are undefined. + //! + //! \li GLSL frexp man page + //! \li GLSL 4.00.08 specification, section 8.3 + template + genType frexp(genType const & x, genIType & exp); + + //! Builds a floating-point number from x and the + //! corresponding integral exponent of two in exp, returning: + //! significand * exp(2, exponent) + //! + //! If this product is too large to be represented in the + //! floating-point type, the result is undefined. + //! + //! \li GLSL ldexp man page; + //! \li GLSL 4.00.08 specification, section 8.3 + template + genType ldexp(genType const & x, genIType const & exp); + + ///@} + + }//namespace common + }//namespace function + }//namespace core + + using namespace core::function::common; +}//namespace glm + +#include "func_common.inl" + +#endif//glm_core_func_common diff --git a/ExternalLibs/glm/core/func_common.inl b/ExternalLibs/glm/core/func_common.inl new file mode 100644 index 0000000..df572cf --- /dev/null +++ b/ExternalLibs/glm/core/func_common.inl @@ -0,0 +1,1577 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-08-03 +// Updated : 2010-01-26 +// Licence : This source is under MIT License +// File : glm/core/func_common.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + namespace detail + { + template + struct Abs_ + { + }; + + template + struct Abs_ + { + static genFIType get(genFIType const & x) + { + GLM_STATIC_ASSERT( + detail::type::is_float || + detail::type::is_int, "'abs' only accept floating-point and integer inputs"); + return x >= genFIType(0) ? x : -x; + } + }; + + template + struct Abs_ + { + static genFIType get(genFIType const & x) + { + GLM_STATIC_ASSERT( + detail::type::is_uint, "'abs' only accept floating-point and integer inputs"); + + return x; + } + }; + }//namespace detail + + namespace core{ + namespace function{ + namespace common{ + + // abs + template + GLM_FUNC_QUALIFIER genFIType abs( + genFIType const & x) + { + return detail::Abs_::is_signed>::get(x); + } + + //template + //GLM_FUNC_QUALIFIER detail::tvec1 abs( + // detail::tvec1 const & v) + //{ + // return detail::tvec1( + // abs(v.x)); + //} + + template + GLM_FUNC_QUALIFIER detail::tvec2 abs( + detail::tvec2 const & v) + { + return detail::tvec2( + abs(v.x), + abs(v.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 abs( + detail::tvec3 const & v) + { + return detail::tvec3( + abs(v.x), + abs(v.y), + abs(v.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 abs( + detail::tvec4 const & v) + { + return detail::tvec4( + abs(v.x), + abs(v.y), + abs(v.z), + abs(v.w)); + } + + // sign + + //Try something like based on x >> 31 to get the sign bit + template + GLM_FUNC_QUALIFIER genFIType sign( + genFIType const & x) + { + GLM_STATIC_ASSERT( + detail::type::is_float || + detail::type::is_int, "'sign' only accept signed inputs"); + + genFIType result; + if(x > genFIType(0)) + result = genFIType(1); + else if(x < genFIType(0)) + result = genFIType(-1); + else + result = genFIType(0); + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 sign( + detail::tvec2 const & x) + { + return detail::tvec2( + sign(x.x), + sign(x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 sign( + detail::tvec3 const & x) + { + return detail::tvec3( + sign(x.x), + sign(x.y), + sign(x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 sign( + detail::tvec4 const & x) + { + return detail::tvec4( + sign(x.x), + sign(x.y), + sign(x.z), + sign(x.w)); + } + + // floor + template <> + GLM_FUNC_QUALIFIER detail::thalf floor(detail::thalf const& x) + { + return detail::thalf(::std::floor(float(x))); + } + + template + GLM_FUNC_QUALIFIER genType floor(genType const& x) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'floor' only accept floating-point inputs"); + + return ::std::floor(x); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 floor(detail::tvec2 const& x) + { + return detail::tvec2( + floor(x.x), + floor(x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 floor(detail::tvec3 const& x) + { + return detail::tvec3( + floor(x.x), + floor(x.y), + floor(x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 floor(detail::tvec4 const& x) + { + return detail::tvec4( + floor(x.x), + floor(x.y), + floor(x.z), + floor(x.w)); + } + + // trunc + template + GLM_FUNC_QUALIFIER genType trunc(genType const & x) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'trunc' only accept floating-point inputs"); + return x < 0 ? -floor(-x) : floor(x); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 trunc(detail::tvec2 const & x) + { + return detail::tvec2( + trunc(x.x), + trunc(x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 trunc(detail::tvec3 const & x) + { + return detail::tvec3( + trunc(x.x), + trunc(x.y), + trunc(x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 trunc(detail::tvec4 const & x) + { + return detail::tvec4( + trunc(x.x), + trunc(x.y), + trunc(x.z), + trunc(x.w)); + } + + // round + template + GLM_FUNC_QUALIFIER genType round(genType const& x) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'round' only accept floating-point inputs"); + + return genType(int(x + genType(0.5))); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 round(detail::tvec2 const& x) + { + return detail::tvec2( + round(x.x), + round(x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 round(detail::tvec3 const& x) + { + return detail::tvec3( + round(x.x), + round(x.y), + round(x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 round(detail::tvec4 const& x) + { + return detail::tvec4( + round(x.x), + round(x.y), + round(x.z), + round(x.w)); + } + + // roundEven + template + GLM_FUNC_QUALIFIER genType roundEven(genType const& x) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'roundEven' only accept floating-point inputs"); + + return genType(int(x + genType(int(x) % 2))); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 roundEven(detail::tvec2 const& x) + { + return detail::tvec2( + roundEven(x.x), + roundEven(x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 roundEven(detail::tvec3 const& x) + { + return detail::tvec3( + roundEven(x.x), + roundEven(x.y), + roundEven(x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 roundEven(detail::tvec4 const& x) + { + return detail::tvec4( + roundEven(x.x), + roundEven(x.y), + roundEven(x.z), + roundEven(x.w)); + } + + // ceil + template + GLM_FUNC_QUALIFIER genType ceil(genType const & x) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'ceil' only accept floating-point inputs"); + + return ::std::ceil(x); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 ceil(detail::tvec2 const & x) + { + return detail::tvec2( + ceil(x.x), + ceil(x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 ceil(detail::tvec3 const & x) + { + return detail::tvec3( + ceil(x.x), + ceil(x.y), + ceil(x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 ceil(detail::tvec4 const & x) + { + return detail::tvec4( + ceil(x.x), + ceil(x.y), + ceil(x.z), + ceil(x.w)); + } + + // fract + template + GLM_FUNC_QUALIFIER genType fract + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'fract' only accept floating-point inputs"); + + return x - ::std::floor(x); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 fract + ( + detail::tvec2 const & x + ) + { + return detail::tvec2( + fract(x.x), + fract(x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 fract + ( + detail::tvec3 const & x + ) + { + return detail::tvec3( + fract(x.x), + fract(x.y), + fract(x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 fract + ( + detail::tvec4 const & x + ) + { + return detail::tvec4( + fract(x.x), + fract(x.y), + fract(x.z), + fract(x.w)); + } + + // mod + template + GLM_FUNC_QUALIFIER genType mod + ( + genType const & x, + genType const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'mod' only accept floating-point inputs"); + + return x - y * floor(x / y); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 mod + ( + detail::tvec2 const & x, + typename detail::tvec2::value_type const & y + ) + { + return detail::tvec2( + mod(x.x, y), + mod(x.y, y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 mod + ( + detail::tvec3 const & x, + typename detail::tvec3::value_type const & y + ) + { + return detail::tvec3( + mod(x.x, y), + mod(x.y, y), + mod(x.z, y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 mod + ( + detail::tvec4 const & x, + typename detail::tvec4::value_type const & y + ) + { + return detail::tvec4( + mod(x.x, y), + mod(x.y, y), + mod(x.z, y), + mod(x.w, y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 mod + ( + detail::tvec2 const & x, + detail::tvec2 const & y + ) + { + return detail::tvec2( + mod(x.x, y.x), + mod(x.y, y.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 mod + ( + detail::tvec3 const & x, + detail::tvec3 const & y + ) + { + return detail::tvec3( + mod(x.x, y.x), + mod(x.y, y.y), + mod(x.z, y.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 mod + ( + detail::tvec4 const & x, + detail::tvec4 const & y + ) + { + return detail::tvec4( + mod(x.x, y.x), + mod(x.y, y.y), + mod(x.z, y.z), + mod(x.w, y.w)); + } + + // modf + template + GLM_FUNC_QUALIFIER genType modf + ( + genType const & x, + genType & i + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'modf' only accept floating-point inputs"); + + i = glm::floor(x); + + return x - i; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 modf + ( + detail::tvec2 const & x, + detail::tvec2 const & y + ) + { + return detail::tvec2( + modf(x.x, y.x), + modf(x.y, y.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 modf + ( + detail::tvec3 const & x, + detail::tvec3 const & y + ) + { + return detail::tvec3( + modf(x.x, y.x), + modf(x.y, y.y), + modf(x.z, y.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 modf + ( + detail::tvec4 const & x, + detail::tvec4 const & y + ) + { + return detail::tvec4( + modf(x.x, y.x), + modf(x.y, y.y), + modf(x.z, y.z), + modf(x.w, y.w)); + } + + //// Only valid if (INT_MIN <= x-y <= INT_MAX) + //// min(x,y) + //r = y + ((x - y) & ((x - y) >> (sizeof(int) * + //CHAR_BIT – 1))); + //// max(x,y) + //r = x - ((x - y) & ((x - y) >> (sizeof(int) * + //CHAR_BIT - 1))); + + // min + template + GLM_FUNC_QUALIFIER genType min + ( + genType const & x, + genType const & y + ) + { + GLM_STATIC_ASSERT( + detail::type::is_float || + detail::type::is_int || + detail::type::is_uint, "'min' only accept numbers"); + + return x < y ? x : y; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 min + ( + detail::tvec2 const & x, + typename detail::tvec2::value_type const & y + ) + { + return detail::tvec2( + min(x.x, y), + min(x.y, y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 min + ( + detail::tvec3 const & x, + typename detail::tvec3::value_type const & y + ) + { + return detail::tvec3( + min(x.x, y), + min(x.y, y), + min(x.z, y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 min + ( + detail::tvec4 const & x, + typename detail::tvec4::value_type const & y + ) + { + return detail::tvec4( + min(x.x, y), + min(x.y, y), + min(x.z, y), + min(x.w, y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 min + ( + detail::tvec2 const & x, + detail::tvec2 const & y + ) + { + return detail::tvec2( + min(x.x, y.x), + min(x.y, y.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 min + ( + detail::tvec3 const & x, + detail::tvec3 const & y + ) + { + return detail::tvec3( + min(x.x, y.x), + min(x.y, y.y), + min(x.z, y.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 min + ( + detail::tvec4 const & x, + detail::tvec4 const & y + ) + { + return detail::tvec4( + min(x.x, y.x), + min(x.y, y.y), + min(x.z, y.z), + min(x.w, y.w)); + } + + // max + template + GLM_FUNC_QUALIFIER genType max + ( + genType const & x, + genType const & y + ) + { + GLM_STATIC_ASSERT( + detail::type::is_float || + detail::type::is_int || + detail::type::is_uint, "'max' only accept numbers"); + + return x > y ? x : y; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 max + ( + detail::tvec2 const & x, + typename detail::tvec2::value_type y + ) + { + return detail::tvec2( + max(x.x, y), + max(x.y, y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 max + ( + detail::tvec3 const & x, + typename detail::tvec3::value_type y + ) + { + return detail::tvec3( + max(x.x, y), + max(x.y, y), + max(x.z, y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 max + ( + detail::tvec4 const & x, + typename detail::tvec4::value_type y + ) + { + return detail::tvec4( + max(x.x, y), + max(x.y, y), + max(x.z, y), + max(x.w, y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 max + ( + detail::tvec2 const & x, + detail::tvec2 const & y + ) + { + return detail::tvec2( + max(x.x, y.x), + max(x.y, y.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 max + ( + detail::tvec3 const & x, + detail::tvec3 const & y + ) + { + return detail::tvec3( + max(x.x, y.x), + max(x.y, y.y), + max(x.z, y.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 max + ( + detail::tvec4 const & x, + detail::tvec4 const & y) + { + return detail::tvec4( + max(x.x, y.x), + max(x.y, y.y), + max(x.z, y.z), + max(x.w, y.w)); + } + + // clamp + template + GLM_FUNC_QUALIFIER valType clamp + ( + valType const & x, + valType const & minVal, + valType const & maxVal + ) + { + GLM_STATIC_ASSERT( + detail::type::is_float || + detail::type::is_int || + detail::type::is_uint, "'clamp' only accept numbers"); + + // Old implementation, less predictable branching + //if(x >= maxVal) return maxVal; + //if(x <= minVal) return minVal; + //return x; + return glm::max(glm::min(x, maxVal), minVal); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 clamp + ( + detail::tvec2 const & x, + typename detail::tvec2::value_type const & minVal, + typename detail::tvec2::value_type const & maxVal + ) + { + return detail::tvec2( + clamp(x.x, minVal, maxVal), + clamp(x.y, minVal, maxVal)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 clamp + ( + detail::tvec3 const & x, + typename detail::tvec3::value_type const & minVal, + typename detail::tvec3::value_type const & maxVal + ) + { + return detail::tvec3( + clamp(x.x, minVal, maxVal), + clamp(x.y, minVal, maxVal), + clamp(x.z, minVal, maxVal)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 clamp + ( + detail::tvec4 const & x, + typename detail::tvec4::value_type const & minVal, + typename detail::tvec4::value_type const & maxVal + ) + { + return detail::tvec4( + clamp(x.x, minVal, maxVal), + clamp(x.y, minVal, maxVal), + clamp(x.z, minVal, maxVal), + clamp(x.w, minVal, maxVal)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 clamp + ( + detail::tvec2 const & x, + detail::tvec2 const & minVal, + detail::tvec2 const & maxVal + ) + { + return detail::tvec2( + clamp(x.x, minVal.x, maxVal.x), + clamp(x.y, minVal.y, maxVal.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 clamp + ( + detail::tvec3 const & x, + detail::tvec3 const & minVal, + detail::tvec3 const & maxVal + ) + { + return detail::tvec3( + clamp(x.x, minVal.x, maxVal.x), + clamp(x.y, minVal.y, maxVal.y), + clamp(x.z, minVal.z, maxVal.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 clamp + ( + detail::tvec4 const & x, + detail::tvec4 const & minVal, + detail::tvec4 const & maxVal + ) + { + return detail::tvec4( + clamp(x.x, minVal.x, maxVal.x), + clamp(x.y, minVal.y, maxVal.y), + clamp(x.z, minVal.z, maxVal.z), + clamp(x.w, minVal.w, maxVal.w)); + } + + // mix + template + GLM_FUNC_QUALIFIER genTypeT mix + ( + genTypeT const & x, + genTypeT const & y, + genTypeU const & a + ) + { + // It could be a vector too + //GLM_STATIC_ASSERT( + // detail::type::is_float && + // detail::type::is_float); + + //return x + a * (y - x); + return genTypeT(genTypeU(x) + a * genTypeU(y - x)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 mix + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + valTypeB const & a + ) + { + return detail::tvec2( + detail::tvec2(x) + a * detail::tvec2(y - x)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 mix + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + valTypeB const & a + ) + { + return detail::tvec3( + detail::tvec3(x) + a * detail::tvec3(y - x)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 mix + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + valTypeB const & a + ) + { + return detail::tvec4( + detail::tvec4(x) + a * detail::tvec4(y - x)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 mix + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + detail::tvec2 const & a + ) + { + return detail::tvec2( + detail::tvec2(x) + a * detail::tvec2(y - x)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 mix + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 const & a + ) + { + return detail::tvec3( + detail::tvec3(x) + a * detail::tvec3(y - x)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 mix + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + detail::tvec4 const & a + ) + { + return detail::tvec4( + detail::tvec4(x) + a * detail::tvec4(y - x)); + } + + //template + //GLM_FUNC_QUALIFIER genTypeT mix + //( + // genTypeT const & x, + // genTypeT const & y, + // float const & a + //) + //{ + // // It could be a vector too + // //GLM_STATIC_ASSERT( + // // detail::type::is_float && + // // detail::type::is_float); + + // return x + a * (y - x); + //} + + template + GLM_FUNC_QUALIFIER genType mix + ( + genType const & x, + genType const & y, + bool a + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'mix' only accept floating-point inputs"); + + return a ? x : y; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 mix + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + typename detail::tvec2::bool_type a + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'mix' only accept floating-point inputs"); + + detail::tvec2 result; + for + ( + typename detail::tvec2::size_type i = 0; + i < detail::tvec2::value_size(); + ++i + ) + { + result[i] = a[i] ? x[i] : y[i]; + } + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 mix + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + typename detail::tvec3::bool_type a + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'mix' only accept floating-point inputs"); + + detail::tvec3 result; + for + ( + typename detail::tvec3::size_type i = 0; + i < detail::tvec3::value_size(); + ++i + ) + { + result[i] = a[i] ? x[i] : y[i]; + } + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 mix + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + typename detail::tvec4::bool_type a + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'mix' only accept floating-point inputs"); + + detail::tvec4 result; + for + ( + typename detail::tvec4::size_type i = 0; + i < detail::tvec4::value_size(); + ++i + ) + { + result[i] = a[i] ? x[i] : y[i]; + } + return result; + } + + // step + template + GLM_FUNC_QUALIFIER genType step + ( + genType const & edge, + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'mix' only accept floating-point inputs"); + + return x <= edge ? genType(0) : genType(1); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 step + ( + typename detail::tvec2::value_type const & edge, + detail::tvec2 const & x + ) + { + return detail::tvec2( + x.x <= edge ? T(0) : T(1), + x.y <= edge ? T(0) : T(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 step + ( + typename detail::tvec3::value_type const & edge, + detail::tvec3 const & x + ) + { + return detail::tvec3( + x.x <= edge ? T(0) : T(1), + x.y <= edge ? T(0) : T(1), + x.z <= edge ? T(0) : T(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 step + ( + typename detail::tvec4::value_type const & edge, + detail::tvec4 const & x + ) + { + return detail::tvec4( + x.x <= edge ? T(0) : T(1), + x.y <= edge ? T(0) : T(1), + x.z <= edge ? T(0) : T(1), + x.w <= edge ? T(0) : T(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 step + ( + detail::tvec2 const & edge, + detail::tvec2 const & x + ) + { + return detail::tvec2( + x.x <= edge.x ? T(0) : T(1), + x.y <= edge.y ? T(0) : T(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 step + ( + detail::tvec3 const & edge, + detail::tvec3 const & x + ) + { + return detail::tvec3( + x.x <= edge.x ? T(0) : T(1), + x.y <= edge.y ? T(0) : T(1), + x.z <= edge.z ? T(0) : T(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 step + ( + detail::tvec4 const & edge, + detail::tvec4 const & x + ) + { + return detail::tvec4( + x.x <= edge.x ? T(0) : T(1), + x.y <= edge.y ? T(0) : T(1), + x.z <= edge.z ? T(0) : T(1), + x.w <= edge.w ? T(0) : T(1)); + } + + // smoothstep + template + GLM_FUNC_QUALIFIER genType smoothstep + ( + genType const & edge0, + genType const & edge1, + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'mix' only accept floating-point inputs"); + + genType tmp = clamp((x - edge0) / (edge1 - edge0), genType(0), genType(1)); + return tmp * tmp * (genType(3) - genType(2) * tmp); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 smoothstep + ( + typename detail::tvec2::value_type const & edge0, + typename detail::tvec2::value_type const & edge1, + detail::tvec2 const & x + ) + { + return detail::tvec2( + smoothstep(edge0, edge1, x.x), + smoothstep(edge0, edge1, x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 smoothstep + ( + typename detail::tvec3::value_type const & edge0, + typename detail::tvec3::value_type const & edge1, + detail::tvec3 const & x + ) + { + return detail::tvec3( + smoothstep(edge0, edge1, x.x), + smoothstep(edge0, edge1, x.y), + smoothstep(edge0, edge1, x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 smoothstep + ( + typename detail::tvec4::value_type const & edge0, + typename detail::tvec4::value_type const & edge1, + detail::tvec4 const & x + ) + { + return detail::tvec4( + smoothstep(edge0, edge1, x.x), + smoothstep(edge0, edge1, x.y), + smoothstep(edge0, edge1, x.z), + smoothstep(edge0, edge1, x.w)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 smoothstep + ( + detail::tvec2 const & edge0, + detail::tvec2 const & edge1, + detail::tvec2 const & x + ) + { + return detail::tvec2( + smoothstep(edge0.x, edge1.x, x.x), + smoothstep(edge0.y, edge1.y, x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 smoothstep + ( + detail::tvec3 const & edge0, + detail::tvec3 const & edge1, + detail::tvec3 const & x + ) + { + return detail::tvec3( + smoothstep(edge0.x, edge1.x, x.x), + smoothstep(edge0.y, edge1.y, x.y), + smoothstep(edge0.z, edge1.z, x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 smoothstep + ( + detail::tvec4 const & edge0, + detail::tvec4 const & edge1, + detail::tvec4 const & x + ) + { + return detail::tvec4( + smoothstep(edge0.x, edge1.x, x.x), + smoothstep(edge0.y, edge1.y, x.y), + smoothstep(edge0.z, edge1.z, x.z), + smoothstep(edge0.w, edge1.w, x.w)); + } + + template + GLM_FUNC_QUALIFIER typename genType::bool_type isnan + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'mix' only accept floating-point inputs"); + +#if(GLM_COMPILER & GLM_COMPILER_VC) + return typename genType::bool_type(_isnan(x)); +#else + return typename genType::bool_type(std::isnan(x)); +#endif + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec2::bool_type isnan + ( + detail::tvec2 const & x + ) + { + return typename detail::tvec2::bool_type( + isnan(x.x), + isnan(x.y)); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec3::bool_type isnan + ( + detail::tvec3 const & x + ) + { + return typename detail::tvec3::bool_type( + isnan(x.x), + isnan(x.y), + isnan(x.z)); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec4::bool_type isnan + ( + detail::tvec4 const & x + ) + { + return typename detail::tvec4::bool_type( + isnan(x.x), + isnan(x.y), + isnan(x.z), + isnan(x.w)); + } + + template + GLM_FUNC_QUALIFIER typename genType::bool_type isinf + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'isinf' only accept floating-point inputs"); + +#if(GLM_COMPILER & GLM_COMPILER_VC) + return typename genType::bool_type(_fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF); +#else + return typename genType::bool_type(std::isinf(x)); +#endif + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec2::bool_type isinf + ( + detail::tvec2 const & x + ) + { + return typename detail::tvec2::bool_type( + isnan(x.x), + isnan(x.y)); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec3::bool_type isinf + ( + detail::tvec3 const & x + ) + { + return typename detail::tvec3::bool_type( + isnan(x.x), + isnan(x.y), + isnan(x.z)); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec4::bool_type isinf + ( + detail::tvec4 const & x + ) + { + return typename detail::tvec4::bool_type( + isnan(x.x), + isnan(x.y), + isnan(x.z), + isnan(x.w)); + } + + GLM_FUNC_QUALIFIER int floatBitsToInt(float const & value) + { + union + { + float f; + int i; + } fi; + + fi.f = value; + return fi.i; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 floatBitsToInt + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + floatBitsToInt(value.x), + floatBitsToInt(value.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 floatBitsToInt + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + floatBitsToInt(value.x), + floatBitsToInt(value.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 floatBitsToInt + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + floatBitsToInt(value.x), + floatBitsToInt(value.y)); + } + + GLM_FUNC_QUALIFIER uint floatBitsToUint(float const & value) + { + union + { + float f; + uint u; + } fu; + + fu.f = value; + return fu.u; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 floatBitsToUint + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + floatBitsToUint(value.x), + floatBitsToUint(value.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 floatBitsToUint + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + floatBitsToUint(value.x), + floatBitsToUint(value.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 floatBitsToUint + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + floatBitsToUint(value.x), + floatBitsToUint(value.y)); + } + + GLM_FUNC_QUALIFIER float intBitsToFloat(int const & value) + { + union + { + float f; + int i; + } fi; + + fi.i = value; + return fi.f; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 intBitsToFloat + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + intBitsToFloat(value.x), + intBitsToFloat(value.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 intBitsToFloat + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + intBitsToFloat(value.x), + intBitsToFloat(value.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 intBitsToFloat + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + intBitsToFloat(value.x), + intBitsToFloat(value.y)); + } + + GLM_FUNC_QUALIFIER float uintBitsToFloat(uint const & value) + { + union + { + float f; + uint u; + } fu; + + fu.u = value; + return fu.f; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 uintBitsToFloat + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + uintBitsToFloat(value.x), + uintBitsToFloat(value.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 uintBitsToFloat + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + uintBitsToFloat(value.x), + uintBitsToFloat(value.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 uintBitsToFloat + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + uintBitsToFloat(value.x), + uintBitsToFloat(value.y)); + } + + template + GLM_FUNC_QUALIFIER genType fma + ( + genType const & a, + genType const & b, + genType const & c + ) + { + return a * b + c; + } + + template + GLM_FUNC_QUALIFIER genType frexp + ( + genType const & x, + int & exp + ) + { + return std::frexp(x, exp); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 frexp + ( + detail::tvec2 const & x, + detail::tvec2 & exp + ) + { + return std::frexp(x, exp); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 frexp + ( + detail::tvec3 const & x, + detail::tvec3 & exp + ) + { + return std::frexp(x, exp); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 frexp + ( + detail::tvec4 const & x, + detail::tvec4 & exp + ) + { + return std::frexp(x, exp); + } + + template + GLM_FUNC_QUALIFIER genType ldexp + ( + genType const & x, + int const & exp + ) + { + return std::frexp(x, exp); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 ldexp + ( + detail::tvec2 const & x, + detail::tvec2 const & exp + ) + { + return std::frexp(x, exp); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 ldexp + ( + detail::tvec3 const & x, + detail::tvec3 const & exp + ) + { + return std::frexp(x, exp); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 ldexp + ( + detail::tvec4 const & x, + detail::tvec4 const & exp + ) + { + return std::frexp(x, exp); + } + + }//namespace common + }//namespace function + }//namespace core +}//namespace glm diff --git a/ExternalLibs/glm/core/func_exponential.hpp b/ExternalLibs/glm/core/func_exponential.hpp new file mode 100644 index 0000000..7871397 --- /dev/null +++ b/ExternalLibs/glm/core/func_exponential.hpp @@ -0,0 +1,90 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-08-08 +// Updated : 2010-02-04 +// Licence : This source is under MIT License +// File : glm/core/func_exponential.hpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_func_exponential +#define glm_core_func_exponential + +namespace glm +{ + namespace test{ + void main_core_func_exponential(); + }//namespace test + + namespace core{ + namespace function{ + //! Define all exponential functions from Section 8.2 of GLSL 1.30.8 specification. Included in glm namespace. + namespace exponential{ + + /// \addtogroup core_funcs + ///@{ + + //! Returns x raised to the y power. + //! + //! \li GLSL pow man page + //! \li GLSL 1.30.08 specification, section 8.2 + template + genType pow(genType const & x, genType const & y); + + //! Returns the natural exponentiation of x, i.e., e^x. + //! + //! \li GLSL exp man page + //! \li GLSL 1.30.08 specification, section 8.2 + template + genType exp(genType const & x); + + //! Returns the natural logarithm of x, i.e., + //! returns the value y which satisfies the equation x = e^y. + //! Results are undefined if x <= 0. + //! + //! \li GLSL log man page + //! \li GLSL 1.30.08 specification, section 8.2 + template + genType log(genType const & x); + + //! Returns 2 raised to the x power. + //! + //! \li GLSL exp2 man page + //! \li GLSL 1.30.08 specification, section 8.2 + template + genType exp2(genType const & x); + + //! Returns the base 2 log of x, i.e., returns the value y, + //! which satisfies the equation x = 2 ^ y. + //! + //! \li GLSL log2 man page + //! \li GLSL 1.30.08 specification, section 8.2 + template + genType log2(genType const & x); + + //! Returns the positive square root of x. + //! + //! \li GLSL sqrt man page + //! \li GLSL 1.30.08 specification, section 8.2 + template + genType sqrt(genType const & x); + + //! Returns the reciprocal of the positive square root of x. + //! + //! \li GLSL inversesqrt man page + //! \li GLSL 1.30.08 specification, section 8.2 + template + genType inversesqrt(genType const & x); + + ///@} + + }//namespace exponential + }//namespace function + }//namespace core + + using namespace core::function::exponential; +}//namespace glm + +#include "func_exponential.inl" + +#endif//glm_core_func_exponential diff --git a/ExternalLibs/glm/core/func_exponential.inl b/ExternalLibs/glm/core/func_exponential.inl new file mode 100644 index 0000000..d3bc59e --- /dev/null +++ b/ExternalLibs/glm/core/func_exponential.inl @@ -0,0 +1,358 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-08-03 +// Updated : 2010-02-04 +// Licence : This source is under MIT License +// File : glm/core/func_exponential.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + namespace core{ + namespace function{ + namespace exponential{ + + // pow + template + GLM_FUNC_QUALIFIER genType pow + ( + genType const & x, + genType const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'pow' only accept floating-point input"); + + return ::std::pow(x, y); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 pow + ( + detail::tvec2 const & x, + detail::tvec2 const & y + ) + { + return detail::tvec2( + pow(x.x, y.x), + pow(x.y, y.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 pow + ( + detail::tvec3 const & x, + detail::tvec3 const & y + ) + { + return detail::tvec3( + pow(x.x, y.x), + pow(x.y, y.y), + pow(x.z, y.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 pow + ( + detail::tvec4 const & x, + detail::tvec4 const & y + ) + { + return detail::tvec4( + pow(x.x, y.x), + pow(x.y, y.y), + pow(x.z, y.z), + pow(x.w, y.w)); + } + + // exp + template + GLM_FUNC_QUALIFIER genType exp + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'exp' only accept floating-point input"); + + return ::std::exp(x); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 exp + ( + detail::tvec2 const & x + ) + { + return detail::tvec2( + exp(x.x), + exp(x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 exp + ( + detail::tvec3 const & x + ) + { + return detail::tvec3( + exp(x.x), + exp(x.y), + exp(x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 exp + ( + detail::tvec4 const & x + ) + { + return detail::tvec4( + exp(x.x), + exp(x.y), + exp(x.z), + exp(x.w)); + } + + // log + template + GLM_FUNC_QUALIFIER genType log + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'log' only accept floating-point input"); + + return ::std::log(x); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 log + ( + detail::tvec2 const & x + ) + { + return detail::tvec2( + log(x.x), + log(x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 log + ( + detail::tvec3 const & x + ) + { + return detail::tvec3( + log(x.x), + log(x.y), + log(x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 log + ( + detail::tvec4 const & x + ) + { + return detail::tvec4( + log(x.x), + log(x.y), + log(x.z), + log(x.w)); + } + + //exp2, ln2 = 0.69314718055994530941723212145818f + template + GLM_FUNC_QUALIFIER genType exp2 + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'exp2' only accept floating-point input"); + + return ::std::exp(genType(0.69314718055994530941723212145818) * x); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 exp2 + ( + detail::tvec2 const & x + ) + { + return detail::tvec2( + exp2(x.x), + exp2(x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 exp2 + ( + detail::tvec3 const & x + ) + { + return detail::tvec3( + exp2(x.x), + exp2(x.y), + exp2(x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 exp2 + ( + detail::tvec4 const & x + ) + { + return detail::tvec4( + exp2(x.x), + exp2(x.y), + exp2(x.z), + exp2(x.w)); + } + + // log2, ln2 = 0.69314718055994530941723212145818f + template + GLM_FUNC_QUALIFIER genType log2 + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'log2' only accept floating-point input"); + + return ::std::log(x) / genType(0.69314718055994530941723212145818); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 log2 + ( + detail::tvec2 const & x + ) + { + return detail::tvec2( + log2(x.x), + log2(x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 log2 + ( + detail::tvec3 const & x + ) + { + return detail::tvec3( + log2(x.x), + log2(x.y), + log2(x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 log2 + ( + detail::tvec4 const & x + ) + { + return detail::tvec4( + log2(x.x), + log2(x.y), + log2(x.z), + log2(x.w)); + } + + // sqrt + template + GLM_FUNC_QUALIFIER genType sqrt + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'sqrt' only accept floating-point input"); + + return genType(::std::sqrt(x)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 sqrt + ( + detail::tvec2 const & x + ) + { + return detail::tvec2( + sqrt(x.x), + sqrt(x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 sqrt + ( + detail::tvec3 const & x + ) + { + return detail::tvec3( + sqrt(x.x), + sqrt(x.y), + sqrt(x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 sqrt + ( + detail::tvec4 const & x + ) + { + return detail::tvec4( + sqrt(x.x), + sqrt(x.y), + sqrt(x.z), + sqrt(x.w)); + } + + template + GLM_FUNC_QUALIFIER genType inversesqrt + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'inversesqrt' only accept floating-point input"); + + return genType(1) / ::std::sqrt(x); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 inversesqrt + ( + detail::tvec2 const & x + ) + { + return detail::tvec2( + inversesqrt(x.x), + inversesqrt(x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 inversesqrt + ( + detail::tvec3 const & x + ) + { + return detail::tvec3( + inversesqrt(x.x), + inversesqrt(x.y), + inversesqrt(x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 inversesqrt + ( + detail::tvec4 const & x + ) + { + return detail::tvec4( + inversesqrt(x.x), + inversesqrt(x.y), + inversesqrt(x.z), + inversesqrt(x.w)); + } + + }//namespace exponential + }//namespace function + }//namespace core +}//namespace glm diff --git a/ExternalLibs/glm/core/func_geometric.hpp b/ExternalLibs/glm/core/func_geometric.hpp new file mode 100644 index 0000000..c82d104 --- /dev/null +++ b/ExternalLibs/glm/core/func_geometric.hpp @@ -0,0 +1,113 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-08-03 +// Updated : 2010-02-04 +// Licence : This source is under MIT License +// File : glm/core/func_geometric.hpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_func_geometric +#define glm_core_func_geometric + +namespace glm +{ + namespace test{ + void main_core_func_geometric(); + }//namespace test + + namespace core{ + namespace function{ + //! Define all geometric functions from Section 8.4 of GLSL 1.30.8 specification. Included in glm namespace. + namespace geometric{ + + /// \addtogroup core_funcs + ///@{ + + //! Returns the length of x, i.e., sqrt(x * x). + //! + //! \li GLSL length man page + //! \li GLSL 1.30.08 specification, section 8.4 + template + typename genType::value_type length( + genType const & x); + + //! Returns the distance betwwen p0 and p1, i.e., length(p0 - p1). + //! + //! \li GLSL distance man page + //! \li GLSL 1.30.08 specification, section 8.4 + template + typename genType::value_type distance( + genType const & p0, + genType const & p1); + + //! Returns the dot product of x and y, i.e., result = x * y. + //! + //! \li GLSL dot man page + //! \li GLSL 1.30.08 specification, section 8.4 + template + typename genType::value_type dot( + genType const & x, + genType const & y); + + //! Returns the cross product of x and y. + //! + //! \li GLSL cross man page + //! \li GLSL 1.30.08 specification, section 8.4 + template + detail::tvec3 cross( + detail::tvec3 const & x, + detail::tvec3 const & y); + + //! Returns a vector in the same direction as x but with length of 1. + //! + //! \li GLSL normalize man page + //! \li GLSL 1.30.08 specification, section 8.4 + template + genType normalize( + genType const & x); + + //! If dot(Nref, I) < 0.0, return N, otherwise, return -N. + //! + //! \li GLSL faceforward man page + //! \li GLSL 1.30.08 specification, section 8.4 + template + genType faceforward( + genType const & N, + genType const & I, + genType const & Nref); + + //! For the incident vector I and surface orientation N, + //! returns the reflection direction : result = I - 2.0 * dot(N, I) * N. + //! + //! \li GLSL reflect man page + //! \li GLSL 1.30.08 specification, section 8.4 + template + genType reflect( + genType const & I, + genType const & N); + + //! For the incident vector I and surface normal N, + //! and the ratio of indices of refraction eta, + //! return the refraction vector. + //! + //! \li GLSL refract man page + //! \li GLSL 1.30.08 specification, section 8.4 + template + genType refract( + genType const & I, + genType const & N, + typename genType::value_type const & eta); + + ///@} + + }//namespace geometric + }//namespace function + }//namespace core + + using namespace core::function::geometric; +}//namespace glm + +#include "func_geometric.inl" + +#endif//glm_core_func_geometric diff --git a/ExternalLibs/glm/core/func_geometric.inl b/ExternalLibs/glm/core/func_geometric.inl new file mode 100644 index 0000000..086b522 --- /dev/null +++ b/ExternalLibs/glm/core/func_geometric.inl @@ -0,0 +1,290 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-08-03 +// Updated : 2010-02-04 +// Licence : This source is under MIT License +// File : glm/core/func_geometric.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + namespace core{ + namespace function{ + namespace geometric{ + + // length + template + GLM_FUNC_QUALIFIER genType length + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'length' only accept floating-point inputs"); + + genType sqr = x * x; + return sqrt(sqr); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec2::value_type length + ( + detail::tvec2 const & v + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'length' only accept floating-point inputs"); + + typename detail::tvec2::value_type sqr = v.x * v.x + v.y * v.y; + return sqrt(sqr); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec3::value_type length + ( + detail::tvec3 const & v + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'length' only accept floating-point inputs"); + + typename detail::tvec3::value_type sqr = v.x * v.x + v.y * v.y + v.z * v.z; + return sqrt(sqr); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec4::value_type length + ( + detail::tvec4 const & v + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'length' only accept floating-point inputs"); + + typename detail::tvec4::value_type sqr = v.x * v.x + v.y * v.y + v.z * v.z + v.w * v.w; + return sqrt(sqr); + } + + // distance + template + GLM_FUNC_QUALIFIER genType distance + ( + genType const & p0, + genType const & p1 + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'distance' only accept floating-point inputs"); + + return length(p1 - p0); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec2::value_type distance + ( + detail::tvec2 const & p0, + detail::tvec2 const & p1 + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'distance' only accept floating-point inputs"); + + return length(p1 - p0); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec3::value_type distance + ( + detail::tvec3 const & p0, + detail::tvec3 const & p1 + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'distance' only accept floating-point inputs"); + + return length(p1 - p0); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec4::value_type distance + ( + detail::tvec4 const & p0, + detail::tvec4 const & p1 + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'distance' only accept floating-point inputs"); + + return length(p1 - p0); + } + + // dot + template + GLM_FUNC_QUALIFIER genType dot + ( + genType const & x, + genType const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'dot' only accept floating-point inputs"); + + return x * y; + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec2::value_type dot + ( + detail::tvec2 const & x, + detail::tvec2 const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'dot' only accept floating-point inputs"); + + return x.x * y.x + x.y * y.y; + } + + template + GLM_FUNC_QUALIFIER T dot + ( + detail::tvec3 const & x, + detail::tvec3 const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'dot' only accept floating-point inputs"); + + return x.x * y.x + x.y * y.y + x.z * y.z; + } +/* // SSE3 + GLM_FUNC_QUALIFIER float dot(const tvec4& x, const tvec4& y) + { + float Result; + __asm + { + mov esi, x + mov edi, y + movaps xmm0, [esi] + mulps xmm0, [edi] + haddps( _xmm0, _xmm0 ) + haddps( _xmm0, _xmm0 ) + movss Result, xmm0 + } + return Result; + } +*/ + template + GLM_FUNC_QUALIFIER T dot + ( + detail::tvec4 const & x, + detail::tvec4 const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'dot' only accept floating-point inputs"); + + return x.x * y.x + x.y * y.y + x.z * y.z + x.w * y.w; + } + + // cross + template + GLM_FUNC_QUALIFIER detail::tvec3 cross + ( + detail::tvec3 const & x, + detail::tvec3 const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'cross' only accept floating-point inputs"); + + return detail::tvec3( + x.y * y.z - y.y * x.z, + x.z * y.x - y.z * x.x, + x.x * y.y - y.x * x.y); + } + + // normalize + template + GLM_FUNC_QUALIFIER genType normalize + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'normalize' only accept floating-point inputs"); + + return x < genType(0) ? genType(-1) : genType(1); + } + + // According to issue 10 GLSL 1.10 specification, if length(x) == 0 then result is undefine and generate an error + template + GLM_FUNC_QUALIFIER detail::tvec2 normalize + ( + detail::tvec2 const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'normalize' only accept floating-point inputs"); + + typename detail::tvec2::value_type sqr = x.x * x.x + x.y * x.y; + return x * inversesqrt(sqr); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 normalize + ( + detail::tvec3 const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'normalize' only accept floating-point inputs"); + + typename detail::tvec3::value_type sqr = x.x * x.x + x.y * x.y + x.z * x.z; + return x * inversesqrt(sqr); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 normalize + ( + detail::tvec4 const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'normalize' only accept floating-point inputs"); + + typename detail::tvec4::value_type sqr = x.x * x.x + x.y * x.y + x.z * x.z + x.w * x.w; + return x * inversesqrt(sqr); + } + + // faceforward + template + GLM_FUNC_QUALIFIER genType faceforward + ( + genType const & N, + genType const & I, + genType const & Nref + ) + { + return dot(Nref, I) < 0 ? N : -N; + } + + // reflect + template + genType reflect + ( + genType const & I, + genType const & N + ) + { + return I - N * dot(N, I) * float(2); + } + + // refract + template + GLM_FUNC_QUALIFIER genType refract + ( + genType const & I, + genType const & N, + typename genType::value_type const & eta + ) + { + //It could be a vector + //GLM_STATIC_ASSERT(detail::type::is_float); + + typename genType::value_type dotValue = dot(N, I); + typename genType::value_type k = typename genType::value_type(1) - eta * eta * (typename genType::value_type(1) - dotValue * dotValue); + if(k < typename genType::value_type(0)) + return genType(0); + else + return eta * I - (eta * dotValue + sqrt(k)) * N; + } + + }//namespace geometric + }//namespace function + }//namespace core +}//namespace glm diff --git a/ExternalLibs/glm/core/func_integer.hpp b/ExternalLibs/glm/core/func_integer.hpp new file mode 100644 index 0000000..b411b58 --- /dev/null +++ b/ExternalLibs/glm/core/func_integer.hpp @@ -0,0 +1,162 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2010-03-17 +// Updated : 2010-03-31 +// Licence : This source is under MIT License +// File : glm/core/func_integer.hpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_func_integer +#define glm_core_func_integer + +namespace glm +{ + namespace test{ + void main_core_func_integer(); + }//namespace test + + namespace core{ + namespace function{ + //! Define integer functions from Section 8.8 of GLSL 4.00.8 specification. + namespace integer{ + + /// \addtogroup core_funcs + ///@{ + + //! Adds 32-bit unsigned integer x and y, returning the sum + //! modulo pow(2, 32). The value carry is set to 0 if the sum was + //! less than pow(2, 32), or to 1 otherwise. + //! + //! \li GLSL uaddCarry man page + //! \li GLSL 4.00.08 specification, section 8.8 + template + genUType uaddCarry( + genUType const & x, + genUType const & y, + genUType & carry); + + //! Subtracts the 32-bit unsigned integer y from x, returning + //! the difference if non-negative, or pow(2, 32) plus the difference + //! otherwise. The value borrow is set to 0 if x >= y, or to 1 otherwise. + //! + //! \li GLSL usubBorrow man page + //! \li GLSL 4.00.08 specification, section 8.8 + template + genUType usubBorrow( + genUType const & x, + genUType const & y, + genUType & borrow); + + //! Multiplies 32-bit integers x and y, producing a 64-bit + //! result. The 32 least-significant bits are returned in lsb. + //! The 32 most-significant bits are returned in msb. + //! + //! \li GLSL umulExtended man page + //! \li GLSL 4.00.08 specification, section 8.8 + template + void umulExtended( + genUType const & x, + genUType const & y, + genUType & msb, + genUType & lsb); + + //! Multiplies 32-bit integers x and y, producing a 64-bit + //! result. The 32 least-significant bits are returned in lsb. + //! The 32 most-significant bits are returned in msb. + //! + //! \li GLSL imulExtended man page + //! \li GLSL 4.00.08 specification, section 8.8 + template + void imulExtended( + genIType const & x, + genIType const & y, + genIType & msb, + genIType & lsb); + + //! Extracts bits [offset, offset + bits - 1] from value, + //! returning them in the least significant bits of the result. + //! For unsigned data types, the most significant bits of the + //! result will be set to zero. For signed data types, the + //! most significant bits will be set to the value of bit offset + base – 1. + //! + //! If bits is zero, the result will be zero. The result will be + //! undefined if offset or bits is negative, or if the sum of + //! offset and bits is greater than the number of bits used + //! to store the operand. + //! + //! \li GLSL bitfieldExtract man page + //! \li GLSL 4.00.08 specification, section 8.8 + template + genIUType bitfieldExtract( + genIUType const & Value, + int const & Offset, + int const & Bits); + + //! Returns the insertion the bits least-significant bits of insert into base. + //! + //! The result will have bits [offset, offset + bits - 1] taken + //! from bits [0, bits – 1] of insert, and all other bits taken + //! directly from the corresponding bits of base. If bits is + //! zero, the result will simply be base. The result will be + //! undefined if offset or bits is negative, or if the sum of + //! offset and bits is greater than the number of bits used to + //! store the operand. + //! + //! \li GLSL bitfieldInsert man page + //! \li GLSL 4.00.08 specification, section 8.8 + template + genIUType bitfieldInsert( + genIUType const & Base, + genIUType const & Insert, + int const & Offset, + int const & Bits); + + //! Returns the reversal of the bits of value. + //! The bit numbered n of the result will be taken from bit (bits - 1) - n of value, + //! where bits is the total number of bits used to represent value. + //! + //! \li GLSL bitfieldReverse man page + //! \li GLSL 4.00.08 specification, section 8.8 + template + genIUType bitfieldReverse(genIUType const & value); + + //! Returns the number of bits set to 1 in the binary representation of value. + //! + //! \li GLSL bitCount man page + //! \li GLSL 4.00.08 specification, section 8.8 + template class C> + typename C::signed_type bitCount(C const & Value); + + //! Returns the bit number of the least significant bit set to + //! 1 in the binary representation of value. + //! If value is zero, -1 will be returned. + //! + //! \li GLSL findLSB man page + //! \li GLSL 4.00.08 specification, section 8.8 + template class C> + typename C::signed_type findLSB(C const & Value); + + //! Returns the bit number of the most significant bit in the binary representation of value. + //! For positive integers, the result will be the bit number of the most significant bit set to 1. + //! For negative integers, the result will be the bit number of the most significant + //! bit set to 0. For a value of zero or negative one, -1 will be returned. + //! + //! \li GLSL findMSB man page + //! \li GLSL 4.00.08 specification, section 8.8 + template class C> + typename C::signed_type findMSB(C const & Value); + + ///@} + + }//namespace integer + }//namespace function + }//namespace core + + using namespace core::function::integer; +}//namespace glm + +#include "func_integer.inl" + +#endif//glm_core_func_integer + diff --git a/ExternalLibs/glm/core/func_integer.inl b/ExternalLibs/glm/core/func_integer.inl new file mode 100644 index 0000000..0e30aa2 --- /dev/null +++ b/ExternalLibs/glm/core/func_integer.inl @@ -0,0 +1,597 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2010-03-17 +// Updated : 2010-03-31 +// Licence : This source is under MIT License +// File : glm/core/func_integer.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + namespace detail + { + + }//namespace detail + + namespace core{ + namespace function{ + namespace integer + { + // uaddCarry + template + GLM_FUNC_QUALIFIER genUType uaddCarry + ( + genUType const & x, + genUType const & y, + genUType & Carry + ) + { + detail::highp_uint_t Value64 = detail::highp_uint_t(x) + detail::highp_uint_t(y); + genUType Result = genUType(Value64 % (detail::highp_uint_t(1) << detail::highp_uint_t(32))); + Carry = (Value64 % (detail::highp_uint_t(1) << detail::highp_uint_t(32))) > 1 ? 1 : 0; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 uaddCarry + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + detail::tvec2 & Carry + ) + { + return detail::tvec2( + uaddCarry(x[0], y[0], Carry[0]), + uaddCarry(x[1], y[1], Carry[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 uaddCarry + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 & Carry + ) + { + return detail::tvec3( + uaddCarry(x[0], y[0], Carry[0]), + uaddCarry(x[1], y[1], Carry[1]), + uaddCarry(x[2], y[2], Carry[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 uaddCarry + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + detail::tvec4 & Carry + ) + { + return detail::tvec4( + uaddCarry(x[0], y[0], Carry[0]), + uaddCarry(x[1], y[1], Carry[1]), + uaddCarry(x[2], y[2], Carry[2]), + uaddCarry(x[3], y[3], Carry[3])); + } + + // usubBorrow + template + GLM_FUNC_QUALIFIER genUType usubBorrow + ( + genUType const & x, + genUType const & y, + genUType & Borrow + ) + { + Borrow = x >= y ? 0 : 1; + if(x > y) + return genUType(detail::highp_int_t(x) - detail::highp_int_t(y)); + else + return genUType(detail::highp_int_t(1) << detail::highp_int_t(32) + detail::highp_int_t(x) - detail::highp_int_t(y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 usubBorrow + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + detail::tvec2 & Borrow + ) + { + return detail::tvec2( + usubBorrow(x[0], y[0], Borrow[0]), + usubBorrow(x[1], y[1], Borrow[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 usubBorrow + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 & Borrow + ) + { + return detail::tvec3( + usubBorrow(x[0], y[0], Borrow[0]), + usubBorrow(x[1], y[1], Borrow[1]), + usubBorrow(x[2], y[2], Borrow[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 usubBorrow + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + detail::tvec4 & Borrow + ) + { + return detail::tvec4( + usubBorrow(x[0], y[0], Borrow[0]), + usubBorrow(x[1], y[1], Borrow[1]), + usubBorrow(x[2], y[2], Borrow[2]), + usubBorrow(x[3], y[3], Borrow[3])); + } + + // umulExtended + template + GLM_FUNC_QUALIFIER void umulExtended + ( + genUType const & x, + genUType const & y, + genUType & msb, + genUType & lsb + ) + { + detail::highp_uint_t ValueX64 = x; + detail::highp_uint_t ValueY64 = y; + detail::highp_uint_t Value64 = ValueX64 * ValueY64; + msb = *(genUType*)&genUType(Value64 & ((detail::highp_uint_t(1) << detail::highp_uint_t(32)) - detail::highp_uint_t(1))); + lsb = *(genUType*)&genUType(Value64 >> detail::highp_uint_t(32)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 umulExtended + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + detail::tvec2 & msb, + detail::tvec2 & lsb + ) + { + return detail::tvec2( + umulExtended(x[0], y[0], msb, lsb), + umulExtended(x[1], y[1], msb, lsb)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 umulExtended + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 & msb, + detail::tvec3 & lsb + ) + { + return detail::tvec3( + umulExtended(x[0], y[0], msb, lsb), + umulExtended(x[1], y[1], msb, lsb), + umulExtended(x[2], y[2], msb, lsb)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 umulExtended + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + detail::tvec4 & msb, + detail::tvec4 & lsb + ) + { + return detail::tvec4( + umulExtended(x[0], y[0], msb, lsb), + umulExtended(x[1], y[1], msb, lsb), + umulExtended(x[2], y[2], msb, lsb), + umulExtended(x[3], y[3], msb, lsb)); + } + + // imulExtended + template + GLM_FUNC_QUALIFIER void imulExtended + ( + genIType const & x, + genIType const & y, + genIType & msb, + genIType & lsb + ) + { + detail::highp_int_t ValueX64 = x; + detail::highp_int_t ValueY64 = y; + detail::highp_int_t Value64 = ValueX64 * ValueY64; + msb = *(genIType*)&genIType(Value64 & ((detail::highp_uint_t(1) << detail::highp_uint_t(32)) - detail::highp_uint_t(1))); + lsb = *(genIType*)&genIType(Value64 >> detail::highp_uint_t(32)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 imulExtended + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + detail::tvec2 & msb, + detail::tvec2 & lsb + ) + { + return detail::tvec2( + imulExtended(x[0], y[0], msb, lsb), + imulExtended(x[1], y[1], msb, lsb)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 imulExtended + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 & msb, + detail::tvec3 & lsb + ) + { + return detail::tvec3( + imulExtended(x[0], y[0], msb, lsb), + imulExtended(x[1], y[1], msb, lsb), + imulExtended(x[2], y[2], msb, lsb)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 imulExtended + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + detail::tvec4 & msb, + detail::tvec4 & lsb + ) + { + return detail::tvec4( + imulExtended(x[0], y[0], msb, lsb), + imulExtended(x[1], y[1], msb, lsb), + imulExtended(x[2], y[2], msb, lsb), + imulExtended(x[3], y[3], msb, lsb)); + } + + // bitfieldExtract + template + GLM_FUNC_QUALIFIER genIUType bitfieldExtract + ( + genIUType const & Value, + int const & Offset, + int const & Bits + ) + { + int GenSize = int(sizeof(genIUType)) << int(3); + + assert(Offset + Bits <= GenSize); + + genIUType ShiftLeft = Bits ? Value << (GenSize - (Bits + Offset)) : genIUType(0); + genIUType ShiftBack = ShiftLeft >> genIUType(GenSize - Bits); + + return ShiftBack; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 bitfieldExtract + ( + detail::tvec2 const & Value, + int const & Offset, + int const & Bits + ) + { + return detail::tvec2( + bitfieldExtract(Value[0]), + bitfieldExtract(Value[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 bitfieldExtract + ( + detail::tvec3 const & Value, + int const & Offset, + int const & Bits + ) + { + return detail::tvec3( + bitfieldExtract(Value[0]), + bitfieldExtract(Value[1]), + bitfieldExtract(Value[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 bitfieldExtract + ( + detail::tvec4 const & Value, + int const & Offset, + int const & Bits + ) + { + return detail::tvec4( + bitfieldExtract(Value[0]), + bitfieldExtract(Value[1]), + bitfieldExtract(Value[2]), + bitfieldExtract(Value[3])); + } + + // bitfieldInsert + template + GLM_FUNC_QUALIFIER genIUType bitfieldInsert + ( + genIUType const & Base, + genIUType const & Insert, + int const & Offset, + int const & Bits + ) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitfieldInsert' only accept integer values"); + assert(Offset + Bits <= sizeof(genIUType)); + + if(Bits == 0) + return Base; + + genIUType Mask = 0; + for(int Bit = Offset; Bit < Offset + Bits; ++Bit) + Mask |= (1 << Bit); + + return (Base & ~Mask) | (Insert & Mask); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 bitfieldInsert + ( + detail::tvec2 const & Base, + detail::tvec2 const & Insert, + int const & Offset, + int const & Bits + ) + { + return detail::tvec2( + bitfieldInsert(Base[0], Insert[0], Offset, Bits), + bitfieldInsert(Base[1], Insert[1], Offset, Bits)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 bitfieldInsert + ( + detail::tvec3 const & Base, + detail::tvec3 const & Insert, + int const & Offset, + int const & Bits + ) + { + return detail::tvec3( + bitfieldInsert(Base[0], Insert[0], Offset, Bits), + bitfieldInsert(Base[1], Insert[1], Offset, Bits), + bitfieldInsert(Base[2], Insert[2], Offset, Bits)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 bitfieldInsert + ( + detail::tvec4 const & Base, + detail::tvec4 const & Insert, + int const & Offset, + int const & Bits + ) + { + return detail::tvec4( + bitfieldInsert(Base[0], Insert[0], Offset, Bits), + bitfieldInsert(Base[1], Insert[1], Offset, Bits), + bitfieldInsert(Base[2], Insert[2], Offset, Bits), + bitfieldInsert(Base[3], Insert[3], Offset, Bits)); + } + + // bitfieldReverse + template + GLM_FUNC_QUALIFIER genIUType bitfieldReverse(genIUType const & Value) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitfieldReverse' only accept integer values"); + + genIUType Out = 0; + std::size_t BitSize = sizeof(genIUType) * 8; + for(std::size_t i = 0; i < BitSize; ++i) + if(Value & (genIUType(1) << i)) + Out |= genIUType(1) << (BitSize - 1 - i); + return Out; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 bitfieldReverse + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + bitfieldReverse(value[0]), + bitfieldReverse(value[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 bitfieldReverse + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + bitfieldReverse(value[0]), + bitfieldReverse(value[1]), + bitfieldReverse(value[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 bitfieldReverse + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + bitfieldReverse(value[0]), + bitfieldReverse(value[1]), + bitfieldReverse(value[2]), + bitfieldReverse(value[3])); + } + + // bitCount + template + GLM_FUNC_QUALIFIER int bitCount(genIUType const & Value) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitCount' only accept integer values"); + + int Count = 0; + for(std::size_t i = 0; i < sizeof(genIUType) * std::size_t(8); ++i) + { + if(Value & (1 << i)) + ++Count; + } + return Count; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 bitCount + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + bitCount(value[0]), + bitCount(value[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 bitCount + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + bitCount(value[0]), + bitCount(value[1]), + bitCount(value[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 bitCount + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + bitCount(value[0]), + bitCount(value[1]), + bitCount(value[2]), + bitCount(value[3])); + } + + // findLSB + template + GLM_FUNC_QUALIFIER int findLSB + ( + genIUType const & Value + ) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'findLSB' only accept integer values"); + if(Value == 0) + return -1; + + genIUType Bit; + for(Bit = genIUType(0); !(Value & (1 << Bit)); ++Bit){} + return Bit; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 findLSB + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + findLSB(value[0]), + findLSB(value[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 findLSB + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + findLSB(value[0]), + findLSB(value[1]), + findLSB(value[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 findLSB + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + findLSB(value[0]), + findLSB(value[1]), + findLSB(value[2]), + findLSB(value[3])); + } + + // findMSB + template + GLM_FUNC_QUALIFIER int findMSB + ( + genIUType const & Value + ) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'findMSB' only accept integer values"); + if(Value == 0) + return -1; + + genIUType bit = genIUType(-1); + for(genIUType tmp = Value; tmp; tmp >>= 1, ++bit){} + return bit; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 findMSB + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + findMSB(value[0]), + findMSB(value[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 findMSB + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + findMSB(value[0]), + findMSB(value[1]), + findMSB(value[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 findMSB + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + findMSB(value[0]), + findMSB(value[1]), + findMSB(value[2]), + findMSB(value[3])); + } + + }//namespace integer + }//namespace function + }//namespace core +}//namespace glm diff --git a/ExternalLibs/glm/core/func_matrix.hpp b/ExternalLibs/glm/core/func_matrix.hpp new file mode 100644 index 0000000..6a60b47 --- /dev/null +++ b/ExternalLibs/glm/core/func_matrix.hpp @@ -0,0 +1,115 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-08-03 +// Updated : 2010-02-04 +// Licence : This source is under MIT License +// File : glm/core/func_matrix.hpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_func_matrix +#define glm_core_func_matrix + +namespace glm +{ + namespace test{ + void main_core_func_matrix(); + }//namespace test + + namespace core{ + namespace function{ + //! Define all matrix functions from Section 8.5 of GLSL 1.30.8 specification. Included in glm namespace. + namespace matrix{ + + /// \addtogroup core_funcs + ///@{ + + //! Multiply matrix x by matrix y component-wise, i.e., + //! result[i][j] is the scalar product of x[i][j] and y[i][j]. + //! + //! \li GLSL matrixCompMult man page + //! \li GLSL 1.30.08 specification, section 8.5 + template + matType matrixCompMult( + matType const & x, + matType const & y); + + //! Treats the first parameter c as a column vector + //! and the second parameter r as a row vector + //! and does a linear algebraic matrix multiply c * r. + //! + //! \li GLSL outerProduct man page + //! \li GLSL 1.30.08 specification, section 8.5 + template + matType outerProduct( + vecType const & c, + vecType const & r); + + //! Returns the transposed matrix of x + //! + //! \li GLSL transpose man page + //! \li GLSL 1.30.08 specification, section 8.5 + template + typename matType::transpose_type transpose( + matType const & x); + + //! Return the determinant of a mat2 matrix. + //! + //! \li GLSL determinant man page + //! \li GLSL 1.30.08 specification, section 8.5 + template + typename detail::tmat2x2::value_type determinant( + detail::tmat2x2 const & m); + + //! Return the determinant of a mat3 matrix. + //! + //! \li GLSL determinant man page + //! \li GLSL 1.30.08 specification, section 8.5 + template + typename detail::tmat3x3::value_type determinant( + detail::tmat3x3 const & m); + + //! Return the determinant of a mat4 matrix. + //! + //! \li GLSL determinant man page + //! \li GLSL 1.30.08 specification, section 8.5 + template + typename detail::tmat4x4::value_type determinant( + detail::tmat4x4 const & m); + + //! Return the inverse of a mat2 matrix. + //! + //! \li GLSL inverse man page + //! \li GLSL 1.40.07 specification, section 8.5 + template + detail::tmat2x2 inverse( + detail::tmat2x2 const & m); + + //! Return the inverse of a mat3 matrix. + //! + //! \li GLSL inverse man page + //! \li GLSL 1.40.07 specification, section 8.5 + template + detail::tmat3x3 inverse( + detail::tmat3x3 const & m); + + //! Return the inverse of a mat4 matrix. + //! + //! \li GLSL inverse man page + //! \li GLSL 1.40.07 specification, section 8.5 + template + detail::tmat4x4 inverse( + detail::tmat4x4 const & m); + + ///@} + + }//namespace matrix + }//namespace function + }//namespace core + + using namespace core::function::matrix; +}//namespace glm + +#include "func_matrix.inl" + +#endif//glm_core_func_matrix diff --git a/ExternalLibs/glm/core/func_matrix.inl b/ExternalLibs/glm/core/func_matrix.inl new file mode 100644 index 0000000..d775d96 --- /dev/null +++ b/ExternalLibs/glm/core/func_matrix.inl @@ -0,0 +1,571 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-03-08 +// Updated : 2010-02-04 +// Licence : This source is under MIT License +// File : glm/core/func_matrix.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + namespace core{ + namespace function{ + namespace matrix{ + + // matrixCompMult + template + GLM_FUNC_QUALIFIER matType matrixCompMult + ( + matType const & x, + matType const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'matrixCompMult' only accept floating-point inputs"); + + matType result(matType::null); + for(typename matType::size_type i = 0; i < matType::col_size(); ++i) + result[i] = x[i] * y[i]; + return result; + } + + // outerProduct + template + GLM_FUNC_QUALIFIER detail::tmat2x2 outerProduct + ( + detail::tvec2 const & c, + detail::tvec2 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat2x2 m(detail::tmat2x2::null); + m[0][0] = c[0] * r[0]; + m[0][1] = c[1] * r[0]; + m[1][0] = c[0] * r[1]; + m[1][1] = c[1] * r[1]; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 outerProduct + ( + detail::tvec3 const & c, + detail::tvec3 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat3x3 m(detail::tmat3x3::null); + for(typename detail::tmat3x3::size_type i = 0; i < detail::tmat3x3::col_size(); ++i) + m[i] = c * r[i]; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 outerProduct + ( + detail::tvec4 const & c, + detail::tvec4 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat4x4 m(detail::tmat4x4::null); + for(typename detail::tmat4x4::size_type i = 0; i < detail::tmat4x4::col_size(); ++i) + m[i] = c * r[i]; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x3 outerProduct + ( + detail::tvec3 const & c, + detail::tvec2 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat2x3 m(detail::tmat2x3::null); + m[0][0] = c.x * r.x; + m[0][1] = c.y * r.x; + m[0][2] = c.z * r.x; + m[1][0] = c.x * r.y; + m[1][1] = c.y * r.y; + m[1][2] = c.z * r.y; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x2 outerProduct + ( + detail::tvec2 const & c, + detail::tvec3 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat3x2 m(detail::tmat3x2::null); + m[0][0] = c.x * r.x; + m[0][1] = c.y * r.x; + m[1][0] = c.x * r.y; + m[1][1] = c.y * r.y; + m[2][0] = c.x * r.z; + m[2][1] = c.y * r.z; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x4 outerProduct + ( + detail::tvec2 const & c, + detail::tvec4 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat2x4 m(detail::tmat2x4::null); + m[0][0] = c.x * r.x; + m[0][1] = c.y * r.x; + m[0][2] = c.z * r.x; + m[0][3] = c.w * r.x; + m[1][0] = c.x * r.y; + m[1][1] = c.y * r.y; + m[1][2] = c.z * r.y; + m[1][3] = c.w * r.y; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x2 outerProduct + ( + detail::tvec4 const & c, + detail::tvec2 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat4x2 m(detail::tmat4x2::null); + m[0][0] = c.x * r.x; + m[0][1] = c.y * r.x; + m[1][0] = c.x * r.y; + m[1][1] = c.y * r.y; + m[2][0] = c.x * r.z; + m[2][1] = c.y * r.z; + m[3][0] = c.x * r.w; + m[3][1] = c.y * r.w; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x4 outerProduct + ( + detail::tvec4 const & c, + detail::tvec3 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat3x4 m(detail::tmat3x4::null); + m[0][0] = c.x * r.x; + m[0][1] = c.y * r.x; + m[0][2] = c.z * r.x; + m[0][3] = c.w * r.x; + m[1][0] = c.x * r.y; + m[1][1] = c.y * r.y; + m[1][2] = c.z * r.y; + m[1][3] = c.w * r.y; + m[2][0] = c.x * r.z; + m[2][1] = c.y * r.z; + m[2][2] = c.z * r.z; + m[2][3] = c.w * r.z; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x3 outerProduct + ( + detail::tvec3 const & c, + detail::tvec4 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat4x3 m(detail::tmat4x3::null); + m[0][0] = c.x * r.x; + m[0][1] = c.y * r.x; + m[0][2] = c.z * r.x; + m[1][0] = c.x * r.y; + m[1][1] = c.y * r.y; + m[1][2] = c.z * r.y; + m[2][0] = c.x * r.z; + m[2][1] = c.y * r.z; + m[2][2] = c.z * r.z; + m[3][0] = c.x * r.w; + m[3][1] = c.y * r.w; + m[3][2] = c.z * r.w; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x2 transpose + ( + detail::tmat2x2 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat2x2 result(detail::tmat2x2::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 transpose + ( + detail::tmat3x3 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat3x3 result(detail::tmat3x3::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[0][2] = m[2][0]; + + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[1][2] = m[2][1]; + + result[2][0] = m[0][2]; + result[2][1] = m[1][2]; + result[2][2] = m[2][2]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 transpose + ( + detail::tmat4x4 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat4x4 result(detail::tmat4x4::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[0][2] = m[2][0]; + result[0][3] = m[3][0]; + + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[1][2] = m[2][1]; + result[1][3] = m[3][1]; + + result[2][0] = m[0][2]; + result[2][1] = m[1][2]; + result[2][2] = m[2][2]; + result[2][3] = m[3][2]; + + result[3][0] = m[0][3]; + result[3][1] = m[1][3]; + result[3][2] = m[2][3]; + result[3][3] = m[3][3]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x3 transpose + ( + detail::tmat3x2 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat2x3 result(detail::tmat2x3::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[0][2] = m[2][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[1][2] = m[2][1]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x2 transpose + ( + detail::tmat2x3 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat3x2 result(detail::tmat3x2::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[2][0] = m[0][2]; + result[2][1] = m[1][2]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x4 transpose + ( + detail::tmat4x2 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat2x4 result(detail::tmat2x4::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[0][2] = m[2][0]; + result[0][3] = m[3][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[1][2] = m[2][1]; + result[1][3] = m[3][1]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x2 transpose + ( + detail::tmat2x4 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat4x2 result(detail::tmat4x2::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[2][0] = m[0][2]; + result[2][1] = m[1][2]; + result[3][0] = m[0][3]; + result[3][1] = m[1][3]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x4 transpose + ( + detail::tmat4x3 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat3x4 result(detail::tmat3x4::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[0][2] = m[2][0]; + result[0][3] = m[3][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[1][2] = m[2][1]; + result[1][3] = m[3][1]; + result[2][0] = m[0][2]; + result[2][1] = m[1][2]; + result[2][2] = m[2][2]; + result[2][3] = m[3][2]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x3 transpose + ( + detail::tmat3x4 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat4x3 result(detail::tmat4x3::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[0][2] = m[2][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[1][2] = m[2][1]; + result[2][0] = m[0][2]; + result[2][1] = m[1][2]; + result[2][2] = m[2][2]; + result[3][0] = m[0][3]; + result[3][1] = m[1][3]; + result[3][2] = m[2][3]; + return result; + } + + template + GLM_FUNC_QUALIFIER typename detail::tmat2x2::value_type determinant + ( + detail::tmat2x2 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'determinant' only accept floating-point inputs"); + + return m[0][0] * m[1][1] - m[1][0] * m[0][1]; + } + + template + GLM_FUNC_QUALIFIER typename detail::tmat3x3::value_type determinant + ( + detail::tmat3x3 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'determinant' only accept floating-point inputs"); + + return + + m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2]) + - m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2]) + + m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]); + } + + template + GLM_FUNC_QUALIFIER typename detail::tmat4x4::value_type determinant + ( + detail::tmat4x4 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'determinant' only accept floating-point inputs"); + + T SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3]; + T SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3]; + T SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2]; + T SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3]; + T SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2]; + T SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1]; + + detail::tvec4 DetCof( + + (m[1][1] * SubFactor00 - m[1][2] * SubFactor01 + m[1][3] * SubFactor02), + - (m[1][0] * SubFactor00 - m[1][2] * SubFactor03 + m[1][3] * SubFactor04), + + (m[1][0] * SubFactor01 - m[1][1] * SubFactor03 + m[1][3] * SubFactor05), + - (m[1][0] * SubFactor02 - m[1][1] * SubFactor04 + m[1][2] * SubFactor05)); + + return m[0][0] * DetCof[0] + + m[0][1] * DetCof[1] + + m[0][2] * DetCof[2] + + m[0][3] * DetCof[3]; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x2 inverse + ( + detail::tmat2x2 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'inverse' only accept floating-point inputs"); + + //valType Determinant = m[0][0] * m[1][1] - m[1][0] * m[0][1]; + T Determinant = determinant(m); + + detail::tmat2x2 Inverse( + + m[1][1] / Determinant, + - m[0][1] / Determinant, + - m[1][0] / Determinant, + + m[0][0] / Determinant); + + return Inverse; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 inverse + ( + detail::tmat3x3 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'inverse' only accept floating-point inputs"); + + //valType Determinant = m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2]) + // - m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2]) + // + m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]); + + T Determinant = determinant(m); + + detail::tmat3x3 Inverse(detail::tmat3x3::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]); + Inverse[0][1] = - (m[0][1] * m[2][2] - m[2][1] * m[0][2]); + Inverse[1][1] = + (m[0][0] * m[2][2] - m[2][0] * m[0][2]); + Inverse[2][1] = - (m[0][0] * m[2][1] - m[2][0] * m[0][1]); + Inverse[0][2] = + (m[0][1] * m[1][2] - m[1][1] * m[0][2]); + Inverse[1][2] = - (m[0][0] * m[1][2] - m[1][0] * m[0][2]); + Inverse[2][2] = + (m[0][0] * m[1][1] - m[1][0] * m[0][1]); + Inverse /= Determinant; + + return Inverse; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 inverse + ( + detail::tmat4x4 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'inverse' only accept floating-point inputs"); + + T Coef00 = m[2][2] * m[3][3] - m[3][2] * m[2][3]; + T Coef02 = m[1][2] * m[3][3] - m[3][2] * m[1][3]; + T Coef03 = m[1][2] * m[2][3] - m[2][2] * m[1][3]; + + T Coef04 = m[2][1] * m[3][3] - m[3][1] * m[2][3]; + T Coef06 = m[1][1] * m[3][3] - m[3][1] * m[1][3]; + T Coef07 = m[1][1] * m[2][3] - m[2][1] * m[1][3]; + + T Coef08 = m[2][1] * m[3][2] - m[3][1] * m[2][2]; + T Coef10 = m[1][1] * m[3][2] - m[3][1] * m[1][2]; + T Coef11 = m[1][1] * m[2][2] - m[2][1] * m[1][2]; + + T Coef12 = m[2][0] * m[3][3] - m[3][0] * m[2][3]; + T Coef14 = m[1][0] * m[3][3] - m[3][0] * m[1][3]; + T Coef15 = m[1][0] * m[2][3] - m[2][0] * m[1][3]; + + T Coef16 = m[2][0] * m[3][2] - m[3][0] * m[2][2]; + T Coef18 = m[1][0] * m[3][2] - m[3][0] * m[1][2]; + T Coef19 = m[1][0] * m[2][2] - m[2][0] * m[1][2]; + + T Coef20 = m[2][0] * m[3][1] - m[3][0] * m[2][1]; + T Coef22 = m[1][0] * m[3][1] - m[3][0] * m[1][1]; + T Coef23 = m[1][0] * m[2][1] - m[2][0] * m[1][1]; + + detail::tvec4 const SignA(+1, -1, +1, -1); + detail::tvec4 const SignB(-1, +1, -1, +1); + + detail::tvec4 Fac0(Coef00, Coef00, Coef02, Coef03); + detail::tvec4 Fac1(Coef04, Coef04, Coef06, Coef07); + detail::tvec4 Fac2(Coef08, Coef08, Coef10, Coef11); + detail::tvec4 Fac3(Coef12, Coef12, Coef14, Coef15); + detail::tvec4 Fac4(Coef16, Coef16, Coef18, Coef19); + detail::tvec4 Fac5(Coef20, Coef20, Coef22, Coef23); + + detail::tvec4 Vec0(m[1][0], m[0][0], m[0][0], m[0][0]); + detail::tvec4 Vec1(m[1][1], m[0][1], m[0][1], m[0][1]); + detail::tvec4 Vec2(m[1][2], m[0][2], m[0][2], m[0][2]); + detail::tvec4 Vec3(m[1][3], m[0][3], m[0][3], m[0][3]); + + detail::tvec4 Inv0 = SignA * (Vec1 * Fac0 - Vec2 * Fac1 + Vec3 * Fac2); + detail::tvec4 Inv1 = SignB * (Vec0 * Fac0 - Vec2 * Fac3 + Vec3 * Fac4); + detail::tvec4 Inv2 = SignA * (Vec0 * Fac1 - Vec1 * Fac3 + Vec3 * Fac5); + detail::tvec4 Inv3 = SignB * (Vec0 * Fac2 - Vec1 * Fac4 + Vec2 * Fac5); + + detail::tmat4x4 Inverse(Inv0, Inv1, Inv2, Inv3); + + detail::tvec4 Row0(Inverse[0][0], Inverse[1][0], Inverse[2][0], Inverse[3][0]); + + T Determinant = glm::dot(m[0], Row0); + + Inverse /= Determinant; + + return Inverse; + } + + }//namespace matrix + }//namespace function + }//namespace core +}//namespace glm diff --git a/ExternalLibs/glm/core/func_noise.hpp b/ExternalLibs/glm/core/func_noise.hpp new file mode 100644 index 0000000..b76ec4b --- /dev/null +++ b/ExternalLibs/glm/core/func_noise.hpp @@ -0,0 +1,66 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-08-01 +// Updated : 2008-09-10 +// Licence : This source is under MIT License +// File : glm/core/func_noise.hpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_func_noise +#define glm_core_func_noise + +namespace glm +{ + namespace test{ + void main_core_func_noise(); + }//namespace test + + namespace core{ + namespace function{ + // Define all noise functions from Section 8.9 of GLSL 1.30.8 specification. Included in glm namespace. + namespace noise{ + + /// \addtogroup core_funcs + ///@{ + + //! Returns a 1D noise value based on the input value x. + //! + //! \li GLSL noise1 man page + //! \li GLSL 1.30.08 specification, section 8.9 + template + typename genType::value_type noise1(genType const & x); + + //! Returns a 2D noise value based on the input value x. + //! + //! \li GLSL noise2 man page + //! \li GLSL 1.30.08 specification, section 8.9 + template + detail::tvec2 noise2(genType const & x); + + //! Returns a 3D noise value based on the input value x. + //! + //! \li GLSL noise3 man page + //! \li GLSL 1.30.08 specification, section 8.9 + template + detail::tvec3 noise3(genType const & x); + + //! Returns a 4D noise value based on the input value x. + //! + //! \li GLSL noise4 man page + //! \li GLSL 1.30.08 specification, section 8.9 + template + detail::tvec4 noise4(genType const & x); + + ///@} + + }//namespace noise + }//namespace function + }//namespace core + + using namespace core::function::noise; +}//namespace glm + +#include "func_noise.inl" + +#endif//glm_core_func_noise diff --git a/ExternalLibs/glm/core/func_noise.inl b/ExternalLibs/glm/core/func_noise.inl new file mode 100644 index 0000000..8e00964 --- /dev/null +++ b/ExternalLibs/glm/core/func_noise.inl @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-08-01 +// Updated : 2011-04-14 +// Licence : This source is under MIT License +// File : glm/core/func_noise.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + namespace core{ + namespace function{ + namespace noise{ + + + + }//namespace noise + }//namespace function + }//namespace core +}//namespace glm diff --git a/ExternalLibs/glm/core/func_packing.hpp b/ExternalLibs/glm/core/func_packing.hpp new file mode 100644 index 0000000..3b42778 --- /dev/null +++ b/ExternalLibs/glm/core/func_packing.hpp @@ -0,0 +1,136 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2010-03-17 +// Updated : 2010-03-17 +// Licence : This source is under MIT License +// File : glm/core/func_packing.hpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_func_packing +#define glm_core_func_packing + +namespace glm +{ + namespace test{ + void main_core_func_packing(); + }//namespace test + + namespace core{ + namespace function{ + //! Define packing functions from section 8.4 floating-point pack and unpack functions of GLSL 4.00.8 specification + namespace packing + { + /// \addtogroup core_funcs + ///@{ + + //! First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. + //! Then, the results are packed into the returned 32-bit unsigned integer. + //! + //! The conversion for component c of v to fixed point is done as follows: + //! packUnorm2x16: round(clamp(c, 0, +1) * 65535.0) + //! + //! The first component of the vector will be written to the least significant bits of the output; + //! the last component will be written to the most significant bits. + //! + //! \li GLSL packUnorm2x16 man page + //! \li GLSL 4.00.08 specification, section 8.4 + detail::uint32 packUnorm2x16(detail::tvec2 const & v); + + //! First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. + //! Then, the results are packed into the returned 32-bit unsigned integer. + //! + //! The conversion for component c of v to fixed point is done as follows: + //! packUnorm4x8: round(clamp(c, 0, +1) * 255.0) + //! + //! The first component of the vector will be written to the least significant bits of the output; + //! the last component will be written to the most significant bits. + //! + //! \li GLSL packUnorm4x8 man page + //! \li GLSL 4.00.08 specification, section 8.4 + detail::uint32 packUnorm4x8(detail::tvec4 const & v); + + //! First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. + //! Then, the results are packed into the returned 32-bit unsigned integer. + //! + //! The conversion for component c of v to fixed point is done as follows: + //! packSnorm4x8: round(clamp(c, -1, +1) * 127.0) + //! + //! The first component of the vector will be written to the least significant bits of the output; + //! the last component will be written to the most significant bits. + //! + //! \li GLSL packSnorm4x8 man page + //! \li GLSL 4.00.08 specification, section 8.4 + detail::uint32 packSnorm4x8(detail::tvec4 const & v); + + //! First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. + //! Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector. + //! + //! The conversion for unpacked fixed-point value f to floating point is done as follows: + //! unpackUnorm2x16: f / 65535.0 + //! + //! The first component of the returned vector will be extracted from the least significant bits of the input; + //! the last component will be extracted from the most significant bits. + //! + //! \li GLSL unpackUnorm2x16 man page + //! \li GLSL 4.00.08 specification, section 8.4 + detail::tvec2 unpackUnorm2x16(detail::uint32 const & p); + + //! First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. + //! Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector. + //! + //! The conversion for unpacked fixed-point value f to floating point is done as follows: + //! unpackUnorm4x8: f / 255.0 + //! + //! The first component of the returned vector will be extracted from the least significant bits of the input; + //! the last component will be extracted from the most significant bits. + //! + //! \li GLSL unpackUnorm4x8 man page + //! \li GLSL 4.00.08 specification, section 8.4 + detail::tvec4 unpackUnorm4x8(detail::uint32 const & p); + + //! First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. + //! Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector. + //! + //! The conversion for unpacked fixed-point value f to floating point is done as follows: + //! unpackSnorm4x8: clamp(f / 127.0, -1, +1) + //! + //! The first component of the returned vector will be extracted from the least significant bits of the input; + //! the last component will be extracted from the most significant bits. + //! + //! \li GLSL unpackSnorm4x8 man page + //! \li GLSL 4.00.08 specification, section 8.4 + detail::tvec4 unpackSnorm4x8(detail::uint32 const & p); + + //! Returns a double-precision value obtained by packing the components of v into a 64-bit value. + //! If an IEEE 754 Inf or NaN is created, it will not signal, and the resulting floating point value is unspecified. + //! Otherwise, the bit- level representation of v is preserved. + //! The first vector component specifies the 32 least significant bits; + //! the second component specifies the 32 most significant bits. + //! + //! \li GLSL packDouble2x32 man page + //! \li GLSL 4.00.08 specification, section 8.4 + double packDouble2x32(detail::tvec2 const & v); + + //! Returns a two-component unsigned integer vector representation of v. + //! The bit-level representation of v is preserved. + //! The first component of the vector contains the 32 least significant bits of the double; + //! the second component consists the 32 most significant bits. + //! + //! \li GLSL unpackDouble2x32 man page + //! \li GLSL 4.00.08 specification, section 8.4 + detail::tvec2 unpackDouble2x32(double const & v); + + ///@} + + }//namespace packing + }//namespace function + }//namespace core + + using namespace core::function::packing; +}//namespace glm + +#include "func_packing.inl" + +#endif//glm_core_func_packing + diff --git a/ExternalLibs/glm/core/func_packing.inl b/ExternalLibs/glm/core/func_packing.inl new file mode 100644 index 0000000..672e67b --- /dev/null +++ b/ExternalLibs/glm/core/func_packing.inl @@ -0,0 +1,94 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2010-03-17 +// Updated : 2010-03-17 +// Licence : This source is under MIT License +// File : glm/core/func_packing.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + namespace detail + { + + }//namespace detail + + namespace core{ + namespace function{ + namespace packing + { + GLM_FUNC_QUALIFIER detail::uint32 packUnorm2x16(detail::tvec2 const & v) + { + detail::uint16 A((detail::uint16)round(clamp(v.x, 0.0f, 1.0f) * 65535.0f)); + detail::uint16 B((detail::uint16)round(clamp(v.y, 0.0f, 1.0f) * 65535.0f)); + return detail::uint32((B << 16) | A); + } + + GLM_FUNC_QUALIFIER detail::uint32 packUnorm4x8(detail::tvec4 const & v) + { + detail::uint8 A((detail::uint8)round(clamp(v.x, 0.0f, 1.0f) * 255.0f)); + detail::uint8 B((detail::uint8)round(clamp(v.y, 0.0f, 1.0f) * 255.0f)); + detail::uint8 C((detail::uint8)round(clamp(v.z, 0.0f, 1.0f) * 255.0f)); + detail::uint8 D((detail::uint8)round(clamp(v.w, 0.0f, 1.0f) * 255.0f)); + return detail::uint32((D << 24) | (C << 16) | (B << 8) | A); + } + + GLM_FUNC_QUALIFIER detail::uint32 packSnorm4x8(detail::tvec4 const & v) + { + detail::uint8 A((detail::uint8)round(clamp(v.x,-1.0f, 1.0f) * 255.0f)); + detail::uint8 B((detail::uint8)round(clamp(v.y,-1.0f, 1.0f) * 255.0f)); + detail::uint8 C((detail::uint8)round(clamp(v.z,-1.0f, 1.0f) * 255.0f)); + detail::uint8 D((detail::uint8)round(clamp(v.w,-1.0f, 1.0f) * 255.0f)); + return detail::uint32((D << 24) | (C << 16) | (B << 8) | A); + } + + GLM_FUNC_QUALIFIER detail::tvec2 unpackUnorm2x16(detail::uint32 const & p) + { + detail::uint16 A(detail::uint16(p >> 0)); + detail::uint16 B(detail::uint16(p >> 16)); + return detail::tvec2( + A * 1.0f / 65535.0f, + B * 1.0f / 65535.0f); + } + + GLM_FUNC_QUALIFIER detail::tvec4 unpackUnorm4x8(detail::uint32 const & p) + { + detail::uint8 A(detail::uint8(p >> 0)); + detail::uint8 B(detail::uint8(p >> 8)); + detail::uint8 C(detail::uint8(p >> 16)); + detail::uint8 D(detail::uint8(p >> 24)); + return detail::tvec4( + A * 1.0f / 255.0f, + B * 1.0f / 255.0f, + C * 1.0f / 255.0f, + D * 1.0f / 255.0f); + } + + GLM_FUNC_QUALIFIER detail::tvec4 unpackSnorm4x8(detail::uint32 const & p) + { + detail::uint8 A(detail::uint8(p >> 0)); + detail::uint8 B(detail::uint8(p >> 8)); + detail::uint8 C(detail::uint8(p >> 16)); + detail::uint8 D(detail::uint8(p >> 24)); + return clamp(detail::tvec4( + A * 1.0f / 127.0f, + B * 1.0f / 127.0f, + C * 1.0f / 127.0f, + D * 1.0f / 127.0f), -1.0f, 1.0f); + } + + GLM_FUNC_QUALIFIER double packDouble2x32(detail::tvec2 const & v) + { + return *(double*)&v; + } + + GLM_FUNC_QUALIFIER detail::tvec2 unpackDouble2x32(double const & v) + { + return *(detail::tvec2*)&v; + } + + }//namespace packing + }//namespace function + }//namespace core +}//namespace glm diff --git a/ExternalLibs/glm/core/func_trigonometric.hpp b/ExternalLibs/glm/core/func_trigonometric.hpp new file mode 100644 index 0000000..34e6257 --- /dev/null +++ b/ExternalLibs/glm/core/func_trigonometric.hpp @@ -0,0 +1,160 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-08-01 +// Updated : 2008-09-10 +// Licence : This source is under MIT License +// File : glm/core/func_trigonometric.hpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_func_trigonometric +#define glm_core_func_trigonometric + +namespace glm +{ + namespace test{ + void main_core_func_trigonometric(); + }//namespace test + + namespace core{ + namespace function{ + //! Define Angle and trigonometry functions + //! from Section 8.1 of GLSL 1.30.8 specification. + //! Included in glm namespace. + namespace trigonometric{ + + /// \addtogroup core_funcs + ///@{ + + //! Converts degrees to radians and returns the result. + //! + //! \li GLSL radians man page + //! \li GLSL 1.30.08 specification, section 8.1 + template + genType radians(genType const & degrees); + + //! Converts radians to degrees and returns the result. + //! + //! \li GLSL degrees man page + //! \li GLSL 1.30.08 specification, section 8.1 + template + genType degrees(genType const & radians); + + //! The standard trigonometric sine function. + //! The values returned by this function will range from [-1, 1]. + //! + //! \li GLSL sin man page + //! \li GLSL 1.30.08 specification, section 8.1 + template + genType sin(genType const & angle); + + //! The standard trigonometric cosine function. + //! The values returned by this function will range from [-1, 1]. + //! + //! \li GLSL cos man page + //! \li GLSL 1.30.08 specification, section 8.1 + template + genType cos(genType const & angle); + + //! The standard trigonometric tangent function. + //! + //! \li GLSL tan man page + //! \li GLSL 1.30.08 specification, section 8.1 + template + genType tan(genType const & angle); + + //! Arc sine. Returns an angle whose sine is x. + //! The range of values returned by this function is [-PI/2, PI/2]. + //! Results are undefined if |x| > 1. + //! + //! \li GLSL asin man page + //! \li GLSL 1.30.08 specification, section 8.1 + template + genType asin(genType const & x); + + //! Arc cosine. Returns an angle whose sine is x. + //! The range of values returned by this function is [0, PI]. + //! Results are undefined if |x| > 1. + //! + //! \li GLSL acos man page + //! \li GLSL 1.30.08 specification, section 8.1 + template + genType acos(genType const & x); + + //! Arc tangent. Returns an angle whose tangent is y/x. + //! The signs of x and y are used to determine what + //! quadrant the angle is in. The range of values returned + //! by this function is [-PI, PI]. Results are undefined + //! if x and y are both 0. + //! + //! \li GLSL atan man page + //! \li GLSL 1.30.08 specification, section 8.1 + template + genType atan(genType const & y, genType const & x); + + //! Arc tangent. Returns an angle whose tangent is y_over_x. + //! The range of values returned by this function is [-PI/2, PI/2]. + //! + //! \li GLSL atan man page + //! \li GLSL 1.30.08 specification, section 8.1 + template + genType atan(genType const & y_over_x); + + //! Returns the hyperbolic sine function, (exp(x) - exp(-x)) / 2 + //! + //! \li GLSL sinh man page + //! \li GLSL 1.30.08 specification, section 8.1 + template + genType sinh(genType const & angle); + + //! Returns the hyperbolic cosine function, (exp(x) + exp(-x)) / 2 + //! + //! \li GLSL cosh man page + //! \li GLSL 1.30.08 specification, section 8.1 + template + genType cosh(genType const & angle); + + //! Returns the hyperbolic tangent function, sinh(angle) / cosh(angle) + //! + //! \li GLSL tanh man page + //! \li GLSL 1.30.08 specification, section 8.1 + template + genType tanh(genType const & angle); + + //! Arc hyperbolic sine; returns the inverse of sinh. + //! + //! \li GLSL asinh man page + //! \li GLSL 1.30.08 specification, section 8.1 + template + genType asinh(genType const & x); + + //! Arc hyperbolic cosine; returns the non-negative inverse + //! of cosh. Results are undefined if x < 1. + //! + //! \li GLSL acosh man page + //! \li GLSL 1.30.08 specification, section 8.1 + template + genType acosh(genType const & x); + + //! Arc hyperbolic tangent; returns the inverse of tanh. + //! Results are undefined if abs(x) >= 1. + //! + //! \li GLSL atanh man page + //! \li GLSL 1.30.08 specification, section 8.1 + template + genType atanh(genType const & x); + + ///@} + + }//namespace trigonometric + }//namespace function + }//namespace core + + using namespace core::function::trigonometric; +}//namespace glm + +#include "func_trigonometric.inl" + +#endif//glm_core_func_trigonometric + + diff --git a/ExternalLibs/glm/core/func_trigonometric.inl b/ExternalLibs/glm/core/func_trigonometric.inl new file mode 100644 index 0000000..0584601 --- /dev/null +++ b/ExternalLibs/glm/core/func_trigonometric.inl @@ -0,0 +1,745 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-08-03 +// Updated : 2008-09-14 +// Licence : This source is under MIT License +// File : glm/core/func_trigonometric.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + namespace core{ + namespace function{ + namespace trigonometric{ + + // radians + template + GLM_FUNC_QUALIFIER genType radians + ( + genType const & degrees + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'radians' only accept floating-point input"); + + const genType pi = genType(3.1415926535897932384626433832795); + return degrees * (pi / genType(180)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 radians + ( + detail::tvec2 const & degrees + ) + { + return detail::tvec2( + radians(degrees.x), + radians(degrees.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 radians + ( + detail::tvec3 const & degrees + ) + { + return detail::tvec3( + radians(degrees.x), + radians(degrees.y), + radians(degrees.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 radians + ( + detail::tvec4 const & degrees + ) + { + return detail::tvec4( + radians(degrees.x), + radians(degrees.y), + radians(degrees.z), + radians(degrees.w)); + } + + // degrees + template + GLM_FUNC_QUALIFIER genType degrees + ( + genType const & radians + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'degrees' only accept floating-point input"); + + const genType pi = genType(3.1415926535897932384626433832795); + return radians * (genType(180) / pi); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 degrees + ( + detail::tvec2 const & radians + ) + { + return detail::tvec2( + degrees(radians.x), + degrees(radians.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 degrees + ( + detail::tvec3 const & radians + ) + { + return detail::tvec3( + degrees(radians.x), + degrees(radians.y), + degrees(radians.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 degrees + ( + detail::tvec4 const & radians + ) + { + return detail::tvec4( + degrees(radians.x), + degrees(radians.y), + degrees(radians.z), + degrees(radians.w)); + } + + // sin + template + GLM_FUNC_QUALIFIER genType sin + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'sin' only accept floating-point input"); + + return ::std::sin(angle); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 sin + ( + detail::tvec2 const & angle + ) + { + return detail::tvec2( + sin(angle.x), + sin(angle.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 sin + ( + detail::tvec3 const & angle + ) + { + return detail::tvec3( + sin(angle.x), + sin(angle.y), + sin(angle.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 sin + ( + detail::tvec4 const & angle + ) + { + return detail::tvec4( + sin(angle.x), + sin(angle.y), + sin(angle.z), + sin(angle.w)); + } + + // cos + template + GLM_FUNC_QUALIFIER genType cos(genType const & angle) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'cos' only accept floating-point input"); + + return ::std::cos(angle); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 cos + ( + detail::tvec2 const & angle + ) + { + return detail::tvec2( + cos(angle.x), + cos(angle.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 cos + ( + detail::tvec3 const & angle + ) + { + return detail::tvec3( + cos(angle.x), + cos(angle.y), + cos(angle.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 cos + ( + detail::tvec4 const & angle + ) + { + return detail::tvec4( + cos(angle.x), + cos(angle.y), + cos(angle.z), + cos(angle.w)); + } + + // tan + template + GLM_FUNC_QUALIFIER genType tan + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'tan' only accept floating-point input"); + + return ::std::tan(angle); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 tan + ( + detail::tvec2 const & angle + ) + { + return detail::tvec2( + tan(angle.x), + tan(angle.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 tan + ( + detail::tvec3 const & angle + ) + { + return detail::tvec3( + tan(angle.x), + tan(angle.y), + tan(angle.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 tan + ( + detail::tvec4 const & angle + ) + { + return detail::tvec4( + tan(angle.x), + tan(angle.y), + tan(angle.z), + tan(angle.w)); + } + + // asin + template + GLM_FUNC_QUALIFIER genType asin + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'asin' only accept floating-point input"); + + return ::std::asin(x); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 asin + ( + detail::tvec2 const & x + ) + { + return detail::tvec2( + asin(x.x), + asin(x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 asin + ( + detail::tvec3 const & x + ) + { + return detail::tvec3( + asin(x.x), + asin(x.y), + asin(x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 asin + ( + detail::tvec4 const & x + ) + { + return detail::tvec4( + asin(x.x), + asin(x.y), + asin(x.z), + asin(x.w)); + } + + // acos + template + GLM_FUNC_QUALIFIER genType acos + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'acos' only accept floating-point input"); + + return ::std::acos(x); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 acos + ( + detail::tvec2 const & x + ) + { + return detail::tvec2( + acos(x.x), + acos(x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 acos + ( + detail::tvec3 const & x + ) + { + return detail::tvec3( + acos(x.x), + acos(x.y), + acos(x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 acos + ( + detail::tvec4 const & x + ) + { + return detail::tvec4( + acos(x.x), + acos(x.y), + acos(x.z), + acos(x.w)); + } + + // atan + template + GLM_FUNC_QUALIFIER genType atan + ( + genType const & y, + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'atan' only accept floating-point input"); + + return ::std::atan2(y, x); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 atan + ( + detail::tvec2 const & y, + detail::tvec2 const & x + ) + { + return detail::tvec2( + atan(y.x, x.x), + atan(y.y, x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 atan + ( + detail::tvec3 const & y, + detail::tvec3 const & x + ) + { + return detail::tvec3( + atan(y.x, x.x), + atan(y.y, x.y), + atan(y.z, x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 atan + ( + detail::tvec4 const & y, + detail::tvec4 const & x + ) + { + return detail::tvec4( + atan(y.x, x.x), + atan(y.y, x.y), + atan(y.z, x.z), + atan(y.w, x.w)); + } + + template + GLM_FUNC_QUALIFIER genType atan + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'atan' only accept floating-point input"); + + return ::std::atan(x); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 atan + ( + detail::tvec2 const & x + ) + { + return detail::tvec2( + atan(x.x), + atan(x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 atan + ( + detail::tvec3 const & x + ) + { + return detail::tvec3( + atan(x.x), + atan(x.y), + atan(x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 atan + ( + detail::tvec4 const & x + ) + { + return detail::tvec4( + atan(x.x), + atan(x.y), + atan(x.z), + atan(x.w)); + } + + // sinh + template + GLM_FUNC_QUALIFIER genType sinh + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'sinh' only accept floating-point input"); + + return std::sinh(angle); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 sinh + ( + detail::tvec2 const & angle + ) + { + return detail::tvec2( + sinh(angle.x), + sinh(angle.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 sinh + ( + detail::tvec3 const & angle + ) + { + return detail::tvec3( + sinh(angle.x), + sinh(angle.y), + sinh(angle.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 sinh + ( + detail::tvec4 const & angle + ) + { + return detail::tvec4( + sinh(angle.x), + sinh(angle.y), + sinh(angle.z), + sinh(angle.w)); + } + + // cosh + template + GLM_FUNC_QUALIFIER genType cosh + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'cosh' only accept floating-point input"); + + return std::cosh(angle); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 cosh + ( + detail::tvec2 const & angle + ) + { + return detail::tvec2( + cosh(angle.x), + cosh(angle.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 cosh + ( + detail::tvec3 const & angle + ) + { + return detail::tvec3( + cosh(angle.x), + cosh(angle.y), + cosh(angle.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 cosh + ( + detail::tvec4 const & angle + ) + { + return detail::tvec4( + cosh(angle.x), + cosh(angle.y), + cosh(angle.z), + cosh(angle.w)); + } + + // tanh + template + GLM_FUNC_QUALIFIER genType tanh + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'tanh' only accept floating-point input"); + + return std::tanh(angle); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 tanh + ( + detail::tvec2 const & angle + ) + { + return detail::tvec2( + tanh(angle.x), + tanh(angle.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 tanh + ( + detail::tvec3 const & angle + ) + { + return detail::tvec3( + tanh(angle.x), + tanh(angle.y), + tanh(angle.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 tanh + ( + detail::tvec4 const & angle + ) + { + return detail::tvec4( + tanh(angle.x), + tanh(angle.y), + tanh(angle.z), + tanh(angle.w)); + } + + // asinh + template + GLM_FUNC_QUALIFIER genType asinh + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'asinh' only accept floating-point input"); + + return (x < genType(0) ? genType(-1) : (x > genType(0) ? genType(1) : genType(0))) * log(abs(x) + sqrt(genType(1) + x * x)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 asinh + ( + detail::tvec2 const & x + ) + { + return detail::tvec2( + asinh(x.x), + asinh(x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 asinh + ( + detail::tvec3 const & x + ) + { + return detail::tvec3( + asinh(x.x), + asinh(x.y), + asinh(x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 asinh + ( + detail::tvec4 const & x + ) + { + return detail::tvec4( + asinh(x.x), + asinh(x.y), + asinh(x.z), + asinh(x.w)); + } + + // acosh + template + GLM_FUNC_QUALIFIER genType acosh + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'acosh' only accept floating-point input"); + + if(x < genType(1)) + return genType(0); + return log(x + sqrt(x * x - genType(1))); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 acosh + ( + detail::tvec2 const & x + ) + { + return detail::tvec2( + acosh(x.x), + acosh(x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 acosh + ( + detail::tvec3 const & x + ) + { + return detail::tvec3( + acosh(x.x), + acosh(x.y), + acosh(x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 acosh + ( + detail::tvec4 const & x + ) + { + return detail::tvec4( + acosh(x.x), + acosh(x.y), + acosh(x.z), + acosh(x.w)); + } + + // atanh + template + GLM_FUNC_QUALIFIER genType atanh + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'atanh' only accept floating-point input"); + + if(abs(x) >= genType(1)) + return 0; + return genType(0.5) * log((genType(1) + x) / (genType(1) - x)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 atanh + ( + detail::tvec2 const & x + ) + { + return detail::tvec2( + atanh(x.x), + atanh(x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 atanh + ( + detail::tvec3 const & x + ) + { + return detail::tvec3( + atanh(x.x), + atanh(x.y), + atanh(x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 atanh + ( + detail::tvec4 const & x + ) + { + return detail::tvec4( + atanh(x.x), + atanh(x.y), + atanh(x.z), + atanh(x.w)); + } + + }//namespace trigonometric + }//namespace function + }//namespace core +}//namespace glm diff --git a/ExternalLibs/glm/core/func_vector_relational.hpp b/ExternalLibs/glm/core/func_vector_relational.hpp new file mode 100644 index 0000000..d290def --- /dev/null +++ b/ExternalLibs/glm/core/func_vector_relational.hpp @@ -0,0 +1,219 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-08-03 +// Updated : 2008-09-09 +// Licence : This source is under MIT License +// File : glm/core/func_vector_relational.hpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_func_vector_relational +#define glm_core_func_vector_relational + +#include "_detail.hpp" + +namespace glm +{ + namespace test{ + void main_core_func_vector_relational(); + }//namespace test + + namespace core{ + namespace function{ + //! Define vector relational functions from Section 8.6 of GLSL 1.30.8 specification. + //! Included in glm namespace. + namespace vector_relational + { + /// \addtogroup core_funcs + ///@{ + + //! Returns the component-wise comparison result of x < y. + //! + //! \li GLSL lessThan man page + //! \li GLSL 1.30.08 specification, section 8.6 + template class vecType> + GLM_FUNC_QUALIFIER typename vecType::bool_type lessThan + ( + vecType const & x, + vecType const & y + ) + { + GLM_STATIC_ASSERT(detail::is_vector >::_YES, + "Invalid template instantiation of 'lessThan', GLM vector types required"); + GLM_STATIC_ASSERT(detail::is_bool::_NO, + "Invalid template instantiation of 'lessThan', GLM vector types required floating-point or integer value types vectors"); + + typename vecType::bool_type Result(vecType::null); + for(typename vecType::size_type i = 0; i < vecType::value_size(); ++i) + Result[i] = x[i] < y[i]; + + return Result; + } + + //! Returns the component-wise comparison of result x <= y. + //! + //! \li GLSL lessThanEqual man page + //! \li GLSL 1.30.08 specification, section 8.6 + template class vecType> + GLM_FUNC_QUALIFIER typename vecType::bool_type lessThanEqual + ( + vecType const & x, + vecType const & y + ) + { + GLM_STATIC_ASSERT(detail::is_vector >::_YES, + "Invalid template instantiation of 'lessThanEqual', GLM vector types required"); + GLM_STATIC_ASSERT(detail::is_bool::_NO, + "Invalid template instantiation of 'lessThanEqual', GLM vector types required floating-point or integer value types vectors"); + + typename vecType::bool_type Result(vecType::null); + for(typename vecType::size_type i = 0; i < vecType::value_size(); ++i) + Result[i] = x[i] <= y[i]; + return Result; + } + + //! Returns the component-wise comparison of result x > y. + //! + //! \li GLSL greaterThan man page + //! \li GLSL 1.30.08 specification, section 8.6 + template class vecType> + GLM_FUNC_QUALIFIER typename vecType::bool_type greaterThan + ( + vecType const & x, + vecType const & y + ) + { + GLM_STATIC_ASSERT(detail::is_vector >::_YES, + "Invalid template instantiation of 'greaterThan', GLM vector types required"); + GLM_STATIC_ASSERT(detail::is_bool::_NO, + "Invalid template instantiation of 'greaterThan', GLM vector types required floating-point or integer value types vectors"); + + typename vecType::bool_type Result(vecType::null); + for(typename vecType::size_type i = 0; i < vecType::value_size(); ++i) + Result[i] = x[i] > y[i]; + return Result; + } + + //! Returns the component-wise comparison of result x >= y. + //! + //! \li GLSL greaterThanEqual man page + //! \li GLSL 1.30.08 specification, section 8.6 + template class vecType> + GLM_FUNC_QUALIFIER typename vecType::bool_type greaterThanEqual + ( + vecType const & x, + vecType const & y + ) + { + GLM_STATIC_ASSERT(detail::is_vector >::_YES, + "Invalid template instantiation of 'greaterThanEqual', GLM vector types required"); + GLM_STATIC_ASSERT(detail::is_bool::_NO, + "Invalid template instantiation of 'greaterThanEqual', GLM vector types required floating-point or integer value types vectors"); + + typename vecType::bool_type Result(vecType::null); + for(typename vecType::size_type i = 0; i < vecType::value_size(); ++i) + Result[i] = x[i] >= y[i]; + return Result; + } + + //! Returns the component-wise comparison of result x == y. + //! + //! \li GLSL equal man page + //! \li GLSL 1.30.08 specification, section 8.6 + template class vecType> + GLM_FUNC_QUALIFIER typename vecType::bool_type equal + ( + vecType const & x, + vecType const & y + ) + { + GLM_STATIC_ASSERT(detail::is_vector >::_YES, + "Invalid template instantiation of 'equal', GLM vector types required"); + + typename vecType::bool_type Result(vecType::null); + for(typename vecType::size_type i = 0; i < vecType::value_size(); ++i) + Result[i] = x[i] == y[i]; + return Result; + } + + //! Returns the component-wise comparison of result x != y. + //! + //! \li GLSL notEqual man page + //! \li GLSL 1.30.08 specification, section 8.6 + template class vecType> + GLM_FUNC_QUALIFIER typename vecType::bool_type notEqual + ( + vecType const & x, + vecType const & y + ) + { + GLM_STATIC_ASSERT(detail::is_vector >::_YES, + "Invalid template instantiation of 'notEqual', GLM vector types required"); + + typename vecType::bool_type Result(vecType::null); + for(typename vecType::size_type i = 0; i < vecType::value_size(); ++i) + Result[i] = x[i] != y[i]; + return Result; + } + + //! Returns true if any component of x is true. + //! + //! \li GLSL any man page + //! \li GLSL 1.30.08 specification, section 8.6 + template