Package boofcv.visualize
Interface PointCloudViewer
- All Known Implementing Classes:
PointCloudViewerSwing
public interface PointCloudViewer
High level interface for displaying point clouds
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Computes the color for a pointstatic interface
Iterator like interface for accessing point information -
Method Summary
Modifier and TypeMethodDescriptiondefault void
addCloud
(AccessPointIndex<Point3D_F64> accessPoint, @Nullable AccessColorIndex accessColor, int size) Adds the point cloud using a data structure that can be access by index and has a known size.void
addCloud
(PointCloudViewer.IteratePoint iterator, boolean hasColor) Adds a point cloud to the viewerdefault void
addCloud
(List<Point3D_F64> cloud) Deprecated.default void
addCloud
(List<Point3D_F64> cloudXyz, int[] colorsRgb) Deprecated.default void
addCloud
(DogArray_F32 cloudXYZ, DogArray_I32 colorRGB) Deprecated.void
addPoint
(double x, double y, double z, int rgb) adds a single point to the point cloud.void
addWireFrame
(List<Point3D_F64> vertexes, boolean closed, int rgb, int radiusPixels) Adds a spite wireframe to the view.void
Removes all points from the point cloudcopyCloud
(@Nullable DogArray<Point3dRgbI_F64> copy) Copies the point cloud into the passed in list.getCameraToWorld
(@Nullable Se3_F64 storage) Returns a copy of the camera to world transform currently being usedReturns a swing component for adding to a GUIvoid
If a colorizer has been specified this will remove itvoid
setBackgroundColor
(int rgb) void
setCameraHFov
(double radians) Specifies the camera's FOV in radiansvoid
setCameraToWorld
(Se3_F64 cameraToWorld) Changes the camera locationvoid
setClipDistance
(double distance) Specifies the clipping distance.void
setColorFrame
(boolean useWorld) Should it pass in points that are in world frame or camera framevoid
setColorizer
(PointCloudViewer.Colorizer colorizer) Used to assign colors to points using a custom function based on their position and/or index.void
setDotSize
(int pixels) Dot size when rendered.void
setFog
(boolean active) If true then objects farther away will fade into the background color.void
setShowAxis
(boolean show) Render the XYZ axis on the screenvoid
setTranslationStep
(double step)
-
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
Adds a point cloud to the viewer- Parameters:
iterator
- Iterator with 3D point and optionally color informationhasColor
- 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 informationaccessColor
- Accessor to RGB color information. If null then 0xFF0000 is assumed.size
- Number of elements
-
addCloud
Deprecated. -
addCloud
Deprecated. -
addCloud
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
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
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
Changes the camera location- Parameters:
cameraToWorld
- transform from camera to world coordinates
-
getCameraToWorld
Returns a copy of the camera to world transform currently being used- Parameters:
storage
- (Optional) storage for the transform- Returns:
- The transform
-
copyCloud
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
-