mesh

package
v0.0.0-...-ddc071b Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mesh

type Mesh struct {
	Vertexes []vector.Vec
	Normals  []vector.Vec
}

Triangle Mesh Storage - Implements Collider Interface

func Box

func Box(w float32, h float32, d float32, o vector.Vec) Mesh

Triangle Mesh Box with 12 Triangles // 36 Vertexes

func InitMesh

func InitMesh(vertices []vector.Vec, origin vector.Vec) Mesh

Init Mesh Creates a linear triangle list from List of Vertices

func (*Mesh) Collision

func (g *Mesh) Collision(P vector.Vec, V vector.Vec, dt float64, r float32) (vector.Vec, vector.Vec, vector.Vec, bool)

Collision checks for collision with underlying mesh Returns Normal, Barycentric Coords, Collision Point, Collision Bool

func (*Mesh) GenerateBoundaryParticles

func (g *Mesh) GenerateBoundaryParticles(density float32) []float32

Generates particles in world space given the world space triangles

func (*Mesh) PrintNormals

func (g *Mesh) PrintNormals()

Jump to

Keyboard shortcuts

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