bullet

package
v0.0.0-...-73aabcd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2020 License: BSD-3-Clause Imports: 4 Imported by: 1

Documentation

Overview

Package bullet implements the core.PhysicsSystem interface by wrapping the Bullet physics library.

Index

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

func (*PhysicsSystem) Update

func (p *PhysicsSystem) Update(dt float64, nodes []*core.Node)

Update implements the core.PhysicsSystem interface fixme: remove gosg dependencies by passing a RigidBodyVec instead of NodeVec

type RigidBody

type RigidBody struct {
	// contains filtered or unexported fields
}

RigidBody implements the core.RigidBody interface

func (RigidBody) ApplyImpulse

func (r RigidBody) ApplyImpulse(impulse mgl64.Vec3, localPoint mgl64.Vec3)

ApplyImpulse implements the core.RigidBody interface

func (RigidBody) GetTransform

func (r RigidBody) GetTransform() mgl64.Mat4

GetTransform implements the core.RigidBody interface

func (RigidBody) SetTransform

func (r RigidBody) SetTransform(transform mgl64.Mat4)

SetTransform implements the core.RigidBody interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL