C# Класс GeometryClassLibrary.CoordinateSystem

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
CoordinateSystem ( ) : System.Collections.Generic

Null Constuctor

Описание методов

CoordinateSystem() публичный Метод

Creates a copy of the given coordinate system
public CoordinateSystem ( CoordinateSystem toCopy ) : System.Collections.Generic
toCopy CoordinateSystem the Coordinate System to copy
Результат System.Collections.Generic

CoordinateSystem() публичный Метод

Creates a local coordinate system that is only translated from the World Coordinates.
public CoordinateSystem ( Point passedTranslationToOrigin ) : System.Collections.Generic
passedTranslationToOrigin Point
Результат System.Collections.Generic

CoordinateSystem() публичный Метод

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
Результат System.Collections.Generic

CoordinateSystem() публичный Метод

public CoordinateSystem ( Shift shift ) : System.Collections.Generic
shift Shift
Результат System.Collections.Generic

DirectionsAreEquivalent() публичный Метод

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
Результат bool

Equals() публичный Метод

does the same thing as ==
public Equals ( object obj ) : bool
obj object
Результат bool

FindThisSystemRelativeToWorldSystemCurrentlyRelativeToPassedSystem() публичный Метод

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
Результат CoordinateSystem

GetHashCode() публичный Метод

public GetHashCode ( ) : int
Результат int

RelativeShift() публичный Метод

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
Результат CoordinateSystem

RotationFromThisTo() публичный Метод

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
Результат Rotation

RotationMatrixFromThisToWorld() публичный Метод

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
Результат Matrix

RotationMatrixToThisFromWorld() публичный Метод

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
Результат Matrix

RotationToThisFrom() публичный Метод

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
Результат Rotation

Shift() публичный Метод

This shifts the coordinate system relative to the world system with the given shift
public Shift ( Shift passedShift ) : CoordinateSystem
passedShift Shift
Результат CoordinateSystem

ShiftFromThisTo() публичный Метод

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
Результат Shift

ShiftToThisFrom() публичный Метод

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
Результат Shift

operator() публичный статический Метод

Not a perfect equality operator, is only accurate up to the Distance Class's accuracy
public static operator ( ) : bool
Результат bool