0030748: Visualization - Marker displayed in immediate layer ruins QT Quick view...
[occt.git] / src / OpenGl / OpenGl_Vec.hxx
CommitLineData
a174a3c5 1// Created on: 2013-01-29
2// Created by: Kirill GAVRILOV
d5f74e42 3// Copyright (c) 2013-2014 OPEN CASCADE SAS
b311480e 4//
973c2be1 5// This file is part of Open CASCADE Technology software library.
b311480e 6//
d5f74e42 7// This library is free software; you can redistribute it and/or modify it under
8// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 9// by the Free Software Foundation, with special exception defined in the file
10// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11// distribution for complete text of the license and disclaimer of any warranty.
b311480e 12//
973c2be1 13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
b311480e 15
a174a3c5 16#ifndef _OpenGl_Vec_H__
17#define _OpenGl_Vec_H__
2166f0fa 18
c4a8a6bb 19#include <Graphic3d_Vec.hxx>
2166f0fa 20
c4a8a6bb 21typedef Graphic3d_Vec2i OpenGl_Vec2i;
22typedef Graphic3d_Vec3i OpenGl_Vec3i;
23typedef Graphic3d_Vec4i OpenGl_Vec4i;
30f0ad28 24
c4a8a6bb 25typedef Graphic3d_Vec2b OpenGl_Vec2b;
26typedef Graphic3d_Vec3b OpenGl_Vec3b;
27typedef Graphic3d_Vec4b OpenGl_Vec4b;
30f0ad28 28
c4a8a6bb 29typedef Graphic3d_Vec2u OpenGl_Vec2u;
30typedef Graphic3d_Vec3u OpenGl_Vec3u;
31typedef Graphic3d_Vec4u OpenGl_Vec4u;
30f0ad28 32
c4a8a6bb 33typedef Graphic3d_Vec2ub OpenGl_Vec2ub;
34typedef Graphic3d_Vec3ub OpenGl_Vec3ub;
35typedef Graphic3d_Vec4ub OpenGl_Vec4ub;
30f0ad28 36
c4a8a6bb 37typedef Graphic3d_Vec2 OpenGl_Vec2;
38typedef Graphic3d_Vec3 OpenGl_Vec3;
39typedef Graphic3d_Vec4 OpenGl_Vec4;
2166f0fa 40
c4a8a6bb 41typedef Graphic3d_Vec2d OpenGl_Vec2d;
42typedef Graphic3d_Vec3d OpenGl_Vec3d;
43typedef Graphic3d_Vec4d OpenGl_Vec4d;
30f0ad28 44
938d4544 45typedef Graphic3d_Mat4 OpenGl_Mat4;
46typedef Graphic3d_Mat4d OpenGl_Mat4d;
47
825aa485 48namespace OpenGl
49{
50 //! Tool class for selecting appropriate vector type.
51 //! \tparam T Numeric data type
52 template<class T> struct VectorType
53 {
54 // Not implemented
55 };
56
57 template<> struct VectorType<Standard_Real>
58 {
59 typedef OpenGl_Vec2d Vec2;
60 typedef OpenGl_Vec3d Vec3;
61 typedef OpenGl_Vec4d Vec4;
62 };
63
64 template<> struct VectorType<Standard_ShortReal>
65 {
66 typedef OpenGl_Vec2 Vec2;
67 typedef OpenGl_Vec3 Vec3;
68 typedef OpenGl_Vec4 Vec4;
69 };
70
71 //! Tool class for selecting appropriate matrix type.
72 //! \tparam T Numeric data type
73 template<class T> struct MatrixType
74 {
75 // Not implemented
76 };
77
78 template<> struct MatrixType<Standard_Real>
79 {
80 typedef OpenGl_Mat4d Mat4;
81 };
82
83 template<> struct MatrixType<Standard_ShortReal>
84 {
85 typedef OpenGl_Mat4 Mat4;
86 };
87}
88
a174a3c5 89#endif // _OpenGl_Vec_H__