Package boofcv.gui.d3

Class PointCloudViewerSwing

java.lang.Object
boofcv.gui.d3.PointCloudViewerSwing
All Implemented Interfaces:
PointCloudViewer

public class PointCloudViewerSwing extends Object implements PointCloudViewer
  • Constructor Details

    • PointCloudViewerSwing

      public PointCloudViewerSwing()
  • Method Details

    • setShowAxis

      public void setShowAxis(boolean show)
      Description copied from interface: PointCloudViewer
      Render the XYZ axis on the screen
      Specified by:
      setShowAxis in interface PointCloudViewer
    • setTranslationStep

      public void setTranslationStep(double step)
      Specified by:
      setTranslationStep in interface PointCloudViewer
    • setDotSize

      public void setDotSize(int pixels)
      Description copied from interface: PointCloudViewer
      Dot size when rendered. This is only valid if sprites are being used
      Specified by:
      setDotSize in interface PointCloudViewer
      Parameters:
      pixels - apparent size of a point
    • setClipDistance

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

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

      public void setBackgroundColor(int rgb)
      Specified by:
      setBackgroundColor in interface PointCloudViewer
    • setColorFrame

      public void setColorFrame(boolean useWorld)
      Description copied from interface: PointCloudViewer
      Should it pass in points that are in world frame or camera frame
      Specified by:
      setColorFrame in interface PointCloudViewer
    • addCloud

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

      public void addCloud(AccessPointIndex<Point3D_F64> accessPoint, @Nullable @Nullable AccessColorIndex accessColor, int size)
      Description copied from interface: PointCloudViewer
      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.
      Specified by:
      addCloud in interface PointCloudViewer
      Parameters:
      accessPoint - Accessor to point information
      accessColor - Accessor to RGB color information. If null then 0xFF0000 is assumed.
      size - Number of elements
    • addPoint

      public void addPoint(double x, double y, double z, int rgb)
      Description copied from interface: PointCloudViewer
      adds a single point to the point cloud. This method can be very slow compared to doing it in a batch
      Specified by:
      addPoint in interface PointCloudViewer
    • addWireFrame

      public void addWireFrame(List<Point3D_F64> vertexes, boolean closed, int rgb, int widthPixels)
      Description copied from interface: PointCloudViewer
      Adds a spite wireframe to the view. Since it's a sprite the thickness is independent of distance.
      Specified by:
      addWireFrame in interface PointCloudViewer
    • clearPoints

      public void clearPoints()
      Description copied from interface: PointCloudViewer
      Removes all points from the point cloud
      Specified by:
      clearPoints in interface PointCloudViewer
    • setColorizer

      public void setColorizer(PointCloudViewer.Colorizer colorizer)
      Description copied from interface: PointCloudViewer
      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
      Specified by:
      setColorizer in interface PointCloudViewer
    • removeColorizer

      public void removeColorizer()
      Description copied from interface: PointCloudViewer
      If a colorizer has been specified this will remove it
      Specified by:
      removeColorizer in interface PointCloudViewer
    • setCameraHFov

      public void setCameraHFov(double radians)
      Description copied from interface: PointCloudViewer
      Specifies the camera's FOV in radians
      Specified by:
      setCameraHFov in interface PointCloudViewer
      Parameters:
      radians - FOV size
    • setCameraToWorld

      public void setCameraToWorld(Se3_F64 cameraToWorld)
      Description copied from interface: PointCloudViewer
      Changes the camera location
      Specified by:
      setCameraToWorld in interface PointCloudViewer
      Parameters:
      cameraToWorld - transform from camera to world coordinates
    • getCameraToWorld

      public Se3_F64 getCameraToWorld(@Nullable @Nullable Se3_F64 cameraToWorld)
      Description copied from interface: PointCloudViewer
      Returns a copy of the camera to world transform currently being used
      Specified by:
      getCameraToWorld in interface PointCloudViewer
      Parameters:
      cameraToWorld - (Optional) storage for the transform
      Returns:
      The transform
    • copyCloud

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

      public JComponent getComponent()
      Description copied from interface: PointCloudViewer
      Returns a swing component for adding to a GUI
      Specified by:
      getComponent in interface PointCloudViewer