# GLM: equal_operator.hpp Source File

- Main Page
- Namespaces
- Files

- File List

# equal_operator.hpp

    00001 #ifndef GLM_EXT_VIRTREV_EQUAL_OPERATOR_HPP
    00002 #define GLM_EXT_VIRTREV_EQUAL_OPERATOR_HPP
    00003
    00005 // OpenGL Mathematics Copyright (c) 2005 - 2009 G-Truc Creation (www.g-truc.net)
    00006 // VirtreV SDK copyright matrem (matrem84.free.fr)
    00008 // Created : 2008-09-23
    00009 // Updated :
    00010 // Licence : This source is under MIT License
    00011 // File    : glm/ext/virtrev/equal_operator.h
    00013 // Dependency:
    00014 // - GLM core
    00016
    00017 #include "../glm.hpp"
    00018
    00019 namespace glm
    00020 {
    00021         namespace virtrev_glmext
    00022         {
    00024         namespace equal_operator
    00025         {
    00026                 template<typename T>
    00027                 inline bool operator == (glm::detail::tvec2<T> const & v1, glm::detail::tvec2<T> const & v2)
    00028                 {
    00029                         return v1.x==v2.x && v1.y==v2.y;
    00030                 }
    00031
    00032                 template<typename T>
    00033                 inline bool operator == (glm::detail::tvec3<T> const & v1, glm::detail::tvec3<T> const & v2)
    00034                 {
    00035                         return v1.x==v2.x && v1.y==v2.y && v1.z==v2.z;
    00036                 }
    00037
    00038                 template<typename T>
    00039                 inline bool operator == (glm::detail::tvec4<T> const & v1, glm::detail::tvec4<T> const & v2)
    00040                 {
    00041                         return v1.x==v2.x && v1.y==v2.y && v1.z==v2.z && v1.w==v2.w;
    00042                 }
    00043
    00044                 template<typename T>
    00045                 inline bool operator != (glm::detail::tvec2<T> const & v1, glm::detail::tvec2<T> const & v2)
    00046                 {
    00047                         return v1.x!=v2.x || v1.y!=v2.y;
    00048                 }
    00049
    00050                 template<typename T>
    00051                 inline bool operator != (glm::detail::tvec3<T> const & v1, glm::detail::tvec3<T> const & v2)
    00052                 {
    00053                         return v1.x!=v2.x || v1.y!=v2.y || v1.z!=v2.z;
    00054                 }
    00055
    00056                 template<typename T>
    00057                 inline bool operator != (glm::detail::tvec4<T> const & v1, glm::detail::tvec4<T> const & v2)
    00058                 {
    00059                         return v1.x!=v2.x || v1.y!=v2.y || v1.z!=v2.z || v1.w!=v2.w;
    00060                 }
    00061         }
    00062         }
    00063 }
    00064
    00065 #define GLM_VIRTREV_equal_operator namespace glm::virtrev_glmext::equal_operator
    00066 #ifndef GLM_VIRTREV_GLOBAL
    00067 namespace glm {using GLM_VIRTREV_equal_operator;}
    00068 #endif//GLM_VIRTREV_GLOBAL
    00069
    00070 #endif//GLM_EXT_VIRTREV_EQUAL_OPERATOR_HPP
    00071