Documentation ¶
Index ¶
- Variables
- type AnnealCallback
- type Annealable
- type Axis
- type Item
- type Model
- func (m *Model) Add(mesh *fauxgl.Mesh, detail, count int, spacing float64, ...)
- func (m *Model) BoundingBox() fauxgl.Box
- func (m *Model) Copy() Annealable
- func (m *Model) DoMove(singleStlSize []fauxgl.Vector, frameSize fauxgl.Vector, packItemNum int) (Undo, int)
- func (m *Model) Energy() float64
- func (m *Model) Mesh() *fauxgl.Mesh
- func (m *Model) Meshes() []*fauxgl.Mesh
- func (m *Model) Pack(iterations int, callback AnnealCallback, singleStlSize []fauxgl.Vector, ...) (*Model, int)
- func (m *Model) Reset()
- func (m *Model) Transformation() []fauxgl.Matrix
- func (m *Model) TreeMesh() *fauxgl.Mesh
- func (m *Model) TreeMeshes() []*fauxgl.Mesh
- func (m *Model) UndoMove(undo Undo)
- func (m *Model) ValidBound(i int, singleStlSize []fauxgl.Vector, frameSize fauxgl.Vector) bool
- func (m *Model) ValidChange(i int) bool
- func (m *Model) Volume() float64
- type Node
- type Tree
- type Undo
Constants ¶
This section is empty.
Variables ¶
View Source
var AxisXRotations []fauxgl.Matrix
View Source
var AxisYRotations []fauxgl.Matrix
View Source
var AxisZRotations []fauxgl.Matrix
Functions ¶
This section is empty.
Types ¶
type AnnealCallback ¶
type AnnealCallback func(Annealable)
type Annealable ¶
type Annealable interface { Energy() float64 DoMove([]fauxgl.Vector, fauxgl.Vector, int) (Undo, int) UndoMove(Undo) Copy() Annealable }
func Anneal ¶
func Anneal(state Annealable, maxTemp, minTemp float64, steps int, callback AnnealCallback, singleStlSize []fauxgl.Vector, frameSize fauxgl.Vector, packItemNum int) (Annealable, int)
type Item ¶
type Model ¶
func (*Model) BoundingBox ¶
func (*Model) Copy ¶
func (m *Model) Copy() Annealable
func (*Model) Transformation ¶
This function will return the tranformation matrices of all items
func (*Model) TreeMeshes ¶
func (*Model) ValidBound ¶
True if the passed move it within maximum_packing_area, false in all other cases.
func (*Model) ValidChange ¶
This function is to make sure no intersection between objects
Click to show internal directories.
Click to hide internal directories.