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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCloud(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.voidaddCloud(PointCloudViewer.IteratePoint iterator, boolean hasColor) Adds a point cloud to the viewervoidaddPoint(double x, double y, double z, int rgb) adds a single point to the point cloud.voidaddWireFrame(List<Point3D_F64> vertexes, boolean closed, int rgb, int widthPixels) Adds a spite wireframe to the view.voidRemoves 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 GUIvoidIf a colorizer has been specified this will remove itvoidsetBackgroundColor(int rgb) voidsetCameraHFov(double radians) Specifies the camera's FOV in radiansvoidsetCameraToWorld(Se3_F64 cameraToWorld) Changes the camera locationvoidsetClipDistance(double distance) Specifies the clipping distance.voidsetColorFrame(boolean useWorld) Should it pass in points that are in world frame or camera framevoidsetColorizer(PointCloudViewer.Colorizer colorizer) Used to assign colors to points using a custom function based on their position and/or index.voidsetDotSize(int pixels) Dot size when rendered.voidsetFog(boolean active) If true then objects farther away will fade into the background color.voidsetShowAxis(boolean show) Render the XYZ axis on the screenvoidsetTranslationStep(double step) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:PointCloudViewerRender the XYZ axis on the screen- Specified by:
setShowAxisin interfacePointCloudViewer
-
setTranslationStep
public void setTranslationStep(double step) - Specified by:
setTranslationStepin interfacePointCloudViewer
-
setDotSize
public void setDotSize(int pixels) Description copied from interface:PointCloudViewerDot size when rendered. This is only valid if sprites are being used- Specified by:
setDotSizein interfacePointCloudViewer- Parameters:
pixels- apparent size of a point
-
setClipDistance
public void setClipDistance(double distance) Description copied from interface:PointCloudViewerSpecifies the clipping distance. The default value will be infinity or some other very large value- Specified by:
setClipDistancein interfacePointCloudViewer- Parameters:
distance- maximum distance an object away from the camera can be seen
-
setFog
public void setFog(boolean active) Description copied from interface:PointCloudViewerIf true then objects farther away will fade into the background color. Providing some sense of depth. this is by default off.- Specified by:
setFogin interfacePointCloudViewer- Parameters:
active- true to turn on
-
setBackgroundColor
public void setBackgroundColor(int rgb) - Specified by:
setBackgroundColorin interfacePointCloudViewer
-
setColorFrame
public void setColorFrame(boolean useWorld) Description copied from interface:PointCloudViewerShould it pass in points that are in world frame or camera frame- Specified by:
setColorFramein interfacePointCloudViewer
-
addCloud
Description copied from interface:PointCloudViewerAdds a point cloud to the viewer- Specified by:
addCloudin 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:PointCloudViewerAdds 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:
addCloudin 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:PointCloudVieweradds a single point to the point cloud. This method can be very slow compared to doing it in a batch- Specified by:
addPointin interfacePointCloudViewer
-
addWireFrame
Description copied from interface:PointCloudViewerAdds a spite wireframe to the view. Since it's a sprite the thickness is independent of distance.- Specified by:
addWireFramein interfacePointCloudViewer
-
clearPoints
public void clearPoints()Description copied from interface:PointCloudViewerRemoves all points from the point cloud- Specified by:
clearPointsin interfacePointCloudViewer
-
setColorizer
Description copied from interface:PointCloudViewerUsed 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:
setColorizerin interfacePointCloudViewer
-
removeColorizer
public void removeColorizer()Description copied from interface:PointCloudViewerIf a colorizer has been specified this will remove it- Specified by:
removeColorizerin interfacePointCloudViewer
-
setCameraHFov
public void setCameraHFov(double radians) Description copied from interface:PointCloudViewerSpecifies the camera's FOV in radians- Specified by:
setCameraHFovin interfacePointCloudViewer- Parameters:
radians- FOV size
-
setCameraToWorld
Description copied from interface:PointCloudViewerChanges the camera location- Specified by:
setCameraToWorldin interfacePointCloudViewer- Parameters:
cameraToWorld- transform from camera to world coordinates
-
getCameraToWorld
Description copied from interface:PointCloudViewerReturns a copy of the camera to world transform currently being used- Specified by:
getCameraToWorldin interfacePointCloudViewer- Parameters:
cameraToWorld- (Optional) storage for the transform- Returns:
- The transform
-
copyCloud
Description copied from interface:PointCloudViewerCopies the point cloud into the passed in list.- Specified by:
copyCloudin 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:PointCloudViewerReturns a swing component for adding to a GUI- Specified by:
getComponentin interfacePointCloudViewer
-