Documentation ¶
Index ¶
- Variables
- type CommandId
- type CommandType
- type LightInfo
- type LightType
- type LodObjectInfo
- type ObjectCommand
- type ObjectInfo
- type ObjectManager
- type ObjectParser
- type ObjectPointPool
- func (self *ObjectPointPool) AddPoint(xyz [3]float32, st [2]float32) int32
- func (self *ObjectPointPool) CalcTriNormal(idx1, idx2, idx3 int32)
- func (self *ObjectPointPool) NormalizeNormals()
- func (self *ObjectPointPool) PreparePoolToDraw()
- func (self *ObjectPointPool) Purge()
- func (self *ObjectPointPool) Size() int
- type VecRGB
- type VecTex
Constants ¶
This section is empty.
Variables ¶
View Source
var ( LandingLightColor = [4]float32{1.0, 1.0, 0.7, 0.6} StrobeLightColor = [4]float32{1.0, 1.0, 1.0, 0.7} )
View Source
var ObjectManagerInstance = &ObjectManager{make(map[string]*ObjectInfo), sync.RWMutex{}}
Functions ¶
This section is empty.
Types ¶
type CommandId ¶
type CommandId int
const ( CommandId_ObjEnd CommandId = iota CommandId_ObjLight CommandId_ObjLine CommandId_ObjTri CommandId_ObjQuad CommandId_ObjQuadHard CommandId_ObjQuadCockpit CommandId_ObjSmokeBlack CommandId_ObjSmokeWhite CommandId_ObjMovie CommandId_ObjPolygon CommandId_ObjQuadStrip CommandId_ObjTriStrip CommandId_ObjTriFan CommandId_AttrShadeFlat CommandId_AttrShadeSmooth CommandId_AttrAmbientRGB CommandId_AttrDiffuseRGB CommandId_AttrEmissionRGB CommandId_AttrSpecularRGB CommandId_AttrShinyRat CommandId_AttrNoDepth CommandId_AttrDepth CommandId_AttrLOD CommandId_AttrReset CommandId_AttrCull CommandId_AttrNoCull CommandId_AttrOffset CommandId_AttrMax )
type CommandType ¶
type CommandType int
const ( CommandType_None CommandType = iota CommandType_PtLine CommandType_Poly CommandType_Attr )
type LightInfo ¶
func NewLightInfo ¶
type LodObjectInfo ¶
type LodObjectInfo struct { NearDist float32 // The visible range FarDist float32 // of this LOD TriangleList []int32 Lights []*LightInfo PointPool *ObjectPointPool Dl uint32 }
func NewLodObjectInfo ¶
func NewLodObjectInfo(nearDist, farDist float32) *LodObjectInfo
type ObjectCommand ¶
type ObjectCommand struct { CmdId CommandId CmdType CommandType Attributes []float32 St []VecTex RGB []VecRGB }
func FindObjectCommand ¶
func FindObjectCommand(token string) (*ObjectCommand, int)
func NewObjectCommand ¶
func NewObjectCommand(cmdId CommandId, cmdType CommandType) *ObjectCommand
type ObjectInfo ¶
type ObjectInfo struct { Path string DefaultTexture string Lods []*LodObjectInfo }
func NewObjectInfo ¶
func NewObjectInfo(objFile string) (*ObjectInfo, error)
type ObjectManager ¶
type ObjectManager struct {
// contains filtered or unexported fields
}
func (*ObjectManager) GetObject ¶
func (self *ObjectManager) GetObject(path string) (objInfo *ObjectInfo, err error)
type ObjectParser ¶
type ObjectParser struct {
// contains filtered or unexported fields
}
func NewObjectParser ¶
func NewObjectParser(objFilePath string) (*ObjectParser, error)
func (*ObjectParser) CurrentLine ¶
func (self *ObjectParser) CurrentLine() int
func (*ObjectParser) Err ¶
func (self *ObjectParser) Err() error
func (*ObjectParser) GetCommands ¶
func (self *ObjectParser) GetCommands() []*ObjectCommand
func (*ObjectParser) GetTexture ¶
func (self *ObjectParser) GetTexture() string
func (*ObjectParser) Parse ¶
func (self *ObjectParser) Parse()
type ObjectPointPool ¶
type ObjectPointPool struct {
// contains filtered or unexported fields
}
func NewObjectPointPool ¶
func NewObjectPointPool() *ObjectPointPool
func (*ObjectPointPool) AddPoint ¶
func (self *ObjectPointPool) AddPoint(xyz [3]float32, st [2]float32) int32
func (*ObjectPointPool) CalcTriNormal ¶
func (self *ObjectPointPool) CalcTriNormal(idx1, idx2, idx3 int32)
func (*ObjectPointPool) NormalizeNormals ¶
func (self *ObjectPointPool) NormalizeNormals()
func (*ObjectPointPool) PreparePoolToDraw ¶
func (self *ObjectPointPool) PreparePoolToDraw()
func (*ObjectPointPool) Purge ¶
func (self *ObjectPointPool) Purge()
func (*ObjectPointPool) Size ¶
func (self *ObjectPointPool) Size() int
Click to show internal directories.
Click to hide internal directories.