Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-18 09:21:32

0001 // Created on: 2013-01-29
0002 // Created by: Kirill GAVRILOV
0003 // Copyright (c) 2013-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef OpenGl_Vec_HeaderFile
0017 #define OpenGl_Vec_HeaderFile
0018 
0019 #include <NCollection_Vec2.hxx>
0020 
0021 #include <Standard_TypeDef.hxx>
0022 
0023 #include <NCollection_Vec3.hxx>
0024 
0025 #include <NCollection_Vec4.hxx>
0026 
0027 #include <NCollection_Mat4.hxx>
0028 
0029 namespace OpenGl
0030 {
0031 //! Tool class for selecting appropriate vector type.
0032 //! \tparam T Numeric data type
0033 template <class T>
0034 struct VectorType
0035 {
0036   // Not implemented
0037 };
0038 
0039 template <>
0040 struct VectorType<double>
0041 {
0042   typedef NCollection_Vec2<double> Vec2;
0043   typedef NCollection_Vec3<double> Vec3;
0044   typedef NCollection_Vec4<double> Vec4;
0045 };
0046 
0047 template <>
0048 struct VectorType<float>
0049 {
0050   typedef NCollection_Vec2<float> Vec2;
0051   typedef NCollection_Vec3<float> Vec3;
0052   typedef NCollection_Vec4<float> Vec4;
0053 };
0054 
0055 //! Tool class for selecting appropriate matrix type.
0056 //! \tparam T Numeric data type
0057 template <class T>
0058 struct MatrixType
0059 {
0060   // Not implemented
0061 };
0062 
0063 template <>
0064 struct MatrixType<double>
0065 {
0066   typedef NCollection_Mat4<double> Mat4;
0067 };
0068 
0069 template <>
0070 struct MatrixType<float>
0071 {
0072   typedef NCollection_Mat4<float> Mat4;
0073 };
0074 } // namespace OpenGl
0075 
0076 #endif // _OpenGl_Vec_H__