vmath

package
v0.0.0-...-03afc55 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2015 License: Apache-2.0 Imports: 3 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LengthSquared

func LengthSquared(v mgl32.Vec3) float32

Types

type AABB

type AABB struct {
	Min mgl32.Vec3
	Max mgl32.Vec3
}

func NewAABB

func NewAABB(x1, y1, z1, x2, y2, z2 float32) AABB

func (AABB) Grow

func (a AABB) Grow(x, y, z float32) AABB

func (AABB) Intersects

func (a AABB) Intersects(o AABB) bool

func (AABB) IntersectsLine

func (a AABB) IntersectsLine(origin, dir mgl32.Vec3) (mgl32.Vec3, bool)

func (AABB) MoveOutOf

func (a AABB) MoveOutOf(o AABB, dir mgl32.Vec3) AABB

func (AABB) RotateX

func (a AABB) RotateX(an, ox, oy, oz float32) AABB

func (AABB) RotateY

func (a AABB) RotateY(an, ox, oy, oz float32) AABB

func (AABB) Shift

func (a AABB) Shift(x, y, z float32) AABB

func (AABB) String

func (a AABB) String() string

type Frustum

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

func NewFrustum

func NewFrustum() *Frustum

func (*Frustum) IsAABBInside

func (f *Frustum) IsAABBInside(aabb AABB) bool

func (*Frustum) IsSphereInside

func (f *Frustum) IsSphereInside(x, y, z, radius float32) bool

func (*Frustum) SetCamera

func (f *Frustum) SetCamera(p, l, u mgl32.Vec3)

func (*Frustum) SetPerspective

func (f *Frustum) SetPerspective(fovy, aspect, near, far float32)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL