impl

package
v0.0.0-...-62a3948 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WolfRayMarcherHeightMultiplier float64 = 3
View Source
var WolfRayMarcherMarchSize float64 = 2
View Source
var WolfRayMarcherMaxDepth int = 200

Functions

func GetActionName

func GetActionName(action glfw.Action) string

func GetModifierNames

func GetModifierNames(mods glfw.ModifierKey) string

func GetPointsBetween

func GetPointsBetween(point0 types.Point, point1 types.Point) []types.Point

func ImportWolfWorld

func ImportWolfWorld(path string) (types.WorldWolf, error)

Types

type BresenhamRenderer

type BresenhamRenderer struct {
	// contains filtered or unexported fields
}

func (*BresenhamRenderer) CanUseCurrentRawRenderer

func (br *BresenhamRenderer) CanUseCurrentRawRenderer() bool

func (*BresenhamRenderer) DrawLine

func (br *BresenhamRenderer) DrawLine(point0 types.Point, point1 types.Point, color types.PaletteIndex)

func (*BresenhamRenderer) DrawLineWithSampler

func (br *BresenhamRenderer) DrawLineWithSampler(point0 types.Point, point0s types.SamplerPoint, point1 types.Point, point1s types.SamplerPoint, sampler interfaces.Sampler)

func (*BresenhamRenderer) Parent

func (*BresenhamRenderer) SetParent

func (br *BresenhamRenderer) SetParent(rr interfaces.RawRenderer)

type DebugGrabber

type DebugGrabber struct {
	ValueToChange *bool
	WhichAction   glfw.Action
	Key           glfw.Key
	Mods          glfw.ModifierKey
	MouseButton   glfw.MouseButton
	MouseAction   glfw.Action
	MouseMods     glfw.ModifierKey
}

func (*DebugGrabber) GrabKey

func (dg *DebugGrabber) GrabKey(key glfw.Key, scancode int, action glfw.Action, mods glfw.ModifierKey) bool

func (*DebugGrabber) GrabMouse

func (dg *DebugGrabber) GrabMouse(button glfw.MouseButton, action glfw.Action, mods glfw.ModifierKey, posX float64, posY float64) bool

type FlatSampler

type FlatSampler struct {
	// contains filtered or unexported fields
}

func (*FlatSampler) GetAtPoint

func (fs *FlatSampler) GetAtPoint(_ types.SamplerPoint) types.PaletteIndex

func (*FlatSampler) GetColor

func (fs *FlatSampler) GetColor() types.PaletteIndex

func (*FlatSampler) SetColor

func (fs *FlatSampler) SetColor(color types.PaletteIndex)

type GradientCreator

type GradientCreator struct {
	// contains filtered or unexported fields
}

func (*GradientCreator) CanUseCurrentRawRenderer

func (gc *GradientCreator) CanUseCurrentRawRenderer() bool

func (*GradientCreator) CreateGradient

func (gc *GradientCreator) CreateGradient(color1, color2 types.Color, numSteps, startingIndex types.PaletteIndex) types.Gradient

func (*GradientCreator) Parent

func (gc *GradientCreator) Parent() interfaces.RawRenderer

func (*GradientCreator) SetParent

func (gc *GradientCreator) SetParent(rr interfaces.RawRenderer)

type GradientSampler

type GradientSampler struct {
	// contains filtered or unexported fields
}

func (*GradientSampler) GetAtPoint

func (fs *GradientSampler) GetAtPoint(point types.SamplerPoint) types.PaletteIndex

func (*GradientSampler) GetGradient

func (fs *GradientSampler) GetGradient() types.Gradient

func (*GradientSampler) SetGradient

func (fs *GradientSampler) SetGradient(gradient types.Gradient)

type OpenGL

type OpenGL struct {
	// contains filtered or unexported fields
}

func (*OpenGL) DeinitRenderer

func (rr *OpenGL) DeinitRenderer() error

func (*OpenGL) DrawBackPixel

func (rr *OpenGL) DrawBackPixel(x uint32, y uint32, paletteIndex types.PaletteIndex) error

func (*OpenGL) FillBack

func (rr *OpenGL) FillBack(paletteIndex types.PaletteIndex) error

func (*OpenGL) GetRGBArray

func (rr *OpenGL) GetRGBArray() []uint8

