Exemple #1
0
        //prepare the shader for the given entity.
        private void PrepareInstance(Function function)
        {
            Transform transform            = new Transform(function.position, 0, 0, 0, 1);
            Matrix4   transformationMatrix = Mathematics.CreateTransformationMatrix(transform.position, transform.xAxisRotation, transform.yAxisRotation, transform.zAxisRotation, transform.scale);

            graphingShader.LoadTransformationMatrix(transformationMatrix);
            graphingShader.LoadDynamicColor(function.color);
        }
Exemple #2
0
        //prepare the shader for the given entity.
        private void PrepareInstance(Node node)
        {
            Transform transform            = new Transform(node.position, 0, 0, 0, 1);
            Matrix4   transformationMatrix = Mathematics.CreateTransformationMatrix(transform.position, transform.xAxisRotation, transform.yAxisRotation, transform.zAxisRotation, transform.scale);

            nodeShader.LoadTransformationMatrix(transformationMatrix);
            nodeShader.LoadDynamicColor(node.color);
        }