ovr_sdk

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