Documentation
¶
Index ¶
- Constants
- func Vector2Color(a Vector) color.RGBA
- type Box
- type Camera
- type Material
- type Object3D
- type Octree
- type Ray
- type Sphere
- type Transformation
- type Vector
- func (a Vector) Add(b Vector) (result Vector)
- func (a Vector) Cross(b Vector) (result Vector)
- func (a Vector) Dot(b Vector) float64
- func (a Vector) Extend(k float64) (result Vector)
- func (a Vector) Multiply(b Vector) (result Vector)
- func (a Vector) Norma() (nrma float64)
- func (a Vector) Normalize() (result Vector)
- func (a Vector) Scale(k float64) (result Vector)
- func (a Vector) Sub(b Vector) (result Vector)
- func (a Vector) Transform(transformMatrix Transformation) (result Vector)
- type VisibleObject
Constants ¶
View Source
const ERROR = 0.00001
Variables ¶
This section is empty.
Functions ¶
func Vector2Color ¶
Types ¶
type Camera ¶
type Camera struct {
// contains filtered or unexported fields
}
func (Camera) GetDistanceFromScreen ¶
func (Camera) GetLookAt ¶
func (camera Camera) GetLookAt(target Vector) Transformation
type Object3D ¶
type Object3D interface {
Intersect(ray Ray) (Ray, float64, bool)
Transform(transformMatrix Transformation)
}
type Ray ¶
type Ray struct {
// contains filtered or unexported fields
}
func (Ray) DiffuseReflection ¶
func (Ray) GetDirection ¶
func (Ray) GetRayPoint ¶
func (Ray) SpecularReflection ¶
type Sphere ¶
type Sphere struct {
// contains filtered or unexported fields
}
func (*Sphere) Transform ¶
func (sphere *Sphere) Transform(transformMatrix Transformation)
type Transformation ¶
type Transformation [4][4]float64
func (Transformation) Combine ¶
func (a Transformation) Combine(b Transformation) (result Transformation)
type Vector ¶
type Vector struct {
// contains filtered or unexported fields
}
func Color2Vector ¶
func (Vector) Transform ¶
func (a Vector) Transform(transformMatrix Transformation) (result Vector)
type VisibleObject ¶
Click to show internal directories.
Click to hide internal directories.