/// <summary></summary> public RectangleD(PointD leftTop, PointD rightBottom) { _Location = leftTop; _Size = rightBottom - leftTop; }
private MeepVector3 Convert(SizeD s, double z) { return new MeepVector3( s.W, s.H, z ); }
/// <summary></summary> public RectangleD(PointD location, SizeD size) { _Location = location; _Size = size; }
/// <summary></summary> public MeepBlock FromParallelogram(PointD origin, SizeD vector1, SizeD vector2) { MeepVector3 center = Convert( origin + 0.5 * vector1 + 0.5 * vector2, CenterZ ); MeepVector3 size = new MeepVector3( vector1.Magnitude, vector2.Magnitude, SizeZ ); return new MeepBlock( MeepMaterial, center, size ) { E1 = Convert( ( 1 / vector1.Magnitude ) * vector1, 0 ), E2 = Convert( ( 1 / vector2.Magnitude ) * vector2, 0 ), E3 = MeepVector3.AxisZ, }; }