Class Anchor
A coordinate system using in kinematic chain.
public class Anchor : IGetAnchor, IGetTopoIndex, IAnchoredDisplayee, IGetRootAnchor, IDisplayee, IExpandToBox3d
- Inheritance
-
Anchor
- Implements
- Inherited Members
- Extension Methods
Constructors
Anchor()
Ctor.
public Anchor()
Anchor(Asmb)
Ctor.
public Anchor(Asmb asmb)
Parameters
Anchor(Asmb, string)
Ctor.
public Anchor(Asmb asmb, string name)
Parameters
Properties
BranchMap
Gets the branch map. ‘this’ anchor locates on Fletch .
public Dictionary<Anchor, Branch> BranchMap { get; }
Property Value
- Dictionary<Anchor, Branch>
The branch map.
BranchMapInv
Gets the branch map. ‘this’ anchor locates on Arrow .
public Dictionary<Anchor, Branch> BranchMapInv { get; }
Property Value
- Dictionary<Anchor, Branch>
The branch map.
Guid
GUID.
public Guid Guid { get; }
Property Value
IndexXName
The XML element name used for indexing anchors.
public static string IndexXName { get; }
Property Value
IndexXml
Get XML for indexing. Only the Guid takes effect when reading.
public XElement IndexXml { get; }
Property Value
Name
Name.
public string Name { get; set; }
Property Value
Methods
Detach()
Detach all related Branch.
public void Detach()
Display(Bind)
Display function called in DispEngine rendering loop.
public void Display(Bind bind)
Parameters
bind
BindBind with DispEngine. See Bind.
ExpandToBox3d(Box3d)
Expands the destination box. This function is usually used to compute the bounding box of elements.
public virtual void ExpandToBox3d(Box3d dst)
Parameters
dst
Box3dDestination box
GetAnchor()
Get key anchor.
public Anchor GetAnchor()
Returns
- Anchor
key anchor
GetByIndexXml(XElement, Dictionary<Guid, Anchor>)
Gets an anchor from its XML index representation using a GUID-to-Anchor dictionary.
public static Anchor GetByIndexXml(XElement src, Dictionary<Guid, Anchor> guidToAncDictionary)
Parameters
src
XElementThe source XML element containing the anchor index information.
guidToAncDictionary
Dictionary<Guid, Anchor>Dictionary mapping GUIDs to Anchor objects.
Returns
- Anchor
The anchor object corresponding to the XML index.
GetClusterAnchors()
Gets all the linked anchors by Branch.
public HashSet<Anchor> GetClusterAnchors()
Returns
GetMat4d(IGetAnchor)
Get transform matrix from this to tail
.
public Mat4d GetMat4d(IGetAnchor tail)
Parameters
tail
IGetAnchortail
Returns
- Mat4d
transform matrix
GetMat4dMap()
Gets the mat4d map in GetClusterAnchors()
public Dictionary<Anchor, Mat4d> GetMat4dMap()
Returns
GetNeighborAnchorList()
Get neighbor anchors.
public List<Anchor> GetNeighborAnchorList()
Returns
GetNeighborAnchorSet()
Get neighbor anchors.
public HashSet<Anchor> GetNeighborAnchorSet()
Returns
GetRootAnchor()
Get root anchor.
public Anchor GetRootAnchor()
Returns
- Anchor
root anchor.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.