Class DynamicTranslation
Dynamic translate transformer
public class DynamicTranslation : IDynamicRegular, IDynamicTransformer, ITransformer, IMakeXmlSource, IGetInverseTransformer, IToPresentDto
- Inheritance
-
DynamicTranslation
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
DynamicTranslation()
Ctor.
public DynamicTranslation()
DynamicTranslation(vec3d_t, double)
Ctor.
public DynamicTranslation(vec3d_t axis, double len = 0)
Parameters
DynamicTranslation(XElement)
Ctor.
public DynamicTranslation(XElement src)
Parameters
srcXElementXML
Properties
Axis
Translation Axis.
public vec3d_t Axis { get; set; }
Property Value
Remarks
A property (a whole-value write) since the topology core moved to native: the setter pushes the transformer to the Branch it is bound to — assign a new vec3d_t.
Len
Length: the object's own value, what the setters wrote (and a step batch mirrored). A view of the transformer – ToPresentDto(), MakeXmlSource(string, string, bool) – shows the bound branch's native step instead, and this value only while unbound.
public double Len { get; set; }
Property Value
Step
Gets or sets the step.
public double Step { get; set; }
Property Value
- double
The step.
XName
Static name.
public static string XName { get; }
Property Value
Methods
Clone()
Clones this instance.
public virtual 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_t GetMat()
Returns
- mat4d_t
The transform matrix.
GetMatInv()
Gets the inverse transform matrix.
public mat4d_t GetMatInv()
Returns
- mat4d_t
The inverse transform 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
baseDirectorystringThe base directory for resolving relative paths
relFilestringThe relative file path for the XML source
exhibitionOnlyboolif 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.
Reg(XFactory)
Registers this type's deserializer with the given XFactory
(or Default when factory is
null). Idempotent.
public static void Reg(XFactory factory = null)
Parameters
factoryXFactory
Set(DynamicTranslation)
Copy from src.
public void Set(DynamicTranslation src)
Parameters
srcDynamicTranslationsrc
ToPresentDto()
Convert DynamicTranslation to presentation DTO (Data Transfer Object) for JSON serialization.
The returned object includes type metadata for web API presentation. Step is the
length of the branch this transformer is bound to, read natively
(ReadStepForView(ITransformer, double)): the truth a play or a step batch wrote
past the object; the object's own Len only while unbound.
public object ToPresentDto()
Returns
- object
DTO dictionary with Type, Axis, and Step keys