Beispiel #1
0
 public override void Resize(int width, int height)
 {
     Projection = Mat4.CreatePerspective(Math.PI / 4, width / (float)height, 1f, 2 * _dist);
     //Projection = Mat4.CreateOrthographic(-width / 2.0, width / 2.0, -height / 2.0, height / 2.0, Near, Far) * Mat4.Scale(Scale);
 }
Beispiel #2
0
 public void Apply()
 {
     RenderState.ProjectionMatrix = Mat4.CreatePerspective(FOV, RenderState.Aspect, 1e-2, 1e3);
     RenderState.CameraMatrix     = Matrix;
 }
Beispiel #3
0
 public static void ViewPerspective(double fov)
 {
     ProjectionMatrix = Mat4.CreatePerspective(fov, Aspect, 1e-2, 1e3);
 }