public override void Update() { double dX = right - left; double dY = top - bottom; double dZ = far - near; Matrix4 p = new Matrix4(); p.Vals[0, 0] = 2 * near / (dX); p.Vals[1, 1] = 2 * near / (dY); p.Vals[0, 2] = (left + right) / (dX); p.Vals[1, 2] = (top + bottom) / (dY); p.Vals[2, 2] = (far+near) / (dZ); p.Vals[3, 2] = 1; p.Vals[2, 3] = -2*far * near / (dZ); p.Vals[3, 3] = 0; Set(p); }
public Matrix4(Matrix4 m) { init(); Set(m.Vals); }
public override void Update() { Matrix4 p = new Matrix4(); double siX_half = sizeX / 2; double siY_half = sizeY / 2; p.Vals[0, 0] = siX_half; p.Vals[1, 1] = -siY_half; p.Vals[0, 2] = -startX; p.Vals[1, 2] = -startY; p.Vals[0, 3] = siX_half; p.Vals[1, 3] = siY_half; Set(p); }
protected void Set(Matrix4 m) { Set(m.Vals); }