Module pointcloud

Class CloudGraph

java.lang.Object
de.grogra.pointcloud.objects.CloudGraphBase
de.grogra.pointcloud.objects.impl.CloudGraph
All Implemented Interfaces:
NodeContext, ProducingNode, BoundedCloud, Cloud, CloudContext, DisposableField, Manageable, Disposable

public class CloudGraph extends CloudGraphBase
Base implementation of a CloudGraphBase
  • Field Details

    • sourceName

      protected String sourceName
    • childrenClass

      protected String childrenClass
    • cloudNode

      protected transient Node cloudNode
    • size

      protected int size
    • balancingFactor

      protected long balancingFactor
    • initialized

      protected transient boolean initialized
    • update

      protected transient boolean update
    • boundariesChanged

      protected transient boolean boundariesChanged
    • $TYPE

      public static final CloudGraph.Type $TYPE
    • sourceName$FIELD

      public static final SCOType.Field sourceName$FIELD
    • childrenClass$FIELD

      public static final SCOType.Field childrenClass$FIELD
    • size$FIELD

      public static final SCOType.Field size$FIELD
    • balancingFactor$FIELD

      public static final SCOType.Field balancingFactor$FIELD
    • depth$FIELD

      public static final SCOType.Field depth$FIELD
  • Constructor Details

    • CloudGraph

      public CloudGraph()
    • CloudGraph

      public CloudGraph(float[] points)
    • CloudGraph

      public CloudGraph(String name, long balancingFactor, long depth, Class type)
  • Method Details

    • editable

      public boolean editable()
      Description copied from interface: Cloud
      A cloud is editable if it is possible to add and remove points. Being able to setPoint does not make the cloud editable as is change either all or none of hte points.
    • getNode

      public Node getNode()
    • setNode

      public void setNode(Node n)
    • getSourceName

      public String getSourceName()
      Specified by:
      getSourceName in class CloudGraphBase
    • dispose

      public void dispose(boolean removeNode)
    • dispose

      public void dispose()
    • createNew

      public Cloud createNew()
    • computeDepthFromNandD

      public static long computeDepthFromNandD(long n, long d)
      get the depth of the tree based on the number of leaves n, and the degree of the tree
      Parameters:
      n -
      d -
      Returns:
    • setPoints

      public void setPoints(Cloud.Point[] p)
    • addPoints

      public void addPoints(Cloud.Point[] nodes)
    • addPoint

      public void addPoint(Cloud.Point node)
    • addPoint

      public void addPoint(IntermediateCloudNode[] nodes)
      Specified by:
      addPoint in class CloudGraphBase
    • addPoint

      public void addPoint(IntermediateCloudNode node)
      Specified by:
      addPoint in class CloudGraphBase
    • createLeaf

      public PointCloudLeaf createLeaf(Object[] args)
      args is the set of arguments that the leaf constructor takes in. e.g. for pointcloudpointimpl it is float x, float y, float z
      Parameters:
      args -
      Returns:
    • getChildrenType

      public Class<? extends PointCloudLeaf> getChildrenType() throws ClassNotFoundException
      Specified by:
      getChildrenType in class CloudGraphBase
      Throws:
      ClassNotFoundException
    • remove

      public Cloud.Point remove(Object i)
      Remove a given node
    • remove

      public Cloud.Point[] remove(Object[] i)
      Remove an array of nodes
    • removeAll

      public void removeAll()
      This delete all the leaves (all their edges) before delete all edges from the pointcloud node to the indtermedate nodes. The deletion of the Leaves if required to ensure that no other edges from them to another part of the project graph remains.
    • removeAll

      public void removeAll(boolean deepRemove)
      If deep remove is false, only delete the first layer of edges from the pointcloud node toward the leaves. If any node of the point cloud have other edges toward the project graph, they will remains persistent through these edges. In most cases this have the same effect as removeall, but if the point cloud was imported with PLY and some refinement edges exists, the points will keep existing after removeall(false);
    • rebalance

      public void rebalance()
      Naive "rebalancing" the depth of the graph is incremented, All direct IPCN from the root are pushed one layer down. (but their layer info is not updated TODO)
      Specified by:
      rebalance in class CloudGraphBase
    • getBalancindFactor

      public long getBalancindFactor()
      Here we consider the max degree of the graph as balancing factor
    • getDepth

      public long getDepth()
    • setMinId

      public void setMinId(long id)
    • setMaxId

      public void setMaxId(long id)
    • getNumberOfPoints

      public int getNumberOfPoints()
      Recompute properly the number of children
    • getFirstLeaf

      public PointCloudLeaf getFirstLeaf()
      Specified by:
      getFirstLeaf in class CloudGraphBase
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: Cloud
      To be part of the graph a cloud need to be added to a node. This return the cloudNode associated to this cloud if any.
    • getPoints

      public Cloud.Point[] getPoints()
    • recomputeBoundaries

      protected void recomputeBoundaries()
    • peek

      public Cloud.Point peek()
      Should be last but well
    • pop

      public Cloud.Point pop()
    • push

      public void push(Cloud.Point p)
    • pointsToFloat

      public float[] pointsToFloat()
      Description copied from interface: Cloud
      Convenience methods as most points are/or can be represented as arrays of floats
    • floatsToPoint

      public Cloud.Point[] floatsToPoint(float[] points)
    • getMinimumX

      public float getMinimumX()
    • getMinimumY

      public float getMinimumY()
    • getMinimumZ

      public float getMinimumZ()
    • getMaximumX

      public float getMaximumX()
    • getMaximumY

      public float getMaximumY()
    • getMaximumZ

      public float getMaximumZ()
    • create

      public static CloudList create(Aggregate a, Cloud.Point p)
    • getCenter

      public Vector3f getCenter()
    • produceNode

      public Node produceNode()
    • addSize

      public void addSize(int a)
      TODO: this should probably not exists. Find a better way to update the size when merging/ spliting clouds
    • fieldModified

      public void fieldModified(PersistenceField field, int[] indices, Transaction t)
      Serialization
    • getStamp

      public int getStamp()
      Description copied from interface: Manageable
      Returns a stamp for this object. Each modification to this object increments the stamp. The initial stamp is non-negative.
      Returns:
      a stamp
    • manageableReadResolve

      public Manageable manageableReadResolve()
    • manageableWriteReplace

      public Object manageableWriteReplace()
    • disposeField

      public void disposeField()
    • getManageableType

      public ManageableType getManageableType()
    • getSize

      public int getSize()
    • setBalancingFactor

      public void setBalancingFactor(long value)
    • getChildrenClass

      public String getChildrenClass()