physicsAPI

package
v0.0.0-...-5b12917 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2017 License: GPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CharacterController

type CharacterController interface {
	Delete()
	Warp(position mgl32.Vec3)
	Jump()
	SetWalkDirection(dir mgl32.Vec3)
	SetVelocityForTimeInterval(speed mgl32.Vec3, time float32)

	SetUpAxis(axis int)
	SetFallSpeed(speed float32)
	SetJumpSpeed(speed float32)
	SetMaxJumpHeight(height float32)
	SetGravity(gravity float32)
	SetMaxSlope(radian float32)

	GetPosition() mgl32.Vec3
	CanJump() bool
	GetGravity() float32
	GetMaxSlope() float32
	OnGround() bool
}

type Constraint

type Constraint interface{}

type ConstraintSolver

type ConstraintSolver interface {
	SolveGroup(stepTime float32, constraints *[]Constraint)
}

type PhysicsObject

type PhysicsObject interface {
	Delete()
	ApplyForce(force, position mgl32.Vec3)
	ApplyTorque(torque mgl32.Vec3)

	GetPosition() mgl32.Vec3
	GetVelocity() mgl32.Vec3
	GetOrientation() mgl32.Quat
	GetAngularVelocityVector() mgl32.Vec3
	GetMass() float32
	GetRadius() float32
	GetFriction() float32
	GetRestitution() float32
	InertiaTensor() mgl32.Mat3
	IsStatic() bool

	SetPosition(position mgl32.Vec3)
	SetVelocity(velocity mgl32.Vec3)
	SetOrientation(orientation mgl32.Quat)
	SetAngularVelocityVector(av mgl32.Vec3)
	SetMass(mass float32)
	SetRadius(radius float32)
	SetFriction(friction float32)
	SetRestitution(restitution float32)
}

type PhysicsObject2D

type PhysicsObject2D interface {
	KineticEnergy() float32
	SetMass(mass float32)
	SetMoment(moment float32)
	GetMoment() float32
	SetAngle(angle float32)
	AddAngle(angle float32)
	GetMass() float32
	SetPosition(pos mgl32.Vec2)
	AddForce(force mgl32.Vec2)
	SetForce(force mgl32.Vec2)
	AddVelocity(velocity mgl32.Vec2)
	SetVelocity(velocity mgl32.Vec2)
	AddTorque(t float32)
	GetTorque() float32
	GetAngularVelocity() float32
	SetTorque(t float32)
	AddAngularVelocity(w float32)
	SetAngularVelocity(w float32)
	GetVelocity() mgl32.Vec2
	GetPosition() mgl32.Vec2
	GetAngle() float32
}

type PhysicsSpace

type PhysicsSpace interface {
	Update(dt float64)
	SimulateStep(stepTime float32, subSteps int)
	Delete()
	AddObject(objects ...PhysicsObject)
	RemoveObject(objects ...PhysicsObject)
	AddCharacterController(characterController CharacterController)
	SetConstraintSolver(solver ConstraintSolver)
	AddConstraint(constraint Constraint)
	RemoveConstraints(constraint ...Constraint)
	SetGravity(gravity mgl32.Vec3)
	GetGravity() mgl32.Vec3
}

type PhysicsSpace2D

type PhysicsSpace2D interface {
	Update(dt float64)
	AddBody(body PhysicsObject2D)
	RemoveBody(body PhysicsObject2D)
	SetGravity(gravity mgl32.Vec2)
	GetGravity() mgl32.Vec2
}

Jump to

Keyboard shortcuts

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