vol: github.com/fogleman/vol Index | Files

package vol

import "github.com/fogleman/vol"

Index

Package Files

matrix.go render.go util.go vector.go

func LoadImage Uses

func LoadImage(path string) (image.Image, error)

func Render Uses

func Render(images []image.Image, windows []Window, matrix Matrix, width, height, samples int, zScale float64) image.Image

func SavePNG Uses

func SavePNG(path string, im image.Image) error

type Matrix Uses

type Matrix struct {
    // contains filtered or unexported fields
}

func Frustum Uses

func Frustum(l, r, b, t, n, f float64) Matrix

func Identity Uses

func Identity() Matrix

func LookAt Uses

func LookAt(eye, center, up Vector) Matrix

func Orthographic Uses

func Orthographic(l, r, b, t, n, f float64) Matrix

func Perspective Uses

func Perspective(fovy, aspect, near, far float64) Matrix

func Rotate Uses

func Rotate(v Vector, a float64) Matrix

func Scale Uses

func Scale(v Vector) Matrix

func Translate Uses

func Translate(v Vector) Matrix

func (Matrix) Determinant Uses

func (a Matrix) Determinant() float64

func (Matrix) Frustum Uses

func (m Matrix) Frustum(l, r, b, t, n, f float64) Matrix

func (Matrix) Inverse Uses

func (a Matrix) Inverse() Matrix

func (Matrix) Mul Uses

func (a Matrix) Mul(b Matrix) Matrix

func (Matrix) MulDirection Uses

func (a Matrix) MulDirection(b Vector) Vector

func (Matrix) MulPosition Uses

func (a Matrix) MulPosition(b Vector) Vector

func (Matrix) MulPositionW Uses

func (a Matrix) MulPositionW(b Vector) Vector

func (Matrix) Orthographic Uses

func (m Matrix) Orthographic(l, r, b, t, n, f float64) Matrix

func (Matrix) Perspective Uses

func (m Matrix) Perspective(fovy, aspect, near, far float64) Matrix

func (Matrix) Rotate Uses

func (m Matrix) Rotate(v Vector, a float64) Matrix

func (Matrix) Scale Uses

func (m Matrix) Scale(v Vector) Matrix

func (Matrix) Translate Uses

func (m Matrix) Translate(v Vector) Matrix

func (Matrix) Transpose Uses

func (a Matrix) Transpose() Matrix

type Vector Uses

type Vector struct {
    X, Y, Z float64
}

func RandomUnitVector Uses

func RandomUnitVector(rnd *rand.Rand) Vector

func V Uses

func V(x, y, z float64) Vector

func (Vector) Add Uses

func (a Vector) Add(b Vector) Vector

func (Vector) AddScalar Uses

func (a Vector) AddScalar(b float64) Vector

func (Vector) Cross Uses

func (a Vector) Cross(b Vector) Vector

func (Vector) Div Uses

func (a Vector) Div(b Vector) Vector

func (Vector) DivScalar Uses

func (a Vector) DivScalar(b float64) Vector

func (Vector) Dot Uses

func (a Vector) Dot(b Vector) float64

func (Vector) Length Uses

func (a Vector) Length() float64

func (Vector) Max Uses

func (a Vector) Max(b Vector) Vector

func (Vector) Min Uses

func (a Vector) Min(b Vector) Vector

func (Vector) Mul Uses

func (a Vector) Mul(b Vector) Vector

func (Vector) MulScalar Uses

func (a Vector) MulScalar(b float64) Vector

func (Vector) Normalize Uses

func (a Vector) Normalize() Vector

func (Vector) Sub Uses

func (a Vector) Sub(b Vector) Vector

func (Vector) SubScalar Uses

func (a Vector) SubScalar(b float64) Vector

type Window Uses

type Window struct {
    Lo, Hi float64
    Color  color.Color
}

Package vol imports 8 packages (graph). Updated 2017-04-14. Refresh now. Tools for package owners.