go3d

package
v0.0.0-...-750c5a3 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WHITE = Color{1, 1, 1, 1}
	BLACK = Color{0, 0, 0, 1}
)

Functions

This section is empty.

Types

type Color

type Color struct {
	R, G, B, A float64
}

func NewColor

func NewColor(r, g, b, a float64) Color

func (Color) NRGBA

func (c Color) NRGBA() color.NRGBA

type Device

type Device struct {
	Width  int
	Height int

	ColorBuffer *image.RGBA
}

func NewDevice

func NewDevice(width, height int) *Device

func (*Device) Clear

func (d *Device) Clear(c Color)

func (*Device) Image

func (d *Device) Image() image.Image

func (*Device) SetPixel

func (d *Device) SetPixel(x, y int, c Color)

type Face

type Face struct {
	V1, V2, V3 int
}

type Mesh

type Mesh struct {
	Vertices []Vector
	Faces    []Face
}

func NewMesh

func NewMesh() Mesh

Jump to

Keyboard shortcuts

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