Module rgg
Package de.grogra.mtg

Class MTGNode

All Implemented Interfaces:
Transformation, VertexSequence.Vertex, Manageable, PersistenceCapable, Shareable, UserFields, XObject, TurtleModifier, Map, Serializable
Direct Known Subclasses:
MTGRoot

public class MTGNode extends F
Since:
2011-11-24
Author:
yong
See Also:
  • Field Details

    • mtgClass

      public String mtgClass
    • mtgClassID

      public int mtgClassID
    • mtgID

      public int mtgID
    • mtgScale

      public int mtgScale
    • L1

      public double L1
    • L2

      public double L2
    • L3

      public double L3
    • DAB

      public double DAB
    • DAC

      public double DAC
    • DBC

      public double DBC
    • XX

      public double XX
    • YY

      public double YY
    • ZZ

      public double ZZ
    • Length

      public double Length
    • Azimut

      public double Azimut
    • Alpha

      public double Alpha
    • AA

      public double AA
    • BB

      public double BB
    • CC

      public double CC
    • TopDia

      public double TopDia
    • BotDia

      public double BotDia
    • Position

      public double Position
    • Category

      public int Category
    • DirectionPrimary

      public Vector3d DirectionPrimary
    • Order

      public int Order
    • stdAttFlag

      public int stdAttFlag
    • dataFlag

      public int dataFlag
    • $TYPE

      public static final Node.NType $TYPE
    • mtgClass$FIELD

      public static final Node.NType.Field mtgClass$FIELD
    • mtgClassID$FIELD

      public static final Node.NType.Field mtgClassID$FIELD
    • mtgID$FIELD

      public static final Node.NType.Field mtgID$FIELD
    • mtgScale$FIELD

      public static final Node.NType.Field mtgScale$FIELD
    • L1$FIELD

      public static final Node.NType.Field L1$FIELD
    • L2$FIELD

      public static final Node.NType.Field L2$FIELD
    • L3$FIELD

      public static final Node.NType.Field L3$FIELD
    • DAB$FIELD

      public static final Node.NType.Field DAB$FIELD
    • DAC$FIELD

      public static final Node.NType.Field DAC$FIELD
    • DBC$FIELD

      public static final Node.NType.Field DBC$FIELD
    • XX$FIELD

      public static final Node.NType.Field XX$FIELD
    • YY$FIELD

      public static final Node.NType.Field YY$FIELD
    • ZZ$FIELD

      public static final Node.NType.Field ZZ$FIELD
    • Azimut$FIELD

      public static final Node.NType.Field Azimut$FIELD
    • Alpha$FIELD

      public static final Node.NType.Field Alpha$FIELD
    • AA$FIELD

      public static final Node.NType.Field AA$FIELD
    • BB$FIELD

      public static final Node.NType.Field BB$FIELD
    • CC$FIELD

      public static final Node.NType.Field CC$FIELD
    • TopDia$FIELD

      public static final Node.NType.Field TopDia$FIELD
    • BotDia$FIELD

      public static final Node.NType.Field BotDia$FIELD
    • Position$FIELD

      public static final Node.NType.Field Position$FIELD
    • Category$FIELD

      public static final Node.NType.Field Category$FIELD
    • DirectionPrimary$FIELD

      public static final Node.NType.Field DirectionPrimary$FIELD
    • Order$FIELD

      public static final Node.NType.Field Order$FIELD
    • Length$FIELD

      public static final Node.NType.Field Length$FIELD
    • stdAttFlag$FIELD

      public static final Node.NType.Field stdAttFlag$FIELD
    • dataFlag$FIELD

      public static final Node.NType.Field dataFlag$FIELD
  • Constructor Details

    • MTGNode

      public MTGNode()
  • Method Details

    • setDirectoryPrimary

      public void setDirectoryPrimary(Vector3d dirp)
    • hasStdAtt

      public boolean hasStdAtt(int mask)
    • setStdAttFlagOn

      public void setStdAttFlagOn(int mask)
    • setStdAttFlagOff

      public void setStdAttFlagOff(int mask)
    • hasL1

      public boolean hasL1()
    • hasL2

      public boolean hasL2()
    • hasL3

      public boolean hasL3()
    • hasDAB

      public boolean hasDAB()
    • hasDAC

      public boolean hasDAC()
    • hasDBC

      public boolean hasDBC()
    • hasXX

      public boolean hasXX()
    • hasYY

      public boolean hasYY()
    • hasZZ

      public boolean hasZZ()
    • hasLength

      public boolean hasLength()
    • hasAzimut

      public boolean hasAzimut()
    • hasAlpha

      public boolean hasAlpha()
    • hasAA

      public boolean hasAA()
    • hasBB

      public boolean hasBB()
    • hasCC

      public boolean hasCC()
    • hasTopDia

      public boolean hasTopDia()
    • hasBotDia

      public boolean hasBotDia()
    • hasPosition

      public boolean hasPosition()
    • hasCategory

      public boolean hasCategory()
    • hasDirectionPrimary

      public boolean hasDirectionPrimary()
    • hasOrder

      public boolean hasOrder()
    • topoSons

      public int[] topoSons(int edgeType)
      Get the list of topological sons with specified edge type connection of this MTGNode.
    • topoSonNodes

      public MTGNode[] topoSonNodes(int edgeType)
      Get the list of topological sons with specified edge type connection of this MTGNode.
    • order

      public int order(MTGNode endNode) throws MTGError.MTGPlantFrameException
      Number of branch edges from this node to an end node.
      Parameters:
      endNodeId -
      Returns:
      Throws:
      MTGError.MTGPlantFrameException
    • height

      public int height(MTGNode endNode) throws MTGError.MTGPlantFrameException
      Number of successor or branch edges from this node to an end node.
      Parameters:
      endNodeId -
      Returns:
      Throws:
      MTGError.MTGPlantFrameException
    • compoFather

      public MTGNode compoFather()
      Returns compositional father of this node
      Returns:
      MTGNode
    • compoSons

      public MTGNode[] compoSons()
      Return compositional sons of this node
    • compoSonsIds

      public int[] compoSonsIds()
      Get the list of composition sons of this MTGNode.
    • compoSonsCount

      public Integer compoSonsCount()
      Get number of compositional sons.
      Returns:
      number of compositional sons.
    • getOrder

      public int getOrder()
      Gets the order attribute value of the node.
      Returns:
      order
    • getLength

      public double getLength()
      Gets the length attribute value of the node.
      Returns:
      length
    • findAdjacentMTG

      public MTGNode findAdjacentMTG(boolean out, int edgeBits, String entityClass, int entityIndex)
      Find an adjacent node n to this one. The edgeBits are used to determine if a relation between those two nodes exists (Edge.testEdgeBits(int)). If out is true and this node is the source or if in is true and this node is the target, n is returned. Thus, if in and out is true, any adjacent node where the connecting edge matches the edgeBits is considered.
      Parameters:
      in - true if edges incoming to this node should be considered
      out - true if edges outgoing from this node should be considered
      edgeBits - the type/types of edges to consider
      Returns:
      an adjacent node that matches the criteria or null if none found
    • getType

      public Node.NType getType()
    • getNTypeImpl

      protected Node.NType getNTypeImpl()
      Description copied from class: Node
      This method returns the Node.NType which describes the managed fields of the class of this node. This method has to be implemented in every concrete subclass.
      Overrides:
      getNTypeImpl in class F
      Returns:
      type describing the managed fields of the class of this node
    • newInstance

      protected Node newInstance()
      Description copied from class: Node
      This method returns a new instance of the class of this node. This method has to be implemented in every concrete subclass.
      Overrides:
      newInstance in class F
      Returns:
      new instance of class of this node
    • copyStdAttributes

      public static void copyStdAttributes(MTGNode oldNode, MTGNode newNode)