/** * ( begin auto-generated from PShape_resetMatrix.xml ) * * Replaces the current matrix of a shape with the identity matrix. The * equivalent function in OpenGL is glLoadIdentity(). * * ( end auto-generated ) * @webref pshape:method * @brief Replaces the current matrix of a shape with the identity matrix * @usage web_application * @see PShape#rotate(float) * @see PShape#scale(float) * @see PShape#translate(float, float) */ public void resetMatrix() { checkMatrix(2); matrix.reset(); }
/** * ( begin auto-generated from PShape_resetMatrix.xml ) * * Replaces the current matrix of a shape with the identity matrix. The * equivalent function in OpenGL is glLoadIdentity(). * * ( end auto-generated ) * @webref pshape:method * @brief Replaces the current matrix of a shape with the identity matrix * @usage web_application * @see PShape#rotate(float) * @see PShape#scale(float) * @see PShape#translate(float, float) */ public void resetMatrix() { checkMatrix(2); matrix.reset(); }
@Override public void resetMatrix() { if (shapeCreated && matrix != null && transformStack != null) { if (family == GROUP) { updateTessellation(); } if (tessellated) { PMatrix mat = popTransform(); while (mat != null) { boolean res = mat.invert(); if (res) { applyMatrixImpl(mat); } else { PGraphics.showWarning("Transformation applied on the shape cannot be inverted"); } mat = popTransform(); } } matrix.reset(); transformStack.clear(); } }
@Override public void resetMatrix() { if (shapeCreated && matrix != null && transformStack != null) { if (family == GROUP) { updateTessellation(); } if (tessellated) { PMatrix mat = popTransform(); while (mat != null) { boolean res = mat.invert(); if (res) { applyMatrixImpl(mat); } else { PGraphics.showWarning("Transformation applied on the shape cannot be inverted"); } mat = popTransform(); } } matrix.reset(); transformStack.clear(); } }
transform.reset();
transform.reset();