Documentation ¶
Index ¶
- func Deserialize(dec object.Decoder) (object.Component, error)
- type Data
- type Dynamic
- type Generator
- type Mesh
- type MeshState
- type Static
- func (m *Static) BoundingSphere() shape.Sphere
- func (m *Static) CastShadows() bool
- func (m *Static) Material() *material.Def
- func (m *Static) MaterialID() material.ID
- func (m *Static) Mesh() *object.Property[vertex.Mesh]
- func (m *Static) Name() string
- func (m *Static) Primitive() vertex.Primitive
- func (m *Static) Serialize(enc object.Encoder) error
- func (m *Static) SetShadows(shadows bool)
- func (m *Static) SetTexture(slot texture.Slot, ref texture.Ref)
- func (m *Static) Texture(slot texture.Slot) texture.Ref
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dynamic ¶
type Dynamic[V vertex.Vertex, I vertex.Index] struct { *Static // contains filtered or unexported fields }
func NewDynamic ¶
func (*Dynamic[V, I]) RefreshSync ¶
func (m *Dynamic[V, I]) RefreshSync()
type Mesh ¶
type Mesh interface { object.Component Primitive() vertex.Primitive CastShadows() bool Material() *material.Def MaterialID() material.ID Texture(texture.Slot) texture.Ref // Bounding sphere used for view frustum culling BoundingSphere() shape.Sphere // returns the VertexData property // this is kinda ugly - but other components might need to subscribe to changes ? Mesh() *object.Property[vertex.Mesh] }
type Static ¶
type Static struct { object.Component VertexData object.Property[vertex.Mesh] // contains filtered or unexported fields }
mesh base
func NewPrimitiveMesh ¶
NewPrimitiveMesh creates a new mesh composed of a given GL primitive
func (*Static) BoundingSphere ¶
func (*Static) CastShadows ¶
func (*Static) MaterialID ¶
func (*Static) SetShadows ¶
Click to show internal directories.
Click to hide internal directories.