*
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#include "camera/Camera.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
namespace LifeGraphics
|
||||
{
|
||||
Camera::Camera()
|
||||
{
|
||||
freeCam = true;
|
||||
isViewValid = false;
|
||||
isProjValid = false;
|
||||
fDir = LifeMath::float3(0, 0, -1);
|
||||
fov = 3.1415926535f / 4.0f;
|
||||
nearPlane = 0.1f;
|
||||
farPlane = 400.0f;
|
||||
viewAspect = 1.0f;
|
||||
eye = LifeMath::float3(0, 0, 0);
|
||||
up = LifeMath::float3(0, 1, 0);
|
||||
at = LifeMath::float3(0, 0, 1);
|
||||
right = LifeMath::float3(1, 0, 0);
|
||||
Mat4x4LookAtLH(eye, at, up, viewMatrix);
|
||||
Mat4x4PerspectiveFOV(fov, viewAspect, nearPlane, farPlane, projectionMatrix);
|
||||
frustum = Frustum(viewMatrix * projectionMatrix);
|
||||
}
|
||||
Camera::~Camera()
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user