Ejemplo n.º 1
0
 public ObjectType(int idNumber, vec4 position, vec4 rotationAxis, float angle, MaterialProperty material)
 {
     this.idNumber             = idNumber;
     this.transformationMatrix = Calculation.calculateTransformationMatrix(position, Calculation.calculateRotationMatrix(rotationAxis, angle), new vec3(1));
     this._object_material     = material;
     this.inverse = glm.inverse(transformationMatrix);
 }
Ejemplo n.º 2
0
 public ObjectType(int idNumber, vec4 position, mat3 rotation, vec3 scale, MaterialProperty material)
 {
     this.transformationMatrix = Calculation.calculateTransformationMatrix(position, rotation, scale);
     this.inverse          = glm.inverse(transformationMatrix);
     this._object_material = material;
 }
Ejemplo n.º 3
0
 public ObjectType(int idNumber, vec4 position, vec3 scale, MaterialProperty material)
 {
     this.idNumber             = idNumber;
     this.transformationMatrix = Calculation.calculateTransformationMatrix(position, Calculation.calculateRotationMatrix(new vec4(0, 0, 0, 1), 0), scale);
     this.inverse          = glm.inverse(transformationMatrix);
     this._object_material = material;
 }
Ejemplo n.º 4
0
        internal virtual void updateObject(vec4 translate, vec4 rotationAxis, float angle, vec3 scaling)
        {
            mat4 _transformation = Calculation.calculateTransformationMatrix(translate, Calculation.calculateRotationMatrix(rotationAxis, angle), scaling);
            mat4 newMat          = Calculation.multiplyTwoMatrices(_transformation, transformationMatrix);

            transformationMatrix = newMat;
            inverse = glm.inverse(newMat);
        }