graphics

package
v0.0.0-...-72a9a6f Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LGNSegs = 4
	NSEGS   = 1 << LGNSegs
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ArcBall

type ArcBall struct {
	Radius float64
	// contains filtered or unexported fields
}

ArcBall is a basic camera control

func NewArcBall

func NewArcBall() *ArcBall

NewArcBall creates Ken's arc ball

func (*ArcBall) GetMatrix

func (ab *ArcBall) GetMatrix() *smath.Matrix4

GetMatrix returns the ball's equivalent matrix

func (*ArcBall) GetRotationFromAxisAngle

func (ab *ArcBall) GetRotationFromAxisAngle(aa *smath.AxisAngle)

GetRotationFromAxisAngle gets the arcball's rotation in radians.

func (*ArcBall) Mouse

func (ab *ArcBall) Mouse(mp *smath.Vector3)

Mouse incorporatea the given mouse position.

func (*ArcBall) Place

func (ab *ArcBall) Place(v *smath.Vector3, r float64)

Place sets the center and size of the controller.

func (*ArcBall) Update

func (ab *ArcBall) Update()

Update updates the arcball

Jump to

Keyboard shortcuts

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