Documentation ¶
Index ¶
- type ChipmonkSpace
- func (cSpace *ChipmonkSpace) AddBody(body physicsAPI.PhysicsObject2D)
- func (cSpace *ChipmonkSpace) GetGravity() mgl32.Vec2
- func (cSpace *ChipmonkSpace) RemoveBody(body physicsAPI.PhysicsObject2D)
- func (cSpace *ChipmonkSpace) SetGravity(gravity mgl32.Vec2)
- func (cSpace *ChipmonkSpace) SetOnCollision(onCollision func(shapeA, shapeB *chipmunk.Shape))
- func (cSpace *ChipmonkSpace) Update(dt float64)
- type ChipmunkBody
- func (cBody *ChipmunkBody) AddAngle(angle float32)
- func (cBody *ChipmunkBody) AddAngularVelocity(w float32)
- func (cBody *ChipmunkBody) AddForce(force mgl32.Vec2)
- func (cBody *ChipmunkBody) AddTorque(t float32)
- func (cBody *ChipmunkBody) AddVelocity(velocity mgl32.Vec2)
- func (cBody *ChipmunkBody) GetAngle() float32
- func (cBody *ChipmunkBody) GetAngularVelocity() float32
- func (cBody *ChipmunkBody) GetMass() float32
- func (cBody *ChipmunkBody) GetMoment() float32
- func (cBody *ChipmunkBody) GetPosition() mgl32.Vec2
- func (cBody *ChipmunkBody) GetTorque() float32
- func (cBody *ChipmunkBody) GetVelocity() mgl32.Vec2
- func (cBody *ChipmunkBody) KineticEnergy() float32
- func (cBody *ChipmunkBody) SetAngle(angle float32)
- func (cBody *ChipmunkBody) SetAngularVelocity(w float32)
- func (cBody *ChipmunkBody) SetForce(force mgl32.Vec2)
- func (cBody *ChipmunkBody) SetMass(mass float32)
- func (cBody *ChipmunkBody) SetMoment(moment float32)
- func (cBody *ChipmunkBody) SetPosition(pos mgl32.Vec2)
- func (cBody *ChipmunkBody) SetTorque(t float32)
- func (cBody *ChipmunkBody) SetVelocity(velocity mgl32.Vec2)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChipmonkSpace ¶
type ChipmonkSpace struct { Space *chipmunk.Space OnCollision func(shapeA, shapeB *chipmunk.Shape) }
func NewChipmonkSpace ¶
func NewChipmonkSpace() *ChipmonkSpace
func (*ChipmonkSpace) AddBody ¶
func (cSpace *ChipmonkSpace) AddBody(body physicsAPI.PhysicsObject2D)
func (*ChipmonkSpace) GetGravity ¶
func (cSpace *ChipmonkSpace) GetGravity() mgl32.Vec2
func (*ChipmonkSpace) RemoveBody ¶
func (cSpace *ChipmonkSpace) RemoveBody(body physicsAPI.PhysicsObject2D)
func (*ChipmonkSpace) SetGravity ¶
func (cSpace *ChipmonkSpace) SetGravity(gravity mgl32.Vec2)
func (*ChipmonkSpace) SetOnCollision ¶
func (cSpace *ChipmonkSpace) SetOnCollision(onCollision func(shapeA, shapeB *chipmunk.Shape))
func (*ChipmonkSpace) Update ¶
func (cSpace *ChipmonkSpace) Update(dt float64)
type ChipmunkBody ¶
func NewChipmunkBody ¶
func NewChipmunkBody(mass, i float32) *ChipmunkBody
func NewChipmunkBodyStatic ¶
func NewChipmunkBodyStatic() *ChipmunkBody
func (*ChipmunkBody) AddAngle ¶
func (cBody *ChipmunkBody) AddAngle(angle float32)
func (*ChipmunkBody) AddAngularVelocity ¶
func (cBody *ChipmunkBody) AddAngularVelocity(w float32)
func (*ChipmunkBody) AddForce ¶
func (cBody *ChipmunkBody) AddForce(force mgl32.Vec2)
func (*ChipmunkBody) AddTorque ¶
func (cBody *ChipmunkBody) AddTorque(t float32)
func (*ChipmunkBody) AddVelocity ¶
func (cBody *ChipmunkBody) AddVelocity(velocity mgl32.Vec2)
func (*ChipmunkBody) GetAngle ¶
func (cBody *ChipmunkBody) GetAngle() float32
func (*ChipmunkBody) GetAngularVelocity ¶
func (cBody *ChipmunkBody) GetAngularVelocity() float32
func (*ChipmunkBody) GetMass ¶
func (cBody *ChipmunkBody) GetMass() float32
func (*ChipmunkBody) GetMoment ¶
func (cBody *ChipmunkBody) GetMoment() float32
func (*ChipmunkBody) GetPosition ¶
func (cBody *ChipmunkBody) GetPosition() mgl32.Vec2
func (*ChipmunkBody) GetTorque ¶
func (cBody *ChipmunkBody) GetTorque() float32
func (*ChipmunkBody) GetVelocity ¶
func (cBody *ChipmunkBody) GetVelocity() mgl32.Vec2
func (*ChipmunkBody) KineticEnergy ¶
func (cBody *ChipmunkBody) KineticEnergy() float32
func (*ChipmunkBody) SetAngle ¶
func (cBody *ChipmunkBody) SetAngle(angle float32)
func (*ChipmunkBody) SetAngularVelocity ¶
func (cBody *ChipmunkBody) SetAngularVelocity(w float32)
func (*ChipmunkBody) SetForce ¶
func (cBody *ChipmunkBody) SetForce(force mgl32.Vec2)
func (*ChipmunkBody) SetMass ¶
func (cBody *ChipmunkBody) SetMass(mass float32)
func (*ChipmunkBody) SetMoment ¶
func (cBody *ChipmunkBody) SetMoment(moment float32)
func (*ChipmunkBody) SetPosition ¶
func (cBody *ChipmunkBody) SetPosition(pos mgl32.Vec2)
func (*ChipmunkBody) SetTorque ¶
func (cBody *ChipmunkBody) SetTorque(t float32)
func (*ChipmunkBody) SetVelocity ¶
func (cBody *ChipmunkBody) SetVelocity(velocity mgl32.Vec2)
Click to show internal directories.
Click to hide internal directories.