Documentation ¶
Index ¶
Constants ¶
View Source
const MaxLights = 3
Variables ¶
View Source
var Identity = func() gfx.Matrix { var identity gfx.Matrix identity.Identity() return identity }()
Functions ¶
This section is empty.
Types ¶
type BakedModelObject ¶
type BakedModelObject struct {
// contains filtered or unexported fields
}
type BufferData ¶
type Model ¶
type Model struct { // v: List of geometric vertices, with (x, y, z [,w]) coordinates. // w is optional and defaults to 1.0. Vertex []gfx.Vector // vt: List of texture coordinates, in (u, [,v ,w]) coordinates. // These will vary between 0 and 1. v, w are optional and default to 0. // We don't use w, so it is omitted from the parsed data. TexCoord [][2]float32 // vn: List of vertex Normals in (x,y,z) form; Normals might not be unit vectors. Normals [][3]float32 Objects []*ModelObjectFaces }
type ModelInstance ¶
type ModelObject ¶
type ModelObject struct { Name string Material string Tex *gfx.AssetTexture ShaderMode int Transparent bool // i: vendor-specific (Spy Cards Online) extension: instance of other object. // i Name x y z rx ry rz sx sy sz Instances []*ModelInstance Buffer []BufferData // contains filtered or unexported fields }
func NewObject ¶
func NewObject(name string) *ModelObject
func Object ¶
func Object(name string) *ModelObject
func SceneBaseObject ¶
func SceneBaseObject(name string) *ModelObject
func SceneFurnitureObject ¶
func SceneFurnitureObject(name string) *ModelObject
func SpriteObject ¶
func SpriteObject(name string, s *sprites.Sprite) *ModelObject
func (*ModelObject) Bake ¶
func (o *ModelObject) Bake() []*BakedModelObject
func (*ModelObject) MarkDirty ¶
func (o *ModelObject) MarkDirty()
type ModelObjectFaces ¶
type ModelObjectFaces struct { *ModelObject // f: List of Faces. For simplicity, we assume Faces are always triangles. Faces [][3]ModelFace }
type Scene ¶
type SceneObject ¶
type SceneObject struct { Model *ModelObject Transform gfx.Matrix }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.