object

package
v0.0.0-...-3626a0a Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2015 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSG

type CSG struct {
}

CSG (constructive solid geometry) combines other objects using union, intersection and difference.

type Cone

type Cone struct {
}

Cone has height and base radius 1 centered at the origin.

type Cylinder

type Cylinder struct {
}

Cylinder has height and radius 1 centered at the origin.

type Object

type Object struct {
	Transform    mgl64.Mat4
	InvTransform mgl64.Mat4
	MaterialName string
	IsectFn      bvh.IntersectFn
	// contains filtered or unexported fields
}

Object reprsents an object in the scene and can be intersected with rays.

func MakeObjects

func MakeObjects(opts *options.Options) ([]*Object, error)

MakeObjects creates new objects from the given options.

func (*Object) AABB

func (o *Object) AABB() *bvh.AABB

AABB implements the bvh.Intersector interface.

func (*Object) Intersect

func (o *Object) Intersect(r *ray.Ray, res *bvh.IntersectResult)

Intersect implements the bvh.Intersector interface.

type Triangle

type Triangle struct {
}

Triangle is made up of the points (0, 0, 0), (1, 0, 0), (0, 1, 0).

type Trimesh

type Trimesh struct {
}

Trimesh is a mesh of many triangles.

Jump to

Keyboard shortcuts

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