C# Class GeometryClassLibrary.CoordinateSystem

Show file Open project: ParagonTruss/GeometryClassLibrary Class Usage Examples

Public Methods

Method Description
CoordinateSystem ( CoordinateSystem toCopy ) : System.Collections.Generic

Creates a copy of the given coordinate system

CoordinateSystem ( Point passedTranslationToOrigin ) : System.Collections.Generic

Creates a local coordinate system that is only translated from the World Coordinates.

CoordinateSystem ( Point translationToOrigin, Angle xAxisRotationAngle, Angle yAxisRotationAngle, Angle zAxisRotationAngle ) : System.Collections.Generic

Creates a new coordinate system with the given origin point and with the given rotations. The inputs are extrinsic angle, i.e. about the global axes

CoordinateSystem ( Shift shift ) : System.Collections.Generic
DirectionsAreEquivalent ( CoordinateSystem other ) : bool

Determines if the orientations of the axes of two different coordinate systems are identical. Note: a single orientation can be arrived at through several different sets of rotations. Therefore, this method simply checks if the overall rotations are the same.

Equals ( object obj ) : bool

does the same thing as ==

FindThisSystemRelativeToWorldSystemCurrentlyRelativeToPassedSystem ( CoordinateSystem thisRelativeTo ) : CoordinateSystem

Find this coordinate system's (which is currently based on the passed system) shifts relative to the world coordinate system instead of the passed coordinate system

GetHashCode ( ) : int
RelativeShift ( Shift passedShift, CoordinateSystem systemShiftIsRelativeTo ) : CoordinateSystem

Shifts this system which is based on the world system with a shift that is relative to (in terms of) the passed system. This shifts this system relative to the world system with the equivalent of the shift in terms of the world system. ".Shift()" can be viewed as a special case of this relative shift where the system the shift is in terms of happens to be the world system

RotationFromThisTo ( CoordinateSystem systemToRotateTo = null ) : Rotation

Returns only the rotational Shift for this CoordinateSystem to apply to objects in order to only orient them in the passed CoordinateSystem, but not move them. If the CoordinateSystem to rotate to is left out, it rotates it to the WorldCoordinateSystem Note: Only works if this CoordinateSystem is the current shift on the object! if it is in another CoordinateSystem and you perform this rotation it will cause incorrect results!

RotationMatrixFromThisToWorld ( ) : Matrix

The rotation matrix that describes the local axes' orientation relative to the global axes. This single rotation is the product of the three separate rotations that follow. This rotation matrix is equivalent to switching the angles using the rotateFromThisTo(WorldCoordinateSystem) function

RotationMatrixToThisFromWorld ( ) : Matrix

The rotation matrix that describes the local axes' orientation relative to the global axes. This single rotation is the product of the three separate rotations that follow. This rotation matrix is equivalent to switching the angles using the rotateToThisFrom(WorldCoordinateSystem) function

RotationToThisFrom ( CoordinateSystem systemToRotateFrom = null ) : Rotation

Returns only the rotational Shift to apply to objects in order to only orient them in this CoordinateSystem when they are currently oriented in the passed CoordinateSystem, but does not move them. If the CoordinateSystem to rotate from is left out, it assumes it is currently oriented in WorldCoordinateSystem Note: Only works if the passed CoordinateSystem is the current shift on the object! if it is in another CoordinateSystem and you perform this rotation it will casue incorrect results!

Shift ( Shift passedShift ) : CoordinateSystem

This shifts the coordinate system relative to the world system with the given shift

ShiftFromThisTo ( CoordinateSystem systemToShiftTo = null ) : Shift

Returns the Shift to apply to objects in order to postition and orient them in the passed CoordinateSystem when they are currently postioned in this CoordinateSystem. If the system to shift to is left out, it defaults to the world coordinate System Note: Only works if this CoordinateSystem is the current shift on the object! if it is in another CoordinateSystem and you perform this shift it will give incorrect results!

ShiftToThisFrom ( CoordinateSystem systemToShiftFrom = null ) : Shift

Makes the Shift to apply to objects in order to postition and orient them in this CoordinateSystem when they are currently postioned in the passed CoordinateSystem. If the system to shift from is left out, it defaults to the world coordinate System Note: Only works if the passed CoordinateSystem is the current shift of the object! if it is in another CoordinateSystem and you perform this shift it will give incorrect results!

operator ( ) : bool

Not a perfect equality operator, is only accurate up to the Distance Class's accuracy

Private Methods

Method Description
CoordinateSystem ( ) : System.Collections.Generic

Null Constuctor

Method Details

CoordinateSystem() public method

Creates a copy of the given coordinate system
public CoordinateSystem ( CoordinateSystem toCopy ) : System.Collections.Generic
toCopy CoordinateSystem the Coordinate System to copy
return System.Collections.Generic

CoordinateSystem() public method

Creates a local coordinate system that is only translated from the World Coordinates.
public CoordinateSystem ( Point passedTranslationToOrigin ) : System.Collections.Generic
passedTranslationToOrigin Point
return System.Collections.Generic

CoordinateSystem() public method

Creates a new coordinate system with the given origin point and with the given rotations. The inputs are extrinsic angle, i.e. about the global axes
public CoordinateSystem ( Point translationToOrigin, Angle xAxisRotationAngle, Angle yAxisRotationAngle, Angle zAxisRotationAngle ) : System.Collections.Generic
translationToOrigin Point
xAxisRotationAngle Angle
yAxisRotationAngle Angle
zAxisRotationAngle Angle
return System.Collections.Generic

