MCPcopy Index your code
hub / github.com/processing/processing / invRotate

Method invRotate

core/src/processing/core/PMatrix3D.java:771–782  ·  view source on GitHub ↗
(float angle, float v0, float v1, float v2)

Source from the content-addressed store, hash-verified

769
770
771 protected void invRotate(float angle, float v0, float v1, float v2) {
772 //TODO should make sure this vector is normalized
773
774 float c = cos(-angle);
775 float s = sin(-angle);
776 float t = 1.0f - c;
777
778 preApply((t*v0*v0) + c, (t*v0*v1) - (s*v2), (t*v0*v2) + (s*v1), 0,
779 (t*v0*v1) + (s*v2), (t*v1*v1) + c, (t*v1*v2) - (s*v0), 0,
780 (t*v0*v2) - (s*v1), (t*v1*v2) + (s*v0), (t*v2*v2) + c, 0,
781 0, 0, 0, 1);
782 }
783
784
785 protected void invScale(float x, float y, float z) {

Callers

nothing calls this directly

Calls 3

cosMethod · 0.95
sinMethod · 0.95
preApplyMethod · 0.95

Tested by

no test coverage detected