Package boofcv.gui.d3
Class PointCloudViewerSwing
java.lang.Object
boofcv.gui.d3.PointCloudViewerSwing
- All Implemented Interfaces:
PointCloudViewer
Wrapper around
PointCloudViewerPanelSwing
for PointCloudViewer
.-
Nested Class Summary
Nested classes/interfaces inherited from interface boofcv.visualize.PointCloudViewer
PointCloudViewer.Colorizer, PointCloudViewer.IteratePoint
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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 viewervoid
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 widthPixels) 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 cameraToWorld) 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) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface boofcv.visualize.PointCloudViewer
addCloud, addCloud, addCloud
-
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 interfacePointCloudViewer
-
setTranslationStep
public void setTranslationStep(double step) - Specified by:
setTranslationStep
in interfacePointCloudViewer
-
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 interfacePointCloudViewer
- 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 interfacePointCloudViewer
- 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 interfacePointCloudViewer
- Parameters:
active
- true to turn on
-
setBackgroundColor
public void setBackgroundColor(int rgb) - Specified by:
setBackgroundColor
in interfacePointCloudViewer
-
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 interfacePointCloudViewer
-
addCloud
Description copied from interface:PointCloudViewer
Adds a point cloud to the viewer- Specified by:
addCloud
in interfacePointCloudViewer
- Parameters:
iterator
- Iterator with 3D point and optionally color informationhasColor
- 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 interfacePointCloudViewer
- Parameters:
accessPoint
- Accessor to point informationaccessColor
- 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 interfacePointCloudViewer
-
addWireFrame
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 interfacePointCloudViewer
-
clearPoints
public void clearPoints()Description copied from interface:PointCloudViewer
Removes all points from the point cloud- Specified by:
clearPoints
in interfacePointCloudViewer
-
setColorizer
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 interfacePointCloudViewer
-
removeColorizer
public void removeColorizer()Description copied from interface:PointCloudViewer
If a colorizer has been specified this will remove it- Specified by:
removeColorizer
in interfacePointCloudViewer
-
setCameraHFov
public void setCameraHFov(double radians) Description copied from interface:PointCloudViewer
Specifies the camera's FOV in radians- Specified by:
setCameraHFov
in interfacePointCloudViewer
- Parameters:
radians
- FOV size
-
setCameraToWorld
Description copied from interface:PointCloudViewer
Changes the camera location- Specified by:
setCameraToWorld
in interfacePointCloudViewer
- Parameters:
cameraToWorld
- transform from camera to world coordinates
-
getCameraToWorld
Description copied from interface:PointCloudViewer
Returns a copy of the camera to world transform currently being used- Specified by:
getCameraToWorld
in interfacePointCloudViewer
- Parameters:
cameraToWorld
- (Optional) storage for the transform- Returns:
- The transform
-
copyCloud
Description copied from interface:PointCloudViewer
Copies the point cloud into the passed in list.- Specified by:
copyCloud
in interfacePointCloudViewer
- Parameters:
copy
- Where the cloud should be copied into. if null a new instance is created- Returns:
- The copy
-
getComponent
Description copied from interface:PointCloudViewer
Returns a swing component for adding to a GUI- Specified by:
getComponent
in interfacePointCloudViewer
-