collision

package
v0.0.0-...-b63c11a Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2018 License: BSD-2-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package collision implements collision related algorithms and data structures.

Package collision implements collision related algorithms and data structures.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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.

Jump to

Keyboard shortcuts

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