Documentation ¶
Overview ¶
Package bullet implements the core.PhysicsSystem interface by wrapping the Bullet physics library.
Index ¶
- type CollisionShape
- type PhysicsSystem
- func (p *PhysicsSystem) AddRigidBody(rigidBody core.RigidBody)
- func (p *PhysicsSystem) CreateRigidBody(mass float32, shape core.CollisionShape) core.RigidBody
- func (p *PhysicsSystem) DeleteRigidBody(body core.RigidBody)
- func (p *PhysicsSystem) DeleteShape(shape core.CollisionShape)
- func (p *PhysicsSystem) NewBoxShape(box mgl64.Vec3) core.CollisionShape
- func (p *PhysicsSystem) NewCapsuleShape(radius float64, height float64) core.CollisionShape
- func (p *PhysicsSystem) NewCompoundShape() core.CollisionShape
- func (p *PhysicsSystem) NewConeShape(radius float64, height float64) core.CollisionShape
- func (p *PhysicsSystem) NewConvexHullShape() core.CollisionShape
- func (p *PhysicsSystem) NewCylinderShape(radius float64, height float64) core.CollisionShape
- func (p *PhysicsSystem) NewSphereShape(radius float64) core.CollisionShape
- func (p *PhysicsSystem) NewStaticPlaneShape(normal mgl64.Vec3, constant float64) core.CollisionShape
- func (p *PhysicsSystem) NewStaticTriangleMeshShape(mesh core.Mesh) core.CollisionShape
- func (p *PhysicsSystem) RemoveRigidBody(rigidBody core.RigidBody)
- func (p *PhysicsSystem) SetGravity(g mgl64.Vec3)
- func (p *PhysicsSystem) Start()
- func (p *PhysicsSystem) Stop()
- func (p *PhysicsSystem) Update(dt float64, nodes []*core.Node)
- type RigidBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollisionShape ¶
type CollisionShape struct {
// contains filtered or unexported fields
}
CollisionShape implements the core.CollisionShape interface
func (CollisionShape) AddChildShape ¶
func (c CollisionShape) AddChildShape(s core.CollisionShape, p mgl64.Vec3, o mgl64.Quat)
AddChildShape implements the core.CollisionShape interface
func (CollisionShape) AddVertex ¶
func (c CollisionShape) AddVertex(v mgl64.Vec3)
AddVertex implements the core.CollisionShape interface
type PhysicsSystem ¶
type PhysicsSystem struct {
// contains filtered or unexported fields
}
PhysicsSystem implements the core.PhysicsSystem interface by wrapping the Bullet physics library.
func (*PhysicsSystem) AddRigidBody ¶
func (p *PhysicsSystem) AddRigidBody(rigidBody core.RigidBody)
AddRigidBody implements the core.PhysicsSystem interface
func (*PhysicsSystem) CreateRigidBody ¶
func (p *PhysicsSystem) CreateRigidBody(mass float32, shape core.CollisionShape) core.RigidBody
CreateRigidBody implements the core.PhysicsSystem interface
func (*PhysicsSystem) DeleteRigidBody ¶
func (p *PhysicsSystem) DeleteRigidBody(body core.RigidBody)
DeleteRigidBody implements the core.PhysicsSystem interface
func (*PhysicsSystem) DeleteShape ¶
func (p *PhysicsSystem) DeleteShape(shape core.CollisionShape)
DeleteShape implements the core.PhysicsSystem interface
func (*PhysicsSystem) NewBoxShape ¶
func (p *PhysicsSystem) NewBoxShape(box mgl64.Vec3) core.CollisionShape
NewBoxShape implements the core.PhysicsSystem interface
func (*PhysicsSystem) NewCapsuleShape ¶
func (p *PhysicsSystem) NewCapsuleShape(radius float64, height float64) core.CollisionShape
NewCapsuleShape implements the core.PhysicsSystem interface
func (*PhysicsSystem) NewCompoundShape ¶
func (p *PhysicsSystem) NewCompoundShape() core.CollisionShape
NewCompoundShape implements the core.PhysicsSystem interface
func (*PhysicsSystem) NewConeShape ¶
func (p *PhysicsSystem) NewConeShape(radius float64, height float64) core.CollisionShape
NewConeShape implements the core.PhysicsSystem interface
func (*PhysicsSystem) NewConvexHullShape ¶
func (p *PhysicsSystem) NewConvexHullShape() core.CollisionShape
NewConvexHullShape implements the core.PhysicsSystem interface
func (*PhysicsSystem) NewCylinderShape ¶
func (p *PhysicsSystem) NewCylinderShape(radius float64, height float64) core.CollisionShape
NewCylinderShape implements the core.PhysicsSystem interface
func (*PhysicsSystem) NewSphereShape ¶
func (p *PhysicsSystem) NewSphereShape(radius float64) core.CollisionShape
NewSphereShape implements the core.PhysicsSystem interface
func (*PhysicsSystem) NewStaticPlaneShape ¶
func (p *PhysicsSystem) NewStaticPlaneShape(normal mgl64.Vec3, constant float64) core.CollisionShape
NewStaticPlaneShape implements the core.PhysicsSystem interface
func (*PhysicsSystem) NewStaticTriangleMeshShape ¶
func (p *PhysicsSystem) NewStaticTriangleMeshShape(mesh core.Mesh) core.CollisionShape
NewStaticTriangleMeshShape implements the core.PhysicsSystem interface
func (*PhysicsSystem) RemoveRigidBody ¶
func (p *PhysicsSystem) RemoveRigidBody(rigidBody core.RigidBody)
RemoveRigidBody implements the core.PhysicsSystem interface
func (*PhysicsSystem) SetGravity ¶
func (p *PhysicsSystem) SetGravity(g mgl64.Vec3)
SetGravity implements the core.PhysicsSystem interface
func (*PhysicsSystem) Start ¶
func (p *PhysicsSystem) Start()
Start implements the core.PhysicsSystem interface
func (*PhysicsSystem) Stop ¶
func (p *PhysicsSystem) Stop()
Stop implements the core.PhysicsSystem interface
type RigidBody ¶
type RigidBody struct {
// contains filtered or unexported fields
}
RigidBody implements the core.RigidBody interface
func (RigidBody) ApplyImpulse ¶
ApplyImpulse implements the core.RigidBody interface
func (RigidBody) GetTransform ¶
GetTransform implements the core.RigidBody interface
func (RigidBody) SetTransform ¶
SetTransform implements the core.RigidBody interface