protected void MoveObserverToTransformation(HomogeneousPoint3D point, IPolyhedron3D obj) { Matrix affineMatrix = AffineTransformation.MoveOriginTo(point); obj.Transform(affineMatrix); obj.TransformRotationCenter(affineMatrix); }
private static void MovePolyhedronGeometricCenter(HomogeneousPoint3D currentCenter, HomogeneousPoint3D needCenter, IPolyhedron3D polyhedron) { var originPoint = new HomogeneousPoint3D( currentCenter.X - needCenter.X, currentCenter.Y - needCenter.Y, currentCenter.Z - needCenter.Z, needCenter.W); Matrix affineMatrix = AffineTransformation.MoveOriginTo(originPoint); polyhedron.Transform(affineMatrix); }
protected void RotateAroundVectorTransformation(double angle, IPolyhedron3D obj) { Matrix affineMatrix = AffineTransformation.RotateAroundVector(obj.RotationVector, angle); obj.Transform(affineMatrix); }
protected void RotateAroundAxisTransformation(Axis3D axis, double angle, IPolyhedron3D obj) { Matrix affineMatrix = AffineTransformation.RotateAroundAxisAtPoint(axis, obj.RotationCenter, angle); obj.Transform(affineMatrix); }