scene

package
v0.0.0-...-6663aec Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2019 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 AlignXSquare

type AlignXSquare struct {
	X  float64 `json:"x"`
	Y1 float64 `json:"y_1"`
	Y2 float64 `json:"y_2"`
	Z1 float64 `json:"z_1"`
	Z2 float64 `json:"z_2"`
}

type AlignYSquare

type AlignYSquare struct {
	X1 float64 `json:"x_1"`
	X2 float64 `json:"x_2"`
	Y  float64 `json:"y"`
	Z1 float64 `json:"z_1"`
	Z2 float64 `json:"z_2"`
}

type AlignZSquare

type AlignZSquare struct {
	X1 float64 `json:"x_1"`
	X2 float64 `json:"x_2"`
	Y1 float64 `json:"y_1"`
	Y2 float64 `json:"y_2"`
	Z  float64 `json:"z"`
}

type AlignedBox

type AlignedBox struct {
	CornerA xmath.Vector `json:"a"`
	CornerB xmath.Vector `json:"b"`
}

type Camera

type Camera struct {
	Location             xmath.Vector `json:"location"`
	LookingAt            xmath.Vector `json:"looking_at"`
	UpDirection          xmath.Vector `json:"up_direction"`
	FieldOfViewInRadians float64      `json:"field_of_view_in_radians"`
	FocalLength          float64      `json:"focal_length"`
	FocalRatio           float64      `json:"focal_ratio"`
	AspectWide           int          `json:"aspect_wide"`
	AspectHigh           int          `json:"aspect_high"`
}

type Disc

type Disc struct {
	Center xmath.Vector `json:"center"`
	Radius float64      `json:"radius"`
	// TODO: Should just accept any norm.
	UnitNorm xmath.Vector `json:"unit_norm"`
}

type Material

type Material struct {
	Colour    colour.Colour `json:"colour"`
	Emittance float64       `json:"emittance"`
	Mirror    bool          `json:"mirror"`
}

type Object

type Object struct {
	Surface  Surface  `json:"surface"`
	Material Material `json:"material"`
}

type Pipe

type Pipe struct {
	EndpointA xmath.Vector `json:"endpoint_a"`
	EndpointB xmath.Vector `json:"endpoint_b"`
	Radius    float64      `json:"radius"`
}

type Scene

type Scene struct {
	Camera  Camera
	Objects []Object
}

type Sphere

type Sphere struct {
	Center xmath.Vector `json:"center"`
	Radius float64      `json:"radius"`
}

type Surface

type Surface struct {
	Triangles     []Triangle     `json:"triangles,omitempty"`
	AlignedBoxes  []AlignedBox   `json:"aligned_boxes,omitempty"`
	Spheres       []Sphere       `json:"spheres,omitempty"`
	AlignXSquares []AlignXSquare `json:"align_x_squares,omitempty"`
	AlignYSquares []AlignYSquare `json:"align_y_squares,omitempty"`
	AlignZSquares []AlignZSquare `json:"align_z_squares,omitempty"`
	Discs         []Disc         `json:"discs,omitempty"`
	Pipes         []Pipe         `json:"pipes,omitempty"`
}

type Triangle

type Triangle struct {
	A xmath.Vector `json:"a"`
	B xmath.Vector `json:"b"`
	C xmath.Vector `json:"c"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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