public static gpTrsf ConvertToGlobalTransformation(gpTrsf currentAxisSystem, gpTrsf currentTransformation) { var transformedCoordinates = new gpTrsf(); transformedCoordinates = currentAxisSystem; transformedCoordinates.Multiply(currentTransformation); transformedCoordinates.SetValues( 1, 0, 0, transformedCoordinates.Value(1, 4), 0, 1, 0, transformedCoordinates.Value(2, 4), 0, 0, 1, transformedCoordinates.Value(3, 4), _angularPrecision, _distancePrecision ); return(transformedCoordinates); }
private static double[] MatrixToList(gpTrsf aTrans) { var tranformData = new double[16]; for (var i = 1; i <= 3; i++) { for (var j = 1; j <= 4; j++) { tranformData[(i - 1) * 4 + (j - 1)] = aTrans.Value(i, j); } } return(tranformData); }
public void TranslateWith(Point3D translateValue) { _currTransform.SetValues( _currTransform.Value(1, 1), _currTransform.Value(1, 2), _currTransform.Value(1, 3), _currTransform.Value(1, 4) + translateValue.X, _currTransform.Value(2, 1), _currTransform.Value(2, 2), _currTransform.Value(2, 3), _currTransform.Value(2, 4) + translateValue.Y, _currTransform.Value(3, 1), _currTransform.Value(3, 2), _currTransform.Value(3, 3), _currTransform.Value(3, 4) + translateValue.Z, _angularPrecision, _distancePrecision ); _pivot = _pivot.AddCoordinate(translateValue); }