class Prism::Systems::RenderSystem

Overview

A default system for rendering Prism::Entitys.

Defined in:

prism/stdlib/systems/render_system.cr

Constant Summary

SKY_COLOR = Vector3f.new(0.5444, 0.62, 0.69)

RGB

Constructors

Instance Method Summary

Instance methods inherited from class Crash::System

input(tick : RenderLoop::Tick, input : RenderLoop::Input) input, render render

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def add_to_engine(engine : Crash::Engine) #
Description copied from class Crash::System

Called just after the system is added to the engine, before any calls to the update method. Override this method to add your own functionality.

@param engine The engine the system was added to.


[View source]
def batch_entities(entities : Array(Crash::Entity)) #

Sorts the entities into groups of TexturedModels and puts them into @grouped_entities


[View source]
def build_view_matrix(transform : Prism::Transform) #

[View source]
def calculate_camera_view_matrix(entity : Crash::Entity) #

Uses the transformation of the entity to calculate the view that the camera has of the world. This allows you to attach the camera view to any entity


[View source]
def input(tick : RenderLoop::Tick, input : RenderLoop::Input) #
Description copied from class Crash::System

Extend Crash::System with an input method


[View source]
def prepare #

[View source]
def remove_from_engine(engine : Crash::Engine) #
Description copied from class Crash::System

Called just after the system is removed from the engine, after all calls to the update method. Override this method to add your own functionality.

@param engine The engine the system was removed from.


[View source]
def render #

Handles the rendering.

TODO this is a little verbose and needs to be cleaned up a bit.


[View source]