Elements.pyECSS.System.TransformSystem¶
- class Elements.pyECSS.System.TransformSystem(name=None, type=None, id=None, cameraComponent=None)[source]¶
System that operates on BasicTransform Components and calculates Local2World matrices that are needed in a Scenegraph DAG hierarchy
Here is the explanation for Transform System class:
I have a BasicTransform component that has a TRS matrix and a l2worldTRS matrix
For each BasicTransform component, I calculate the l2worldTRS matrix of that component based on the hierarchy of its parent nodes
Then I update the l2worldTRS matrix of that BasicTransform component
- The l2worldTRS matrix of a component is calculated in the following way:
if the component is the root node, then the l2worldTRS matrix is the TRS matrix of that component
if the component is not the root node, then the l2worldTRS matrix is calculated by multiplying the TRS matrix of that component with the l2worldTRS matrix of its parent node
- Parameters
System ([type]) – [description]
- Returns
[description]
- Return type
[type]
- __init__(name=None, type=None, id=None, cameraComponent=None)[source]¶
Initialize self. See help(type(self)) for accurate signature.
Methods
__init__([name, type, id, cameraComponent])Initialize self.
apply(Entity[, event])method to be subclassed for behavioral or logic computation when visits Entities.
apply2BasicTransform(basicTransform)method to be subclassed for behavioral or logic computation when visits Components.
apply2Camera(basicTransform[, event])method to be subclassed for behavioral or logic computation when visits Components.
apply2GATransform(basicTransform[, event])method to be subclassed for behavioral or logic computation when visits Components.
apply2ImGUIDecorator(imGUIDecorator[, event])apply2RenderDecorator(renderDecorator[, event])apply2RenderMesh(renderMesh[, event])method to be subclassed for behavioral or logic computation when visits Components.
apply2RenderWindow(renderWindow[, event])apply2SDLWindow(sdlWindow[, event])apply2Shader(shader[, event])apply2ShaderGLDecorator(shaderGLDecorator[, …])apply2VertexArray(vertexArray[, event])applyCamera2BasicTransform(basicTransform[, …])method to be subclassed for behavioral or logic computation when visits Components.
applyGravity(gravityComponent[, event])applyRotation2BasicTransform(…[, event])getClassName()getLocal2World(leafComp[, topComp])Calculate the l2world BasicTransform matrix
init()method to be subclassed for behavioral or logic computation when visits Components of an EntityNode.
update()method to be subclassed for behavioral or logic computation when visits Components of an EntityNode.
Attributes
idGet Systems’s id
nameGet Systems’s name
priorityGet Systems’s priority
typeGet Systems’s type