geometry

package
v0.0.0-...-15a073e Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Box

type Box struct {
	Width, Height, Depth                                  float32
	NumWidthSegments, NumHeightSegments, NumDepthSegments int
}

Box is a rectangular cuboid centered around (0, 0, 0) with sizes Width, Height and Depth on the X, Y and Z axis respectively. Some control over the tesselation of each face is given through the number of segments on each direction.

func NewBox

func NewBox(width, height, depth float32, options ...BoxOptions) *Box

NewBox creates a new box.

func (*Box) GetMesh

func (b *Box) GetMesh() *dax.Mesh

GetMesh is part of the dax.Mesher interface.

type BoxOptions

type BoxOptions struct {
	NumWidthSegments, NumHeightSegments, NumDepthSegments int
}

BoxOptions contains optional parameters for the Box constructors.

type Sphere

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

func NewSphere

func NewSphere(radius float32, nVSegments, nHSegments int) *Sphere

func (*Sphere) GetMesh

func (s *Sphere) GetMesh() *dax.Mesh

func (*Sphere) Init

func (s *Sphere) Init(radius float32, nVSegments, nHSegments int)

func (*Sphere) InitFull

func (s *Sphere) InitFull(radius float32, nVSegments, nHSegments int,
	phiStart, phiLength, thetaStart, thetaLength float32)

Jump to

Keyboard shortcuts

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