/// <inheritdoc cref="GridPoint2.GetColor(ColorFunction)"/> public int __GetColor_Reference(int ax, int bx, int by, int cx, int cy, int cz) { var parm = new Matrixf33(ax, 0, 0, bx, by, 0, cx, cy, cz); var parmInv = parm.Inv(); var pointInUnitCube = this.ToVector3().Mul(parmInv); var rect = new Matrixf33(ax, 0, 0, 0, by, 0, 0, 0, cz); var pointInRect = pointInUnitCube.Mul(rect); var rectX = GLMathf.FloorMod(Mathf.FloorToInt(pointInRect.x), ax); var rectY = GLMathf.FloorMod(Mathf.FloorToInt(pointInRect.y), by); var rectZ = GLMathf.FloorMod(Mathf.FloorToInt(pointInRect.z), cz); return(rectX + rectY * ax + rectZ * ax * by); }
public Matrixf33 Div(Matrixf33 other) { return(Mul(other.Inv())); }