Documentation ¶
Index ¶
- Constants
- func IndexType(size int) core1_0.IndexType
- func Max[V Vertex](vertices []V) vec3.T
- func Min[V Vertex](vertices []V) vec3.T
- type Args
- type C
- type CullMode
- type GeneratedMesh
- type Index
- type Mesh
- type MutableMesh
- type P
- type Pointer
- type Pointers
- type Primitive
- type T
- type Tag
- type Triangle
- type UI
- type Vertex
Constants ¶
View Source
const ( CullNone = CullMode(core1_0.CullModeFlags(0)) CullFront = CullMode(core1_0.CullModeFront) CullBack = CullMode(core1_0.CullModeBack) )
View Source
const ( Triangles Primitive = Primitive(core1_0.PrimitiveTopologyTriangleList) Lines = Primitive(core1_0.PrimitiveTopologyLineList) Points = Primitive(core1_0.PrimitiveTopologyPointList) )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type C ¶
type C struct { P vec3.T `vtx:"position,float,3"` N vec3.T `vtx:"normal,float,3"` C vec4.T `vtx:"color_0,float,4"` }
C - Colored Vertex
type CullMode ¶
type CullMode core1_0.CullModeFlags
type GeneratedMesh ¶
func NewGenerated ¶
func NewGenerated[A Args, V Vertex, I Index](key string, args A, generator func(A) (V, I)) GeneratedMesh[A, V, I]
type Mesh ¶
type Mesh interface { Key() string Version() int Primitive() Primitive Pointers() Pointers VertexCount() int VertexData() any VertexSize() int IndexCount() int IndexData() any IndexSize() int Min() vec3.T Max() vec3.T Positions(func(vec3.T)) Triangles(iter func(Triangle)) }
func CollisionMesh ¶
type MutableMesh ¶
type MutableMesh[V Vertex, I Index] interface { Mesh Vertices() []V Indices() []I Update(vertices []V, indices []I) }
func NewLines ¶
func NewLines[T Vertex, K Index](key string, vertices []T, indices []K) MutableMesh[T, K]
func NewMesh ¶
func NewMesh[V Vertex, I Index](key string, primitive Primitive, vertices []V, indices []I) MutableMesh[V, I]
func NewTriangles ¶
func NewTriangles[V Vertex, I Index](key string, vertices []V, indices []I) MutableMesh[V, I]
type Pointer ¶
type Pointers ¶
type Pointers []Pointer
func ParsePointers ¶
func ParsePointers(data interface{}) Pointers
func (Pointers) BufferString ¶
type Primitive ¶
type Primitive core1_0.PrimitiveTopology
type T ¶
type T struct { P vec3.T `vtx:"position,float,3"` N vec3.T `vtx:"normal,float,3"` T vec2.T `vtx:"texcoord_0,float,2"` }
T - Textured Vertex
Click to show internal directories.
Click to hide internal directories.