Documentation ¶
Index ¶
- func GetRayColor(r *Ray, bgColor *Vec3, world Hittable, lights Hittable, depth int, ...) *Vec3
- type Box
- type Bvh
- type Camera
- type CheckerTexture2d
- type CheckerTexture3d
- type CosinePdf
- type Dielectric
- type DiffuseLight
- type FlipFace
- type HitRecord
- type Hittable
- type HittableList
- type HittablePdf
- type ImageTexture
- type Lambertian
- type Material
- type MeshBuilder
- type Metal
- type MixturePdf
- type MovingSphere
- type NoiseTexture
- type Pdf
- type RectXY
- type RectXZ
- type RectYZ
- type RotateY
- type ScatterRecord
- type SolidColor
- type Sphere
- type Texture
- type Translate
- type Triangle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRayColor ¶
Types ¶
type Bvh ¶
type Bvh struct {
// contains filtered or unexported fields
}
func MakeBvhFromList ¶
func MakeBvhFromList(list *HittableList, t0, t1 float64, r *RandExt) *Bvh
type CheckerTexture2d ¶
type CheckerTexture2d struct {
// contains filtered or unexported fields
}
func MakeCheckerTexture2d ¶
func MakeCheckerTexture2d(scale float64, odd, even *Vec3) *CheckerTexture2d
func (*CheckerTexture2d) GetValue ¶
func (this *CheckerTexture2d) GetValue(u, v float64, p *Point3) *Vec3
type CheckerTexture3d ¶
type CheckerTexture3d struct {
// contains filtered or unexported fields
}
func MakeCheckerTexture3d ¶
func MakeCheckerTexture3d(scale float64, odd, even *Vec3) *CheckerTexture3d
func (*CheckerTexture3d) GetValue ¶
func (this *CheckerTexture3d) GetValue(u, v float64, p *Point3) *Vec3
type CosinePdf ¶
type CosinePdf struct {
// contains filtered or unexported fields
}
func MakeCosinePdf ¶
func MakeCosinePdf(w *Vec3) *CosinePdf
type Dielectric ¶
type Dielectric struct {
// contains filtered or unexported fields
}
func MakeDielectric ¶
func MakeDielectric(ri float64) *Dielectric
func (*Dielectric) Emitted ¶
func (this *Dielectric) Emitted(u, v float64, p *Point3) *Vec3
func (*Dielectric) Scatter ¶
func (this *Dielectric) Scatter(r *Ray, rec *HitRecord, rng *RandExt) (bool, *ScatterRecord)
func (*Dielectric) ScatteringPDF ¶
type DiffuseLight ¶
type DiffuseLight struct {
// contains filtered or unexported fields
}
func MakeDiffuseLightFromColor ¶
func MakeDiffuseLightFromColor(c *Vec3) *DiffuseLight
func MakeDiffuseLightFromTexture ¶
func MakeDiffuseLightFromTexture(emit Texture) *DiffuseLight
func (*DiffuseLight) Emitted ¶
func (this *DiffuseLight) Emitted(u, v float64, p *Point3) *Vec3
func (*DiffuseLight) Scatter ¶
func (this *DiffuseLight) Scatter(r *Ray, rec *HitRecord, rng *RandExt) (bool, *ScatterRecord)
func (*DiffuseLight) ScatteringPDF ¶
type FlipFace ¶
type FlipFace struct {
// contains filtered or unexported fields
}
func MakeFlipFace ¶
type Hittable ¶
type Hittable interface {
// contains filtered or unexported methods
}
func MakeCubeMesh ¶
type HittableList ¶
type HittableList struct {
Objects []Hittable
}
type HittablePdf ¶
type HittablePdf struct {
// contains filtered or unexported fields
}
func MakeHittablePdf ¶
func MakeHittablePdf(obj Hittable, origin *Point3) *HittablePdf
type ImageTexture ¶
type ImageTexture struct {
// contains filtered or unexported fields
}
func MakeImageTexture ¶
func MakeImageTexture(path string) (*ImageTexture, error)
func (*ImageTexture) GetValue ¶
func (this *ImageTexture) GetValue(u, v float64, p *Point3) *Vec3
type Lambertian ¶
type Lambertian struct {
// contains filtered or unexported fields
}
func MakeLambertianSolidColor ¶
func MakeLambertianSolidColor(albedo *Vec3) *Lambertian
func MakeLambertianTexture ¶
func MakeLambertianTexture(t Texture) *Lambertian
func (*Lambertian) Emitted ¶
func (this *Lambertian) Emitted(u, v float64, p *Point3) *Vec3
func (*Lambertian) Scatter ¶
func (this *Lambertian) Scatter(r *Ray, rec *HitRecord, rng *RandExt) (bool, *ScatterRecord)
func (*Lambertian) ScatteringPDF ¶
func (this *Lambertian) ScatteringPDF(r *Ray, rec *HitRecord, scattered *Ray) float64
type MeshBuilder ¶
type MeshBuilder struct {
// contains filtered or unexported fields
}
func MakeMeshBuilder ¶
func MakeMeshBuilder() *MeshBuilder
func (*MeshBuilder) AddPosition ¶
func (this *MeshBuilder) AddPosition(p *Point3) int
func (*MeshBuilder) AddVertex ¶
func (this *MeshBuilder) AddVertex(pos int)
func (*MeshBuilder) BeginPolygon ¶
func (this *MeshBuilder) BeginPolygon()
func (*MeshBuilder) EndPolygon ¶
func (this *MeshBuilder) EndPolygon()
func (*MeshBuilder) GetTriMesh ¶
func (this *MeshBuilder) GetTriMesh(material Material, rng *RandExt) Hittable
type Metal ¶
type Metal struct {
// contains filtered or unexported fields
}
func (*Metal) Scatter ¶
func (this *Metal) Scatter(r *Ray, rec *HitRecord, rng *RandExt) (bool, *ScatterRecord)
func (*Metal) ScatteringPDF ¶
type MixturePdf ¶
type MixturePdf struct {
// contains filtered or unexported fields
}
func MakeMixturePdf ¶
func MakeMixturePdf(a, b Pdf) *MixturePdf
type MovingSphere ¶
type NoiseTexture ¶
type NoiseTexture struct {
// contains filtered or unexported fields
}
func MakeNoiseTexture ¶
func MakeNoiseTexture(scale float64, r *RandExt) *NoiseTexture
func (*NoiseTexture) GetValue ¶
func (this *NoiseTexture) GetValue(u, v float64, p *Point3) *Vec3
type RectXY ¶
type RectXY struct { Material // contains filtered or unexported fields }
func MakeRectXY ¶
type RectXZ ¶
type RectXZ struct { Material // contains filtered or unexported fields }
func MakeRectXZ ¶
type RectYZ ¶
type RectYZ struct { Material // contains filtered or unexported fields }
func MakeRectYZ ¶
type ScatterRecord ¶
type ScatterRecord struct {
// contains filtered or unexported fields
}
type SolidColor ¶
type SolidColor struct {
// contains filtered or unexported fields
}
func MakeSolidColor ¶
func MakeSolidColor(color *Vec3) *SolidColor
func (*SolidColor) GetValue ¶
func (this *SolidColor) GetValue(u, v float64, p *Point3) *Vec3
type Translate ¶
type Translate struct {
// contains filtered or unexported fields
}
func MakeTranslate ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.