All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
TransformHelpers.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "VectorMathDecl.h"
6 #include "Camera.h"
7 #include "Geometry.h"
8 
9 namespace Eegeo
10 {
11  namespace Helpers
12  {
13  namespace TransformHelpers
14  {
15  void ComputeModelViewProjectionFacingCamera(const dv3& ecefPosition, const Camera::RenderCamera& renderCamera, m44& outModelViewProjection);
16 
17  void ComputeModelViewProjectionFacingCamera(const dv3& ecefPosition, const Camera::RenderCamera& renderCamera, m44& outModelViewProjection, float modelScale);
18 
19  v3 TransformModelSpaceToViewSpace(const v3& modelPosition, const m44& modelViewProjection);
20 
21  v2 TransformViewSpaceToScreenSpace(const v3& viewSpacePosition, float viewportWidth, float viewportHeight);
22 
23  v3 TransformModelSpaceToScreenSpace(const v3& modelPosition, const m44& modelViewProjection, float viewportWidth, float viewportHeight);
24 
25  float ComputeModelScaleForConstantScreenSize(const Camera::RenderCamera& renderCamera, const dv3& objectEcefPosition);
26  float ComputeModelScaleForConstantScreenSizeWithVerticalFoV(const Camera::RenderCamera& renderCamera, const dv3& objectEcefPosition);
27 
28  Eegeo::m44 CreatePlanarReflection(const Eegeo::Geometry::Plane& plane);
29  }
30  }
31 }