class Prism::Systems::RenderSystem
- Prism::Systems::RenderSystem
- Crash::System
- Reference
- Object
Overview
A default system for rendering Prism::Entity
s.
Defined in:
prism/stdlib/systems/render_system.crConstant Summary
-
SKY_COLOR =
Vector3f.new(0.5444, 0.62, 0.69)
-
RGB
Constructors
Instance Method Summary
-
#add_to_engine(engine : Crash::Engine)
Called just after the system is added to the engine, before any calls to the update method.
-
#batch_entities(entities : Array(Crash::Entity))
Sorts the entities into groups of
TexturedModel
s and puts them into @grouped_entities - #build_view_matrix(transform : Prism::Transform)
-
#calculate_camera_view_matrix(entity : Crash::Entity)
Uses the transformation of the entity to calculate the view that the camera has of the world.
-
#input(tick : RenderLoop::Tick, input : RenderLoop::Input)
Extend
Crash::System
with an input method - #prepare
-
#remove_from_engine(engine : Crash::Engine)
Called just after the system is removed from the engine, after all calls to the update method.
-
#render
Handles the rendering.
Instance methods inherited from class Crash::System
input(tick : RenderLoop::Tick, input : RenderLoop::Input)
input,
render
render
Constructor Detail
Instance Method Detail
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.
Sorts the entities into groups of TexturedModel
s and puts them into @grouped_entities
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
Extend Crash::System
with an input method
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.