Documentation ¶
Index ¶
- Constants
- func DirectionV3ToQuaternion(v3 *lin.V3) ode.Quaternion
- func EulerToQuaternion(yaw, pitch, roll float64) *lin.Q
- func GetCollideHandler(w *World) func(data interface{}, obj1, obj2 ode.Geom)
- func Q_LinToMsg(q *lin.Q) (msg *Quaternion)
- func Q_LinToOde(q *lin.Q) ode.Quaternion
- func Q_MsgToOde(msg *Quaternion) (q ode.Quaternion)
- func Q_OdeToLin(q ode.Quaternion) *lin.Q
- func Q_OdeToMsg(q ode.Quaternion) (msg *Quaternion)
- func SetAllBits() int
- func SetBitExcept(b int, bits ...uint) int
- func SetBits(b int, bits ...uint) int
- func V3_LinToMsg(p *lin.V3) (msg *Vector3)
- func V3_LinToOde(v3 *lin.V3) ode.Vector3
- func V3_MsgToOde(msg *Vector3) (v3 ode.Vector3)
- func V3_OdeToLin(q ode.Vector3) *lin.V3
- func V3_OdeToMsg(v3 ode.Vector3) (msg *Vector3)
- type CollideCallback
- type Obj
- func (obj *Obj) AddBody(body ode.Body)
- func (obj *Obj) AddGeom(geom ode.Geom)
- func (obj *Obj) ClearAOE()
- func (obj *Obj) Collide(obj2 *Obj)
- func (obj *Obj) CreateAOE(space ode.Space, radius float64)
- func (obj *Obj) Destroy()
- func (obj *Obj) GetData() *ObjData
- func (obj *Obj) InAOE(entityId int64, p ode.Vector3)
- func (obj *Obj) LoopCollideObj(f func(obj *Obj, times int64) bool)
- func (obj *Obj) ResetCollide()
- func (obj *Obj) SetData(objData ObjData)
- func (obj *Obj) SyncAOEPos()
- type ObjData
- type Objs
- type World
- func (w *World) AddObj(id int64, obj *Obj)
- func (w *World) CreateEntity(objName string, id int64, pos lin.V3, rot lin.Q)
- func (w *World) CreateTerrain()
- func (w *World) DeleteObj(id int64)
- func (w *World) Destroy()
- func (w *World) GetAllTransform() (pos *Position)
- func (w *World) GetTransform(id int64) (p *lin.V3, q *lin.Q)
- func (w *World) Init(roomId int64)
- func (w *World) Move(id int64, v float64, omega float64)
- func (w *World) PhysicUpdate()
- func (w *World) SetTranform(id int64, t *TransForm)
- type WorldData
Constants ¶
View Source
const ( Player_Bit = iota Enemy_Bit Skill_Bit Terrain_Bit Specified_Bit AOE_Bit )
Variables ¶
This section is empty.
Functions ¶
func DirectionV3ToQuaternion ¶
func DirectionV3ToQuaternion(v3 *lin.V3) ode.Quaternion
func EulerToQuaternion ¶
func GetCollideHandler ¶
func Q_LinToMsg ¶
func Q_LinToOde ¶
func Q_LinToOde(q *lin.Q) ode.Quaternion
func Q_MsgToOde ¶
func Q_MsgToOde(msg *Quaternion) (q ode.Quaternion)
func Q_OdeToLin ¶
func Q_OdeToLin(q ode.Quaternion) *lin.Q
func Q_OdeToMsg ¶
func Q_OdeToMsg(q ode.Quaternion) (msg *Quaternion)
func SetAllBits ¶
func SetAllBits() int
func SetBitExcept ¶
func V3_LinToMsg ¶
func V3_MsgToOde ¶
func V3_OdeToMsg ¶
Types ¶
type CollideCallback ¶
type Obj ¶
type Obj struct { sync.Mutex CBody ode.Body CGeom ode.Geom Space ode.Space AOE ode.Geom OtherBodys []ode.Body OtherGeoms []ode.Geom Data *ObjData CollideObjs map[*Obj]int64 AOEObjs map[int64]ode.Vector3 }
func (*Obj) ResetCollide ¶
func (obj *Obj) ResetCollide()
func (*Obj) SyncAOEPos ¶
func (obj *Obj) SyncAOEPos()
type World ¶
type World struct { sync.RWMutex World ode.World Space ode.Space Floor ode.Plane CtGrp ode.JointGroup Objs Objs Cb func(data interface{}, obj1, obj2 ode.Geom) }
func (*World) CreateEntity ¶
func (*World) CreateTerrain ¶
func (w *World) CreateTerrain()
func (*World) GetAllTransform ¶
func (w *World) GetAllTransform() (pos *Position)
func (*World) PhysicUpdate ¶
func (w *World) PhysicUpdate()
func (*World) SetTranform ¶
Click to show internal directories.
Click to hide internal directories.