Documentation
¶
Index ¶
- func ToHex(color color.Color, l float64) uint32
- type Image
- type Matrix4x4
- func IdentityMatrix() *Matrix4x4
- func PointAtMatrix(pos, target, up *Vector3d) *Matrix4x4
- func ProjectionMatrix(aspectRatio, fNear, fFar float64, fov float64) *Matrix4x4
- func TranslationMatrix(v *Vector3d) *Matrix4x4
- func XRotationMatrix(angle float64) *Matrix4x4
- func YRotationMatrix(angle float64) *Matrix4x4
- func ZRotationMatrix(angle float64) *Matrix4x4
- type Mesh
- type Plane
- type Triangle
- type Vector
- type Vector2d
- type Vector3d
- func (v1 *Vector3d) Add(v2 *Vector3d) *Vector3d
- func (v1 *Vector3d) CrossProduct(v2 *Vector3d) *Vector3d
- func (v *Vector3d) Div(k float64) *Vector3d
- func (v1 *Vector3d) DotProduct(v2 *Vector3d) float64
- func (v *Vector3d) Length() float64
- func (v *Vector3d) Mul(k float64) *Vector3d
- func (v1 *Vector3d) Negative() *Vector3d
- func (v *Vector3d) Normalize() *Vector3d
- func (v1 *Vector3d) Print()
- func (v1 *Vector3d) Sub(v2 *Vector3d) *Vector3d
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Matrix4x4 ¶
type Matrix4x4 struct {
M [4][4]float64
}
func IdentityMatrix ¶
func IdentityMatrix() *Matrix4x4
func PointAtMatrix ¶
func ProjectionMatrix ¶
func TranslationMatrix ¶
func XRotationMatrix ¶
func YRotationMatrix ¶
func ZRotationMatrix ¶
type Triangle ¶
type Triangle struct {
P [3]*Vector3d
T [3]*Vector2d
Color color.Color
Texture *Image
Luminance float64
}
func EmptyTriangle ¶
func EmptyTriangle() *Triangle
func NewTriangle ¶
type Vector3d ¶
type Vector3d struct {
X, Y, Z, W float64
}
func NewVector3d ¶
func (*Vector3d) CrossProduct ¶
func (*Vector3d) DotProduct ¶
Click to show internal directories.
Click to hide internal directories.