CSharpGL.IModelSpaceHelper.GetModelMatrix C# (CSharp) Method

GetModelMatrix() public static method

Get model matrix.
public static GetModelMatrix ( this model ) : CSharpGL.mat4
model this
return CSharpGL.mat4
        public static mat4 GetModelMatrix(this IModelSpace model)
        {
            mat4 matrix = glm.translate(mat4.identity(), model.WorldPosition);
            matrix = glm.scale(matrix, model.Scale);
            matrix = glm.rotate(matrix, model.RotationAngleDegree, model.RotationAxis);
            return matrix;
        }