Class GeneralTransform
Represents a general transformation that combines scaling, rotation, and translation.
public class GeneralTransform : IStaticTransformer, ITransformer, IMakeXmlSource, IGetInverseTransformer
- Inheritance
-
GeneralTransform
- Implements
- Inherited Members
- Extension Methods
Constructors
GeneralTransform()
Initializes a new instance of the GeneralTransform class.
public GeneralTransform()
GeneralTransform(Mat4d)
Initializes a new instance of the GeneralTransform class from a 4x4 transformation matrix.
public GeneralTransform(Mat4d mat)
Parameters
mat
Mat4dThe transformation matrix.
GeneralTransform(double, StaticRotation, StaticTranslation)
Initializes a new instance of the GeneralTransform class with specified scale, rotation, and translation.
public GeneralTransform(double scale, StaticRotation rotation, StaticTranslation translation)
Parameters
scale
doubleThe scaling factor.
rotation
StaticRotationThe rotation transformation.
translation
StaticTranslationThe translation transformation.
GeneralTransform(XElement)
Ctor.
public GeneralTransform(XElement src)
Parameters
src
XElementXML
Properties
Rotation
2th transform.
public StaticRotation Rotation { get; }
Property Value
Scale
1th transform.
public double Scale { get; set; }
Property Value
Translation
3th transform.
public StaticTranslation Translation { get; }
Property Value
XName
Static name.
public static string XName { get; }
Property Value
Methods
Clone()
Clones this instance.
public ITransformer Clone()
Returns
- ITransformer
clone
GetInverseTransformer()
Gets the inverse transformer of this transformer.
public ITransformer GetInverseTransformer()
Returns
- ITransformer
The inverse transformer.
GetMat()
Gets the transform matrix.
public Mat4d GetMat()
Returns
- Mat4d
The transform matrix.
GetMatInv()
Gets the inverse transform matrix.
public Mat4d GetMatInv()
Returns
- Mat4d
The inverse transform matrix.
MakeXmlSource(string, string)
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)
Parameters
baseDirectory
stringThe base directory for resolving relative paths
relFile
stringThe relative file path for the XML source
Returns
- XElement
An XML element representing the object's state