Versions in this module Expand all Collapse all v0 v0.5.20 Dec 26, 2023 v0.5.19 Dec 21, 2023 v0.5.18 Dec 20, 2023 Changes in this version + func UpdateWorldMatrix(n ki.Ki) type Node + func NodesUnderPoint(n ki.Ki, pt image.Point) []Node type Pose + func (ps *Pose) String() string type Scene + func (sc *Scene) DepthImage() ([]float32, error) + func (sc *Scene) UpdateNodesIfNeeded() v0.5.17 Dec 13, 2023 v0.5.16 Dec 13, 2023 v0.5.15 Dec 13, 2023 v0.5.14 Dec 12, 2023 v0.5.13 Dec 12, 2023 v0.5.12 Dec 9, 2023 v0.5.11 Dec 9, 2023 Changes in this version + const Active + const CloseLines + const ConeMeshName + const EndArrow + const GitCommit + const Inactive + const LineMeshName + const ManipBoxName + const NoEndArrow + const NoStartArrow + const OpenLines + const Plane2DMeshName + const SelBoxName + const StartArrow + const TrackCameraName + const Version + const VersionDate + var CameraProps = ki.Props + var Decoders = map[string]Decoder + var GroupType = gti.AddType(>i.Type{ ... }) + var LightColorMap = map[LightColors]color.RGBA + var ManipPtType = gti.AddType(>i.Type{ ... }) + var NodeBaseType = gti.AddType(>i.Type{ ... }) + var OrbitFactor = float32(0.025) + var PanFactor = float32(0.001) + var SceneType = gti.AddType(>i.Type{ ... }) + var SolidType = gti.AddType(>i.Type{ ... }) + var Text2DType = gti.AddType(>i.Type{ ... }) + var Update3DTrace = false + func AsNode(k ki.Ki) (Node, *NodeBase) + func SetLineStartEnd(ln *Solid, st, ed mat32.Vec3) + type AmbientLight struct + func NewAmbientLight(sc *Scene, name string, lumens float32, color LightColors) *AmbientLight + type BBox struct + Area float32 + BBox mat32.Box3 + BSphere mat32.Sphere + Volume float32 + func (bb *BBox) SetBounds(min, max mat32.Vec3) + func (bb *BBox) UpdateFmBBox() + type Box struct + Segs mat32.Vec3i + Size mat32.Vec3 + func NewBox(sc *Scene, name string, width, height, depth float32) *Box + func (bx *Box) Set(sc *Scene, vtxAry, normAry, texAry, clrAry mat32.ArrayF32, ...) + func (bx *Box) Sizes() (nVtx, nIdx int, hasColor bool) + func (t *Box) SetColor(v bool) *Box + func (t *Box) SetDynamic(v bool) *Box + func (t *Box) SetSegs(v mat32.Vec3i) *Box + func (t *Box) SetSize(v mat32.Vec3) *Box + func (t *Box) SetTrans(v bool) *Box + type Camera struct + Aspect float32 + CamMu sync.RWMutex + FOV float32 + Far float32 + Frustum *mat32.Frustum + InvPrjnMatrix mat32.Mat4 + Near float32 + Ortho bool + Pose Pose + PrjnMatrix mat32.Mat4 + Target mat32.Vec3 + UpDir mat32.Vec3 + ViewMatrix mat32.Mat4 + VkPrjnMatrix mat32.Mat4 + func (cm *Camera) DefaultPose() + func (cm *Camera) Defaults() + func (cm *Camera) DistTo(pt mat32.Vec3) float32 + func (cm *Camera) GenGoSet(path string) string + func (cm *Camera) LookAt(target, upDir mat32.Vec3) + func (cm *Camera) LookAtOrigin() + func (cm *Camera) LookAtTarget() + func (cm *Camera) Orbit(delX, delY float32) + func (cm *Camera) Pan(delX, delY float32) + func (cm *Camera) PanAxis(delX, delY float32) + func (cm *Camera) PanTarget(delX, delY, delZ float32) + func (cm *Camera) TargetFmView() + func (cm *Camera) UpdateMatrix() + func (cm *Camera) ViewMainAxis() (dim mat32.Dims, sign float32) + func (cm *Camera) ViewVector() mat32.Vec3 + func (cm *Camera) Zoom(zoomPct float32) + func (cm *Camera) ZoomTo(pt, size image.Point, zoomPct float32) + type Capsule struct + AngLen float32 + AngStart float32 + BotRad float32 + CapSegs int + Height float32 + HeightSegs int + RadialSegs int + TopRad float32 + func NewCapsule(sc *Scene, name string, height, radius float32, segs, heightSegs int) *Capsule + func (cp *Capsule) Defaults() + func (cp *Capsule) Set(sc *Scene, vtxAry, normAry, texAry, clrAry mat32.ArrayF32, ...) + func (cp *Capsule) Sizes() (nVtx, nIdx int, hasColor bool) + func (t *Capsule) SetAngLen(v float32) *Capsule + func (t *Capsule) SetAngStart(v float32) *Capsule + func (t *Capsule) SetBotRad(v float32) *Capsule + func (t *Capsule) SetCapSegs(v int) *Capsule + func (t *Capsule) SetColor(v bool) *Capsule + func (t *Capsule) SetDynamic(v bool) *Capsule + func (t *Capsule) SetHeight(v float32) *Capsule + func (t *Capsule) SetHeightSegs(v int) *Capsule + func (t *Capsule) SetRadialSegs(v int) *Capsule + func (t *Capsule) SetTopRad(v float32) *Capsule + func (t *Capsule) SetTrans(v bool) *Capsule + type Cylinder struct + AngLen float32 + AngStart float32 + BotRad float32 + Bottom bool + Height float32 + HeightSegs int + RadialSegs int + Top bool + TopRad float32 + func NewCone(sc *Scene, name string, height, radius float32, radialSegs, heightSegs int, ...) *Cylinder + func NewCylinder(sc *Scene, name string, height, radius float32, radialSegs, heightSegs int, ...) *Cylinder + func NewCylinderSector(sc *Scene, name string, height, topRad, botRad float32, ...) *Cylinder + func UnitConeMesh(sc *Scene, segs int) *Cylinder + func (cy *Cylinder) Defaults() + func (cy *Cylinder) Set(sc *Scene, vtxAry, normAry, texAry, clrAry mat32.ArrayF32, ...) + func (cy *Cylinder) Sizes() (nVtx, nIdx int, hasColor bool) + func (t *Cylinder) SetAngLen(v float32) *Cylinder + func (t *Cylinder) SetAngStart(v float32) *Cylinder + func (t *Cylinder) SetBotRad(v float32) *Cylinder + func (t *Cylinder) SetBottom(v bool) *Cylinder + func (t *Cylinder) SetColor(v bool) *Cylinder + func (t *Cylinder) SetDynamic(v bool) *Cylinder + func (t *Cylinder) SetHeight(v float32) *Cylinder + func (t *Cylinder) SetHeightSegs(v int) *Cylinder + func (t *Cylinder) SetRadialSegs(v int) *Cylinder + func (t *Cylinder) SetTop(v bool) *Cylinder + func (t *Cylinder) SetTopRad(v float32) *Cylinder + func (t *Cylinder) SetTrans(v bool) *Cylinder + type Decoder interface + Decode func(rs []io.Reader) error + Desc func() string + HasScene func() bool + New func() Decoder + SetFile func(fname string) []string + SetFileFS func(fsys fs.FS, fname string) []string + SetGroup func(sc *Scene, gp *Group) + SetScene func(sc *Scene) + func DecodeFile(fname string) (Decoder, error) + func DecodeFileFS(fsys fs.FS, fname string) (Decoder, error) + type DirLight struct + Pos mat32.Vec3 + func NewDirLight(sc *Scene, name string, lumens float32, color LightColors) *DirLight + func (dl *DirLight) ViewDir(viewMat *mat32.Mat4) mat32.Vec3 + type GenMesh struct + Clr mat32.ArrayF32 + Idx mat32.ArrayU32 + Norm mat32.ArrayF32 + Tex mat32.ArrayF32 + Vtx mat32.ArrayF32 + func (ms *GenMesh) Set(sc *Scene, vtxAry, normAry, texAry, clrAry mat32.ArrayF32, ...) + func (ms *GenMesh) Sizes() (nVtx, nIdx int, hasColor bool) + type Group struct + func NewArrow(sc *Scene, parent ki.Ki, name string, st, ed mat32.Vec3, width float32, ...) *Group + func NewGroup(par ki.Ki, name ...string) *Group + func NewLineBox(sc *Scene, parent ki.Ki, meshNm, boxNm string, bbox mat32.Box3, width float32, ...) *Group + func (gp *Group) CopyFieldsFrom(frm any) + func (gp *Group) Defaults() + func (gp *Group) RaySolidIntersections(ray mat32.Ray) []*SolidPoint + func (gp *Group) RenderClass() RenderClasses + func (gp *Group) SetAxisRotation(x, y, z, angle float32) *Group + func (gp *Group) SetEulerRotation(x, y, z float32) *Group + func (gp *Group) SetPos(x, y, z float32) *Group + func (gp *Group) SetScale(x, y, z float32) *Group + func (gp *Group) UpdateMeshBBox() + func (t *Group) KiType() *gti.Type + func (t *Group) New() ki.Ki + type Light interface + Color func() color.RGBA + Lumens func() float32 + Name func() string + type LightBase struct + Clr color.RGBA + Lumns float32 + Nm string + On bool + func (lb *LightBase) Color() color.RGBA + func (lb *LightBase) Lumens() float32 + func (lb *LightBase) Name() string + type LightColors int32 + const Candle + const CarbonArc + const DirectSun + const FluorCool + const FluorFull + const FluorGrow + const FluorStd + const FluorWarm + const Halogen + const LightColorsN + const MercuryVapor + const MetalHalide + const Overcast + const SodiumVapor + const Tungsten100W + const Tungsten40W + func LightColorsValues() []LightColors + func (i *LightColors) SetInt64(in int64) + func (i *LightColors) SetString(s string) error + func (i *LightColors) UnmarshalText(text []byte) error + func (i LightColors) Desc() string + func (i LightColors) Int64() int64 + func (i LightColors) IsValid() bool + func (i LightColors) MarshalText() ([]byte, error) + func (i LightColors) String() string + func (i LightColors) Values() []enums.Enum + type Lines struct + Closed bool + Colors []color.RGBA + Points []mat32.Vec3 + Width mat32.Vec2 + func NewLineBoxMeshes(sc *Scene, meshNm string, bbox mat32.Box3, width float32) (front, side *Lines) + func NewLines(sc *Scene, name string, points []mat32.Vec3, width mat32.Vec2, closed bool) *Lines + func UnitLineMesh(sc *Scene) *Lines + func (ln *Lines) Set(sc *Scene, vtxAry, normAry, texAry, clrAry mat32.ArrayF32, ...) + func (ln *Lines) Sizes() (nVtx, nIdx int, hasColor bool) + type ManipPt struct + func NewManipPt(par ki.Ki, name ...string) *ManipPt + func (t *ManipPt) KiType() *gti.Type + func (t *ManipPt) New() ki.Ki + func (t *ManipPt) SetMat(v Material) *ManipPt + type Material struct + Bright float32 + Color color.RGBA + CullBack bool + CullFront bool + Emissive color.RGBA + Reflective float32 + Shiny float32 + TexPtr Texture + Texture TexName + Tiling Tiling + func (mt *Material) Defaults() + func (mt *Material) Disconnect() + func (mt *Material) IsTransparent() bool + func (mt *Material) NoTexture() + func (mt *Material) Render(sc *Scene) + func (mt *Material) SetTexture(tex Texture) *Material + func (mt *Material) SetTextureName(sc *Scene, texName string) error + func (mt *Material) Validate(sc *Scene) error + func (mt Material) String() string + func (t *Material) SetBright(v float32) *Material + func (t *Material) SetColor(v color.RGBA) *Material + func (t *Material) SetCullBack(v bool) *Material + func (t *Material) SetCullFront(v bool) *Material + func (t *Material) SetEmissive(v color.RGBA) *Material + func (t *Material) SetReflective(v float32) *Material + func (t *Material) SetShiny(v float32) *Material + func (t *Material) SetTiling(v Tiling) *Material + type Mesh interface + AsMeshBase func() *MeshBase + ComputeNorms func(pos, norm mat32.ArrayF32) + HasColor func() bool + IsTransparent func() bool + Name func() string + Set func(sc *Scene, vtxAry, normAry, texAry, clrAry mat32.ArrayF32, ...) + SetMod func(sc *Scene) + SetName func(nm string) + Sizes func() (nVtx, nIdx int, hasColor bool) + Update func(sc *Scene, vtxAry, normAry, texAry, clrAry mat32.ArrayF32, ...) + type MeshBase struct + BBox BBox + BBoxMu sync.RWMutex + Color bool + Dynamic bool + NIdx int + NVtx int + Nm string + Trans bool + func (ms *MeshBase) AsMeshBase() *MeshBase + func (ms *MeshBase) ComputeNorms(pos, norm mat32.ArrayF32) + func (ms *MeshBase) HasColor() bool + func (ms *MeshBase) IsTransparent() bool + func (ms *MeshBase) Name() string + func (ms *MeshBase) SetMod(sc *Scene) + func (ms *MeshBase) SetName(nm string) + func (ms *MeshBase) Sizes() (nVtx, nIdx int, hasColor bool) + func (ms *MeshBase) Update(sc *Scene, vtxAry, normAry, texAry, clrAry mat32.ArrayF32, ...) + func (t *MeshBase) SetColor(v bool) *MeshBase + func (t *MeshBase) SetDynamic(v bool) *MeshBase + func (t *MeshBase) SetTrans(v bool) *MeshBase + type MeshName string + func (mn MeshName) String() string + type Node interface + AsNode func() *NodeBase + AsSolid func() *Solid + Config func() + IsSolid func() bool + IsTransparent func() bool + IsVisible func() bool + NormDCBBox func() mat32.Box3 + RayPick func(pos image.Point) mat32.Ray + Render func() + RenderClass func() RenderClasses + SetPosePos func(pos mat32.Vec3) + SetPoseQuat func(quat mat32.Quat) + SetPoseScale func(scale mat32.Vec3) + UpdateBBox2D func(size mat32.Vec2) + UpdateMVPMatrix func(viewMat, prjnMat *mat32.Mat4) + UpdateMeshBBox func() + UpdateNode func() + UpdateWorldMatrix func(parWorld *mat32.Mat4) + Validate func() error + WorldMatrix func() *mat32.Mat4 + type NodeBase struct + BBox image.Rectangle + MeshBBox BBox + NDCBBox mat32.Box3 + Pose Pose + PoseMu sync.RWMutex + Sc *Scene + ScBBox image.Rectangle + WorldBBox BBox + func AsNodeBase(k ki.Ki) *NodeBase + func NewNodeBase(par ki.Ki, name ...string) *NodeBase + func (nb *NodeBase) AsNode() *NodeBase + func (nb *NodeBase) AsSolid() *Solid + func (nb *NodeBase) BaseIface() reflect.Type + func (nb *NodeBase) Config() + func (nb *NodeBase) CopyFieldsFrom(frm any) + func (nb *NodeBase) IsSolid() bool + func (nb *NodeBase) IsTransparent() bool + func (nb *NodeBase) IsVisible() bool + func (nb *NodeBase) NormDCBBox() mat32.Box3 + func (nb *NodeBase) OnAdd() + func (nb *NodeBase) RayPick(pos image.Point) mat32.Ray + func (nb *NodeBase) Render() + func (nb *NodeBase) SetPosePos(pos mat32.Vec3) + func (nb *NodeBase) SetPoseQuat(quat mat32.Quat) + func (nb *NodeBase) SetPoseScale(scale mat32.Vec3) + func (nb *NodeBase) TrackCamera() + func (nb *NodeBase) TrackLight(lightName string) error + func (nb *NodeBase) UpdateBBox2D(size mat32.Vec2) + func (nb *NodeBase) UpdateEnd(updt bool) + func (nb *NodeBase) UpdateMVPMatrix(viewMat, prjnMat *mat32.Mat4) + func (nb *NodeBase) UpdateNode() + func (nb *NodeBase) UpdateStart() bool + func (nb *NodeBase) UpdateWorldMatrix(parWorld *mat32.Mat4) + func (nb *NodeBase) Validate() error + func (nb *NodeBase) WorldMatrix() *mat32.Mat4 + func (t *NodeBase) KiType() *gti.Type + func (t *NodeBase) New() ki.Ki + type NodeFlags ki.Flags + const Invisible + const NodeFlagsN + const VectorsUpdated + const WorldMatrixUpdated + func NodeFlagsValues() []NodeFlags + func (i *NodeFlags) SetFlag(on bool, f ...enums.BitFlag) + func (i *NodeFlags) SetInt64(in int64) + func (i *NodeFlags) SetString(s string) error + func (i *NodeFlags) SetStringOr(s string) error + func (i *NodeFlags) UnmarshalText(text []byte) error + func (i NodeFlags) BitIndexString() string + func (i NodeFlags) Desc() string + func (i NodeFlags) HasFlag(f enums.BitFlag) bool + func (i NodeFlags) Int64() int64 + func (i NodeFlags) IsValid() bool + func (i NodeFlags) MarshalText() ([]byte, error) + func (i NodeFlags) String() string + func (i NodeFlags) Values() []enums.Enum + type Plane struct + NormAxis mat32.Dims + NormNeg bool + Offset float32 + Segs mat32.Vec2i + Size mat32.Vec2 + func NewPlane(sc *Scene, name string, width, height float32) *Plane + func (pl *Plane) Set(sc *Scene, vtxAry, normAry, texAry, clrAry mat32.ArrayF32, ...) + func (pl *Plane) Sizes() (nVtx, nIdx int, hasColor bool) + func (t *Plane) SetColor(v bool) *Plane + func (t *Plane) SetDynamic(v bool) *Plane + func (t *Plane) SetNormAxis(v mat32.Dims) *Plane + func (t *Plane) SetNormNeg(v bool) *Plane + func (t *Plane) SetOffset(v float32) *Plane + func (t *Plane) SetSegs(v mat32.Vec2i) *Plane + func (t *Plane) SetSize(v mat32.Vec2) *Plane + func (t *Plane) SetTrans(v bool) *Plane + type PointLight struct + LinDecay float32 + Pos mat32.Vec3 + QuadDecay float32 + func NewPointLight(sc *Scene, name string, lumens float32, color LightColors) *PointLight + func (pl *PointLight) ViewPos(viewMat *mat32.Mat4) mat32.Vec3 + type Pose struct + MVMatrix mat32.Mat4 + MVPMatrix mat32.Mat4 + Matrix mat32.Mat4 + NormMatrix mat32.Mat3 + ParMatrix mat32.Mat4 + Pos mat32.Vec3 + Quat mat32.Quat + Scale mat32.Vec3 + WorldMatrix mat32.Mat4 + func (ps *Pose) CopyFrom(op *Pose) + func (ps *Pose) Defaults() + func (ps *Pose) EulerRotation() mat32.Vec3 + func (ps *Pose) EulerRotationRad() mat32.Vec3 + func (ps *Pose) GenGoSet(path string) string + func (ps *Pose) LookAt(target, upDir mat32.Vec3) + func (ps *Pose) MoveOnAxis(x, y, z, dist float32) + func (ps *Pose) MoveOnAxisAbs(x, y, z, dist float32) + func (ps *Pose) MulMatrix(mat *mat32.Mat4) + func (ps *Pose) RotateEuler(x, y, z float32) + func (ps *Pose) RotateEulerRad(x, y, z, angle float32) + func (ps *Pose) RotateOnAxis(x, y, z, angle float32) + func (ps *Pose) RotateOnAxisRad(x, y, z, angle float32) + func (ps *Pose) SetAxisRotation(x, y, z, angle float32) + func (ps *Pose) SetAxisRotationRad(x, y, z, angle float32) + func (ps *Pose) SetEulerRotation(x, y, z float32) + func (ps *Pose) SetEulerRotationRad(x, y, z float32) + func (ps *Pose) SetMatrix(m *mat32.Mat4) + func (ps *Pose) UpdateMVPMatrix(viewMat, prjnMat *mat32.Mat4) + func (ps *Pose) UpdateMatrix() + func (ps *Pose) UpdateWorldMatrix(parWorld *mat32.Mat4) + func (ps *Pose) WorldEulerRotation() mat32.Vec3 + func (ps *Pose) WorldPos() mat32.Vec3 + func (ps *Pose) WorldQuat() mat32.Quat + func (ps *Pose) WorldScale() mat32.Vec3 + type RenderClasses int32 + const RClassNone + const RClassOpaqueTexture + const RClassOpaqueUniform + const RClassOpaqueVertex + const RClassTransTexture + const RClassTransUniform + const RClassTransVertex + const RenderClassesN + func RenderClassesValues() []RenderClasses + func (i *RenderClasses) SetInt64(in int64) + func (i *RenderClasses) SetString(s string) error + func (i *RenderClasses) UnmarshalText(text []byte) error + func (i RenderClasses) Desc() string + func (i RenderClasses) Int64() int64 + func (i RenderClasses) IsValid() bool + func (i RenderClasses) MarshalText() ([]byte, error) + func (i RenderClasses) String() string + func (i RenderClasses) Values() []enums.Enum + type ScFlags ki.Flags + const ScFlagsN + const ScNeedsConfig + const ScNeedsRender + const ScNeedsUpdate + const ScUpdating + func ScFlagsValues() []ScFlags + func (i *ScFlags) SetFlag(on bool, f ...enums.BitFlag) + func (i *ScFlags) SetInt64(in int64) + func (i *ScFlags) SetString(s string) error + func (i *ScFlags) SetStringOr(s string) error + func (i *ScFlags) UnmarshalText(text []byte) error + func (i ScFlags) BitIndexString() string + func (i ScFlags) Desc() string + func (i ScFlags) HasFlag(f enums.BitFlag) bool + func (i ScFlags) Int64() int64 + func (i ScFlags) IsValid() bool + func (i ScFlags) MarshalText() ([]byte, error) + func (i ScFlags) String() string + func (i ScFlags) Values() []enums.Enum + type Scene struct + BackgroundColor color.RGBA + Camera Camera + CurManipPt *ManipPt + CurSel Node + DirUpIdx int + Frame *vgpu.RenderFrame + Geom mat32.Geom2DInt + ImgCopy image.RGBA + Library map[string]*Group + Lights ordmap.Map[string, Light] + Meshes ordmap.Map[string, Mesh] + MultiSample int + NoNav bool + Phong vphong.Phong + RenderMu sync.Mutex + SavedCams map[string]Camera + SelMode SelModes + SelParams SelParams + SetDragCursor bool + Textures ordmap.Map[string, Texture] + Wireframe bool + func AsScene(k ki.Ki) *Scene + func NewScene(name ...string) *Scene + func (sc *Scene) AddFmLibrary(nm string, parent ki.Ki) (*Group, error) + func (sc *Scene) AddLight(lt Light) + func (sc *Scene) AddMesh(ms Mesh) + func (sc *Scene) AddMeshUnique(ms Mesh) + func (sc *Scene) AddTexture(tx Texture) + func (sc *Scene) AddToLibrary(gp *Group) + func (sc *Scene) Config() + func (sc *Scene) ConfigFrame(gpu *vgpu.GPU, dev *vgpu.Device) + func (sc *Scene) ConfigFrameFromSurface(surf *vgpu.Surface) + func (sc *Scene) ConfigLights() + func (sc *Scene) ConfigMeshes() + func (sc *Scene) ConfigMeshesTextures() + func (sc *Scene) ConfigNodes() + func (sc *Scene) ConfigTextures() + func (sc *Scene) Defaults() + func (sc *Scene) DeleteMesh(nm string) + func (sc *Scene) DeleteMeshes() + func (sc *Scene) DeleteTexture(nm string) + func (sc *Scene) DeleteTextures() + func (sc *Scene) DeleteUnusedMeshes() + func (sc *Scene) Destroy() + func (sc *Scene) DoUpdate() bool + func (sc *Scene) Image() (*image.RGBA, error) + func (sc *Scene) ImageCopy() (*image.RGBA, error) + func (sc *Scene) ImageDone() + func (sc *Scene) IsConfiged() bool + func (sc *Scene) KeyChordEvent(e events.Event) + func (sc *Scene) ManipBox() + func (sc *Scene) MeshByName(nm string) Mesh + func (sc *Scene) MeshByNameTry(nm string) (Mesh, error) + func (sc *Scene) MeshList() []string + func (sc *Scene) MouseDownEvent(e events.Event) + func (sc *Scene) MouseScrollEvent(e *events.MouseScroll) + func (sc *Scene) NavKeyEvents(kt events.Event) + func (sc *Scene) NewInLibrary(nm string) *Group + func (sc *Scene) OpenNewObj(fname string, parent ki.Ki) (*Group, error) + func (sc *Scene) OpenNewObjFS(fsys fs.FS, fname string, parent ki.Ki) (*Group, error) + func (sc *Scene) OpenObj(fname string, gp *Group) error + func (sc *Scene) OpenObjFS(fsys fs.FS, fname string, gp *Group) error + func (sc *Scene) OpenScene(fname string) error + func (sc *Scene) OpenSceneFS(fsys fs.FS, fname string) error + func (sc *Scene) OpenToLibrary(fname string, libnm string) (*Group, error) + func (sc *Scene) OpenToLibraryFS(fsys fs.FS, fname string, libnm string) (*Group, error) + func (sc *Scene) PlaneMesh2D() Mesh + func (sc *Scene) ReadObj(fname string, rs []io.Reader, gp *Group) error + func (sc *Scene) ReadScene(fname string, rs []io.Reader, gp *Group) error + func (sc *Scene) ReconfigMeshes() + func (sc *Scene) ReconfigTextures() + func (sc *Scene) Render() bool + func (sc *Scene) RenderImpl() + func (sc *Scene) SaveCamera(name string) + func (sc *Scene) SelectBox() + func (sc *Scene) SetCamera(name string) error + func (sc *Scene) SetManipPt(pt *ManipPt) + func (sc *Scene) SetMeshes() + func (sc *Scene) SetNeedsConfig() + func (sc *Scene) SetNeedsRender() + func (sc *Scene) SetNeedsUpdate() + func (sc *Scene) SetSel(nd Node) + func (sc *Scene) SetSize(sz image.Point) *Scene + func (sc *Scene) SlideMoveEvent(e events.Event) + func (sc *Scene) SolidsIntersectingPoint(pos image.Point) []Node + func (sc *Scene) TextureByName(nm string) Texture + func (sc *Scene) TextureByNameTry(nm string) (Texture, error) + func (sc *Scene) TextureList() []string + func (sc *Scene) TrackCamera() bool + func (sc *Scene) Update() + func (sc *Scene) UpdateEnd(updt bool) + func (sc *Scene) UpdateEndConfig(updt bool) + func (sc *Scene) UpdateEndRender(updt bool) + func (sc *Scene) UpdateEndUpdate(updt bool) + func (sc *Scene) UpdateMVPMatrix() + func (sc *Scene) UpdateMeshBBox() + func (sc *Scene) UpdateMeshes() + func (sc *Scene) UpdateNodes() + func (sc *Scene) UpdateStart() bool + func (sc *Scene) UpdateWorldMatrix() + func (sc *Scene) Validate() error + func (t *Scene) AsScene() *Scene + func (t *Scene) KiType() *gti.Type + func (t *Scene) New() ki.Ki + func (t *Scene) SetBackgroundColor(v color.RGBA) *Scene + func (t *Scene) SetMultiSample(v int) *Scene + func (t *Scene) SetNoNav(v bool) *Scene + func (t *Scene) SetSelMode(v SelModes) *Scene + func (t *Scene) SetSelParams(v SelParams) *Scene + func (t *Scene) SetWireframe(v bool) *Scene + type SceneEmbedder interface + AsScene func() *Scene + type SelModes int32 + const Manipulable + const NotSelectable + const SelModesN + const Selectable + const SelectionBox + func SelModesValues() []SelModes + func (i *SelModes) SetInt64(in int64) + func (i *SelModes) SetString(s string) error + func (i *SelModes) UnmarshalText(text []byte) error + func (i SelModes) Desc() string + func (i SelModes) Int64() int64 + func (i SelModes) IsValid() bool + func (i SelModes) MarshalText() ([]byte, error) + func (i SelModes) String() string + func (i SelModes) Values() []enums.Enum + type SelParams struct + Color color.RGBA + Radius float32 + Width float32 + func (sp *SelParams) Defaults() + type Solid struct + Mat Material + Mesh MeshName + MeshPtr Mesh + func NewLine(sc *Scene, parent ki.Ki, name string, st, ed mat32.Vec3, width float32, ...) *Solid + func NewSolid(par ki.Ki, name ...string) *Solid + func (sld *Solid) AsSolid() *Solid + func (sld *Solid) Config() + func (sld *Solid) CopyFieldsFrom(frm any) + func (sld *Solid) Defaults() + func (sld *Solid) IsSolid() bool + func (sld *Solid) IsTransparent() bool + func (sld *Solid) IsVisible() bool + func (sld *Solid) OnInit() + func (sld *Solid) ParentMaterial() *Material + func (sld *Solid) Render() + func (sld *Solid) RenderClass() RenderClasses + func (sld *Solid) SetAxisRotation(x, y, z, angle float32) *Solid + func (sld *Solid) SetBright(v float32) *Solid + func (sld *Solid) SetColor(v color.RGBA) *Solid + func (sld *Solid) SetEmissive(v color.RGBA) *Solid + func (sld *Solid) SetEulerRotation(x, y, z float32) *Solid + func (sld *Solid) SetMesh(ms Mesh) *Solid + func (sld *Solid) SetMeshName(meshName string) error + func (sld *Solid) SetPos(x, y, z float32) *Solid + func (sld *Solid) SetReflective(v float32) *Solid + func (sld *Solid) SetScale(x, y, z float32) *Solid + func (sld *Solid) SetShiny(v float32) *Solid + func (sld *Solid) SetTexture(tex Texture) *Solid + func (sld *Solid) SetTextureName(texName string) *Solid + func (sld *Solid) UpdateMeshBBox() + func (sld *Solid) Validate() error + func (t *Solid) KiType() *gti.Type + func (t *Solid) New() ki.Ki + func (t *Solid) SetMat(v Material) *Solid + type SolidPoint struct + Point mat32.Vec3 + Solid *Solid + type Sphere struct + AngLen float32 + AngStart float32 + ElevLen float32 + ElevStart float32 + HeightSegs int + Radius float32 + WidthSegs int + func NewSphere(sc *Scene, name string, radius float32, segs int) *Sphere + func (sp *Sphere) Defaults() + func (sp *Sphere) Set(sc *Scene, vtxAry, normAry, texAry, clrAry mat32.ArrayF32, ...) + func (sp *Sphere) Sizes() (nVtx, nIdx int, hasColor bool) + func (t *Sphere) SetAngLen(v float32) *Sphere + func (t *Sphere) SetAngStart(v float32) *Sphere + func (t *Sphere) SetColor(v bool) *Sphere + func (t *Sphere) SetDynamic(v bool) *Sphere + func (t *Sphere) SetElevLen(v float32) *Sphere + func (t *Sphere) SetElevStart(v float32) *Sphere + func (t *Sphere) SetHeightSegs(v int) *Sphere + func (t *Sphere) SetRadius(v float32) *Sphere + func (t *Sphere) SetTrans(v bool) *Sphere + func (t *Sphere) SetWidthSegs(v int) *Sphere + type SpotLight struct + AngDecay float32 + CutoffAngle float32 + LinDecay float32 + Pose Pose + QuadDecay float32 + func NewSpotLight(sc *Scene, name string, lumens float32, color LightColors) *SpotLight + func (sl *SpotLight) LookAt(target, upDir mat32.Vec3) + func (sl *SpotLight) LookAtOrigin() + func (sl *SpotLight) ViewDir() mat32.Vec3 + type TexName string + type Text2D struct + RenderState paint.State + Styles styles.Style + Text string + TxtPos mat32.Vec2 + TxtRender paint.Text + func NewText2D(par ki.Ki, name ...string) *Text2D + func (t *Text2D) KiType() *gti.Type + func (t *Text2D) New() ki.Ki + func (t *Text2D) SetMat(v Material) *Text2D + func (t *Text2D) SetText(v string) *Text2D + func (txt *Text2D) Config() + func (txt *Text2D) Defaults() + func (txt *Text2D) IsTransparent() bool + func (txt *Text2D) OnInit() + func (txt *Text2D) RenderClass() RenderClasses + func (txt *Text2D) RenderText() + func (txt *Text2D) TextSize() (mat32.Vec2, bool) + func (txt *Text2D) UpdateWorldMatrix(parWorld *mat32.Mat4) + func (txt *Text2D) Validate() error + type Texture interface + Image func() *image.RGBA + IsTransparent func() bool + Name func() string + SetImage func(img image.Image) + SetTransparent func(trans bool) + type TextureBase struct + Img *image.RGBA + Nm string + Trans bool + func (tx *TextureBase) Image() *image.RGBA + func (tx *TextureBase) IsTransparent() bool + func (tx *TextureBase) Name() string + func (tx *TextureBase) SetImage(img image.Image) + func (tx *TextureBase) SetTransparent(trans bool) + type TextureFile struct + FSys fs.FS + File string + func NewTextureFile(sc *Scene, name string, filename string) *TextureFile + func NewTextureFileFS(fsys fs.FS, sc *Scene, name string, filename string) *TextureFile + func (tx *TextureFile) Image() *image.RGBA + type TextureGi2D struct + type Tiling struct + Off mat32.Vec2 + Repeat mat32.Vec2 + func (tl *Tiling) Defaults() + type Torus struct + AngLen float32 + AngStart float32 + RadialSegs int + Radius float32 + TubeRadius float32 + TubeSegs int + func NewTorus(sc *Scene, name string, radius, tubeRadius float32, segs int) *Torus + func (t *Torus) SetAngLen(v float32) *Torus + func (t *Torus) SetAngStart(v float32) *Torus + func (t *Torus) SetColor(v bool) *Torus + func (t *Torus) SetDynamic(v bool) *Torus + func (t *Torus) SetRadialSegs(v int) *Torus + func (t *Torus) SetRadius(v float32) *Torus + func (t *Torus) SetTrans(v bool) *Torus + func (t *Torus) SetTubeRadius(v float32) *Torus + func (t *Torus) SetTubeSegs(v int) *Torus + func (tr *Torus) Defaults() + func (tr *Torus) Set(sc *Scene, vtxAry, normAry, texAry, clrAry mat32.ArrayF32, ...) + func (tr *Torus) Sizes() (nVtx, nIdx int, hasColor bool) Other modules containing this package goki.dev