Documentation ¶
Index ¶
- func RenderToFile(maxRayBounce, samplesPerPixel, imageWidth int, hittables []Hittable, ...) error
- type BVHNode
- type Camera
- type HitList
- type HitRecord
- type Hittable
- type Material
- type Mesh
- func (m Mesh) BoundingBox(startTime, endTime float64) *geometry.AABB
- func (s Mesh) GetMaterial() Material
- func (s Mesh) Hit(ray *TemporalRay, minDistance, maxDistance float64, hitRecord *HitRecord) bool
- func (s Mesh) Hit2(ray *TemporalRay, minDistance, maxDistance float64, hitRecord *HitRecord) bool
- type SortBoxByXAxis
- type SortBoxByYAxis
- type SortBoxByZAxis
- type Sphere
- type TemporalRay
- type Texture
- type Tree
- type Triangle
- type XYRectangle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BVHNode ¶
type BVHNode struct {
// contains filtered or unexported fields
}
func NewBVHTree ¶
func (BVHNode) BoundingBox ¶
type Camera ¶
type Camera struct {
// contains filtered or unexported fields
}
func NewDefaultCamera ¶ added in v0.4.0
type HitRecord ¶
type HitRecord struct { Distance float64 Point vector3.Float64 Normal vector3.Float64 FrontFace bool Material Material UV vector2.Float64 Float3Data map[string]vector3.Float64 Float2Data map[string]vector2.Float64 }
func NewHitRecord ¶
func NewHitRecord() *HitRecord
func (*HitRecord) SetFaceNormal ¶
func (h *HitRecord) SetFaceNormal(ray TemporalRay, outwardNormal vector3.Float64)
type Mesh ¶
type Mesh struct {
// contains filtered or unexported fields
}
func NewMeshWithAttributes ¶ added in v0.4.0
func (Mesh) GetMaterial ¶
type SortBoxByXAxis ¶
type SortBoxByXAxis []Hittable
func (SortBoxByXAxis) Len ¶
func (a SortBoxByXAxis) Len() int
func (SortBoxByXAxis) Less ¶
func (a SortBoxByXAxis) Less(i, j int) bool
func (SortBoxByXAxis) Swap ¶
func (a SortBoxByXAxis) Swap(i, j int)
type SortBoxByYAxis ¶
type SortBoxByYAxis []Hittable
func (SortBoxByYAxis) Len ¶
func (a SortBoxByYAxis) Len() int
func (SortBoxByYAxis) Less ¶
func (a SortBoxByYAxis) Less(i, j int) bool
func (SortBoxByYAxis) Swap ¶
func (a SortBoxByYAxis) Swap(i, j int)
type SortBoxByZAxis ¶
type SortBoxByZAxis []Hittable
func (SortBoxByZAxis) Len ¶
func (a SortBoxByZAxis) Len() int
func (SortBoxByZAxis) Less ¶
func (a SortBoxByZAxis) Less(i, j int) bool
func (SortBoxByZAxis) Swap ¶
func (a SortBoxByZAxis) Swap(i, j int)
type Sphere ¶
type Sphere struct {
// contains filtered or unexported fields
}
func NewAnimatedSphere ¶
func NewAnimatedSphere(radius float64, mat Material, animation sample.FloatToVec3) *Sphere
func (Sphere) GetMaterial ¶
type TemporalRay ¶
type TemporalRay struct {
// contains filtered or unexported fields
}
func NewTemporalRay ¶
func (TemporalRay) Direction ¶
func (r TemporalRay) Direction() vector3.Float64
func (TemporalRay) Origin ¶
func (r TemporalRay) Origin() vector3.Float64
func (TemporalRay) Ray ¶
func (r TemporalRay) Ray() geometry.Ray
type XYRectangle ¶
type XYRectangle struct {
// contains filtered or unexported fields
}
func NewXYRectangle ¶
func NewXYRectangle(bottomLeft, topRight vector2.Float64, depth float64, mat Material) XYRectangle
func (XYRectangle) BoundingBox ¶
func (xyr XYRectangle) BoundingBox(startTime, endTime float64) *geometry.AABB
func (XYRectangle) Hit ¶
func (xyr XYRectangle) Hit(ray *TemporalRay, minDistance, maxDistance float64, hitRecord *HitRecord) bool
Source Files ¶
Click to show internal directories.
Click to hide internal directories.