primitivelist

package
v0.0.0-...-77601ef Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByXPos

type ByXPos PrimitiveList

ByXPos is a sort technique to sort by X axis location

func (ByXPos) Len

func (a ByXPos) Len() int

func (ByXPos) Less

func (a ByXPos) Less(i, j int) bool

func (ByXPos) Swap

func (a ByXPos) Swap(i, j int)

type ByYPos

type ByYPos PrimitiveList

ByYPos is a sort technique to sort by Y axis location

func (ByYPos) Len

func (a ByYPos) Len() int

func (ByYPos) Less

func (a ByYPos) Less(i, j int) bool

func (ByYPos) Swap

func (a ByYPos) Swap(i, j int)

type ByZPos

type ByZPos PrimitiveList

ByZPos is a sort technique to sort by Z axis location

func (ByZPos) Len

func (a ByZPos) Len() int

func (ByZPos) Less

func (a ByZPos) Less(i, j int) bool

func (ByZPos) Swap

func (a ByZPos) Swap(i, j int)

type PrimitiveList

type PrimitiveList struct {
	List []primitive.Primitive
}

PrimitiveList holds a list of Primitives to process

func FromElements

func FromElements(primitives ...primitive.Primitive) (*PrimitiveList, error)

FromElements creates a primitive list from variadic inputs

func (*PrimitiveList) BoundingBox

func (pl *PrimitiveList) BoundingBox(t0, t1 float64) (*aabb.AABB, bool)

BoundingBox returns an AABB of this object

func (*PrimitiveList) Copy

func (pl *PrimitiveList) Copy() primitive.Primitive

Copy returns a shallow copy of this object

func (*PrimitiveList) FirstHalfCopy

func (pl *PrimitiveList) FirstHalfCopy() *PrimitiveList

FirstHalfCopy returns a new list with a copy of the first n/2 elements

func (*PrimitiveList) Intersection

func (pl *PrimitiveList) Intersection(ray geometry.Ray, tMin, tMax float64, rng *rand.Rand) (*material.RayHit, bool)

Intersection computer the intersection of this list and a given ray

func (*PrimitiveList) IsClosed

func (pl *PrimitiveList) IsClosed() bool

IsClosed returns whether this object is closed

func (*PrimitiveList) IsInfinite

func (pl *PrimitiveList) IsInfinite() bool

IsInfinite returns whether this object is infinite

func (*PrimitiveList) LastHalfCopy

func (pl *PrimitiveList) LastHalfCopy() *PrimitiveList

LastHalfCopy returns a new list with a copy of the last n/2 - 1 elements

func (*PrimitiveList) SetMaterial

func (pl *PrimitiveList) SetMaterial(m material.Material)

SetMaterial sets this object's material

Jump to

Keyboard shortcuts

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