engine: github.com/g3n/engine/experimental/collision Index | Files | Directories

package collision

import "github.com/g3n/engine/experimental/collision"

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


Package Files

collision.go contact.go doc.go matrix.go

func CheckConvex Uses

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

type Contact Uses

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

Contact describes a contact point, normal, and depth.

type Matrix Uses

type Matrix [][]bool

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

func NewMatrix Uses

func NewMatrix() Matrix

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

func (*Matrix) Get Uses

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

Get returns whether i and j are colliding.

func (*Matrix) Reset Uses

func (m *Matrix) Reset()

Reset clears all values.

func (*Matrix) Set Uses

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

Set sets whether i and j are colliding.



Package collision imports 2 packages (graph) and is imported by 2 packages. Updated 2018-07-30. Refresh now. Tools for package owners.