Documentation ¶
Index ¶
- Constants
- func AxisAlignedBoudingBox(vertices []vertex) (center, extent vector.Vector3)
- func CStruct() string
- func MeshToTriangleMesh(m *Mesh) *triangleMesh
- func ReadBinaryMeshHeader(filename string) (BinaryMeshHeader, []BinaryVertexAttrib)
- func VectorToBytes(v vector.Vector3, format VertexAttribDesc) []byte
- func VectorToInt16(v vector.Vector3, normalized bool) [3]int16
- type BinaryMeshHeader
- type BinarySurfaceDesc
- type BinaryVertexAttrib
- type FaceVert
- type Mesh
- type Polygon
- type Scene
- type VertexAttribDesc
- type VertexAttribName
- type VertexAttribType
Constants ¶
View Source
const ( MaxFloat32 = float64(^uint32(0)) MaxInt32 = float64(^uint32(0)>>1 - 1) MaxInt16 = float64(^uint16(0)>>1 - 1) MaxUint16 = float64(^uint16(0) - 1) MaxInt8 = float64(^uint8(0)>>1 - 1) MaxUint8 = float64(^uint8(0) - 1) )
used for attribute normalization
Variables ¶
This section is empty.
Functions ¶
func AxisAlignedBoudingBox ¶
func ReadBinaryMeshHeader ¶
func ReadBinaryMeshHeader(filename string) (BinaryMeshHeader, []BinaryVertexAttrib)
func VectorToBytes ¶
func VectorToBytes(v vector.Vector3, format VertexAttribDesc) []byte
Types ¶
type BinaryMeshHeader ¶
type BinarySurfaceDesc ¶
type BinarySurfaceDesc struct {
StartIndex, Count uint32
}
type BinaryVertexAttrib ¶
struct describing what composes a vertex
type Mesh ¶
type Mesh struct { Name string SurfaceCount uint Positions, Texcos, Normals []vector.Vector3 Polygons []Polygon }
A generic mesh structure
type VertexAttribDesc ¶
type VertexAttribDesc struct { Name VertexAttribName Count uint Type VertexAttribType Normalized bool }
type VertexAttribName ¶
type VertexAttribName uint32
const ( Position VertexAttribName = iota Normal Color Texco0 Texco1 TangentDet )
type VertexAttribType ¶
type VertexAttribType uint32
const ( Float32 VertexAttribType = iota Int32 Int16 Uint16 Int8 Uint8 )
func (VertexAttribType) ByteSize ¶
func (t VertexAttribType) ByteSize() (size uint)
Click to show internal directories.
Click to hide internal directories.