scene_objects

package
v0.0.0-...-7881847 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2014 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Camera

type Camera struct {
	Position Point3D
}

type Intersection

type Intersection struct {
	Object   Sphere
	ObjectId int
	Distance float64
	HitPoint Point3D
}

type Light

type Light struct {
	Position Point3D
}

type Point3D

type Point3D struct {
	X, Y, Z float64
}

func (*Point3D) Add

func (p *Point3D) Add(p1 Point3D) Point3D

func (*Point3D) ComputeDistance

func (p *Point3D) ComputeDistance(p1 Point3D) float64

func (*Point3D) Multiply

func (p *Point3D) Multiply(f1 float64) Point3D

TODO: there should be a struct like point3d representing a vector and this method belongs there

func (*Point3D) Normalize

func (p *Point3D) Normalize() Point3D

TODO: there should be a struct like point3d representing a vector and this method belongs there

func (*Point3D) Pow

func (p *Point3D) Pow(f float64) Point3D

func (*Point3D) ScalarProd

func (p *Point3D) ScalarProd(p1 Point3D) float64

TODO: there should be a struct like point3d representing a vector and this method belongs there

func (*Point3D) Subtract

func (p *Point3D) Subtract(p1 Point3D) Point3D

type Ray

type Ray struct {
	Origin, Direction Point3D
}

func (*Ray) PointInRay

func (r *Ray) PointInRay(t float64) Point3D

type Sphere

type Sphere struct {
	Center      Point3D
	SphereRay   float64
	SphereColor color.RGBA

	//Properties of the object:
	//Should they be referenced in an Object Interface?
	RefractiveIndex float64
}

Jump to

Keyboard shortcuts

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