Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checker ¶
type Checker struct {
PatternBase
// contains filtered or unexported fields
}
Checker Basic checker pattern based on x-axis value
func MakeChecker ¶
MakeChecker Return a basic Checker pattern with two colors
type Gradient ¶
type Gradient struct {
PatternBase
// contains filtered or unexported fields
}
Gradient Basic gradient pattern based on x-axis value
func MakeGradient ¶
MakeGradient Return a basic gradient pattern with two colors
type Material ¶
type Material struct {
Pat Pattern
Ambient, Diffuse, Specular, Shininess, Reflective, Transparency, RefractiveIndex float64
}
Material Basic Phong material
func MakeDefaultMaterial ¶
func MakeDefaultMaterial() Material
MakeDefaultMaterial Create a basic material
type Pattern ¶
type Pattern interface {
ColorAt(primitives.PV) RGB
SetTransform(primitives.Matrix)
}
Pattern Patterns are represented with a GetColorAt function
type PatternBase ¶
type PatternBase struct {
// contains filtered or unexported fields
}
PatternBase Base class for Pattern objects
func MakePatternBase ¶
func MakePatternBase() PatternBase
MakePatternBase Make an empty PatternBase Object
func (PatternBase) PatternPoint ¶
func (pb PatternBase) PatternPoint(point primitives.PV) primitives.PV
PatternPoint Convert a point to pattern space
func (*PatternBase) SetTransform ¶
func (pb *PatternBase) SetTransform(transform primitives.Matrix)
SetTransform Parent class for pattern interface
type RGB ¶
type RGB struct {
PatternBase
// contains filtered or unexported fields
}
RGB represents red, green, and blue values for a color object
func (RGB) ColorAt ¶
func (r RGB) ColorAt(point primitives.PV) RGB
ColorAt Pattern interface function
func (RGB) ToImageRGBA ¶
ToImageRGBA Convert to an RGBA image format
type Stripe ¶
type Stripe struct {
PatternBase
// contains filtered or unexported fields
}
Stripe Basic stripe pattern based on x-axis value
func MakeStripe ¶
MakeStripe Make a stripe pattern from two patterns
type TestPattern ¶
type TestPattern struct {
PatternBase
}
TestPattern Basic pattern used for testing
func (TestPattern) ColorAt ¶
func (tp TestPattern) ColorAt(point primitives.PV) RGB
ColorAt Return the points as the color