Documentation ¶
Index ¶
- type PhysSystem
- func (ps *PhysSystem) GetB2World() *box2d.B2World
- func (ps *PhysSystem) NewB2Body(def *box2d.B2BodyDef) *box2d.B2Body
- func (ps *PhysSystem) PhysUpdate(gb interfaces.IGameBase) error
- func (ps *PhysSystem) RegisterRigidbody(rb interfaces.IRigidbody)
- func (ps *PhysSystem) UnregisterRigidbody(rb interfaces.IRigidbody)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PhysSystem ¶
type PhysSystem struct {
// contains filtered or unexported fields
}
An interface over Box2D that defines all the physics in the scene.
func (*PhysSystem) GetB2World ¶
func (ps *PhysSystem) GetB2World() *box2d.B2World
Returns Box2D world.
func (*PhysSystem) NewB2Body ¶
func (ps *PhysSystem) NewB2Body(def *box2d.B2BodyDef) *box2d.B2Body
Returns new Box2D body that created in the Box2D world.
func (*PhysSystem) PhysUpdate ¶
func (ps *PhysSystem) PhysUpdate(gb interfaces.IGameBase) error
func (*PhysSystem) RegisterRigidbody ¶
func (ps *PhysSystem) RegisterRigidbody(rb interfaces.IRigidbody)
Registers the rigidbody in the rigidbodies registry. All the non-registered rigidbodies wouldn't be calculated.
func (*PhysSystem) UnregisterRigidbody ¶
func (ps *PhysSystem) UnregisterRigidbody(rb interfaces.IRigidbody)
Unregisters the rigidbody.
Click to show internal directories.
Click to hide internal directories.