intersections

package
Version: v0.0.0-...-7e8cd7c Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2014 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HIT_FROM_INSIDE = -1
	MISS            = 0
	HIT             = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HitType

type HitType int

func IntersectRayPlane

func IntersectRayPlane(r core.Ray, plane *core.Plane, maxDist float64) (hit HitType, dist float64)

func IntersectRaySphere

func IntersectRaySphere(r core.Ray, sphere *core.Sphere, maxDist float64) (hit HitType, dist float64)

func IntersectRayTriangle

func IntersectRayTriangle(r core.Ray, p1, p2, p3 core.Vec3, maxDist float64) (hit HitType, dist float64)

Assumes the ray and triangle points are in the same space

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL