Documentation
¶
Index ¶
- type Alpha
- type Camera
- type CameraBuilder
- type CameraLookAt
- type CameraProjection
- type Geometry
- type GeometryBuilder
- type Hud
- type HudBuilder
- type HudDisplay
- type HudDisplayBuilder
- type HudNode
- type HudNodeBuilder
- type HudNodeContent
- type HudPosition
- type Layer
- type LayerBuilder
- type Material
- type MaterialBuilder
- type Model
- type ModelBuilder
- type Node
- type NodeBuilder
- type NodeContent
- type Orientation
- type Position
- type ProgramBuilder
- type Scene
- type SceneBuilder
- type Texture
- type TextureBuilder
- type TextureShader
- type VertexShader
- type VertexShaderVariables
- type VertexType
- type World
- type WorldBuilder
- type WorldCamera
- type WorldCameraBuilder
- type WorldLogicFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Camera ¶
type Camera interface {
ID() *uuid.UUID
Index() uint
Projection() CameraProjection
LookAt() CameraLookAt
Render(
delta time.Duration,
pos Position,
orientation Orientation,
activeScene Scene,
program uint32,
) error
}
Camera represents a camera
type CameraBuilder ¶
type CameraBuilder interface {
Create() CameraBuilder
WithCamera(cam cameras.Camera) CameraBuilder
Now() (Camera, error)
}
CameraBuilder represents the camera builder
type CameraLookAt ¶
type CameraLookAt interface {
Variable() string
Eye() mgl32.Vec3
Center() mgl32.Vec3
Up() mgl32.Vec3
}
CameraLookAt represents the direction where the camera looks at
type CameraProjection ¶
type CameraProjection interface {
Variable() string
FieldOfView() float32
AspectRation() float32
Near() float32
Far() float32
}
CameraProjection represents the camera projection
type Geometry ¶
type Geometry interface {
ID() *uuid.UUID
Program() uint32
VAO() uint32
VertexAmount() int32
VertexType() VertexType
Shader() VertexShader
Prepare() error
Render() error
}
Geometry represents a geometry
type GeometryBuilder ¶
type GeometryBuilder interface {
Create() GeometryBuilder
WithProgram(prog uint32) GeometryBuilder
WithGeometry(geo geometries.Geometry) GeometryBuilder
Now() (Geometry, error)
}
GeometryBuilder represents a geometry builder
type Hud ¶
type Hud interface {
ID() *uuid.UUID
Program() uint32
HasNodes() bool
Nodes() []HudNode
HasMaterial() bool
Material() Material
Render(
delta time.Duration,
activeScene Scene,
) error
}
Hud represents a head-up display
type HudBuilder ¶
type HudBuilder interface {
Create() HudBuilder
WithHud(hud huds.Hud) HudBuilder
Now() (Hud, error)
}
HudBuilder represents a hud builder
type HudDisplay ¶
type HudDisplay interface {
ID() *uuid.UUID
Index() uint
Viewport() viewports.Viewport
Camera() Camera
HasMaterial() bool
Material() Material
}
HudDisplay represents a hud display
type HudDisplayBuilder ¶
type HudDisplayBuilder interface {
Create() HudDisplayBuilder
WithDisplay(display displays.Display) HudDisplayBuilder
Now() (HudDisplay, error)
}
HudDisplayBuilder represents a hud display builder
type HudNode ¶
type HudNode interface {
ID() *uuid.UUID
Position() HudPosition
Orientation() Orientation
HasContent() bool
Content() HudNodeContent
HasChildren() bool
Children() []HudNode
Render(
delta time.Duration,
activeScene Scene,
) error
}
HudNode represents a hud node
type HudNodeBuilder ¶
type HudNodeBuilder interface {
Create() HudNodeBuilder
WithNode(node hud_nodes.Node) HudNodeBuilder
Now() (HudNode, error)
}
HudNodeBuilder represents a hud node builder
type HudNodeContent ¶
type HudNodeContent interface {
IsModel() bool
Model() Model
IsDisplay() bool
Display() HudDisplay
}
HudNodeContent represents the hud node content
type HudPosition ¶
type HudPosition interface {
Vector() mgl32.Vec2
Variable() string
Add(pos HudPosition) HudPosition
}
HudPosition represents a hud position
type Layer ¶
type Layer interface {
ID() *uuid.UUID
Index() uint
Alpha() Alpha
Texture() Texture
Render(
delta time.Duration,
pos Position,
orientation Orientation,
activeScene Scene,
program uint32,
) error
}
Layer represents a layer
type LayerBuilder ¶
type LayerBuilder interface {
Create() LayerBuilder
WithLayer(layer layers.Layer) LayerBuilder
Now() (Layer, error)
}
LayerBuilder represents a layer builder
type Material ¶
type Material interface {
ID() *uuid.UUID
Alpha() Alpha
Viewport() viewports.Viewport
Layers() []Layer
Render(
delta time.Duration,
pos Position,
orientation Orientation,
activeScene Scene,
program uint32,
) error
}
Material represents a material
type MaterialBuilder ¶
type MaterialBuilder interface {
Create() MaterialBuilder
WithMaterial(mat materials.Material) MaterialBuilder
Now() (Material, error)
}
MaterialBuilder represents a material builder
type Model ¶
type Model interface {
ID() *uuid.UUID
Program() uint32
Geometry() Geometry
Material() Material
Render(
delta time.Duration,
activeCamera WorldCamera,
activeScene Scene,
) error
}
Model represents a model
type ModelBuilder ¶
type ModelBuilder interface {
Create() ModelBuilder
WithModel(model models.Model) ModelBuilder
Now() (Model, error)
}
ModelBuilder represents a model builder
type Node ¶
type Node interface {
ID() *uuid.UUID
Position() Position
Orientation() Orientation
HasContent() bool
Content() NodeContent
HasChildren() bool
Children() []Node
Render(
delta time.Duration,
activeCamera WorldCamera,
activeScene Scene,
) error
}
Node represents a node
type NodeBuilder ¶
type NodeBuilder interface {
Create() NodeBuilder
WithNode(node nodes.Node) NodeBuilder
Now() (Node, error)
}
NodeBuilder represents a node builder
type NodeContent ¶
NodeContent represents the node content
type Orientation ¶
type Orientation interface {
Angle() float32
Direction() mgl32.Vec3
Variable() string
Add(orientation Orientation) Orientation
}
Orientation represents an orientation
type ProgramBuilder ¶
type ProgramBuilder interface {
Create() ProgramBuilder
WithTextureShader(texShader texture_shaders.Shader) ProgramBuilder
WithVertexShader(verShader vertex_shaders.Shader) ProgramBuilder
WithFragmentShader(fragShader fragment_shader.Shader) ProgramBuilder
Now() (uint32, error)
}
ProgramBuilder represents a program builder
type Scene ¶
type Scene interface {
ID() *uuid.UUID
Index() uint
Hud() Hud
Nodes() []Node
Render(
delta time.Duration,
activeCameraID *uuid.UUID,
) error
}
Scene represents a scene
type SceneBuilder ¶
type SceneBuilder interface {
Create() SceneBuilder
WithScene(scene scenes.Scene) SceneBuilder
Now() (Scene, error)
}
SceneBuilder represents a scene builder
type Texture ¶
type Texture interface {
ID() *uuid.UUID
Dimension() ints.Vec2
Variable() string
IsResource() bool
Resource() uint32
IsCamera() bool
Camera() Camera
IsShader() bool
Shader() TextureShader
Render(
delta time.Duration,
pos Position,
orientation Orientation,
activeScene Scene,
program uint32,
) error
}
Texture represents a texture
type TextureBuilder ¶
type TextureBuilder interface {
Create() TextureBuilder
WithTexture(tex textures.Texture) TextureBuilder
Now() (Texture, error)
}
TextureBuilder represents a texture builder
type TextureShader ¶
type TextureShader interface {
ID() *uuid.UUID
Program() uint32
IsDynamic() bool
Render(
delta time.Duration,
pos Position,
orientation Orientation,
program uint32,
) error
}
TextureShader represents a texture shader
type VertexShader ¶
type VertexShader interface {
ID() *uuid.UUID
Variables() VertexShaderVariables
}
VertexShader represents a vertex shader
type VertexShaderVariables ¶
VertexShaderVariables represents vertex shader variables
type World ¶
type World interface {
ID() *uuid.UUID
WindowApplication() windows.Application
Logic() WorldLogicFn
CurrentSceneIndex() uint
Scenes() []Scene
Execute() error
}
World represents a world index
type WorldBuilder ¶
type WorldBuilder interface {
Create() WorldBuilder
WithWindow(win domain_window.Window) WorldBuilder
WithWorld(world worlds.World) WorldBuilder
WithLogic(fn WorldLogicFn) WorldBuilder
Now() (World, error)
}
WorldBuilder represents a world builder
type WorldCamera ¶
type WorldCamera interface {
Camera() Camera
Position() Position
Orientation() Orientation
Update(pos Position, orientation Orientation) WorldCamera
Slide(pos HudPosition, orientation Orientation) WorldCamera
}
WorldCamera represents a camera in a 3d world
type WorldCameraBuilder ¶
type WorldCameraBuilder interface {
Create() WorldCameraBuilder
WithNode(node Node) WorldCameraBuilder
Now() (WorldCamera, error)
}
WorldCameraBuilder represents a world camera builder
type WorldLogicFn ¶
WorldLogicFn represents the world logic func
Source Files
¶
- alpha.go
- camera.go
- camera_builder.go
- camera_lookat.go
- camera_projection.go
- geometry.go
- geometry_builder.go
- hud.go
- hud_builder.go
- hud_display.go
- hud_display_builder.go
- hud_node.go
- hud_node_builder.go
- hud_node_content.go
- hud_position.go
- layer.go
- layer_builder.go
- material.go
- material_builder.go
- model.go
- model_builder.go
- node.go
- node_builder.go
- node_content.go
- orientation.go
- position.go
- program_builder.go
- scene.go
- scene_builder.go
- sdk.go
- texture.go
- texture_builder.go
- texture_shader.go
- vertex_shader.go
- vertex_shader_variables.go
- vertex_type.go
- world.go
- world_builder.go