Esempio n. 1
0
    public BVSphere(RayTracingSphere sphere)
    {
        Sphere      = sphere;
        AABB.center = sphere.Center;
        float r = sphere.Radius;

        AABB.extents = new Vector3(r, r, r);
    }
    public RayTracingSphere GetRayTracingSphere()
    {
        var myPlanet = GetPlanet();
        var color    = myPlanet.Color;

        var sphere = new RayTracingSphere();

        sphere.albedo   = new Vector3(color.r, color.g, color.b);
        sphere.specular = new Vector3(specularColor.r, specularColor.g, specularColor.b);
        sphere.radius   = myPlanet.Radius;
        sphere.position = myPlanet.Center;

        return(sphere);
    }
Esempio n. 3
0
 public static void SubscribeSphere(RayTracingSphere sphere)
 {
     m_RayTracingSpheres.Add(sphere);
 }
Esempio n. 4
0
 public static void UnSubscribeSphere(RayTracingSphere sphere)
 {
     m_RayTracingSpheres.Remove(sphere);
     SphereWasRemoved = true;
 }