CoordinateSystem() public method

public CoordinateSystem ( Shift shift ) : System.Collections.Generic
shift Shift
return System.Collections.Generic

DirectionsAreEquivalent() public method

Determines if the orientations of the axes of two different coordinate systems are identical. Note: a single orientation can be arrived at through several different sets of rotations. Therefore, this method simply checks if the overall rotations are the same.
public DirectionsAreEquivalent ( CoordinateSystem other ) : bool
other CoordinateSystem The coordinate system we are checking against
return bool

Equals() public method

does the same thing as ==
public Equals ( object obj ) : bool
obj object
return bool

FindThisSystemRelativeToWorldSystemCurrentlyRelativeToPassedSystem() public method

Find this coordinate system's (which is currently based on the passed system) shifts relative to the world coordinate system instead of the passed coordinate system
public FindThisSystemRelativeToWorldSystemCurrentlyRelativeToPassedSystem ( CoordinateSystem thisRelativeTo ) : CoordinateSystem
thisRelativeTo CoordinateSystem The coordinate System this coordinate system is currently based on
return CoordinateSystem

GetHashCode() public method

public GetHashCode ( ) : int
return int

RelativeShift() public method

Shifts this system which is based on the world system with a shift that is relative to (in terms of) the passed system. This shifts this system relative to the world system with the equivalent of the shift in terms of the world system. ".Shift()" can be viewed as a special case of this relative shift where the system the shift is in terms of happens to be the world system
public RelativeShift ( Shift passedShift, CoordinateSystem systemShiftIsRelativeTo ) : CoordinateSystem
passedShift Shift The shift that is based on the passed system to apply to this system
systemShiftIsRelativeTo CoordinateSystem The system the shift is based in/ in terms of/ relative to
return CoordinateSystem

RotationFromThisTo() public method

Returns only the rotational Shift for this CoordinateSystem to apply to objects in order to only orient them in the passed CoordinateSystem, but not move them. If the CoordinateSystem to rotate to is left out, it rotates it to the WorldCoordinateSystem Note: Only works if this CoordinateSystem is the current shift on the object! if it is in another CoordinateSystem and you perform this rotation it will cause incorrect results!
public RotationFromThisTo ( CoordinateSystem systemToRotateTo = null ) : Rotation
systemToRotateTo CoordinateSystem
return Rotation

RotationMatrixFromThisToWorld() public method

The rotation matrix that describes the local axes' orientation relative to the global axes. This single rotation is the product of the three separate rotations that follow. This rotation matrix is equivalent to switching the angles using the rotateFromThisTo(WorldCoordinateSystem) function
public RotationMatrixFromThisToWorld ( ) : Matrix
return Matrix

RotationMatrixToThisFromWorld() public method

The rotation matrix that describes the local axes' orientation relative to the global axes. This single rotation is the product of the three separate rotations that follow. This rotation matrix is equivalent to switching the angles using the rotateToThisFrom(WorldCoordinateSystem) function
public RotationMatrixToThisFromWorld ( ) : Matrix
return Matrix

RotationToThisFrom() public method

Returns only the rotational Shift to apply to objects in order to only orient them in this CoordinateSystem when they are currently oriented in the passed CoordinateSystem, but does not move them. If the CoordinateSystem to rotate from is left out, it assumes it is currently oriented in WorldCoordinateSystem Note: Only works if the passed CoordinateSystem is the current shift on the object! if it is in another CoordinateSystem and you perform this rotation it will casue incorrect results!
public RotationToThisFrom ( CoordinateSystem systemToRotateFrom = null ) : Rotation
systemToRotateFrom CoordinateSystem
return Rotation

Shift() public method

This shifts the coordinate system relative to the world system with the given shift
public Shift ( Shift passedShift ) : CoordinateSystem
passedShift Shift
return CoordinateSystem

ShiftFromThisTo() public method

Returns the Shift to apply to objects in order to postition and orient them in the passed CoordinateSystem when they are currently postioned in this CoordinateSystem. If the system to shift to is left out, it defaults to the world coordinate System Note: Only works if this CoordinateSystem is the current shift on the object! if it is in another CoordinateSystem and you perform this shift it will give incorrect results!
public ShiftFromThisTo ( CoordinateSystem systemToShiftTo = null ) : Shift
systemToShiftTo CoordinateSystem The CoordinateSystem to shift to from this CoordinateSystem. Defaults to the WorldCoordinateSystem if left out
return Shift

ShiftToThisFrom() public method

Makes the Shift to apply to objects in order to postition and orient them in this CoordinateSystem when they are currently postioned in the passed CoordinateSystem. If the system to shift from is left out, it defaults to the world coordinate System Note: Only works if the passed CoordinateSystem is the current shift of the object! if it is in another CoordinateSystem and you perform this shift it will give incorrect results!
public ShiftToThisFrom ( CoordinateSystem systemToShiftFrom = null ) : Shift
systemToShiftFrom CoordinateSystem The CoordinateSystem to shift from to this CoordinateSystem. Defaults to the WorldCoordinateSystem if left out
return Shift

operator() public static method

Not a perfect equality operator, is only accurate up to the Distance Class's accuracy
public static operator ( ) : bool
return bool