core

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Core

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

func NewCore

func NewCore(lib uintptr) (c *Core, err error)

func (*Core) GetCanvasInfo

func (c *Core) GetCanvasInfo(modelPtr uintptr) (size drawable.Vector2, origin drawable.Vector2, pixelsPerUnit float32)

Get the canvas info

func (*Core) GetDrawables

func (c *Core) GetDrawables(modelPtr uintptr) (ds []drawable.Drawable)

Get Drawables Since all the information is gathered, the cost is high. It is expected to be called only once initially

func (*Core) GetDynamicFlags

func (c *Core) GetDynamicFlags(modelPtr uintptr) (rs []drawable.DynamicFlag)

Get dynamic flags

func (*Core) GetOpacities

func (c *Core) GetOpacities(modelPtr uintptr) (rs []float32)

Get opacities

func (*Core) GetParameterValue

func (c *Core) GetParameterValue(modelPtr uintptr, id string) float32

Get parameter value

func (*Core) GetParameters

func (c *Core) GetParameters(modelPtr uintptr) (parameters []parameter.Parameter)

Get parameters

func (*Core) GetPartIds

func (c *Core) GetPartIds(modelPtr uintptr) (ids []string)

Get the part IDs

func (*Core) GetSortedDrawableIndices

func (c *Core) GetSortedDrawableIndices(modelPtr uintptr) (rs []int)

Get the drawing order The index of the n-th drawable to be drawn can be obtained with rs[n].

func (*Core) GetVersion

func (c *Core) GetVersion() string

Get version

func (*Core) GetVertexPositions

func (c *Core) GetVertexPositions(modelPtr uintptr) (vps [][]drawable.Vector2)

Get vertex positions

func (*Core) LoadMoc

func (c *Core) LoadMoc(path string) (moc moc.Moc, err error)

Load moc3 and return moc.Moc

func (*Core) SetParameterValue

func (c *Core) SetParameterValue(modelPtr uintptr, id string, value float32)

Set parameter value

func (*Core) SetPartOpacity

func (c *Core) SetPartOpacity(modelPtr uintptr, id string, value float32)

Set the part's opacity

func (*Core) Update

func (c *Core) Update(modelPtr uintptr)

Update the model

Jump to

Keyboard shortcuts

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