|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.grogra.graph.impl.Edge de.grogra.graph.impl.Node de.grogra.imp3d.objects.Null de.grogra.imp3d.objects.ShadedNull de.grogra.imp3d.objects.AxisBase de.grogra.turtle.TurtleStep de.grogra.turtle.Shoot de.grogra.turtle.F de.grogra.mtg.MTGNode de.grogra.mtg.MTGRoot
public class MTGRoot
Class representing an MTG. Contents are in HashMap retrievable by keys specified in section "//MTGNode contents" of MTGKeys.java.
MTGKeys
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class de.grogra.turtle.F |
---|
F.Pattern |
Nested classes/interfaces inherited from class de.grogra.graph.impl.Node |
---|
Node.AccessorBridge, Node.FieldAttributeAccessor, Node.NType |
Nested classes/interfaces inherited from interface de.grogra.util.Map |
---|
Map.Chain |
Field Summary | |
---|---|
static Node.NType |
$TYPE
|
static Node.NType.Field |
dist$FIELD
|
protected PolygonMesh |
polygons
|
protected int |
visibleSides
|
static Node.NType.Field |
visibleSides$FIELD
|
Fields inherited from class de.grogra.mtg.MTGNode |
---|
AA, AA$FIELD, Alpha, Alpha$FIELD, Azimut, Azimut$FIELD, BB, BB$FIELD, BotDia, BotDia$FIELD, Category, Category$FIELD, CC, CC$FIELD, DAB, DAB$FIELD, DAC, DAC$FIELD, dataFlag, dataFlag$FIELD, DBC, DBC$FIELD, DirectionPrimary, DirectionPrimary$FIELD, L1, L1$FIELD, L2, L2$FIELD, L3, L3$FIELD, Length, Length$FIELD, mtgClass, mtgClass$FIELD, mtgClassID, mtgClassID$FIELD, mtgID, mtgID$FIELD, mtgScale, mtgScale$FIELD, Order, Order$FIELD, Position, Position$FIELD, stdAttFlag, stdAttFlag$FIELD, TopDia, TopDia$FIELD, XX, XX$FIELD, YY, YY$FIELD, ZZ, ZZ$FIELD |
Fields inherited from class de.grogra.turtle.F |
---|
color, color$FIELD, diameter, diameter$FIELD, length, length$FIELD |
Fields inherited from class de.grogra.turtle.Shoot |
---|
localRegisters$FIELD |
Fields inherited from class de.grogra.imp3d.objects.AxisBase |
---|
SCALE_V_MASK, scaleV$FIELD, USED_BITS |
Fields inherited from class de.grogra.imp3d.objects.ShadedNull |
---|
INFINITE_MASK, interior, interior$FIELD, shader, shader$FIELD, treatedAsInfinite$FIELD |
Fields inherited from class de.grogra.imp3d.objects.Null |
---|
transform, transform$FIELD, TRANSFORMING_MASK, transforming$FIELD |
Fields inherited from class de.grogra.graph.impl.Node |
---|
ADDITIONAL_FIELDS, bits, DELETED, EXTENT_BIT, EXTENT_MASK, extentIndex$FIELD, extentTail$FIELD, HAS_OBSERVERS, IS_INTERPRETIVE, isInterpretive$FIELD, LAST_EXTENT_INDEX, layer$FIELD, MARK, mark$FIELD, MIME_TYPE, MIN_UNUSED_SPECIAL_OF_SOURCE, MIN_UNUSED_SPECIAL_OF_TARGET, name$FIELD |
Fields inherited from interface de.grogra.util.Map |
---|
DEFAULT_VALUE, EMPTY_MAP |
Constructor Summary | |
---|---|
MTGRoot()
|
Method Summary | |
---|---|
void |
changeBenchmark(Vector3d ori,
Vector3d u,
Vector3d v,
Vector3d w)
|
int |
classScale(java.lang.String classSymbol)
Returns scale of a given class |
int[] |
classSymbolsToClassIndices(java.lang.String[] classSymbols)
|
int |
classSymbolToClassIndex(java.lang.String classSymbol)
|
Matrix4d |
combinePriSecRotation(double x,
double y,
double z,
double x2,
double y2,
double z2)
|
int |
compoFather(int nodeIndex)
Nodes - Returns refinement father of the specified node. |
MTGNode |
compoFather(MTGNode node)
Nodes - Returns refinement father of the specified node. |
int[] |
compoSonsIds(int nodeIndex)
Nodes - Returns refinement sons of the specified node. |
int[] |
compoSonsIds(int nodeIndex,
int scale)
Returns compositional sons of a node, given that the compositional sons are of a lower scale than the given scale. |
void |
deleteNodeList()
|
void |
draw(java.lang.Object object,
boolean asNode,
RenderState rs)
|
int |
edgeType(int sourceIndex,
int targetIndex)
Nodes - Get the edge bits (int) between a source node and a target node. |
int |
findLocalTopoRoot(int startv,
int etype)
Find root(first node) of the compositional group node 'startv' belongs to. |
java.util.ArrayList<MTGBranch> |
getBranches()
Branches - Get the branches or plant frame. |
int |
getBranchesCount()
Branches - Get number of branches. |
java.util.ArrayList<MTGNodeDataClasses> |
getClassesInfo()
Classes - Returns information of MTG classes defined. |
MTGNodeData |
getData()
|
java.util.ArrayList<MTGNodeDataFeature> |
getFeaturesInfo()
Features - Returns information of MTG features defined. |
int |
getIndex(MTGNode node)
Nodes - Returns index of MTGNode given its instance. |
MTGNode |
getNode(int nodeIndex)
Nodes - Returns MTGNode instance given its index. |
protected Node.NType |
getNTypeImpl()
This method returns the Node.NType which describes the managed
fields of the class of this node. |
java.lang.Object |
getObject(java.lang.String key)
|
int |
getPlantCount()
Plant - Gets the number of plants recognized in this MTG so far. |
PolygonMesh |
getPolygons()
|
int[] |
getRootIds(int scale)
Obtain a list of indices of root nodes refined the specified node. |
MTGNode[] |
getRoots(int scale)
|
int |
getScale(int nodeIndex)
Nodes - Returns scale of node at index specified. |
int |
height(MTGNode startNode,
MTGNode endNode)
Number of successor or branch edges from a start node to an end node. |
void |
incrementPlantCount()
Plant - Increment the counter for the number of plants specified in this MTG. |
int |
mtgType()
Coordinates - Get the MTG geometric reference system type. |
protected Node |
newInstance()
This method returns a new instance of the class of this node. |
int |
pathLength(int father,
int vertex,
int edge)
|
void |
plantFrame(int scale,
double dist)
Computes the frame of the plant at the specified scale. |
void |
plantFrameDelete(int scale)
|
void |
refreshNodeIndices()
Refreshes cached node list. |
void |
removeInterScaleTopoRelations()
Removes inter-scale topological relations (i.e. successor and branching edges). |
MTGBranchElement |
searchForElement(int nodeIndex)
Branches - Returns branch element that corresponds to the node of the given index. |
void |
setData(MTGNodeData data)
|
void |
setElevationAzimuth(Vector3d vec,
double ele,
double azi)
|
void |
setObject(java.lang.String key,
java.lang.Object obj)
|
void |
setPolygons(PolygonMesh mesh)
|
int |
topoFather(int nodeIndex,
int edgeType)
Nodes - Returns index of node that is topological father of node specified by input nodeIndex. |
int[] |
topoSons(int nodeIndex,
int edgeType)
Nodes - For usage by root MTG node. |
Methods inherited from class de.grogra.mtg.MTGNode |
---|
compoFather, compoSons, compoSonsCount, compoSonsIds, copyStdAttributes, findAdjacentMTG, getLength, getOrder, getType, hasAA, hasAlpha, hasAzimut, hasBB, hasBotDia, hasCategory, hasCC, hasDAB, hasDAC, hasDBC, hasDirectionPrimary, hasL1, hasL2, hasL3, hasLength, hasOrder, hasPosition, hasStdAtt, hasTopDia, hasXX, hasYY, hasZZ, height, order, setDirectoryPrimary, setStdAttFlagOff, setStdAttFlagOn, topoSonNodes, topoSons |
Methods inherited from class de.grogra.turtle.F |
---|
getFloat, getInt, getLength |
Methods inherited from class de.grogra.turtle.Shoot |
---|
execute, getBoolean, getLocalRegisters, getObject, getSymbolColor, getVertexTransformation, setLocalRegisters |
Methods inherited from class de.grogra.turtle.TurtleStep |
---|
getDouble, postTransform |
Methods inherited from class de.grogra.imp3d.objects.AxisBase |
---|
isScaleV, setScaleV |
Methods inherited from class de.grogra.imp3d.objects.ShadedNull |
---|
getInterior, getShader, isTreatedAsInfinite, setBackShader, setColor, setColor, setFrontShader, setInterior, setMaterial, setShader, setShaders, setTreatedAsInfinite |
Methods inherited from class de.grogra.imp3d.objects.Null |
---|
getLocalTransformation, getTransform, getTranslation, isTransforming, preTransform, setRotation, setScale, setTransform, setTransform, setTransform, setTransform, setTransform, setTransform, setTransform, setTransform, setTransforming, setTranslation |
Methods inherited from class de.grogra.graph.impl.Edge |
---|
addEdgeBits, getBitMark, getEdgeBits, getObjectMark, getSpecialEdgeDescriptor, parseEdgeKeys, remove, removeEdgeBits, setBitMark, setEdgeBits, setObjectMark, testEdgeBits |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface de.grogra.persistence.PersistenceCapable |
---|
getBitMark, getObjectMark, setBitMark, setObjectMark |
Field Detail |
---|
public static final Node.NType $TYPE
public static final Node.NType.Field dist$FIELD
protected PolygonMesh polygons
protected int visibleSides
public static final Node.NType.Field visibleSides$FIELD
Constructor Detail |
---|
public MTGRoot()
Method Detail |
---|
public void changeBenchmark(Vector3d ori, Vector3d u, Vector3d v, Vector3d w)
public int classScale(java.lang.String classSymbol)
classSymbol
-
public int[] classSymbolsToClassIndices(java.lang.String[] classSymbols)
public int classSymbolToClassIndex(java.lang.String classSymbol)
public Matrix4d combinePriSecRotation(double x, double y, double z, double x2, double y2, double z2)
public int compoFather(int nodeIndex)
nodeIndex
-
public MTGNode compoFather(MTGNode node)
nodeIndex
-
public int[] compoSonsIds(int nodeIndex)
nodeIndex
-
public int[] compoSonsIds(int nodeIndex, int scale) throws MTGError.MTGPlantFrameException
nodeIndex
- scale
-
MTGError.MTGPlantFrameException
public void deleteNodeList()
public void draw(java.lang.Object object, boolean asNode, RenderState rs)
draw
in interface Renderable
public int edgeType(int sourceIndex, int targetIndex)
sourceIndex
- targetIndex
-
public int findLocalTopoRoot(int startv, int etype) throws MTGError.MTGPlantFrameException
startv
- etype
-
MTGError.MTGPlantFrameException
public java.util.ArrayList<MTGBranch> getBranches()
public int getBranchesCount()
public java.util.ArrayList<MTGNodeDataClasses> getClassesInfo() throws MTGError.MTGPlantFrameException
MTGError.MTGPlantFrameException
public MTGNodeData getData()
public java.util.ArrayList<MTGNodeDataFeature> getFeaturesInfo() throws MTGError.MTGPlantFrameException
MTGError.MTGPlantFrameException
public int getIndex(MTGNode node)
node
-
public MTGNode getNode(int nodeIndex)
nodeIndex
-
protected Node.NType getNTypeImpl()
Node
Node.NType
which describes the managed
fields of the class of this node. This method has to be implemented
in every concrete subclass.
getNTypeImpl
in class MTGNode
public java.lang.Object getObject(java.lang.String key)
public int getPlantCount() throws MTGError.MTGPlantFrameException
MTGError.MTGPlantFrameException
public PolygonMesh getPolygons()
public int[] getRootIds(int scale) throws MTGError.MTGPlantFrameException
scale
-
MTGError.MTGPlantFrameException
public MTGNode[] getRoots(int scale) throws MTGError.MTGPlantFrameException
MTGError.MTGPlantFrameException
public int getScale(int nodeIndex) throws MTGError.MTGPlantFrameException
nodeIndex
-
MTGError.MTGPlantFrameException
public int height(MTGNode startNode, MTGNode endNode) throws MTGError.MTGPlantFrameException
startNodeId
- endNodeId
-
MTGError.MTGPlantFrameException
public void incrementPlantCount() throws MTGError.MTGPlantFrameException
MTGError.MTGPlantFrameException
public int mtgType() throws MTGError.MTGPlantFrameException
MTGError.MTGPlantFrameException
protected Node newInstance()
Node
newInstance
in class MTGNode
public int pathLength(int father, int vertex, int edge)
public void plantFrame(int scale, double dist) throws MTGError.MTGPlantFrameException
scale
-
MTGError.MTGPlantFrameException
public void plantFrameDelete(int scale)
public void refreshNodeIndices() throws MTGError.MTGPlantFrameException
MTGError.MTGPlantFrameException
public void removeInterScaleTopoRelations() throws MTGError.MTGPlantFrameException
MTGError.MTGPlantFrameException
public MTGBranchElement searchForElement(int nodeIndex)
nodeIndex
-
public void setData(MTGNodeData data)
public void setElevationAzimuth(Vector3d vec, double ele, double azi)
public void setObject(java.lang.String key, java.lang.Object obj)
public void setPolygons(PolygonMesh mesh)
public int topoFather(int nodeIndex, int edgeType)
nodeIndex
- edgeType
-
public int[] topoSons(int nodeIndex, int edgeType)
nodeIndex
- edgeType
-
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |