Interface PointCloudViewer

All Known Implementing Classes:
PointCloudViewerSwing

public interface PointCloudViewer
High level interface for displaying point clouds
  • Method Details

    • setShowAxis

      void setShowAxis(boolean show)
      Render the XYZ axis on the screen
    • setTranslationStep

      void setTranslationStep(double step)
    • setDotSize

      void setDotSize(int pixels)
      Dot size when rendered. This is only valid if sprites are being used
      Parameters:
      pixels - apparent size of a point
    • setClipDistance

      void setClipDistance(double distance)
      Specifies the clipping distance. The default value will be infinity or some other very large value
      Parameters:
      distance - maximum distance an object away from the camera can be seen
    • setFog

      void setFog(boolean active)
      If true then objects farther away will fade into the background color. Providing some sense of depth. this is by default off.
      Parameters:
      active - true to turn on
    • setBackgroundColor

      void setBackgroundColor(int rgb)
    • setColorFrame

      void setColorFrame(boolean useWorld)
      Should it pass in points that are in world frame or camera frame
    • addCloud

      void addCloud(PointCloudViewer.IteratePoint iterator, boolean hasColor)
      Adds a point cloud to the viewer
      Parameters:
      iterator - Iterator with 3D point and optionally color information
      hasColor - true if the iterator has valid color
    • addCloud

      default void addCloud(AccessPointIndex<Point3D_F64> accessPoint, @Nullable @Nullable AccessColorIndex accessColor, int size)
      Adds the point cloud using a data structure that can be access by index and has a known size. Knowing the size can allow the internal implementation to preallocate memory.
      Parameters:
      accessPoint - Accessor to point information
      accessColor - Accessor to RGB color information. If null then 0xFF0000 is assumed.
      size - Number of elements
    • addCloud

      @Deprecated default void addCloud(List<Point3D_F64> cloudXyz, int[] colorsRgb)
      Deprecated.
    • addCloud

      @Deprecated default void addCloud(List<Point3D_F64> cloud)
      Deprecated.
    • addCloud

      @Deprecated default void addCloud(DogArray_F32 cloudXYZ, DogArray_I32 colorRGB)
      Deprecated.
    • addPoint

      void addPoint(double x, double y, double z, int rgb)
      adds a single point to the point cloud. This method can be very slow compared to doing it in a batch
    • addWireFrame

      void addWireFrame(List<Point3D_F64> vertexes, boolean closed, int rgb, int radiusPixels)
      Adds a spite wireframe to the view. Since it's a sprite the thickness is independent of distance.
    • clearPoints

      void clearPoints()
      Removes all points from the point cloud
    • setColorizer

      void setColorizer(PointCloudViewer.Colorizer colorizer)
      Used to assign colors to points using a custom function based on their position and/or index. If a color is specified it will override it
    • removeColorizer

      void removeColorizer()
      If a colorizer has been specified this will remove it
    • setCameraHFov

      void setCameraHFov(double radians)
      Specifies the camera's FOV in radians
      Parameters:
      radians - FOV size
    • setCameraToWorld

      void setCameraToWorld(Se3_F64 cameraToWorld)
      Changes the camera location
      Parameters:
      cameraToWorld - transform from camera to world coordinates
    • getCameraToWorld

      Se3_F64 getCameraToWorld(@Nullable @Nullable Se3_F64 storage)
      Returns a copy of the camera to world transform currently being used
      Parameters:
      storage - (Optional) storage for the transform
      Returns:
      The transform
    • copyCloud

      DogArray<Point3dRgbI_F64> copyCloud(@Nullable @Nullable DogArray<Point3dRgbI_F64> copy)
      Copies the point cloud into the passed in list.
      Parameters:
      copy - Where the cloud should be copied into. if null a new instance is created
      Returns:
      The copy
    • getComponent

      JComponent getComponent()
      Returns a swing component for adding to a GUI