-
Notifications
You must be signed in to change notification settings - Fork 0
/
Scene.cs
57 lines (38 loc) · 1.7 KB
/
Scene.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using BlackHoleRaytracer.Equation;
using BlackHoleRaytracer.Hitable;
using System;
using System.Collections.Generic;
using System.Numerics;
namespace BlackHoleRaytracer
{
public class Scene
{
public Vector3 CameraPosition { get; }
public Vector3 CameraLookAt { get; }
public Vector3 UpVector { get; }
public float Fov { get; }
public double CameraDistance { get; }
public double CameraAngleHorz { get; }
public double CameraAngleVert { get; }
public double CameraTilt { get; }
public double CameraYaw { get; }
public List<IHitable> hitables { get; }
public SchwarzschildBlackHoleEquation SchwarzschildEquation { get; }
public KerrBlackHoleEquation KerrEquation { get; }
public Scene(Vector3 CameraPosition, Vector3 CameraLookAt, Vector3 UpVector, float Fov, List<IHitable> hitables, float CurvatureCoeff, float AngularMomentum)
{
this.CameraPosition = CameraPosition;
this.CameraLookAt = CameraLookAt;
this.UpVector = UpVector;
this.hitables = hitables;
this.Fov = Fov;
double tempR = 0, tempTheta = 0, tempPhi = 0;
Util.ToSpherical(CameraPosition.X, CameraPosition.Y, CameraPosition.Z, ref tempR, ref tempTheta, ref tempPhi);
CameraDistance = tempR;
CameraAngleVert = tempTheta;
CameraAngleHorz = tempPhi - 0.1;
SchwarzschildEquation = new SchwarzschildBlackHoleEquation(CurvatureCoeff);
KerrEquation = new KerrBlackHoleEquation(CameraDistance, CameraAngleHorz, CameraAngleVert, AngularMomentum);
}
}
}