imguizmo

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowAxisFlip

func AllowAxisFlip(value bool)

func BeginFrame

func BeginFrame()

func DecomposeMatrixToComponents

func DecomposeMatrixToComponents(matrix, translation, rotation, scale *float32)

func DrawCubes

func DrawCubes(view, projection, matrices *float32, matrixCount int32)

func DrawGrid

func DrawGrid(view, projection, matrix *float32, gridSize float32)

func Enable

func Enable(enable bool)

func GetIDPtr

func GetIDPtr(ptr_id uintptr) imgui.ID

func GetIDStr

func GetIDStr(str_id string) imgui.ID

calculate unique ID (hash of whole ID stack + given parameter). e.g. if you want to query into ImGuiStorage yourself

func GetIDStrStr

func GetIDStrStr(str_id_begin, str_id_end string) imgui.ID

func IsOver

func IsOver() bool

func IsOverFloatPtr

func IsOverFloatPtr(position *float32, pixelRadius float32) bool

func IsOverOPERATION

func IsOverOPERATION(op OPERATION) bool

func IsUsing

func IsUsing() bool

func IsUsingAny

func IsUsingAny() bool

func IsUsingViewManipulate

func IsUsingViewManipulate() bool

func IsViewManipulateHovered added in v1.2.0

func IsViewManipulateHovered() bool

func Manipulate

func Manipulate(view, projection *float32, operation OPERATION, mode MODE, matrix *float32) bool

func ManipulateV

func ManipulateV(view, projection *float32, operation OPERATION, mode MODE, matrix, deltaMatrix, snap, localBounds, boundsSnap *float32) bool

ManipulateV parameter default value hint: deltaMatrix: NULL snap: NULL localBounds: NULL boundsSnap: NULL

func PopID

func PopID()

pop from the ID stack.

func PushIDInt

func PushIDInt(int_id int32)

push integer into the ID stack (will hash integer).

func PushIDPtr

func PushIDPtr(ptr_id uintptr)

push pointer into the ID stack (will hash pointer).

func PushIDStr

func PushIDStr(str_id string)

push string into the ID stack (will hash string).

func PushIDStrStr

func PushIDStrStr(str_id_begin, str_id_end string)

push string into the ID stack (will hash string).

func RecomposeMatrixFromComponents

func RecomposeMatrixFromComponents(translation, rotation, scale, matrix *float32)

func SetAlternativeWindow

func SetAlternativeWindow(window *imgui.Window)

func SetAxisLimit

func SetAxisLimit(value float32)

func SetAxisMask

func SetAxisMask(x, y, z bool)

func SetDrawlist

func SetDrawlist()

func SetDrawlistV

func SetDrawlistV(drawlist *imgui.DrawList)

SetDrawlistV parameter default value hint: drawlist: nullptr

func SetGizmoSizeClipSpace

func SetGizmoSizeClipSpace(value float32)

func SetID

func SetID(id int32)

func SetImGuiContext

func SetImGuiContext(ctx *imgui.Context)

func SetOrthographic

func SetOrthographic(isOrthographic bool)

func SetPlaneLimit

func SetPlaneLimit(value float32)

func SetRect

func SetRect(x, y, width, height float32)

func ViewManipulateFloat

func ViewManipulateFloat(view *float32, length float32, position, size imgui.Vec2, backgroundColor uint32)

func ViewManipulateFloatPtr

func ViewManipulateFloatPtr(view, projection *float32, operation OPERATION, mode MODE, matrix *float32, length float32, position, size imgui.Vec2, backgroundColor uint32)

Types

type COLOR

type COLOR int32

original name: COLOR

const (
	// directionColor[0]
	DIRECTIONX COLOR = 0
	// directionColor[1]
	DIRECTIONY COLOR = 1
	// directionColor[2]
	DIRECTIONZ COLOR = 2
	// planeColor[0]
	PLANEX COLOR = 3
	// planeColor[1]
	PLANEY COLOR = 4
	// planeColor[2]
	PLANEZ COLOR = 5
	// selectionColor
	SELECTION COLOR = 6
	// inactiveColor
	INACTIVE COLOR = 7
	// translationLineColor
	TRANSLATIONLINE     COLOR = 8
	SCALELINE           COLOR = 9
	ROTATIONUSINGBORDER COLOR = 10
	ROTATIONUSINGFILL   COLOR = 11
	HATCHEDAXISLINES    COLOR = 12
	TEXT                COLOR = 13
	TEXTSHADOW          COLOR = 14
	COUNT               COLOR = 15
)

