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