Package boofcv.visualize
Class RenderMesh
java.lang.Object
boofcv.visualize.RenderMesh
- All Implemented Interfaces:
VerbosePrint
Simple algorithm that renders a 3D mesh and computes a depth image. This rendering engine is fairly basic and makes
the following assumptions: each shape has a single color and all colors are opaque. What's configurable:
defaultColorRgbaSpecifies what color the background is.surfaceColorFunction which returns the color of a shape. The shape's index is passed.intrinsicsCamera intrinsics. This must be set before use.worldToViewTransform from work to the current view.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionintWhat color background pixels are set to by default in RGBA.final GrayF32Rendered depth image.final CameraPinholePinhole camera model needed to go from depth image to 3D pointfinal InterleavedU8Rendered color image.Used to change what color a surface is.final Se3_F64Transform from world (what the mesh is in) to the camera view -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidrender(VertexMesh mesh) Renders the mesh onto an image.voidsetVerbose(@Nullable PrintStream out, @Nullable Set<String> configuration)
-
Field Details
-
defaultColorRgba
public int defaultColorRgbaWhat color background pixels are set to by default in RGBA. Default value is white -
surfaceColor
Used to change what color a surface is. By default, it's red. -
depthImage
Rendered depth image. Values with no depth information are set to NaN. -
rgbImage
Rendered color image. Pixels are in RGBA format. -
intrinsics
Pinhole camera model needed to go from depth image to 3D point -
worldToView
Transform from world (what the mesh is in) to the camera view
-
-
Constructor Details
-
RenderMesh
public RenderMesh()
-
-
Method Details
-
render
Renders the mesh onto an image. Produces an RGB image and depth image. Must have configuredintrinsicsalready and setworldToView.- Parameters:
mesh- The mesh that's going to be rendered.
-
setVerbose
public void setVerbose(@Nullable @Nullable PrintStream out, @Nullable @Nullable Set<String> configuration) - Specified by:
setVerbosein interfaceVerbosePrint
-