func (*OpenGL) GetSize

func (rr *OpenGL) GetSize() types.Point

func (*OpenGL) InitRenderer

func (rr *OpenGL) InitRenderer(windowName string, width uint32, height uint32) error

func (*OpenGL) PopGrabber

func (rr *OpenGL) PopGrabber() (interfaces.KeyGrabber, error)

func (*OpenGL) PopGrabberAt

func (rr *OpenGL) PopGrabberAt(index uint32) (interfaces.KeyGrabber, error)

func (*OpenGL) PopMouseGrabber

func (rr *OpenGL) PopMouseGrabber() (interfaces.MouseGrabber, error)

func (*OpenGL) PopMouseGrabberAt

func (rr *OpenGL) PopMouseGrabberAt(index uint32) (interfaces.MouseGrabber, error)

func (*OpenGL) PushGrabber

func (rr *OpenGL) PushGrabber(grabber interfaces.KeyGrabber)

func (*OpenGL) PushGrabberAt

func (rr *OpenGL) PushGrabberAt(grabber interfaces.KeyGrabber, index uint32)

func (*OpenGL) PushMouseGrabber

func (rr *OpenGL) PushMouseGrabber(grabber interfaces.MouseGrabber)

func (*OpenGL) PushMouseGrabberAt

func (rr *OpenGL) PushMouseGrabberAt(grabber interfaces.MouseGrabber, index uint32)

func (*OpenGL) SetPaletteColor

func (rr *OpenGL) SetPaletteColor(paletteIndex types.PaletteIndex, color types.Color) error

func (*OpenGL) ShouldQuit

func (rr *OpenGL) ShouldQuit() bool

func (*OpenGL) TickRenderer

func (rr *OpenGL) TickRenderer()

type PointSampler

type PointSampler struct {
	// contains filtered or unexported fields
}

func (*PointSampler) GetAtPoint

func (fs *PointSampler) GetAtPoint(point types.SamplerPoint) types.PaletteIndex

func (*PointSampler) GetColor

func (fs *PointSampler) GetColor() types.PaletteIndex

func (*PointSampler) GetPointColor

func (fs *PointSampler) GetPointColor() types.PaletteIndex

func (*PointSampler) GetSamplerPoints

func (fs *PointSampler) GetSamplerPoints() []types.SamplerPoint

func (*PointSampler) SetColor

func (fs *PointSampler) SetColor(color types.PaletteIndex)

func (*PointSampler) SetPointColor

func (fs *PointSampler) SetPointColor(color types.PaletteIndex)

func (*PointSampler) SetSamplerPoints

func (fs *PointSampler) SetSamplerPoints(points []types.SamplerPoint)

type PolyRenderer

type PolyRenderer struct {
	// contains filtered or unexported fields
}

func (*PolyRenderer) CanUseCurrentRawRenderer

func (bp *PolyRenderer) CanUseCurrentRawRenderer() bool

func (*PolyRenderer) DrawPoly

func (bp *PolyRenderer) DrawPoly(poly *types.Poly, sampler interfaces.Sampler)

func (*PolyRenderer) GetLineRenderer

func (bp *PolyRenderer) GetLineRenderer() interfaces.LineRenderer

func (*PolyRenderer) Parent

func (bp *PolyRenderer) Parent() interfaces.RawRenderer

func (*PolyRenderer) SetLineRenderer

func (bp *PolyRenderer) SetLineRenderer(rr interfaces.LineRenderer)

func (*PolyRenderer) SetParent

func (bp *PolyRenderer) SetParent(rr interfaces.RawRenderer)

type WolfRayMarcher

type WolfRayMarcher struct {
	// contains filtered or unexported fields
}

func (WolfRayMarcher) CanUseCurrentRawRenderer

func (wrm WolfRayMarcher) CanUseCurrentRawRenderer() bool

func (WolfRayMarcher) Parent

func (wrm WolfRayMarcher) Parent() interfaces.RawRenderer

func (WolfRayMarcher) RenderWorld

func (wrm WolfRayMarcher) RenderWorld(world types.WorldWolf, cameraPos types.Point, cameraRotation types.Degree)

func (*WolfRayMarcher) SetParent

func (wrm *WolfRayMarcher) SetParent(rr interfaces.RawRenderer)

Jump to

Keyboard shortcuts

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