Documentation ¶
Index ¶
Constants ¶
View Source
const MAX_RECURSION int = 2
View Source
const REFRACTION_INDEX_AIR float32 = 1.0
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CameraConfig ¶
type Engine ¶
type Engine interface { // Return closest object intersecting ray if any, nil otherwise. // If there is an intersection, also return distance to ray origin FindClosestObject(ray *scene.Ray) (*scene.Traceable, float32) // Return whether ray hits any object. This is an optimization for the // shadow calculations, where the search can be aborted as soon as any // occluding object is found FindOccluder(ray *scene.Ray, lightDistance float32) bool }
type RayTracer ¶
type RayTracer struct {
Width, Height int
Camera CameraConfig
Scene *Scene
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.