Class ExMConversions
See ExM. This class contains functions related to coordinate conversion.
Inheritance
System.Object
ExMConversions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: cs.temp.dll.dll
Syntax
public static class ExMConversions
Methods
ConvertBasis(tv2, tv2)
Declaration
public static tv2 ConvertBasis(tv2 source, tv2 basis1)
Parameters
Type |
Name |
Description |
tv2 |
source |
|
tv2 |
basis1 |
|
Returns
CrossProduct(tv3, tv3)
Declaration
public static tv3 CrossProduct(tv3 v1, tv3 v2)
Parameters
Type |
Name |
Description |
tv3 |
v1 |
|
tv3 |
v2 |
|
Returns
DeconvertBasis(tv2, tv2)
Declaration
public static tv2 DeconvertBasis(tv2 source, tv2 basis1)
Parameters
Type |
Name |
Description |
tv2 |
source |
|
tv2 |
basis1 |
|
Returns
FromSphere(tfloat, tv2)
Declaration
public static tv3 FromSphere(tfloat radius, tv2 sphere)
Parameters
Type |
Name |
Description |
tfloat |
radius |
|
tv2 |
sphere |
|
Returns
Polar2ToXY(tv2)
Declaration
public static tv2 Polar2ToXY(tv2 rt)
Parameters
Type |
Name |
Description |
tv2 |
rt |
|
Returns
PolarToXY(tfloat, tfloat)
Convert polar coordinates (theta in degrees) to Cartesian coordinates.
Declaration
public static tv2 PolarToXY(tfloat r, tfloat theta)
Parameters
Type |
Name |
Description |
tfloat |
r |
|
tfloat |
theta |
|
Returns
PolarToXYRad(tfloat, tfloat)
Convert polar coordinates (theta in radians) to Cartesian coordinates.
Declaration
public static tv2 PolarToXYRad(tfloat r, tfloat theta)
Parameters
Type |
Name |
Description |
tfloat |
r |
|
tfloat |
theta |
|
Returns
Rotate(tfloat, tv2)
Rotate a V2 by some degrees counterclockwise.
Declaration
public static tv2 Rotate(tfloat ang_deg, tv2 v2)
Parameters
Type |
Name |
Description |
tfloat |
ang_deg |
|
tv2 |
v2 |
|
Returns
Rotate2(tfloat, tfloat, tfloat)
Rotate an (x,y) pair by some degrees counterclockwise.
Declaration
public static tv2 Rotate2(tfloat ang_deg, tfloat xv, tfloat yv)
Parameters
Type |
Name |
Description |
tfloat |
ang_deg |
|
tfloat |
xv |
|
tfloat |
yv |
|
Returns
RotateCS(tfloat, tfloat, tv2)
Rotate a V2 by a calculated cosine and sine value counterclockwise.
Declaration
public static tv2 RotateCS(tfloat cos, tfloat sin, tv2 v2)
Parameters
Type |
Name |
Description |
tfloat |
cos |
|
tfloat |
sin |
|
tv2 |
v2 |
|
Returns
RotateCS2(tfloat, tfloat, tfloat, tfloat)
Rotate an (x,y) pair by a calculated cosine and sine value counterclockwise.
Declaration
public static tv2 RotateCS2(tfloat cos, tfloat sin, tfloat xv, tfloat yv)
Parameters
Type |
Name |
Description |
tfloat |
cos |
|
tfloat |
sin |
|
tfloat |
xv |
|
tfloat |
yv |
|
Returns
RotateInPlane(tfloat, tv3, tv3)
Note: requires that normalVec and planeVec are perpendicular.
Declaration
public static tv3 RotateInPlane(tfloat rot, tv3 normalVec, tv3 planeVec)
Parameters
Type |
Name |
Description |
tfloat |
rot |
|
tv3 |
normalVec |
|
tv3 |
planeVec |
|
Returns
RotateRad(tfloat, tv2)
Rotate a V2 by some radians counterclockwise.
Declaration
public static tv2 RotateRad(tfloat ang_rad, tv2 v2)
Parameters
Type |
Name |
Description |
tfloat |
ang_rad |
|
tv2 |
v2 |
|
Returns
RotateRad2(tfloat, tfloat, tfloat)
Rotate an (x,y) pair by some radians counterclockwise.
Declaration
public static tv2 RotateRad2(tfloat ang_rad, tfloat xv, tfloat yv)
Parameters
Type |
Name |
Description |
tfloat |
ang_rad |
|
tfloat |
xv |
|
tfloat |
yv |
|
Returns
RotateV(tv2, tv2)
Rotate a V2 by a vector containing cosine and sine values counterclockwise.
Declaration
public static tv2 RotateV(tv2 cossin, tv2 v2)
Parameters
Type |
Name |
Description |
tv2 |
cossin |
|
tv2 |
v2 |
|
Returns
RotateV2(tv2, tfloat, tfloat)
Rotate a V2 by a vector containing cosine and sine values counterclockwise.
Declaration
public static tv2 RotateV2(tv2 cossin, tfloat xv, tfloat yv)
Parameters
Type |
Name |
Description |
tv2 |
cossin |
|
tfloat |
xv |
|
tfloat |
yv |
|
Returns
RV2ToPolar(trv2)
Converts an RV2 to polar coordinates (theta in degrees) via TrueLocation and XYToPolar.
Declaration
public static tv2 RV2ToPolar(trv2 v2rv2)
Parameters
Type |
Name |
Description |
trv2 |
v2rv2 |
|
Returns
RV2ToXY(trv2)
Converts an RV2 to Cartesian coordinates via TrueLocation.
Declaration
public static tv2 RV2ToXY(trv2 v2rv2)
Parameters
Type |
Name |
Description |
trv2 |
v2rv2 |
|
Returns
ToSphere(tv3)
Get the unit spherical coordinates for a vector3.
Declaration
public static tv2 ToSphere(tv3 source)
Parameters
Type |
Name |
Description |
tv3 |
source |
|
Returns
XYToPolar(tv2)
Convert Cartesian coordinates to polar coordinates (theta in degrees).
Declaration
public static tv2 XYToPolar(tv2 v2)
Parameters
Type |
Name |
Description |
tv2 |
v2 |
|
Returns
XYToPolarRad(tv2)
Convert Cartesian coordinates to polar coordinates (theta in radians).
Declaration
public static tv2 XYToPolarRad(tv2 v2)
Parameters
Type |
Name |
Description |
tv2 |
v2 |
|
Returns