Back to Aurora Vision Library website

You are here: Start » Function Reference » Debug Preview » SetView3DPrimitive

SetView3DPrimitive


Header: AVL.h
Namespace: avl::DebugPreview
Module: FoundationLite

Sets a 3D primitive into a debug preview window.

Description

This function adds/sets a point cloud, surface or 3D primitive to the preview window. Up to 100 primitives distinguished by a slot index can be added to a single preview window.

The following function overloads for various primitive types are available:

bool SetView3DPrimitive(ViewHandle view, int primitiveIndex, const avl::Point3DGrid& grid, Color color = AutoColor)
bool SetView3DPrimitive(ViewHandle view, int primitiveIndex, const atl::Array<avl::Point3DGrid>& gridArray, Color color = AutoColor)
bool SetView3DPrimitive(ViewHandle view, int primitiveIndex, const avl::Surface& surface, Color color = AutoColor)
bool SetView3DPrimitive(ViewHandle view, int primitiveIndex, const atl::Array<avl::Surface>& surfaceArray, Color color = AutoColor)
bool SetView3DPrimitive(ViewHandle view, int primitiveIndex, const avl::Plane3D& plane, Color color = AutoColor)
bool SetView3DPrimitive(ViewHandle view, int primitiveIndex, const avl::Point3D& point, Color color = AutoColor)
bool SetView3DPrimitive(ViewHandle view, int primitiveIndex, const atl::Array<avl::Point3D>& pointArray, Color color = AutoColor)
bool SetView3DPrimitive(ViewHandle view, int primitiveIndex, const avl::Circle3D& circle, Color color = AutoColor)
bool SetView3DPrimitive(ViewHandle view, int primitiveIndex, const atl::Array<avl::Circle3D>& circleArray, Color color = AutoColor)
bool SetView3DPrimitive(ViewHandle view, int primitiveIndex, const avl::Sphere3D& sphere, Color color = AutoColor)
bool SetView3DPrimitive(ViewHandle view, int primitiveIndex, const atl::Array<avl::Sphere3D>& sphereArray, Color color = AutoColor)
bool SetView3DPrimitive(ViewHandle view, int primitiveIndex, const avl::Segment3D& segment, Color color = AutoColor)
bool SetView3DPrimitive(ViewHandle view, int primitiveIndex, const atl::Array<avl::Segment3D>& segmentArray, Color color = AutoColor)
bool SetView3DPrimitive(ViewHandle view, int primitiveIndex, const avl::Box3D& box, Color color = AutoColor)
bool SetView3DPrimitive(ViewHandle view, int primitiveIndex, const atl::Array<avl::Box3D>& boxArray, Color color = AutoColor)
bool SetView3DPrimitive(ViewHandle view, int primitiveIndex, const avl::Line3D& line, Color color = AutoColor)
bool SetView3DPrimitive(ViewHandle view, int primitiveIndex, const atl::Array<avl::Line3D>& lineArray, Color color = AutoColor)
bool SetView3DPrimitive(ViewHandle view, int primitiveIndex, const avl::Path& path, Color color = AutoColor)
bool SetView3DPrimitive(ViewHandle view, int primitiveIndex, const atl::Array<avl::Path>& pathArray, Color color = AutoColor)
bool SetView3DPrimitive(ViewHandle view, int primitiveIndex, const avl::Segment2D& segment, Color color = AutoColor)
bool SetView3DPrimitive(ViewHandle view, int primitiveIndex, const atl::Array<avl::Segment2D>& segmentArray, Color color = AutoColor)
bool SetView3DPrimitive(ViewHandle view, int primitiveIndex, const avl::Region& region, Color color = AutoColor)
bool SetView3DPrimitive(ViewHandle view, int primitiveIndex, const atl::Array<avl::Region>& regionArray, Color color = AutoColor)

The view argument must provide a handle to the preview created with the CreateView3D function.

The primitiveIndex arguments specifies the slot index to set the primitive into (in the range 0...99). Setting the primitive into a slot for the first time initializes the given primitive. Setting the primitive again into the same slot overrides the previous primitive data and type. The slot indexes does not have to be used in consecutive order.

The color argument determines the color the primitive is displayed as a 32bit ARGB value (e.g. 0xFFFF0000 for red, or 0xFF0000FF for blue). This parameter is optional and can be omitted or set to AutoColor constant to automatically associate the primitive color based on its index.

Return value

The function returns true when the specified preview window is still active and the new image is displayed in the preview. The function will return false when the preview window associated with the handle has been manually closed by the user and the window is not active anymore.

See Also

  • CreateView3D – Creates a new floating window for a 3D data preview.