Merge branch 'doc' of ssh://g-truc.git.sourceforge.net/gitroot/ogl-math/ogl-math into doc
This commit is contained in:
commit
239b2f8de6
@ -1,6 +1,6 @@
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2005 - 2010 G-Truc Creation
|
||||
Copyright (c) 2005 - 2011 G-Truc Creation
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
|
||||
/*!
|
||||
\defgroup core_types Core Types
|
||||
\defgroup core_types Types
|
||||
|
||||
\brief The standard types defined by the specification.
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup core_precision Core Precision Types
|
||||
\defgroup core_precision Precision types
|
||||
|
||||
\brief Non-GLSL types that are used to define precision-based types.
|
||||
|
||||
@ -44,17 +44,18 @@
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup core_template Core Template Types
|
||||
\defgroup core_template Template types
|
||||
|
||||
\brief The generic template types used as the basis for the core types.
|
||||
\brief The generic template types used as the basis for the core types.
|
||||
|
||||
These types are all templates used to define the actual \ref core_types.
|
||||
These templetes are implementation details of GLM types and should not be used explicitly.
|
||||
|
||||
\ingroup core
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup core_funcs Core Functions
|
||||
\defgroup core_funcs Functions
|
||||
|
||||
\brief The functions defined by the specification.
|
||||
|
||||
|
@ -1,55 +1,48 @@
|
||||
/*!
|
||||
\defgroup gtc GTC Extensions (Stable)
|
||||
|
||||
\brief Functions and types that GLSL does not provide, but are useful to have.
|
||||
\brief Functions and types that the GLSL specification doesn't define, but useful to have for a C++ program.
|
||||
|
||||
Core extensions differ from \ref gtx "experimental extensions" in that core extensions
|
||||
are fairly stable. The API for experimental extensions is expected to change
|
||||
significantly between versions.
|
||||
GTC extensions aim to be stable.
|
||||
|
||||
Even if it's highly unrecommended, you can bring all of the extensions, by
|
||||
including <glm/ext.hpp>. Otherwise, you will have to include each extension
|
||||
by including a specific file.
|
||||
Even if it's highly unrecommended, it's possible to include all the extensions at once by
|
||||
including <glm/ext.hpp>. Otherwise, each extension needs to be included a specific file.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtc_half_float Half Float Core Extension
|
||||
\defgroup gtc_half_float GLM_GTC_half_float: Half-precision floating-point based types and functions.
|
||||
\ingroup gtc
|
||||
|
||||
\brief Defines the half-float type, along with various typedefs for vectors and matrices.
|
||||
|
||||
You must include <glm/gtc/half_float.hpp> to get this functionality.
|
||||
Defines the half-precision floating-point type, along with various typedefs for vectors and matrices.
|
||||
<glm/gtc/half_float.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtc_matrix_access Matrix Access Core Extension
|
||||
\defgroup gtc_matrix_access GLM_GTC_matrix_access: Access matrix rows and columns.
|
||||
\ingroup gtc
|
||||
|
||||
\brief Defines functions that allow you to access rows or columns of a matrix easily.
|
||||
|
||||
You must include <glm/gtc/matrix_access.hpp> to get this functionality.
|
||||
Defines functions to access rows or columns of a matrix easily.
|
||||
<glm/gtc/matrix_access.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtc_matrix_integer Integer Matrix Core Extension
|
||||
\defgroup gtc_matrix_integer GLM_GTC_matrix_integer: Integer matrix types.
|
||||
\ingroup gtc
|
||||
|
||||
\brief Defines a number of matrices with integer types.
|
||||
|
||||
You must include <glm/gtc/matrix_integer.hpp> to get this functionality.
|
||||
Defines a number of matrices with integer types.
|
||||
<glm/gtc/matrix_integer.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtc_matrix_inverse Matrix Inverse Core Extension
|
||||
\defgroup gtc_matrix_inverse GLM_GTC_matrix_inverse: Additional matrix inverse function
|
||||
\ingroup gtc
|
||||
|
||||
\brief Defines additional matrix inverting functions.
|
||||
|
||||
You must include <glm/gtc/matrix_inverse.hpp> to get this functionality.
|
||||
Defines additional matrix inverting functions.
|
||||
<glm/gtc/matrix_inverse.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtc_matrix_transform Matrix Transform Core Extension
|
||||
\defgroup gtc_matrix_transform GLM_GTC_matrix_transform: Matrix transform functions.
|
||||
\ingroup gtc
|
||||
|
||||
\brief Defines functions that generate common transformation matrices.
|
||||
@ -60,20 +53,20 @@
|
||||
perspective, ortho, etc) are designed to expect. The OpenGL compatibility
|
||||
specifications defines the particular layout of this eye space.
|
||||
|
||||
You must include <glm/gtc/matrix_transform.hpp> to get this functionality.
|
||||
<glm/gtc/matrix_transform.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtc_quaternion Quaternion Core Extension
|
||||
\defgroup gtc_quaternion GLM_GTC_quaternion: Quaternion types and functions
|
||||
\ingroup gtc
|
||||
|
||||
\brief Defines a templated quaternion type and several quaternion operations.
|
||||
|
||||
You must include <glm/gtc/quaternion.hpp> to get this functionality.
|
||||
<glm/gtc/quaternion.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtc_type_precision Type Precision Core Extension
|
||||
\defgroup gtc_type_precision GLM_GTC_type_precision: Vector and matrix types with defined precisions.
|
||||
\ingroup gtc
|
||||
|
||||
\brief Defines specific C++-based precision types.
|
||||
@ -81,11 +74,11 @@
|
||||
\ref core_precision defines types based on GLSL's precision qualifiers. This
|
||||
extension defines types based on explicitly-sized C++ data types.
|
||||
|
||||
You must include the file <glm/gtc/type_precision.hpp> to get this functionality.
|
||||
<glm/gtc/type_precision.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtc_type_ptr Pointer Access Core Extension
|
||||
\defgroup gtc_type_ptr GLM_GTC_type_ptr: Memory layout access.
|
||||
\ingroup gtc
|
||||
|
||||
\brief Used to get a pointer to the memory layout of a basic type.
|
||||
@ -93,7 +86,7 @@
|
||||
This extension defines an overloaded function, glm::value_ptr, which
|
||||
takes any of the \ref core_template "core template types". It returns
|
||||
a pointer to the memory layout of the object. Matrix types store their values
|
||||
in row-major order.
|
||||
in column-major order.
|
||||
|
||||
This is useful for uploading data to matrices or copying data to buffer objects.
|
||||
|
||||
@ -102,6 +95,7 @@
|
||||
\code
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtc/type_ptr.hpp>
|
||||
|
||||
glm::vec3 aVector(3);
|
||||
glm::mat4 someMatrix(1.0);
|
||||
|
||||
@ -109,6 +103,6 @@ glUniform3fv(uniformLoc, 1, glm::value_ptr(aVector));
|
||||
glUniformMatrix4fv(uniformMatrixLoc, 1, GL_FALSE, glm::value_ptr(someMatrix));
|
||||
\endcode
|
||||
|
||||
You must include the file <glm/gtc/type_ptr.hpp> to get this functionality.
|
||||
<glm/gtc/type_ptr.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
|
@ -1,500 +1,498 @@
|
||||
/*!
|
||||
\defgroup gtx GTX Extensions (Experimental)
|
||||
|
||||
\brief Functions and types that GLSL does not provide, but are useful to have.
|
||||
\brief Functions and types that the GLSL specification doesn't define, but useful to have for a C++ program.
|
||||
|
||||
Experimental extensions are useful functions and types, but the development of
|
||||
their API and functionality is not necessarily stable. They can change substantially
|
||||
between versions. Backwards compatibility is not much of an issue for them.
|
||||
|
||||
Even if it's highly unrecommended, you can bring all of the extensions, by
|
||||
including <glm/ext.hpp>. Otherwise, you will have to include each extension
|
||||
by including a specific file.
|
||||
Even if it's highly unrecommended, it's possible to include all the extensions at once by
|
||||
including <glm/ext.hpp>. Otherwise, each extension needs to be included a specific file.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_associated_min_max Associated Min/Max Experimental Extension
|
||||
\defgroup gtx_associated_min_max GLM_GTX_associated_min_max: Associated Min/Max
|
||||
\ingroup gtx
|
||||
|
||||
\brief Min and max functions that return associated values not the compared onces.
|
||||
|
||||
You must include the file <glm/glx/associated_min_max.hpp> to get this functionality.
|
||||
<glm/gtx/associated_min_max.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_bit Bitwise Operations Experimental Extension
|
||||
\defgroup gtx_bit GLM_GTX_bit: Extended bitwise operations
|
||||
\ingroup gtx
|
||||
|
||||
\brief Allow to perform bit operations on integer values
|
||||
|
||||
You must include the file <glm/glx/bit.hpp> to get this functionality.
|
||||
<glm/gtx/bit.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_closest_point Find Closest Point Experimental Extension
|
||||
\defgroup gtx_closest_point GLM_GTX_closest_point: Find closest point
|
||||
\ingroup gtx
|
||||
|
||||
\brief Find the point on a straight line which is the closet of a point.
|
||||
|
||||
You must include the file <glm/glx/closest_point.hpp> to get this functionality.
|
||||
<glm/gtx/closest_point.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_color_cast Color Conversion Experimental Extension
|
||||
\defgroup gtx_color_cast GLM_GTX_color_cast: Color conversion
|
||||
\ingroup gtx
|
||||
|
||||
\brief Conversion between two color types.
|
||||
|
||||
You must include the file <glm/glx/color_cast.hpp> to get this functionality.
|
||||
<glm/gtx/color_cast.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_color_space RGB to HSV Conversion Experimental Extension
|
||||
\defgroup gtx_color_space GLM_GTX_color_space: RGB to HSV conversion
|
||||
\ingroup gtx
|
||||
|
||||
\brief Related to RGB to HSV conversions and operations.
|
||||
|
||||
You must include the file <glm/glx/color_space.hpp> to get this functionality.
|
||||
<glm/gtx/color_space.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_color_space_YCoCg RGB to YCoCg Conversion Experimental Extension
|
||||
\defgroup gtx_color_space_YCoCg GLM_GTX_color_space_YCoCg: RGB to YCoCg conversion
|
||||
\ingroup gtx
|
||||
|
||||
\brief RGB to YCoCg conversions and operations
|
||||
|
||||
You must include the file <glm/glx/color_space_YCoCg.hpp> to get this functionality.
|
||||
<glm/gtx/color_space_YCoCg.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_compatibility Cg and HLSL Compatibility Experimental Extension
|
||||
\defgroup gtx_compatibility GLM_GTX_compatibility: Cg and HLSL compatibility
|
||||
\ingroup gtx
|
||||
|
||||
\brief Provide functions to increase the compatibility with Cg and HLSL languages
|
||||
|
||||
You must include the file <glm/glx/compatibility.hpp> to get this functionality.
|
||||
<glm/gtx/compatibility.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_component_wise Component Wise Experimental Extension
|
||||
\defgroup gtx_component_wise GLM_GTX_component_wise: Component wise
|
||||
\ingroup gtx
|
||||
|
||||
\brief Operations between components of a type
|
||||
|
||||
You must include the file <glm/glx/component_wise.hpp> to get this functionality.
|
||||
<glm/gtx/component_wise.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_epsilon Epsilon Comparison Experimental Extension
|
||||
\defgroup gtx_epsilon GLM_GTX_epsilon: Epsilon comparison
|
||||
\ingroup gtx
|
||||
|
||||
\brief Comparison functions for a user defined epsilon values.
|
||||
|
||||
You must include the file <glm/glx/epsilon.hpp> to get this functionality.
|
||||
<glm/gtx/epsilon.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_euler_angles Matrix From Euler Angles Experimental Extension
|
||||
\defgroup gtx_euler_angles GLM_GTX_euler_angles: Matrix from euler angles
|
||||
\ingroup gtx
|
||||
|
||||
\brief Build matrices from Euler angles.
|
||||
|
||||
You must include the file <glm/glx/euler_angles.hpp> to get this functionality.
|
||||
<glm/gtx/euler_angles.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_extend Position Extending Experimental Extension
|
||||
\defgroup gtx_extend GLM_GTX_extend: Position extending
|
||||
\ingroup gtx
|
||||
|
||||
\brief Extend a position from a source to a position at a defined length.
|
||||
|
||||
You must include the file <glm/glx/extend.hpp> to get this functionality.
|
||||
<glm/gtx/extend.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_extented_min_max Extended Min Max Experimental Extension
|
||||
\defgroup gtx_extented_min_max GLM_GTX_extented_min_max: Extended min max
|
||||
\ingroup gtx
|
||||
|
||||
\brief Min and max functions for 3 to 4 parameters.
|
||||
|
||||
You must include the file <glm/glx/extented_min_max.hpp> to get this functionality.
|
||||
<glm/gtx/extented_min_max.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_fast_exponential Fast Exponentiation Experimental Extension
|
||||
\defgroup gtx_fast_exponential GLM_GTX_fast_exponential: Fast exponentiation functions
|
||||
\ingroup gtx
|
||||
|
||||
\brief Fast but less accurate implementations of exponential based functions.
|
||||
|
||||
You must include the file <glm/glx/fast_exponential.hpp> to get this functionality.
|
||||
<glm/gtx/fast_exponential.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_fast_square_root Fast Square Root Experimental Extension
|
||||
\defgroup gtx_fast_square_root GLM_GTX_fast_square_root: Fast square root functions
|
||||
\ingroup gtx
|
||||
|
||||
\brief Fast but less accurate implementations of square root based functions.
|
||||
|
||||
You must include the file <glm/glx/fast_square_root.hpp> to get this functionality.
|
||||
<glm/gtx/fast_square_root.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_fast_trigonometry Fast Trig Experimental Extension
|
||||
\defgroup gtx_fast_trigonometry GLM_GTX_fast_trigonometry: Fast trigonometric functions
|
||||
\ingroup gtx
|
||||
|
||||
\brief Fast but less accurate implementations of trigonometric functions.
|
||||
|
||||
You must include the file <glm/glx/fast_trigonometry.hpp> to get this functionality.
|
||||
<glm/gtx/fast_trigonometry.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_handed_coordinate_space Space Handedness Experimental Extension
|
||||
\defgroup gtx_handed_coordinate_space GLM_GTX_handed_coordinate_space: Space Handedness
|
||||
\ingroup gtx
|
||||
|
||||
\brief To know if a set of three basis vectors defines a right or left-handed coordinate system.
|
||||
|
||||
You must include the file <glm/glx/handed_coordinate_system.hpp> to get this functionality.
|
||||
<glm/gtx/handed_coordinate_system.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_inertia Intertial Matrix Experimental Extension
|
||||
\defgroup gtx_inertia GLM_GTX_inertia: Intertial matrix
|
||||
\ingroup gtx
|
||||
|
||||
\brief Create inertia matrices
|
||||
|
||||
You must include the file <glm/glx/inertia.hpp> to get this functionality.
|
||||
<glm/gtx/inertia.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_int_10_10_10_2 Packed Integer Experimental Extension
|
||||
\defgroup gtx_int_10_10_10_2 GLM_GTX_int_10_10_10_2: Packed integer
|
||||
\ingroup gtx
|
||||
|
||||
\brief Pack vector to 1010102 integers. Storage only.
|
||||
|
||||
<glm/gtx/int_10_10_10_2.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_integer GLM_GTX_integer: Extended integer functions
|
||||
\ingroup gtx
|
||||
|
||||
\brief Add support for integer for core functions
|
||||
|
||||
You must include the file <glm/glx/int_10_10_10_2.hpp> to get this functionality.
|
||||
<glm/gtx/integer.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_integer Integer Function Experimental Extension
|
||||
\ingroup gtx
|
||||
|
||||
\brief Add support for integer for core functions
|
||||
|
||||
You must include the file <glm/glx/integer.hpp> to get this functionality.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_intersect Intersection Test Experimental Extension
|
||||
\defgroup gtx_intersect GLM_GTX_intersect: Intersection tests
|
||||
\ingroup gtx
|
||||
|
||||
\brief Add intersection functions
|
||||
|
||||
You must include the file <glm/glx/intersect.hpp> to get this functionality.
|
||||
<glm/gtx/intersect.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_log_base Log With Base Experimental Extension
|
||||
\defgroup gtx_log_base GLM_GTX_log_base: Log with base
|
||||
\ingroup gtx
|
||||
|
||||
\brief Logarithm for any base. base can be a vector or a scalar.
|
||||
|
||||
You must include the file <glm/glx/log_base.hpp> to get this functionality.
|
||||
<glm/gtx/log_base.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_matrix_cross_product Cross Product Matrices Experimental Extension
|
||||
\defgroup gtx_matrix_cross_product GLM_GTX_matrix_cross_product: Cross product matrix form
|
||||
\ingroup gtx
|
||||
|
||||
\brief Build cross product matrices
|
||||
|
||||
You must include the file <glm/glx/matrix_cross_product.hpp> to get this functionality.
|
||||
<glm/gtx/matrix_cross_product.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_matrix_major_storage Build Matrix Experimental Extension
|
||||
\defgroup gtx_matrix_major_storage GLM_GTX_matrix_major_storage: Build matrix
|
||||
\ingroup gtx
|
||||
|
||||
\brief Build matrices with specific matrix order, row or column
|
||||
|
||||
You must include the file <glm/glx/matrix_major_storage.hpp> to get this functionality.
|
||||
<glm/gtx/matrix_major_storage.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_matrix_operation Diagonal Matrix Experimental Extension
|
||||
\defgroup gtx_matrix_operation GLM_GTX_matrix_operation: Extended matrix operations
|
||||
\ingroup gtx
|
||||
|
||||
\brief Build diagonal matrices from vectors.
|
||||
|
||||
You must include the file <glm/glx/matrix_operation.hpp> to get this functionality.
|
||||
<glm/gtx/matrix_operation.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_matrix_query Query Matrix Properties Experimental Extension
|
||||
\defgroup gtx_matrix_query GLM_GTX_matrix_query: Query matrix properties
|
||||
\ingroup gtx
|
||||
|
||||
\brief Query to evaluate matrix properties
|
||||
|
||||
You must include the file <glm/glx/matrix_query.hpp> to get this functionality.
|
||||
<glm/gtx/matrix_query.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_mixed_product Mixed Product Experimental Extension
|
||||
\defgroup gtx_mixed_product GLM_GTX_mixed_producte: Mixed product
|
||||
\ingroup gtx
|
||||
|
||||
\brief Mixed product of 3 vectors.
|
||||
|
||||
You must include the file <glm/glx/mixed_product.hpp> to get this functionality.
|
||||
<glm/gtx/mixed_product.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_multiple Multiples Experimental Extension
|
||||
\defgroup gtx_multiple GLM_GTX_multiple: Multiples
|
||||
\ingroup gtx
|
||||
|
||||
\brief Find the closest number of a number multiple of other number.
|
||||
|
||||
You must include the file <glm/glx/multiple.hpp> to get this functionality.
|
||||
<glm/gtx/multiple.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_norm Vector Norm Experimental Extension
|
||||
\defgroup gtx_norm GLM_GTX_norm: Vector norm calculations
|
||||
\ingroup gtx
|
||||
|
||||
\brief Various way to compute vector norms.
|
||||
|
||||
You must include the file <glm/glx/norm.hpp> to get this functionality.
|
||||
<glm/gtx/norm.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_normal Compute Normal Experimental Extension
|
||||
\defgroup gtx_normal GLM_GTX_normal: Compute normals
|
||||
\ingroup gtx
|
||||
|
||||
\brief Compute the normal of a triangle.
|
||||
|
||||
You must include the file <glm/glx/normal.hpp> to get this functionality.
|
||||
<glm/gtx/normal.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_normalize_dot Normalize Dot Product Experimental Extension
|
||||
\defgroup gtx_normalize_dot GLM_GTX_normalize_dot: Normalize dot product
|
||||
\ingroup gtx
|
||||
|
||||
\brief Dot product of vectors that need to be normalize with a single square root.
|
||||
|
||||
You must include the file <glm/glx/normalized_dot.hpp> to get this functionality.
|
||||
<glm/gtx/normalized_dot.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_number_precision Number Precision Experimental Extension
|
||||
\defgroup gtx_number_precision GLM_GTX_number_precision: Number precision
|
||||
\ingroup gtx
|
||||
|
||||
\brief Defined size types.
|
||||
|
||||
You must include the file <glm/glx/number_precision.hpp> to get this functionality.
|
||||
<glm/gtx/number_precision.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_ocl_type OpenCL Types Experimental Extension
|
||||
\defgroup gtx_ocl_type GLM_GTX_ocl_type: OpenCL types
|
||||
\ingroup gtx
|
||||
|
||||
\brief OpenCL types.
|
||||
|
||||
You must include the file <glm/glx/ocl_type.hpp> to get this functionality.
|
||||
<glm/gtx/ocl_type.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_optimum_pow Optimum Pow Experimental Extension
|
||||
\defgroup gtx_optimum_pow GLM_GTX_optimum_pow: Optimum pow
|
||||
\ingroup gtx
|
||||
|
||||
\brief Integer exponentiation of power functions.
|
||||
|
||||
You must include the file <glm/glx/optimum_pow.hpp> to get this functionality.
|
||||
<glm/gtx/optimum_pow.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_orthonormalize Orthonormalize Experimental Extension
|
||||
\defgroup gtx_orthonormalize GLM_GTX_orthonormalize: Orthonormalize
|
||||
\ingroup gtx
|
||||
|
||||
\brief Orthonormalize matrices.
|
||||
|
||||
You must include the file <glm/glx/orthonormalize.hpp> to get this functionality.
|
||||
<glm/gtx/orthonormalize.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_perpendicular Perpendicular Experimental Extension
|
||||
\defgroup gtx_perpendicular GLM_GTX_perpendicular: Perpendicular
|
||||
\ingroup gtx
|
||||
|
||||
\brief Perpendicular of a vector from other one
|
||||
|
||||
You must include the file <glm/glx/perpendicular.hpp> to get this functionality.
|
||||
<glm/gtx/perpendicular.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_polar_coordinates Polar Coordinates Experimental Extension
|
||||
\defgroup gtx_polar_coordinates GLM_GTX_polar_coordinates: Polar coordinates
|
||||
\ingroup gtx
|
||||
|
||||
\brief Conversion from Euclidean space to polar space and revert.
|
||||
|
||||
You must include the file <glm/glx/polar_coordinates.hpp> to get this functionality.
|
||||
<glm/gtx/polar_coordinates.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_projection Projection Experimental Extension
|
||||
\defgroup gtx_projection GLM_GTX_projection: Projection
|
||||
\ingroup gtx
|
||||
|
||||
\brief Projection of a vector to other one
|
||||
|
||||
You must include the file <glm/glx/projection.hpp> to get this functionality.
|
||||
<glm/gtx/projection.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_quaternion Quaternion Experimental Extension
|
||||
\defgroup gtx_quaternion GLM_GTX_quaternion: Extented quaternion types and functions
|
||||
\ingroup gtx
|
||||
|
||||
\brief Quaternion types and functions
|
||||
\brief Extented quaternion types and functions
|
||||
|
||||
You must include the file <glm/glx/quaternion.hpp> to get this functionality.
|
||||
<glm/gtx/quaternion.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_random Random Experimental Extension
|
||||
\defgroup gtx_random GLM_GTX_random: Random
|
||||
\ingroup gtx
|
||||
|
||||
\brief Generate random number from various distribution methods
|
||||
|
||||
You must include the file <glm/glx/random.hpp> to get this functionality.
|
||||
<glm/gtx/random.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_raw_data Raw Data Experimental Extension
|
||||
\defgroup gtx_raw_data GLM_GTX_raw_data: Raw data
|
||||
\ingroup gtx
|
||||
|
||||
\brief Projection of a vector to other one
|
||||
|
||||
You must include the file <glm/glx/raw_data.hpp> to get this functionality.
|
||||
<glm/gtx/raw_data.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_reciprocal Reciprocal Experimental Extension
|
||||
\defgroup gtx_reciprocal GLM_GTX_reciprocal: Reciprocal
|
||||
\ingroup gtx
|
||||
|
||||
\brief Define secant, cosecant and cotangent functions.
|
||||
|
||||
You must include the file <glm/glx/reciprocal.hpp> to get this functionality.
|
||||
<glm/gtx/reciprocal.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_rotate_vector Rotate Vector Experimental Extension
|
||||
\defgroup gtx_rotate_vector GLM_GTX_rotate_vector: Rotate vector
|
||||
\ingroup gtx
|
||||
|
||||
\brief Function to directly rotate a vector
|
||||
|
||||
You must include the file <glm/glx/rotate_vector.hpp> to get this functionality.
|
||||
<glm/gtx/rotate_vector.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_simd_mat4 SIMD Mat4 Experimental Extension
|
||||
\defgroup gtx_simd_mat4 GLM_GTX_simd_mat4: SIMD mat4 type and functions
|
||||
\ingroup gtx
|
||||
|
||||
\brief SIMD implementation of mat4 type.
|
||||
|
||||
You must include the file <glm/glx/simd_mat4.hpp> to get this functionality.
|
||||
<glm/gtx/simd_mat4.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_simd_vec4 SIMD Vec4 Experimental Extension
|
||||
\defgroup gtx_simd_vec4 GLM_GTX_simd_vec4: SIMD vec4 type and functions
|
||||
\ingroup gtx
|
||||
|
||||
\brief SIMD implementation of vec4 type.
|
||||
|
||||
You must include the file <glm/glx/simd_vec4.hpp> to get this functionality.
|
||||
<glm/gtx/simd_vec4.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_spline Spline Experimental Extension
|
||||
\defgroup gtx_spline GLM_GTX_spline: Spline
|
||||
\ingroup gtx
|
||||
|
||||
\brief Spline functions
|
||||
|
||||
You must include the file <glm/glx/spline.hpp> to get this functionality.
|
||||
<glm/gtx/spline.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_string_cast String Cast Experimental Extension
|
||||
\defgroup gtx_string_cast GLM_GTX_string_cast: String cast
|
||||
\ingroup gtx
|
||||
|
||||
\brief Setup strings for GLM type values
|
||||
|
||||
You must include the file <glm/glx/transform.hpp> to get this functionality.
|
||||
<glm/gtx/string_cast.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_transform Transformation Matrices Experimental Extension
|
||||
\defgroup gtx_transform GLM_GTX_transform: Extented transformation matrices
|
||||
\ingroup gtx
|
||||
|
||||
\brief Add transformation matrices
|
||||
|
||||
You must include the file <glm/glx/transform2.hpp> to get this functionality.
|
||||
<glm/gtx/transform.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_transform2 Extra Transform Matrices Experimental Extension
|
||||
\defgroup gtx_transform2 GLM_GTX_transform2: Extra transformation matrices
|
||||
\ingroup gtx
|
||||
|
||||
\brief Add extra transformation matrices
|
||||
|
||||
You must include the file <glm/glx/unsigned_int.hpp> to get this functionality.
|
||||
<glm/gtx/transform2.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_unsigned_int Unsigned Int Experimental Extension
|
||||
\defgroup gtx_unsigned_int GLM_GTX_unsigned_int: Unsigned int
|
||||
\ingroup gtx
|
||||
|
||||
\brief Add support for unsigned integer for core functions
|
||||
|
||||
You must include the file <glm/glx/unsigned_int.hpp> to get this functionality.
|
||||
<glm/gtx/unsigned_int.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_vector_access Vector Access Experimental Extension
|
||||
\defgroup gtx_vector_access GLM_GTX_vector_angle: Vector access
|
||||
\ingroup gtx
|
||||
|
||||
\brief Function to set values to vectors
|
||||
|
||||
You must include the file <glm/glx/vector_access.hpp> to get this functionality.
|
||||
<glm/gtx/vector_access.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_vector_angle Vector Angle Experimental Extension
|
||||
\defgroup gtx_vector_angle GLM_GTX_vector_angle: Vector angle
|
||||
\ingroup gtx
|
||||
|
||||
\brief Compute angle between vectors
|
||||
|
||||
You must include the file <glm/glx/vector_angle.hpp> to get this functionality.
|
||||
<glm/gtx/vector_angle.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_vector_query Vector Query Experimental Extension
|
||||
\defgroup gtx_vector_query GLM_GTX_vector_query: Vector query
|
||||
\ingroup gtx
|
||||
|
||||
\brief Query informations of vector types
|
||||
|
||||
You must include the file <glm/glx/vector_query.hpp> to get this functionality.
|
||||
<glm/gtx/vector_query.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_verbose_operator Verbose Operator Experimental Extension
|
||||
\defgroup gtx_verbose_operator GLM_GTX_verbose_operator: Verbose operator
|
||||
\ingroup gtx
|
||||
|
||||
\brief Use words to replace operators
|
||||
|
||||
You must include the file <glm/glx/verbose_operator.hpp> to get this functionality.
|
||||
<glm/gtx/verbose_operator.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup gtx_wrap Wrap Experimental Extension
|
||||
\defgroup gtx_wrap GLM_GTX_wrap: Texture coordinate wrap modes
|
||||
\ingroup gtx
|
||||
|
||||
\brief Wrapping mode using my texture samping.
|
||||
\brief Wrapping mode of texture coordinates.
|
||||
|
||||
You must include the file <glm/glx/wrap.hpp> to get this functionality.
|
||||
<glm/gtx/wrap.hpp> need to be included to use these functionalities.
|
||||
**/
|
||||
|
||||
|
@ -21,7 +21,8 @@
|
||||
|
||||
The source code is licenced under the <a href="http://www.opensource.org/licenses/mit-license.php">MIT licence</a>.
|
||||
|
||||
Thanks for contributing to the project by <a href="https://sourceforge.net/apps/trac/ogl-math/newticket">submitting tickets for bug reports and feature requests</a>. (SF.net account required). Any feedback is welcome at glm@g-truc.net.
|
||||
Thanks for contributing to the project by <a href="https://sourceforge.net/apps/trac/ogl-math/newticket">submitting tickets for bug reports and feature requests</a>.
|
||||
(SF.net account required). Any feedback is welcome at glm@g-truc.net.
|
||||
|
||||
\li \subpage pg_started
|
||||
\li \subpage pg_advanced
|
||||
@ -44,7 +45,7 @@
|
||||
|
||||
GLM makes heavy usages of C++ templates. This design may significantly increase the compile time for files that use GLM. Precompiled headers are recommended to avoid this issue.
|
||||
|
||||
\section started_sample Use Sample of GLM Core
|
||||
\section started_sample Use Sample of GLM
|
||||
\code
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
@ -60,31 +61,31 @@ int foo()
|
||||
|
||||
\section started_structure Library Structure
|
||||
|
||||
GLM is arranged in 3 distinct segments. These are the GLM core,
|
||||
core extensions, and experimental extensions.
|
||||
GLM is arranged in 2 distinct segments. These are the GLM features based on the GLSL specification and a set of extensions.
|
||||
Some extensions are stable and backward compatible (\ref gtc GTC \ref virtrev VIRTREV) but some are experimental (\ref gtx GTX)
|
||||
which means that they are not guarantee to be backward compatible from version to version.
|
||||
|
||||
The \ref core "GLM core" represents only what GLSL's core provides in terms of types and functions
|
||||
The \ref core "GLM" represents only what GLSL's core provides in terms of types and functions
|
||||
(to the best of GLM's ability to replicate them). All that is needed to use the core
|
||||
is to <tt>#include <glm/glm.hpp></tt>.
|
||||
|
||||
\ref gtc "Core extensions" are sets of functions and types that add onto the core.
|
||||
\ref gtc "GTC extensions" are functions and types that add onto the core.
|
||||
These are considered reasonably stable, with their APIs not changing much between
|
||||
versions. Each core extension is included with a separated header file include. All
|
||||
of the core extensions are in the "glm/gtc" directory.
|
||||
|
||||
\ref gtx "Experimental extensions" are sets of functions and types that add onto the
|
||||
core. Unlike core extensions, their APIs are not considered particularly stable, which
|
||||
is why they are "experimental". All of the experimental extensions are in the
|
||||
"glm/gtx" directory. Like core extensions, each experimental extension is included
|
||||
\ref gtx "GTX extensions" are functions and types that add onto the
|
||||
core. Unlike GTC extensions, their APIs are not considered particularly stable, which
|
||||
is why they are marked "experimental". Like GTC extensions, each experimental extension is included
|
||||
with a separate header file.
|
||||
|
||||
If you want to use all extensions by default, you may <tt>#include <glm/ext.hpp></tt>.
|
||||
This includes all extensions, core and experimental.
|
||||
All the extensions can be included at once by default with <tt>#include <glm/ext.hpp></tt>
|
||||
but this is not recommanded as it will reduce compilation speed for many unused features.
|
||||
|
||||
All of GLM is defined as direct children of the glm namespace, including extensions. Note that some extensions are incompatible with other extensions; this may result in C++ name collisions when used together.
|
||||
All of GLM is defined as direct children of the glm namespace, including extensions.
|
||||
|
||||
To use a particular extension, simply include the extension header file. All
|
||||
extension features are added to the glm namespace.
|
||||
extension features are added to the glm namespace automatically.
|
||||
|
||||
\code
|
||||
#include <glm/glm.hpp>
|
||||
@ -116,7 +117,7 @@ int foo()
|
||||
like so: <tt>glUniform3fv(loc, 1, glm::vec3(0))</tt>. However, this is not the case;
|
||||
the vector and matrix types are C++ classes, not arrays.
|
||||
|
||||
Instead, GLM provides a mechanism to get the contents of a vector or matrix as
|
||||
Instead, GLM provides a mechanism to get the content of a vector or matrix as
|
||||
an array pointer. The \ref gtc_type_ptr extension provides this ability.
|
||||
|
||||
\code
|
||||
@ -135,7 +136,7 @@ void BindUniforms(GLuint uniVec, GLuint uniMat)
|
||||
|
||||
Notice that all matrix types are <em>column-major</em> rather than row-major. Hence the need to pass GL_FALSE to glUniformMatrix4fv.
|
||||
|
||||
Alternatively, one can simply dereference the first element of the type.
|
||||
Alternatively, the first element of the type can be dereferenced.
|
||||
|
||||
\code
|
||||
#include <glm/glm.hpp>
|
||||
@ -150,18 +151,21 @@ void BindUniforms(GLuint uniVec, GLuint uniMat)
|
||||
}
|
||||
\endcode
|
||||
|
||||
As you can see, this requires dereferencing the very first basic type of the object, not merely the first element. The [] operator on the matrix type returns a column vector; one must then access the first element of that column vector to get a pointer to the basic type.
|
||||
This method requires dereferencing the very first basic type of the object, not merely the first element.
|
||||
The [] operator on the matrix type returns a column vector; one must then access the first element of that column vector to get a pointer to the basic type.
|
||||
|
||||
\note This operation could have been built into the base vector and matrix types and performed with a cast operator. However, this has some downsides. Implicit casts
|
||||
can cause unexpected and unwanted behavior.
|
||||
\note This operation could have been built into the base vector and matrix types and performed with a cast operator.
|
||||
However, this has some downsides. Implicit casts can cause unexpected and unwanted behavior.
|
||||
**/
|
||||
|
||||
/*!
|
||||
\page pg_advanced Advaned Usage
|
||||
\page pg_advanced Advanced Usage
|
||||
|
||||
\section advanced_swizzle Swizzle Operators
|
||||
|
||||
A common feature of shader languages like GLSL is components swizzling. This involves being able to select which components of a vector are used and in what order. For example, "variable.x", "variable.xxy", "variable.zxyy" are examples of swizzling.
|
||||
A common feature of shader languages like GLSL is components swizzling.
|
||||
This involves being able to select which components of a vector are used and in what order.
|
||||
For example, "variable.x", "variable.xxy", "variable.zxyy" are examples of swizzling.
|
||||
|
||||
\code
|
||||
vec4 A;
|
||||
@ -171,18 +175,22 @@ B.yx = A.wy;
|
||||
B = A.xx;
|
||||
\endcode
|
||||
|
||||
This functionally turns out to be really complicated to implement in C++ using the exact GLSL conventions. GLM provides 2 implementions this feature.
|
||||
This functionally turns out to be really complicated to implement in C++ using the exact GLSL conventions.
|
||||
GLM provides 2 implementions this feature.
|
||||
|
||||
\subsection advanced_swizzle_macro Macro implementation
|
||||
|
||||
The first implementation follows the GLSL convensions accurately. It uses macros to achieve this, which might generates name conflicts with system headers or third party libraries. Therefore, it is disabled by default. To enable this implementation, GLM_SWIZZLE must be defined before any inclusion of <glm/glm.hpp>.
|
||||
The first implementation follows the GLSL convensions accurately.
|
||||
It uses macros to achieve this, which might generates name conflicts with system headers or third party libraries.
|
||||
Therefore, it is disabled by default. To enable this implementation, GLM_SWIZZLE must be defined before any inclusion of <glm/glm.hpp>.
|
||||
|
||||
\code
|
||||
#define GLM_SWIZZLE
|
||||
#include <glm/glm.hpp>
|
||||
\endcode
|
||||
|
||||
This implementation can be partially enabled by defining GLM_SWIZZLE_XYZW, GLM_SWIZZLE_RGBA or GLM_SWIZZLE_STQP. Each macro only enable a set of swizzling operators. For example we can only enable x,y,z,w and s,t,q,p operators using:
|
||||
This implementation can be partially enabled by defining GLM_SWIZZLE_XYZW, GLM_SWIZZLE_RGBA or GLM_SWIZZLE_STQP.
|
||||
Each macro only enable a set of swizzling operators. For example we can only enable x,y,z,w and s,t,q,p operators using:
|
||||
|
||||
\code
|
||||
#define GLM_SWIZZLE_XYZW
|
||||
@ -192,9 +200,15 @@ B = A.xx;
|
||||
|
||||
\subsection advanced_swizzle_ext Extension implementation
|
||||
|
||||
A safer way to do swizzling is to use the <glm/gtc/swizzle.hpp> extension. This extension provides the GLSL functionality, but uses a different syntax for it. However, the swizzle extension also provides dynamic swizzling.
|
||||
A safer way to do swizzling is to use the <glm/gtc/swizzle.hpp> extension.
|
||||
This extension provides the GLSL functionality, but uses a different syntax for it.
|
||||
Moreover, the swizzle extension also provides dynamic swizzling.
|
||||
|
||||
Static swizzling is resovled at compile-time. The swizzle mask ".xzyy" is as fixed as the type of a particular variable. Dynamic swizzling is resolved at runtime via function calls. Dynamic swizzling is more flexible, since one can choose the swizzle mask at runtime, but it runs slower. This performance issue is enhanced when \ref advanced_simd "SIMD instructions" are used.
|
||||
Static swizzling is resovled at compile-time.
|
||||
The swizzle mask ".xzyy" is as fixed as the type of a particular variable.
|
||||
Dynamic swizzling is resolved at runtime via function calls.
|
||||
Dynamic swizzling is more flexible, since one can choose the swizzle mask at runtime, but it runs slower.
|
||||
This performance issue is enhanced when \ref advanced_simd "SIMD instructions" are used.
|
||||
|
||||
\code
|
||||
#include <glm/glm.hpp>
|
||||
@ -239,20 +253,26 @@ void foo()
|
||||
|
||||
\section advanced_inline Force Inline
|
||||
|
||||
GLM's functions are defined in headers, so they are defined with C++'s "inline" delcaration. This does not require the compiler to inline them, however. If you want to force the compiler to inline the function, using whatever capabilities that the compiler provides to do so, you can define GLM_FORCE_INLINE before any inclusion of <glm/glm.hpp>.
|
||||
GLM's functions are defined in headers, so they are defined with C++'s "inline" delcaration.
|
||||
This does not require the compiler to inline them, however.
|
||||
If you want to force the compiler to inline the function, using whatever capabilities that the compiler provides to do so,
|
||||
you can define GLM_FORCE_INLINE before any inclusion of <glm/glm.hpp>.
|
||||
|
||||
\code
|
||||
#define GLM_FORCE_INLINE
|
||||
#include <glm/glm.hpp>
|
||||
\endcode
|
||||
|
||||
\section advanced_simd SIMD Support
|
||||
\section advanced_simd SIMD support
|
||||
|
||||
GLM provides some SIMD optimizations based on compiler intrinsics. These optimizations will be automatically utilized based on the build environment. These optimizations are mainly available through the extensions \ref gtx_simd_vec4 and \ref gtx_simd_mat4.
|
||||
GLM provides some SIMD optimizations based on compiler intrinsics.
|
||||
These optimizations will be automatically utilized based on the build environment.
|
||||
These optimizations are mainly available through the extensions \ref gtx_simd_vec4 and \ref gtx_simd_mat4.
|
||||
|
||||
A programmer can restrict or force instruction sets used for these optimizations using GLM_FORCE_SSE2 or GLM_FORCE_AVX.
|
||||
|
||||
A programmer can discard the use of intrinsics by defining GLM_FORCE_PURE before any inclusion of <glm/glm.hpp>. If GLM_FORCE_PURE is defined, then including a SIMD extension will generate a build error.
|
||||
A programmer can discard the use of intrinsics by defining GLM_FORCE_PURE before any inclusion of <glm/glm.hpp>.
|
||||
If GLM_FORCE_PURE is defined, then including a SIMD extension will generate a build error.
|
||||
|
||||
\code
|
||||
#define GLM_FORCE_PURE
|
||||
@ -260,7 +280,8 @@ void foo()
|
||||
\endcode
|
||||
|
||||
\section advanced_compatibility Compatibility
|
||||
Compilers have some language extensions that GLM will automatically take advantage of them when they are enabled. The #define GLM_FORCE_CXX98 can switch off these extensions, forcing GLM to operate on pure C++98.
|
||||
Compilers have some language extensions that GLM will automatically take advantage of them when they are enabled.
|
||||
The #define GLM_FORCE_CXX98 can switch off these extensions, forcing GLM to operate on pure C++98.
|
||||
|
||||
\code
|
||||
#define GLM_FORCE_CXX98
|
||||
@ -269,11 +290,12 @@ void foo()
|
||||
**/
|
||||
|
||||
/*!
|
||||
\page pg_deprecated Deprecated Function Replacements
|
||||
\page pg_deprecated Deprecated function replacements
|
||||
|
||||
The OpenGL 3.0 specification deprecated some features, and most of these have been removed from the OpenGL 3.1 specfication and beyond. GLM provides some replacement functions. Many of these functions come from the \ref gtc_matrix_transform extension.
|
||||
The OpenGL 3.0 specification deprecated some features, and most of these have been removed from the OpenGL 3.1 specfication and beyond.
|
||||
GLM provides some replacement functions. Many of these functions come from the \ref gtc_matrix_transform extension.
|
||||
|
||||
\section deprecated_opengl OpenGL Function Replacements
|
||||
\section deprecated_opengl OpenGL function replacements
|
||||
|
||||
<dl>
|
||||
<dt>glRotate[fd]</dt>
|
||||
@ -298,7 +320,7 @@ void foo()
|
||||
<dd>\link glm::gtc::matrix_transform::lookAt glm::lookAt \endlink</dd>
|
||||
</dl>
|
||||
|
||||
\section deprecated_glu GLU Function Replacements
|
||||
\section deprecated_glu GLU function replacements
|
||||
|
||||
<dl>
|
||||
<dt>gluOrtho2D</dt>
|
||||
|
@ -1,11 +1,11 @@
|
||||
/*!
|
||||
\defgroup virtrev VIRTREV Extensions (Stable)
|
||||
\defgroup virtrev VIRTREV Extensions
|
||||
|
||||
\brief Extensions develop and maintain by Mathieu [matrem] Roumillac (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showprofile&User=22660).
|
||||
**/
|
||||
|
||||
/*!
|
||||
\defgroup virtrev_xstream xml like output
|
||||
\defgroup virtrev_xstream GLM_VIRTREV_xstream: xml like output
|
||||
\ingroup virtrev
|
||||
|
||||
\brief Streaming vector and matrix in a xml way.
|
||||
|
@ -45,7 +45,7 @@ namespace glm
|
||||
bool main_core();
|
||||
}//namespace test
|
||||
|
||||
//! GLM core. Namespace that includes all the feature define by GLSL 1.30.8 specification. This namespace is included in glm namespace.
|
||||
//! GLM core. Namespace that includes all the feature define by GLSL 4.10.6 specification. This namespace is included in glm namespace.
|
||||
namespace core
|
||||
{
|
||||
//! Scalar, vectors and matrices
|
||||
@ -67,9 +67,6 @@ namespace glm
|
||||
//! The interface could change between releases.
|
||||
namespace gtx{}
|
||||
|
||||
//! IMG extensions.
|
||||
namespace img{}
|
||||
|
||||
//! VIRTREV extensions.
|
||||
namespace img{}
|
||||
|
||||
|
@ -1,76 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Created : 2008-06-22
|
||||
// Updated : 2008-10-27
|
||||
// Licence : This source is under MIT License
|
||||
// File : glm/gtx/comparison.inl
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
namespace glm{
|
||||
namespace gtx{
|
||||
namespace comparison{
|
||||
/*
|
||||
template <typename valType>
|
||||
inline bool operator==
|
||||
(
|
||||
detail::tvec2<valType> const & x,
|
||||
detail::tvec2<valType> const & y
|
||||
)
|
||||
{
|
||||
return glm::all(glm::equal(x, y));
|
||||
}
|
||||
|
||||
template <typename valType>
|
||||
inline bool operator==
|
||||
(
|
||||
detail::tvec3<valType> const & x,
|
||||
detail::tvec3<valType> const & y
|
||||
)
|
||||
{
|
||||
return glm::all(glm::equal(x, y));
|
||||
}
|
||||
|
||||
template <typename valType>
|
||||
inline bool operator==
|
||||
(
|
||||
detail::tvec4<valType> const & x,
|
||||
detail::tvec4<valType> const & y
|
||||
)
|
||||
{
|
||||
return glm::all(glm::equal(x, y));
|
||||
}
|
||||
|
||||
template <typename valType>
|
||||
inline bool operator!=
|
||||
(
|
||||
detail::tvec2<valType> const & x,
|
||||
detail::tvec2<valType> const & y
|
||||
)
|
||||
{
|
||||
return glm::any(glm::notEqual(x, y));
|
||||
}
|
||||
|
||||
template <typename valType>
|
||||
inline bool operator!=
|
||||
(
|
||||
detail::tvec3<valType> const & x,
|
||||
detail::tvec3<valType> const & y
|
||||
)
|
||||
{
|
||||
return glm::any(glm::notEqual(x, y));
|
||||
}
|
||||
|
||||
template <typename valType>
|
||||
inline bool operator!=
|
||||
(
|
||||
detail::tvec4<valType> const & x,
|
||||
detail::tvec4<valType> const & y
|
||||
)
|
||||
{
|
||||
return glm::any(glm::notEqual(x, y));
|
||||
}
|
||||
*/
|
||||
}//namespace comparison
|
||||
}//namespace gtx
|
||||
}//namespace glm
|
Loading…
Reference in New Issue
Block a user