collision

package
v0.0.0-...-b8d9494 Latest Latest
Warning

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

Go to latest
Published: May 13, 2021 License: BSD-3-Clause, 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