collision

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2019 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package collision implements collision related algorithms and data structures. WARNING: This package is experimental and incomplete!

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckConvex

func CheckConvex(g1, g2 *geometry.Geometry) bool

Types

type Contact

type Contact struct {
	Point  math32.Vector3
	Normal math32.Vector3
	Depth  float32
}

Contact describes a contact point, normal, and depth.

type Matrix

type Matrix [][]bool

Matrix is a triangular collision matrix indicating which pairs of bodies are colliding.

func NewMatrix

func NewMatrix() Matrix

NewMatrix creates and returns a pointer to a new collision Matrix.

func (*Matrix) Get

func (m *Matrix) Get(i, j int) bool

Get returns whether i and j are colliding.

func (*Matrix) Reset

func (m *Matrix) Reset()

Reset clears all values.

func (*Matrix) Set

func (m *Matrix) Set(i, j int, val bool)

Set sets whether i and j are colliding.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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