Documentation
¶
Index ¶
- func NodeTransform(node *collada.Node) glm.Mat4d
- func Quaternion(m glm.Mat3d) glm.Quatd
- func RotationComponent(m glm.Mat4d) glm.Mat3d
- type Context
- type Geometry
- type Index
- type IndexPair
- type Mesh
- type Model
- func EmptyModel(name string) *Model
- func LoadModel(index *Index, node *collada.Node, geometryTemplates map[collada.Id][]*Geometry) (*Model, bool)
- func LoadSceneAsModel(filename string) (*Model, error)
- func NewModel(name string, children []*Model, geometry []*Geometry, transform glm.Mat4d) *Model
- func NewSingleModel(name string, triangles *Triangles, transform glm.Mat4d) *Model
- type Triangles
- type Vehicle
- func (v *Vehicle) Destroy()
- func (v *Vehicle) Position() ode.Vector3
- func (v *Vehicle) Quaternion() ode.Quaternion
- func (v *Vehicle) Rotation() ode.Matrix3
- func (v *Vehicle) Set(in *protocol.Input)
- func (v *Vehicle) SetPosition(pos ode.Vector3)
- func (v *Vehicle) Update(dt float64)
- func (v *Vehicle) Wheel(index int) *Wheel
- type Wheel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NodeTransform ¶
Types ¶
type Context ¶
type Context struct { sync.RWMutex ode.World Space ode.Space JointGroup ode.JointGroup Profile protocol.Profile // contains filtered or unexported fields }
Context ...
func (*Context) AddVehicle ¶
AddVehicle ...
func (*Context) Iter ¶
func (ctx *Context) Iter(step time.Duration, callback ode.NearCallback)
Iter ...
func (*Context) IterVehicles ¶
IterVehicles ...
type Geometry ¶
func NewGeometry ¶
type Index ¶
type Model ¶
type Model struct { Name string Transform glm.Mat4d BaseTransform glm.Mat4d Geometry []*Geometry Children []*Model Parent *Model Unit float64 }
func EmptyModel ¶
func LoadSceneAsModel ¶
func NewSingleModel ¶
func (*Model) AddGeometry ¶
func (*Model) WorldTransform ¶
type Vehicle ¶
type Vehicle struct {
// contains filtered or unexported fields
}
Vehicle ...
func NewVehicle ¶
func NewVehicle(ctx *Context, profile protocol.VehicleProfile) *Vehicle
NewVehicle ...
func (*Vehicle) Quaternion ¶
func (v *Vehicle) Quaternion() ode.Quaternion
func (*Vehicle) SetPosition ¶
type Wheel ¶
type Wheel struct { Joint ode.Hinge2Joint // contains filtered or unexported fields }
Wheel ...
func (*Wheel) Quaternion ¶
func (w *Wheel) Quaternion() ode.Quaternion
Click to show internal directories.
Click to hide internal directories.