ovr_sdk

view LibOVR/Src/Kernel/OVR_Math.cpp @ 0:1b39a1b46319

initial 0.4.4
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 14 Jan 2015 06:51:16 +0200
parents
children
line source
1 /************************************************************************************
3 Filename : OVR_Math.h
4 Content : Implementation of 3D primitives such as vectors, matrices.
5 Created : September 4, 2012
6 Authors : Andrew Reisse, Michael Antonov, Anna Yershova
8 Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
10 Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
11 you may not use the Oculus VR Rift SDK except in compliance with the License,
12 which is provided at the time of installation or download, or which
13 otherwise accompanies this software in either electronic or hard copy form.
15 You may obtain a copy of the License at
17 http://www.oculusvr.com/licenses/LICENSE-3.2
19 Unless required by applicable law or agreed to in writing, the Oculus VR SDK
20 distributed under the License is distributed on an "AS IS" BASIS,
21 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 See the License for the specific language governing permissions and
23 limitations under the License.
25 *************************************************************************************/
27 #include "OVR_Math.h"
28 #include "OVR_Log.h"
30 #include <float.h>
33 namespace OVR {
36 //-------------------------------------------------------------------------------------
37 // ***** Constants
39 template<>
40 const Vector3<float> Vector3<float>::ZERO = Vector3<float>();
42 template<>
43 const Vector3<double> Vector3<double>::ZERO = Vector3<double>();
45 template<>
46 const Matrix4<float> Matrix4<float>::IdentityValue = Matrix4<float>(1.0f, 0.0f, 0.0f, 0.0f,
47 0.0f, 1.0f, 0.0f, 0.0f,
48 0.0f, 0.0f, 1.0f, 0.0f,
49 0.0f, 0.0f, 0.0f, 1.0f);
51 template<>
52 const Matrix4<double> Matrix4<double>::IdentityValue = Matrix4<double>(1.0, 0.0, 0.0, 0.0,
53 0.0, 1.0, 0.0, 0.0,
54 0.0, 0.0, 1.0, 0.0,
55 0.0, 0.0, 0.0, 1.0);
58 } // Namespace OVR