Class StaticRotation
Static Rotation.
public class StaticRotation : IStaticTransformer, ITransformer, IMakeXmlSource, IGetInverseTransformer
- Inheritance
-
StaticRotation
- Implements
- Inherited Members
- Extension Methods
Constructors
StaticRotation()
Initializes a new instance of the StaticRotation class.
public StaticRotation()
StaticRotation(Vec3d, double)
Ctor.
public StaticRotation(Vec3d axis, double angle_rad)
Parameters
StaticRotation(Vec3d, double, Vec3d)
Ctor.
public StaticRotation(Vec3d axis, double angle_rad, Vec3d pivot)
Parameters
StaticRotation(XElement)
Initializes a new instance of the StaticRotation class from XML data.
public StaticRotation(XElement src)
Parameters
src
XElementThe XML element containing the rotation data.
Properties
Angle_deg
Gets or sets the rotation angle in degrees.
public double Angle_deg { get; set; }
Property Value
Angle_rad
Gets or sets the rotation angle in radians.
public double Angle_rad { get; set; }
Property Value
Axis
Gets or sets the rotation axis.
public Vec3d Axis { get; set; }
Property Value
Pivot
Gets or sets the pivot point for the rotation.
public Vec3d Pivot { get; set; }
Property Value
XName
Gets the XML element name for serialization.
public static string XName { get; }
Property Value
Methods
Clone()
Clones this instance.
public ITransformer Clone()
Returns
- ITransformer
clone
GetInverseTransformer()
Gets a new transformer that represents the inverse of this rotation.
public ITransformer GetInverseTransformer()
Returns
- ITransformer
An inverse transformer instance.
GetMat()
Gets the transformation matrix representing this rotation.
public Mat4d GetMat()
Returns
- Mat4d
A 4x4 transformation matrix.
GetMatInv()
Gets the inverse transformation matrix of this rotation.
public Mat4d GetMatInv()
Returns
- Mat4d
A 4x4 inverse transformation matrix.
MakeXmlSource(string, string, bool)
Creates an XML representation of the object. This method may also generate additional resources such as related files.
public virtual XElement MakeXmlSource(string baseDirectory, string relFile, bool exhibitionOnly)
Parameters
baseDirectory
stringThe base directory for resolving relative paths
relFile
stringThe relative file path for the XML source
exhibitionOnly
boolif true, the extended file creation is suppressed.
Returns
- XElement
An XML element representing the object's state
Remarks
For the demand of easy moving source folder (especially project folder) without configuration file path corruption, the relative file path is applied.
The baseDirectory
is typically the folder at the nearest configuration file folder.
Since the folder can be moving with the configuration file.