type MODE

type MODE int32

original name: MODE

const (
	LOCAL MODE = 0
	WORLD MODE = 1
)

type OPERATION

type OPERATION int32

call it when you want a gizmo Needs view and projection matrices. matrix parameter is the source matrix (where will be gizmo be drawn) and might be transformed by the function. Return deltaMatrix is optional translation is applied in world space original name: OPERATION

const (
	TRANSLATEX   OPERATION = 1
	TRANSLATEY   OPERATION = 2
	TRANSLATEZ   OPERATION = 4
	ROTATEX      OPERATION = 8
	ROTATEY      OPERATION = 16
	ROTATEZ      OPERATION = 32
	ROTATESCREEN OPERATION = 64
	SCALEX       OPERATION = 128
	SCALEY       OPERATION = 256
	SCALEZ       OPERATION = 512
	BOUNDS       OPERATION = 1024
	SCALEXU      OPERATION = 2048
	SCALEYU      OPERATION = 4096
	SCALEZU      OPERATION = 8192
	TRANSLATE    OPERATION = 7
	ROTATE       OPERATION = 120
	SCALE        OPERATION = 896
	// universal
	SCALEU    OPERATION = 14336
	UNIVERSAL OPERATION = 14463
)

type Style

type Style struct {
	CData *C.Style
}

func GetStyle

func GetStyle() *Style

func NewEmptyStyle added in v1.2.0

func NewEmptyStyle() *Style

NewEmptyStyle creates Style with its 0 value.

func NewStyle

func NewStyle() *Style

func NewStyleFromC

func NewStyleFromC[SRC any](cvalue SRC) *Style

NewStyleFromC creates Style from its C pointer. SRC ~= *C.Style

func (Style) C

func (self Style) C() (C.Style, func())

C is like Handle but returns plain type instead of pointer.

func (*Style) CenterCircleSize

func (self *Style) CenterCircleSize() float32

func (*Style) Colors

func (self *Style) Colors() [15]imgui.Vec4

func (*Style) Destroy

func (self *Style) Destroy()

func (*Style) Handle

func (self *Style) Handle() (result *C.Style, fin func())

Handle returns C version of Style and its finalizer func.

func (*Style) HatchedAxisLineThickness

func (self *Style) HatchedAxisLineThickness() float32

func (*Style) RotationLineThickness

func (self *Style) RotationLineThickness() float32

func (*Style) RotationOuterLineThickness

func (self *Style) RotationOuterLineThickness() float32

func (*Style) ScaleLineCircleSize

func (self *Style) ScaleLineCircleSize() float32

func (*Style) ScaleLineThickness

func (self *Style) ScaleLineThickness() float32

func (Style) SetCenterCircleSize

func (self Style) SetCenterCircleSize(v float32)

func (Style) SetColors

func (self Style) SetColors(v *[15]imgui.Vec4)

func (Style) SetHatchedAxisLineThickness

func (self Style) SetHatchedAxisLineThickness(v float32)

func (Style) SetRotationLineThickness

func (self Style) SetRotationLineThickness(v float32)

func (Style) SetRotationOuterLineThickness

func (self Style) SetRotationOuterLineThickness(v float32)

func (Style) SetScaleLineCircleSize

func (self Style) SetScaleLineCircleSize(v float32)

func (Style) SetScaleLineThickness

func (self Style) SetScaleLineThickness(v float32)

func (Style) SetTranslationLineArrowSize

func (self Style) SetTranslationLineArrowSize(v float32)

func (Style) SetTranslationLineThickness

func (self Style) SetTranslationLineThickness(v float32)

func (*Style) TranslationLineArrowSize

func (self *Style) TranslationLineArrowSize() float32

func (*Style) TranslationLineThickness

func (self *Style) TranslationLineThickness() float32

Jump to

Keyboard shortcuts

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