///
/// MIT License - Copyright(c) 2019 Ugo Belfiore
///
using System;
using UnityEngine;
namespace PerspectiveSwitcher
{
///
/// this class represent a camera.
/// This camera have a projection, witch is the main settings of the camera
///
[Serializable]
public class CameraData
{
[SerializeField, Tooltip("Matrix settings")]
public MatrixBlendData Projection;
public CameraData(MatrixBlendData.MatrixType matrixType)
{
Projection = new MatrixBlendData(matrixType);
}
///
/// initialize the projection matrix
///
public void Init()
{
Projection.Init();
}
///
/// call this to set the camera projection
///
///
public void SetCameraDatas(Camera camera)
{
camera.projectionMatrix = Projection.GetSetuppedMatrix();
}
}
}