material

package
v0.0.0-...-9c88ebf Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Color

type Color struct {
	R, G, B float64
}

Color is an RGB color where each value is in the range 0 to 1.

func Avg

func Avg(colors ...*Color) *Color

Avg finds the average of a set of colors.

func RGBAColor

func RGBAColor(c *color.RGBA) *Color

RGBAColor converts an RGBA color to Color.

func Radiate

func Radiate(colors ...*Color) *Color

Radiate compounds the brightness of a set of colors.

func Reflect

func Reflect(colors ...*Color) *Color

Reflect finds the product of a set of colors - this is for Raytracing reflections.

func (*Color) RGBA

func (c *Color) RGBA() *color.RGBA

RGBA converts a color to an RGBA color with A set to 255.

func (*Color) Scale

func (c *Color) Scale(scale float64) *Color

Scale multiplies all values of a color by a scale factor.

type Material

type Material struct {
	Specular    angle.Rad
	Color       *Color
	Diffuse     angle.Rad
	Luminous    float64
	Border      float64
	BorderColor *Color
}

Material holds information that different renderers can use to shade a material.

Jump to

Keyboard shortcuts

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