enum

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeNotFound        = 1001
	CodeInvalidPassword = 1002
	CodeTimeout         = 1003
	CodeInternalError   = 9999
)

Variables

This section is empty.

Functions

func ErrorCode added in v0.0.5

func ErrorCode[E ProdError](err E) int

func RenderAll

func RenderAll(objs []Renderable)

RenderAll uses the behavior-polymorphism

func ScreenSpaceOcclusion

func ScreenSpaceOcclusion[T SceneObject](x T) float32

ScreenSpaceOcclusion uses the typeset (SceneObject) to limit the type of Renderable supported by this function

Types

type Box

type Box struct{}

func (Box) Render

func (box Box) Render()

type Collection

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

func (Collection) Render

func (coll Collection) Render()

type InternalError added in v0.0.5

type InternalError struct{}

func (InternalError) Code added in v0.0.5

func (_ InternalError) Code() int

func (InternalError) Error added in v0.0.5

func (_ InternalError) Error() string

type InvalidPassword added in v0.0.5

type InvalidPassword struct{}

func (InvalidPassword) Code added in v0.0.5

func (_ InvalidPassword) Code() int

func (InvalidPassword) Error added in v0.0.5

func (_ InvalidPassword) Error() string

type NotFound added in v0.0.5

type NotFound struct{}

func (NotFound) Code added in v0.0.5

func (_ NotFound) Code() int

func (NotFound) Error added in v0.0.5

func (_ NotFound) Error() string

type PolyPlane

type PolyPlane struct{}

func (PolyPlane) Render

func (pPlane PolyPlane) Render()

type ProdError added in v0.0.5

type ProdError interface {
	NotFound | InvalidPassword | Timeout | InternalError

	Error() string
	Code() int
}

ProdError defines the error typeset

type Renderable

type Renderable interface {
	Render()
}

Renderable defines the behavior

type SceneObject

type SceneObject interface {
	Sphere | Box | PolyPlane | Torus
}

SceneObject defines the typeset

type Sphere

type Sphere struct{}

func (Sphere) Render

func (sphere Sphere) Render()

type Timeout added in v0.0.5

type Timeout struct{}

func (Timeout) Code added in v0.0.5

func (_ Timeout) Code() int

func (Timeout) Error added in v0.0.5

func (_ Timeout) Error() string

type Torus

type Torus struct {
	Radius float32
}

func (Torus) Render

func (torus Torus) Render()

Jump to

Keyboard shortcuts

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