Documentation ¶
Index ¶
- func IsCCW(v0 V2d, v1 V2d, v2 V2d) bool
- func IsPointInside(p V2d, v0 V2d, v1 V2d, v2 V2d) bool
- func NewShaderFor2DAxes(rc gigl.GLRenderingContext) gigl.GLShader
- func NewShaderForInstancePoseColor(rc gigl.GLRenderingContext) gigl.GLShader
- func NewShaderForMaterialColors(rc gigl.GLRenderingContext) gigl.GLShader
- func NewShaderForMaterialTexture(rc gigl.GLRenderingContext) gigl.GLShader
- func SelectPoseByWorldXY(sobj *SceneObject)
- type BBox
- type Camera
- func (self *Camera) ApplyBoundingBox(position bool, zoomlevel bool) *Camera
- func (self *Camera) IsPointVisible(wxy [2]float32) bool
- func (self *Camera) ProjectWorldToCanvas(wxy [2]float32) [2]int
- func (self *Camera) ProjectWorldToClip(wxy [2]float32) [2]float32
- func (self *Camera) Rotate(angle_in_degree float32) *Camera
- func (self *Camera) SetAspectRatio(width int, height int) *Camera
- func (self *Camera) SetBoundingBox(bbox [2][2]float32) *Camera
- func (self *Camera) SetFov(fov float32) *Camera
- func (self *Camera) SetPose(cx float32, cy float32, angle_in_degree float32) *Camera
- func (self *Camera) SetZoom(zoom float32) *Camera
- func (self *Camera) Summary() string
- func (self *Camera) Translate(tx float32, ty float32) *Camera
- func (self *Camera) UnprojectCanvasDeltaToWorld(deltaxy [2]int) [2]float32
- func (self *Camera) UnprojectCanvasToWorld(canvasxy [2]int) [2]float32
- type Geometry
- func NewGeometry() *Geometry
- func NewGeometryArrow() *Geometry
- func NewGeometryArrowHead() *Geometry
- func NewGeometryOrigin() *Geometry
- func NewGeometryPolygon(n int, radius float32, starting_angle_in_degree float32) *Geometry
- func NewGeometryRectangle(size float32) *Geometry
- func NewGeometryTriangle(size float32) *Geometry
- func (self *Geometry) AddEdge(edge []uint32) uint32
- func (self *Geometry) AddFace(face []uint32) uint32
- func (self *Geometry) AddTextureUV(tuv []float32) *Geometry
- func (self *Geometry) AddVertex(coords [2]float32) uint32
- func (self *Geometry) AppyMatrix(matrix *common.Matrix3) *Geometry
- func (self *Geometry) BuildDataBuffers(for_points bool, for_lines bool, for_faces bool)
- func (self *Geometry) BuildDataBuffersForWireframe()
- func (self *Geometry) Clear(geom bool, data_buf bool, webgl_buf bool) *Geometry
- func (self *Geometry) GetIdxBuffer(mode int) []uint32
- func (self *Geometry) GetIdxBufferCount(mode int) int
- func (self *Geometry) GetVtxBuffer(draw_mode int) []float32
- func (self *Geometry) GetVtxBufferInfo(draw_mode int) [5]int
- func (self *Geometry) HasTextureFor(mode string) bool
- func (self *Geometry) IsDataBufferReady() bool
- func (self *Geometry) IsVtxBufferRebuiltForFaces() bool
- func (self *Geometry) Merge(g *Geometry) *Geometry
- func (self *Geometry) Rotate(angle_in_degree float32) *Geometry
- func (self *Geometry) Scale(sx float32, sy float32) *Geometry
- func (self *Geometry) SetEdges(edges [][]uint32) *Geometry
- func (self *Geometry) SetFaces(faces [][]uint32) *Geometry
- func (self *Geometry) SetTextureUVs(tuvs [][]float32) *Geometry
- func (self *Geometry) SetVertices(vertices [][2]float32) *Geometry
- func (self *Geometry) String() string
- func (self *Geometry) Summary() string
- func (self *Geometry) Translate(tx float32, ty float32) *Geometry
- type MaterialAlphabetTexture
- func (self *MaterialAlphabetTexture) GetAlaphabetCharacterIndex(c rune) int
- func (self *MaterialAlphabetTexture) GetAlaphabetCharacterWH(scale float32) [2]float32
- func (self *MaterialAlphabetTexture) GetAlaphabetLength() int
- func (self *MaterialAlphabetTexture) GetAlphabetString() string
- func (self *MaterialAlphabetTexture) GetFontColor() string
- func (self *MaterialAlphabetTexture) GetFontFamily() string
- func (self *MaterialAlphabetTexture) GetFontOutlined() bool
- func (self *MaterialAlphabetTexture) GetFontSize() int
- func (self *MaterialAlphabetTexture) GetTexture() any
- func (self *MaterialAlphabetTexture) GetTexturePixbuf() []uint8
- func (self *MaterialAlphabetTexture) GetTextureRGB() [3]float32
- func (self *MaterialAlphabetTexture) GetTextureWH() [2]int
- func (self *MaterialAlphabetTexture) IsLoaded() bool
- func (self *MaterialAlphabetTexture) IsLoading() bool
- func (self *MaterialAlphabetTexture) IsReady() bool
- func (self *MaterialAlphabetTexture) LoadAlphabetTexture()
- func (self *MaterialAlphabetTexture) MaterialSummary() string
- func (self *MaterialAlphabetTexture) SetAlphabetWH(wh [2]float32)
- func (self *MaterialAlphabetTexture) SetError(err error)
- func (self *MaterialAlphabetTexture) SetTexture(texture any)
- func (self *MaterialAlphabetTexture) SetTextureRGB(color any)
- func (self *MaterialAlphabetTexture) SetTextureWH(wh [2]int)
- type MaterialColors
- type MaterialGlowTexture
- func (self *MaterialGlowTexture) GetTexture() any
- func (self *MaterialGlowTexture) GetTexturePixbuf() []uint8
- func (self *MaterialGlowTexture) GetTextureRGB() [3]float32
- func (self *MaterialGlowTexture) GetTextureWH() [2]int
- func (self *MaterialGlowTexture) IsLoaded() bool
- func (self *MaterialGlowTexture) IsLoading() bool
- func (self *MaterialGlowTexture) IsReady() bool
- func (self *MaterialGlowTexture) LoadGlowTexture()
- func (self *MaterialGlowTexture) MaterialSummary() string
- func (self *MaterialGlowTexture) SetTexture(texture any)
- func (self *MaterialGlowTexture) SetTextureRGB(color any)
- type MaterialTexture
- func (self *MaterialTexture) GetTexture() any
- func (self *MaterialTexture) GetTexturePixbuf() []uint8
- func (self *MaterialTexture) GetTextureRGB() [3]float32
- func (self *MaterialTexture) GetTextureWH() [2]int
- func (self *MaterialTexture) IsLoaded() bool
- func (self *MaterialTexture) IsLoading() bool
- func (self *MaterialTexture) IsReady() bool
- func (self *MaterialTexture) LoadTextureFromLocalFile()
- func (self *MaterialTexture) LoadTextureFromRemoteServer()
- func (self *MaterialTexture) MaterialSummary() string
- func (self *MaterialTexture) SetTexture(texture any)
- func (self *MaterialTexture) SetTextureRGB(color any)
- type Overlay
- type OverlayLabel
- func (self *OverlayLabel) SetBackground(bkgtype string) *OverlayLabel
- func (self *OverlayLabel) SetCharacterWH(chwh [2]float32) *OverlayLabel
- func (self *OverlayLabel) SetPose(rotation float32, offset_reference string, offset [2]float32) *OverlayLabel
- func (self *OverlayLabel) String(chwh [2]float32) string
- type OverlayLabelLayer
- func (self *OverlayLabelLayer) AddLabel(labels ...*OverlayLabel) *OverlayLabelLayer
- func (self *OverlayLabelLayer) AddLabelsForTest() *OverlayLabelLayer
- func (self *OverlayLabelLayer) AddTextLabel(label_text string, xy [2]float32, color string, offref string) *OverlayLabel
- func (self *OverlayLabelLayer) CreateLabel(label_text string, xy [2]float32, color string) *OverlayLabel
- func (self *OverlayLabelLayer) FindLabel(label_text string) *OverlayLabel
- func (self *OverlayLabelLayer) Render(pvm *common.Matrix3)
- func (self *OverlayLabelLayer) String(chwh [2]float32) string
- func (self *OverlayLabelLayer) Summary() string
- type OverlayMarkerLayer
- func (self *OverlayMarkerLayer) AddArrowHeadMarker(size float32, color string, outline_color string, rotation float32, ...) *OverlayMarkerLayer
- func (self *OverlayMarkerLayer) AddArrowMarker(size float32, color string, outline_color string, rotation float32, ...) *OverlayMarkerLayer
- func (self *OverlayMarkerLayer) AddMarker(marker ...*SceneObject) *OverlayMarkerLayer
- func (self *OverlayMarkerLayer) AddMarkersForTest() *OverlayMarkerLayer
- func (self *OverlayMarkerLayer) AddSpriteMarker(imgpath string, color string, wh [2]float32, xy [2]float32, offref string) *OverlayMarkerLayer
- func (self *OverlayMarkerLayer) CreateArrowHeadMarker(size float32, color string, outline_color string, use_poses bool) *SceneObject
- func (self *OverlayMarkerLayer) CreateArrowMarker(size float32, color string, outline_color string, use_poses bool) *SceneObject
- func (self *OverlayMarkerLayer) CreateSpriteMarker(imgpath string, color string, wh [2]float32, offref string, use_poses bool) *SceneObject
- func (self *OverlayMarkerLayer) GetShaderForMarker(use_poses bool) gigl.GLShader
- func (self *OverlayMarkerLayer) GetShaderForSpriteMarker(wh [2]float32, offrot [3]float32, use_poses bool) gigl.GLShader
- func (self *OverlayMarkerLayer) Render(pvm *common.Matrix3)
- type Renderer
- type Scene
- func (self *Scene) Add(scnobj ...*SceneObject) *Scene
- func (self *Scene) AddOverlay(overlay ...Overlay) *Scene
- func (self *Scene) Get(indices ...int) *SceneObject
- func (self *Scene) GetBBoxSizeCenter(renew bool) ([2][2]float32, [2]float32, [2]float32)
- func (self *Scene) GetBkgColor() [3]float32
- func (self *Scene) GetBoundingBox(renew bool) *BBox
- func (self *Scene) SetBkgColor(color string) *Scene
- func (self *Scene) String() string
- type SceneObject
- func NewSceneObject(geometry *Geometry, material gigl.GLMaterial, vshader gigl.GLShader, ...) *SceneObject
- func NewSceneObject_HexagonWireframe(rc gigl.GLRenderingContext) *SceneObject
- func NewSceneObject_RectangleInstancesExample(rc gigl.GLRenderingContext) *SceneObject
- func NewSceneObject_RedTriangle(rc gigl.GLRenderingContext) *SceneObject
- func SelectObjectByWorldXY(scene *Scene) *SceneObject
- func (self *SceneObject) AddChild(child *SceneObject) *SceneObject
- func (self *SceneObject) ClearInstanceBuffer()
- func (self *SceneObject) GetBoundingBox(m *common.Matrix3, renew bool) *BBox
- func (self *SceneObject) IsReady() bool
- func (self *SceneObject) Rotate(angle_in_degree float32) *SceneObject
- func (self *SceneObject) Scale(sx float32, sy float32) *SceneObject
- func (self *SceneObject) SetInstanceBuffer(instance_count int, instance_stride int, data []float32) *SceneObject
- func (self *SceneObject) SetInstanceColorValues(instance_index int, offset int, v0 uint8, v1 uint8, v2 uint8, v3 uint8)
- func (self *SceneObject) SetInstancePoseValues(instance_index int, offset int, values ...float32)
- func (self *SceneObject) SetTransformation(txy [2]float32, angle_in_degree float32, sxy [2]float32) *SceneObject
- func (self *SceneObject) Summary() string
- func (self *SceneObject) Translate(tx float32, ty float32) *SceneObject
- type V2d
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewShaderFor2DAxes ¶
func NewShaderFor2DAxes(rc gigl.GLRenderingContext) gigl.GLShader
func NewShaderForInstancePoseColor ¶
func NewShaderForInstancePoseColor(rc gigl.GLRenderingContext) gigl.GLShader
func NewShaderForMaterialColors ¶
func NewShaderForMaterialColors(rc gigl.GLRenderingContext) gigl.GLShader
func NewShaderForMaterialTexture ¶
func NewShaderForMaterialTexture(rc gigl.GLRenderingContext) gigl.GLShader
func SelectPoseByWorldXY ¶
func SelectPoseByWorldXY(sobj *SceneObject)
Types ¶
type BBox ¶
type BBox [2][2]float32
func NewBBoxEmpty ¶
func NewBBoxEmpty() *BBox
func (*BBox) IsIncludingPoint ¶
type Camera ¶
type Camera struct {
// contains filtered or unexported fields
}
func (*Camera) ApplyBoundingBox ¶
func (*Camera) IsPointVisible ¶
func (*Camera) ProjectWorldToCanvas ¶
func (*Camera) ProjectWorldToClip ¶
func (*Camera) SetBoundingBox ¶
func (*Camera) UnprojectCanvasDeltaToWorld ¶
func (*Camera) UnprojectCanvasToWorld ¶
type Geometry ¶
type Geometry struct {
// contains filtered or unexported fields
}
func NewGeometry ¶
func NewGeometry() *Geometry
func NewGeometryArrow ¶
func NewGeometryArrow() *Geometry
func NewGeometryArrowHead ¶
func NewGeometryArrowHead() *Geometry
func NewGeometryOrigin ¶
func NewGeometryOrigin() *Geometry
func NewGeometryPolygon ¶
func NewGeometryRectangle ¶
func NewGeometryTriangle ¶
func (*Geometry) AddTextureUV ¶
func (*Geometry) BuildDataBuffers ¶
func (*Geometry) BuildDataBuffersForWireframe ¶
func (self *Geometry) BuildDataBuffersForWireframe()
func (*Geometry) GetIdxBuffer ¶
func (*Geometry) GetIdxBufferCount ¶
func (*Geometry) GetVtxBuffer ¶
func (*Geometry) GetVtxBufferInfo ¶
func (*Geometry) HasTextureFor ¶
func (*Geometry) IsDataBufferReady ¶
func (*Geometry) IsVtxBufferRebuiltForFaces ¶
func (*Geometry) SetTextureUVs ¶
func (*Geometry) SetVertices ¶
type MaterialAlphabetTexture ¶
type MaterialAlphabetTexture struct {
// contains filtered or unexported fields
}
func NewMaterialAlphabetTexture ¶
func NewMaterialAlphabetTexture(fontfamily string, fontsize int, color string, outlined bool) *MaterialAlphabetTexture
func (*MaterialAlphabetTexture) GetAlaphabetCharacterIndex ¶
func (self *MaterialAlphabetTexture) GetAlaphabetCharacterIndex(c rune) int
func (*MaterialAlphabetTexture) GetAlaphabetCharacterWH ¶
func (self *MaterialAlphabetTexture) GetAlaphabetCharacterWH(scale float32) [2]float32
func (*MaterialAlphabetTexture) GetAlaphabetLength ¶
func (self *MaterialAlphabetTexture) GetAlaphabetLength() int
func (*MaterialAlphabetTexture) GetAlphabetString ¶
func (self *MaterialAlphabetTexture) GetAlphabetString() string
func (*MaterialAlphabetTexture) GetFontColor ¶
func (self *MaterialAlphabetTexture) GetFontColor() string
func (*MaterialAlphabetTexture) GetFontFamily ¶
func (self *MaterialAlphabetTexture) GetFontFamily() string
func (*MaterialAlphabetTexture) GetFontOutlined ¶
func (self *MaterialAlphabetTexture) GetFontOutlined() bool
func (*MaterialAlphabetTexture) GetFontSize ¶
func (self *MaterialAlphabetTexture) GetFontSize() int
func (*MaterialAlphabetTexture) GetTexture ¶
func (self *MaterialAlphabetTexture) GetTexture() any
func (*MaterialAlphabetTexture) GetTexturePixbuf ¶
func (self *MaterialAlphabetTexture) GetTexturePixbuf() []uint8
func (*MaterialAlphabetTexture) GetTextureRGB ¶
func (self *MaterialAlphabetTexture) GetTextureRGB() [3]float32
func (*MaterialAlphabetTexture) GetTextureWH ¶
func (self *MaterialAlphabetTexture) GetTextureWH() [2]int
func (*MaterialAlphabetTexture) IsLoaded ¶
func (self *MaterialAlphabetTexture) IsLoaded() bool
func (*MaterialAlphabetTexture) IsLoading ¶
func (self *MaterialAlphabetTexture) IsLoading() bool
func (*MaterialAlphabetTexture) IsReady ¶
func (self *MaterialAlphabetTexture) IsReady() bool
func (*MaterialAlphabetTexture) LoadAlphabetTexture ¶
func (self *MaterialAlphabetTexture) LoadAlphabetTexture()
func (*MaterialAlphabetTexture) MaterialSummary ¶
func (self *MaterialAlphabetTexture) MaterialSummary() string
func (*MaterialAlphabetTexture) SetAlphabetWH ¶
func (self *MaterialAlphabetTexture) SetAlphabetWH(wh [2]float32)
func (*MaterialAlphabetTexture) SetError ¶
func (self *MaterialAlphabetTexture) SetError(err error)
func (*MaterialAlphabetTexture) SetTexture ¶
func (self *MaterialAlphabetTexture) SetTexture(texture any)
func (*MaterialAlphabetTexture) SetTextureRGB ¶
func (self *MaterialAlphabetTexture) SetTextureRGB(color any)
func (*MaterialAlphabetTexture) SetTextureWH ¶
func (self *MaterialAlphabetTexture) SetTextureWH(wh [2]int)
type MaterialColors ¶
type MaterialColors struct {
// contains filtered or unexported fields
}
func NewMaterialColors ¶
func NewMaterialColors(colors ...any) *MaterialColors
func (*MaterialColors) GetDrawModeColor ¶
func (self *MaterialColors) GetDrawModeColor(draw_mode int) [4]float32
func (*MaterialColors) MaterialSummary ¶
func (self *MaterialColors) MaterialSummary() string
func (*MaterialColors) SetColorForDrawMode ¶
func (self *MaterialColors) SetColorForDrawMode(draw_mode int, color string) *MaterialColors
type MaterialGlowTexture ¶
type MaterialGlowTexture struct {
// contains filtered or unexported fields
}
func NewMaterialGlowTexture ¶
func NewMaterialGlowTexture(color any) *MaterialGlowTexture
func (*MaterialGlowTexture) GetTexture ¶
func (self *MaterialGlowTexture) GetTexture() any
func (*MaterialGlowTexture) GetTexturePixbuf ¶
func (self *MaterialGlowTexture) GetTexturePixbuf() []uint8
func (*MaterialGlowTexture) GetTextureRGB ¶
func (self *MaterialGlowTexture) GetTextureRGB() [3]float32
func (*MaterialGlowTexture) GetTextureWH ¶
func (self *MaterialGlowTexture) GetTextureWH() [2]int
func (*MaterialGlowTexture) IsLoaded ¶
func (self *MaterialGlowTexture) IsLoaded() bool
func (*MaterialGlowTexture) IsLoading ¶
func (self *MaterialGlowTexture) IsLoading() bool
func (*MaterialGlowTexture) IsReady ¶
func (self *MaterialGlowTexture) IsReady() bool
func (*MaterialGlowTexture) LoadGlowTexture ¶
func (self *MaterialGlowTexture) LoadGlowTexture()
func (*MaterialGlowTexture) MaterialSummary ¶
func (self *MaterialGlowTexture) MaterialSummary() string
func (*MaterialGlowTexture) SetTexture ¶
func (self *MaterialGlowTexture) SetTexture(texture any)
func (*MaterialGlowTexture) SetTextureRGB ¶
func (self *MaterialGlowTexture) SetTextureRGB(color any)
type MaterialTexture ¶
type MaterialTexture struct {
// contains filtered or unexported fields
}
func NewMaterialTexture ¶
func NewMaterialTexture(filepath string, color ...string) *MaterialTexture
func (*MaterialTexture) GetTexture ¶
func (self *MaterialTexture) GetTexture() any
func (*MaterialTexture) GetTexturePixbuf ¶
func (self *MaterialTexture) GetTexturePixbuf() []uint8
func (*MaterialTexture) GetTextureRGB ¶
func (self *MaterialTexture) GetTextureRGB() [3]float32
func (*MaterialTexture) GetTextureWH ¶
func (self *MaterialTexture) GetTextureWH() [2]int
func (*MaterialTexture) IsLoaded ¶
func (self *MaterialTexture) IsLoaded() bool
func (*MaterialTexture) IsLoading ¶
func (self *MaterialTexture) IsLoading() bool
func (*MaterialTexture) IsReady ¶
func (self *MaterialTexture) IsReady() bool
func (*MaterialTexture) LoadTextureFromLocalFile ¶
func (self *MaterialTexture) LoadTextureFromLocalFile()
func (*MaterialTexture) LoadTextureFromRemoteServer ¶
func (self *MaterialTexture) LoadTextureFromRemoteServer()
func (*MaterialTexture) MaterialSummary ¶
func (self *MaterialTexture) MaterialSummary() string
func (*MaterialTexture) SetTexture ¶
func (self *MaterialTexture) SetTexture(texture any)
func (*MaterialTexture) SetTextureRGB ¶
func (self *MaterialTexture) SetTextureRGB(color any)
type OverlayLabel ¶
type OverlayLabel struct {
// contains filtered or unexported fields
}
func (*OverlayLabel) SetBackground ¶
func (self *OverlayLabel) SetBackground(bkgtype string) *OverlayLabel
func (*OverlayLabel) SetCharacterWH ¶
func (self *OverlayLabel) SetCharacterWH(chwh [2]float32) *OverlayLabel
func (*OverlayLabel) SetPose ¶
func (self *OverlayLabel) SetPose(rotation float32, offset_reference string, offset [2]float32) *OverlayLabel
func (*OverlayLabel) String ¶
func (self *OverlayLabel) String(chwh [2]float32) string
type OverlayLabelLayer ¶
type OverlayLabelLayer struct { Labels []*OverlayLabel // // contains filtered or unexported fields }
func NewOverlayLabelLayer ¶
func NewOverlayLabelLayer(rc gigl.GLRenderingContext, fontsize int, outlined bool) *OverlayLabelLayer
func (*OverlayLabelLayer) AddLabel ¶
func (self *OverlayLabelLayer) AddLabel(labels ...*OverlayLabel) *OverlayLabelLayer
func (*OverlayLabelLayer) AddLabelsForTest ¶
func (self *OverlayLabelLayer) AddLabelsForTest() *OverlayLabelLayer
func (*OverlayLabelLayer) AddTextLabel ¶
func (self *OverlayLabelLayer) AddTextLabel(label_text string, xy [2]float32, color string, offref string) *OverlayLabel
func (*OverlayLabelLayer) CreateLabel ¶
func (self *OverlayLabelLayer) CreateLabel(label_text string, xy [2]float32, color string) *OverlayLabel
func (*OverlayLabelLayer) FindLabel ¶
func (self *OverlayLabelLayer) FindLabel(label_text string) *OverlayLabel
func (*OverlayLabelLayer) Render ¶
func (self *OverlayLabelLayer) Render(pvm *common.Matrix3)
func (*OverlayLabelLayer) String ¶
func (self *OverlayLabelLayer) String(chwh [2]float32) string
func (*OverlayLabelLayer) Summary ¶
func (self *OverlayLabelLayer) Summary() string
type OverlayMarkerLayer ¶
type OverlayMarkerLayer struct { Markers []*SceneObject // list of OverlayMarkers to be rendered (in pixels in CAMERA space) // contains filtered or unexported fields }
func NewOverlayMarkerLayer ¶
func NewOverlayMarkerLayer(rc gigl.GLRenderingContext) *OverlayMarkerLayer
func (*OverlayMarkerLayer) AddArrowHeadMarker ¶
func (self *OverlayMarkerLayer) AddArrowHeadMarker(size float32, color string, outline_color string, rotation float32, xy [2]float32) *OverlayMarkerLayer
func (*OverlayMarkerLayer) AddArrowMarker ¶
func (self *OverlayMarkerLayer) AddArrowMarker(size float32, color string, outline_color string, rotation float32, xy [2]float32) *OverlayMarkerLayer
func (*OverlayMarkerLayer) AddMarker ¶
func (self *OverlayMarkerLayer) AddMarker(marker ...*SceneObject) *OverlayMarkerLayer
func (*OverlayMarkerLayer) AddMarkersForTest ¶
func (self *OverlayMarkerLayer) AddMarkersForTest() *OverlayMarkerLayer
func (*OverlayMarkerLayer) AddSpriteMarker ¶
func (self *OverlayMarkerLayer) AddSpriteMarker(imgpath string, color string, wh [2]float32, xy [2]float32, offref string) *OverlayMarkerLayer
func (*OverlayMarkerLayer) CreateArrowHeadMarker ¶
func (self *OverlayMarkerLayer) CreateArrowHeadMarker(size float32, color string, outline_color string, use_poses bool) *SceneObject
func (*OverlayMarkerLayer) CreateArrowMarker ¶
func (self *OverlayMarkerLayer) CreateArrowMarker(size float32, color string, outline_color string, use_poses bool) *SceneObject
func (*OverlayMarkerLayer) CreateSpriteMarker ¶
func (self *OverlayMarkerLayer) CreateSpriteMarker(imgpath string, color string, wh [2]float32, offref string, use_poses bool) *SceneObject
func (*OverlayMarkerLayer) GetShaderForMarker ¶
func (self *OverlayMarkerLayer) GetShaderForMarker(use_poses bool) gigl.GLShader
func (*OverlayMarkerLayer) GetShaderForSpriteMarker ¶
func (*OverlayMarkerLayer) Render ¶
func (self *OverlayMarkerLayer) Render(pvm *common.Matrix3)
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
func NewRenderer ¶
func NewRenderer(rc gigl.GLRenderingContext) *Renderer
func (*Renderer) RenderAxes ¶
func (*Renderer) RenderScene ¶
func (*Renderer) RenderSceneObject ¶
func (self *Renderer) RenderSceneObject(scnobj *SceneObject, pvm *common.Matrix3) error
type Scene ¶
type Scene struct {
// contains filtered or unexported fields
}
func (*Scene) Add ¶
func (self *Scene) Add(scnobj ...*SceneObject) *Scene
func (*Scene) AddOverlay ¶
func (*Scene) Get ¶
func (self *Scene) Get(indices ...int) *SceneObject
func (*Scene) GetBBoxSizeCenter ¶
func (*Scene) GetBkgColor ¶
func (*Scene) GetBoundingBox ¶
func (*Scene) SetBkgColor ¶
type SceneObject ¶
type SceneObject struct { Geometry *Geometry // geometry interface Material gigl.GLMaterial // material VShader gigl.GLShader // vert shader and its bindings EShader gigl.GLShader // edge shader and its bindings FShader gigl.GLShader // face shader and its bindings UseDepth bool // depth test flag (default is true) UseBlend bool // blending flag with alpha (default is false) // contains filtered or unexported fields }
func NewSceneObject ¶
func NewSceneObject(geometry *Geometry, material gigl.GLMaterial, vshader gigl.GLShader, eshader gigl.GLShader, fshader gigl.GLShader) *SceneObject
func NewSceneObject_HexagonWireframe ¶
func NewSceneObject_HexagonWireframe(rc gigl.GLRenderingContext) *SceneObject
func NewSceneObject_RectangleInstancesExample ¶
func NewSceneObject_RectangleInstancesExample(rc gigl.GLRenderingContext) *SceneObject
func NewSceneObject_RedTriangle ¶
func NewSceneObject_RedTriangle(rc gigl.GLRenderingContext) *SceneObject
func SelectObjectByWorldXY ¶
func SelectObjectByWorldXY(scene *Scene) *SceneObject
func (*SceneObject) AddChild ¶
func (self *SceneObject) AddChild(child *SceneObject) *SceneObject
func (*SceneObject) ClearInstanceBuffer ¶
func (self *SceneObject) ClearInstanceBuffer()
func (*SceneObject) GetBoundingBox ¶
func (self *SceneObject) GetBoundingBox(m *common.Matrix3, renew bool) *BBox
func (*SceneObject) IsReady ¶
func (self *SceneObject) IsReady() bool
func (*SceneObject) Rotate ¶
func (self *SceneObject) Rotate(angle_in_degree float32) *SceneObject
func (*SceneObject) Scale ¶
func (self *SceneObject) Scale(sx float32, sy float32) *SceneObject
func (*SceneObject) SetInstanceBuffer ¶
func (self *SceneObject) SetInstanceBuffer(instance_count int, instance_stride int, data []float32) *SceneObject
func (*SceneObject) SetInstanceColorValues ¶
func (*SceneObject) SetInstancePoseValues ¶
func (self *SceneObject) SetInstancePoseValues(instance_index int, offset int, values ...float32)
func (*SceneObject) SetTransformation ¶
func (self *SceneObject) SetTransformation(txy [2]float32, angle_in_degree float32, sxy [2]float32) *SceneObject
func (*SceneObject) Summary ¶
func (self *SceneObject) Summary() string
func (*SceneObject) Translate ¶
func (self *SceneObject) Translate(tx float32, ty float32) *SceneObject
Source Files ¶
Click to show internal directories.
Click to hide internal directories.