Documentation
¶
Index ¶
- type EPair
- type Entity
- func (ent *Entity) FloatForKey(key string) float32
- func (ent *Entity) FloatForKeyWithDefault(key string, defaultValue float32) float32
- func (ent *Entity) IntForKey(key string) int
- func (ent *Entity) LightForKey(key string, useHDR bool, lightScale float32) (mgl32.Vec3, error)
- func (ent *Entity) LightForString(light string, useHDR bool, lightScale float32) (mgl32.Vec3, error)
- func (ent *Entity) ValueForKey(key string) string
- func (ent *Entity) ValueForKeyWithDefault(key string, defaultValue string) string
- func (ent *Entity) VectorForKey(key string) mgl32.Vec3
- type List
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entity ¶
"Abstract" Engine entity.
func FromVmfNode ¶
FromVmfNode parses a single Vmf node that represents an entity
func (*Entity) FloatForKey ¶
FloatForKey returns float value for key. 0 returned if key not found
func (*Entity) FloatForKeyWithDefault ¶
FloatForKeyWithDefault returns float value for key. Specified default value returned if key not found
func (*Entity) LightForKey ¶
LightForKey returns a Light-specific Vec3 for a key
func (*Entity) LightForString ¶
func (ent *Entity) LightForString(light string, useHDR bool, lightScale float32) (mgl32.Vec3, error)
LightForString returns a light-specific Vec3 for a string representation of a light This takes into account configuration of parameters: HDR, lightScale
func (*Entity) ValueForKey ¶
ValueForKey gets string value for a key Returns empty string "" if not found
func (*Entity) ValueForKeyWithDefault ¶
ValueForKeyWithDefault gets string value for key Returns a specified default if not found
type List ¶
type List struct {
// contains filtered or unexported fields
}
List is an entity list
func FromVmfNodeTree ¶
FromVmfNodeTree Build an entity list Constructs from the root node of Vmf entity data
func NewEntityList ¶
NewEntityList Create a new entity list from an existing slice of entities
func (*List) FindByKeyValue ¶
FindByKeyValue finds an entity by a key/value pair Note: Returns the first found entity, so non-unique pairing may be problematic
func (*List) FindForModel ¶
FindForModel finds an entity from a model id