|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectccvisu.MinimizerBarnesHut.OctTree
private class MinimizerBarnesHut.OctTree
Octtree for graph nodes with positions in 3D space. Contains all graph nodes that are located in a given cuboid in 3D space.
Field Summary | |
---|---|
private MinimizerBarnesHut.OctTree[] |
children
Children of this tree node. |
private int |
index
For leafs, the unique index of the graph node; for non-leafs -1. |
private float[] |
maxPos
Maximum coordinates of the cuboid in each of the 3 dimensions. |
private float[] |
minPos
Minimum coordinates of the cuboid in each of the 3 dimensions. |
private float[] |
position
Barycenter of the contained graph nodes. |
private float |
weight
Total weight of the contained graph nodes. |
Constructor Summary | |
---|---|
private |
MinimizerBarnesHut.OctTree(int index,
float[] position,
float weight,
float[] minPos,
float[] maxPos)
Creates an octtree containing one graph node. |
Method Summary | |
---|---|
private void |
addNode(int nodeIndex,
float[] nodePos,
float nodeWeight)
Adds a graph node to the octtree. |
private void |
addNode2(int nodeIndex,
float[] nodePos,
float nodeWeight)
Adds a graph node to the octtree, without changing the position and weight of the root. |
private void |
moveNode(float[] oldPos,
float[] newPos,
float nodeWeight)
Updates the positions of the octtree nodes when the position of a graph node has changed. |
private float |
width()
Returns the maximum extension of the octtree. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int index
private MinimizerBarnesHut.OctTree[] children
private float[] position
private float weight
private float[] minPos
private float[] maxPos
Constructor Detail |
---|
private MinimizerBarnesHut.OctTree(int index, float[] position, float weight, float[] minPos, float[] maxPos)
index
- Unique index of the graph node.position
- Position of the graph node.weight
- Weight of the graph node.minPos
- Minimum coordinates of the cuboid.maxPos
- Maximum coordinates of the cuboid.Method Detail |
---|
private void addNode(int nodeIndex, float[] nodePos, float nodeWeight)
nodeIndex
- Unique index of the graph node.nodePos
- Position of the graph node.nodeWeight
- Weight of the graph node.private void addNode2(int nodeIndex, float[] nodePos, float nodeWeight)
nodeIndex
- Unique index of the graph node.nodePos
- Position of the graph node.nodeWeight
- Weight of the graph node.private void moveNode(float[] oldPos, float[] newPos, float nodeWeight)
oldPos
- Previous position of the graph node.newPos
- New position of the graph node.nodeWeight
- Weight of the graph node.private float width()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |