Documentation ¶
Index ¶
- func CastRay(x, y int, invWidth, invHeight, aspectRatio, angle float64, config *Config) (color.Color, error)
- func RenderImage(config *Config, fieldOfView float64) (image.Image, error)
- type Camera
- type Config
- type Image
- type Scene
- type Sphere
- type Vector3
- func (v Vector3) Add(v2 Vector3) Vector3
- func (v Vector3) DotProduct(v2 Vector3) float64
- func (v Vector3) Length() float64
- func (v Vector3) LengthSquared() float64
- func (v Vector3) Multiply(v2 Vector3) Vector3
- func (v Vector3) Negate(v2 Vector3) Vector3
- func (v Vector3) Normalize() Vector3
- func (v Vector3) ScalarMultiply(f float64) Vector3
- func (v Vector3) String() (string, error)
- func (v Vector3) Subtract(v2 Vector3) Vector3
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Sphere ¶
type Sphere struct { Center Vector3 `json:"center"` Radius float64 `json:"radius"` SurfaceColor Vector3 `json:"surfaceColor"` EmitColor Vector3 `json:"emitColor"` Transparency float64 `json:"transparency"` Reflection float64 `json:"reflection"` }
func (*Sphere) RadiusSquared ¶
type Vector3 ¶
func (Vector3) DotProduct ¶
func (Vector3) LengthSquared ¶
func (Vector3) ScalarMultiply ¶
Click to show internal directories.
Click to hide internal directories.