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); }
public static void SubscribeSphere(RayTracingSphere sphere) { m_RayTracingSpheres.Add(sphere); }
public static void UnSubscribeSphere(RayTracingSphere sphere) { m_RayTracingSpheres.Remove(sphere); SphereWasRemoved = true; }