Class PointCloudBaseImpl

All Implemented Interfaces:
Transformation, Manageable, PersistenceCapable, Shareable, UserFields, XObject, Map, Serializable

public class PointCloudBaseImpl extends PointCloudBase
Handling adding nodes and their persistence should be managed by a graph manager and a persistence manager.
See Also:
  • Field Details

    • sourceName

      protected String sourceName
    • childrenClass

      protected String childrenClass
    • $TYPE

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

      public static final Node.NType.Field sourceName$FIELD
    • childrenClass$FIELD

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

    • PointCloudBaseImpl

      public PointCloudBaseImpl()
    • PointCloudBaseImpl

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

    • 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:
    • addPoint

      public void addPoint(PointCloudLeaf[] nodes)
      Specified by:
      addPoint in class PointCloudBase
    • addPoint

      public void addPoint(PointCloudLeaf node)
      Specified by:
      addPoint in class PointCloudBase
    • 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

      protected Class<? extends PointCloudLeaf> getChildrenType() throws ClassNotFoundException
      Specified by:
      getChildrenType in class PointCloudBase
      Throws:
      ClassNotFoundException
    • removePoint

      public void removePoint(Object id)
      Specified by:
      removePoint in class PointCloudBase
    • removePoint

      public void removePoint(PointCloudLeaf[] nodes)
      Specified by:
      removePoint in class PointCloudBase
    • rebalance

      public void rebalance()
      Specified by:
      rebalance in class PointCloudBase
    • merge

      public void merge(PointCloudBase pc)
      Merges the leaf nodes of the specified point cloud into the current point cloud.
      Specified by:
      merge in class PointCloudBase
      Parameters:
      pc - The point cloud from which leaf nodes will be merged.
    • split

      public PointCloudBase split(PointCloudLeaf[] nodes)
      Splits the point cloud by a set of leaves. Removes the leaves from the point cloud and creates a new point cloud.
      Specified by:
      split in class PointCloudBase
      Parameters:
      nodes - An Array containing leaf nodes
      Returns:
      PointCloudBase A new point cloud containing the leaves
    • split

      public PointCloudBase split(Plane plane)
      Splits the point cloud by a given plane. Removes the leaves from the point cloud and creates a new point cloud.
      Specified by:
      split in class PointCloudBase
      Parameters:
      plane - to be used as cutting object
      Returns:
      PointCloudBase A new point cloud containing the leaves above the plane
    • getMinimumX

      public double getMinimumX()
      Calculates and returns the minimum X-coordinate value among all leaf nodes.
      Returns:
      The minimum X-coordinate value among all leaf nodes, or 0 if no leaf nodes are present.
    • getMinimumY

      public double getMinimumY()
      Calculates and returns the minimum Y-coordinate value among all leaf nodes.
      Returns:
      The minimum Y-coordinate value among all leaf nodes, or 0 if no leaf nodes are present.
    • getMinimumZ

      public double getMinimumZ()
      Calculates and returns the minimum Z-coordinate value among all leaf nodes.
      Returns:
      The minimum Z-coordinate value among all leaf nodes, or 0 if no leaf nodes are present.
    • getMaximumX

      public double getMaximumX()
      Calculates and returns the maximum X-coordinate value among all leaf nodes.
      Returns:
      The maximum X-coordinate value among all leaf nodes, or 0 if no leaf nodes are present.
    • getMaximumY

      public double getMaximumY()
      Calculates and returns the maximum Y-coordinate value among all leaf nodes.
      Returns:
      The maximum Y-coordinate value among all leaf nodes, or 0 if no leaf nodes are present.
    • getMaximumZ

      public double getMaximumZ()
      Calculates and returns the maximum Z-coordinate value among all leaf nodes.
      Returns:
      The maximum Z-coordinate value among all leaf nodes, or 0 if no leaf nodes are present.
    • split

      public PointCloudBase[] split(Attribute a)
      Specified by:
      split in class PointCloudBase
    • getSize

      public long getSize()
    • 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)
    • getFirstLeaf

      public PointCloudLeaf getFirstLeaf()
      Specified by:
      getFirstLeaf in class PointCloudBase
    • 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 Null
      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 Null
      Returns:
      new instance of class of this node
    • getSourceName

      public String getSourceName()
      Specified by:
      getSourceName in class PointCloudBase
    • getChildrenClass

      public String getChildrenClass()