ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
PclUtils::PCLVis Class Reference

#include <PCLVis.h>

Inheritance diagram for PclUtils::PCLVis:
Collaboration diagram for PclUtils::PCLVis:

Signals

void interactorPickedEvent (vtkActor *actor)
 
- Signals inherited from ecvGenericVisualizer3D
void interactorKeyboardEvent (const std::string &symKey)
 
void interactorPointPickedEvent (const CCVector3 &p, int index, const std::string &id)
 
void interactorAreaPickedEvent (const std::vector< int > &selected_slice)
 

Public Member Functions

 PCLVis (vtkSmartPointer< VTKExtensions::vtkCustomInteractorStyle > interactor_style, const std::string &viewerName="", bool initIterator=false, int argc=0, char **argv=nullptr)
 Default constructor. More...
 
 PCLVis (vtkSmartPointer< vtkRenderer > ren, vtkSmartPointer< vtkRenderWindow > wind, vtkSmartPointer< VTKExtensions::vtkCustomInteractorStyle > interactor_style, const std::string &viewerName="", bool initIterator=false, int argc=0, char **argv=nullptr)
 
virtual ~PCLVis ()
 
void initialize ()
 
void configCenterAxes ()
 
void configInteractorStyle (vtkSmartPointer< VTKExtensions::vtkCustomInteractorStyle > interactor_style)
 
void hidePclMarkerAxes ()
 Marker Axes. More...
 
bool pclMarkerAxesShown ()
 
void showPclMarkerAxes (vtkRenderWindowInteractor *interactor=nullptr)
 
void hideOrientationMarkerWidgetAxes ()
 
void showOrientationMarkerWidgetAxes (vtkRenderWindowInteractor *interactor)
 
void toggleOrientationMarkerWidgetAxes ()
 
bool removeActorFromRenderer (const vtkSmartPointer< vtkProp > &actor, int viewport=0)
 Internal method. Adds a vtk actor to screen. More...
 
void addActorToRenderer (const vtkSmartPointer< vtkProp > &actor, int viewport=0)
 
void UpdateScreen ()
 UpdateScreen - Updates/refreshes the render window This method forces a render update after actor changes. More...
 
void setupInteractor (vtkRenderWindowInteractor *iren, vtkRenderWindow *win)
 setupInteractor override to init interactor_ More...
 
vtkSmartPointer< vtkRenderWindowInteractor > getRenderWindowInteractor ()
 Get a pointer to the current interactor style used. More...
 
pcl::visualization::Camera getCamera (int viewport=0)
 
vtkSmartPointer< vtkCamera > getVtkCamera (int viewport=0)
 
void setModelViewMatrix (const ccGLMatrixd &viewMat, int viewport=0)
 
double getParallelScale (int viewport=0)
 
void setParallelScale (double scale, int viewport=0)
 
void setOrthoProjection (int viewport=0)
 
void setPerspectiveProjection (int viewport=0)
 
bool getPerspectiveState (int viewport=0)
 
bool getAutoUpateCameraPos ()
 
void setAutoUpateCameraPos (bool state)
 
void rotateWithAxis (const CCVector2i &pos, const CCVector3d &axis, double angle, int viewport=0)
 
void getCenterOfRotation (double center[3])
 
void resetCenterOfRotation (int viewport=0)
 
void setCenterOfRotation (double x, double y, double z)
 
void setCenterOfRotation (double xyz[3])
 
void setRotationFactor (double factor)
 
double getRotationFactor ()
 
void setCenterAxesVisibility (bool)
 
virtual void setCamera2DManipulators (const int manipulators[9])
 
virtual void setCamera3DManipulators (const int manipulators[9])
 
void setCameraManipulators (VTKExtensions::vtkCustomInteractorStyle *style, const int manipulators[9])
 
virtual void setCamera2DMouseWheelMotionFactor (double factor)
 
virtual void setCamera3DMouseWheelMotionFactor (double factor)
 
virtual void updateCenterAxes ()
 
void synchronizeGeometryBounds (int viewport=0)
 
double getGLDepth (int x, int y)
 
double getCameraFocalDistance (int viewport=0)
 
void setCameraFocalDistance (double focal_distance, int viewport=0)
 
void zoomCamera (double zoomFactor, int viewport=0)
 
void getProjectionTransformMatrix (Eigen::Matrix4d &proj)
 
void getModelViewTransformMatrix (Eigen::Matrix4d &view)
 
void resetCameraClippingRange (int viewport=0)
 
void internalResetCameraClippingRange ()
 
void resetCamera (const ccBBox *bbox)
 
void resetCamera (double xMin, double xMax, double yMin, double yMax, double zMin, double zMax)
 
void resetCamera ()
 
void resetCamera (double bounds[6])
 
void getReasonableClippingRange (double range[2], int viewport=0)
 
void expandBounds (double bounds[6], vtkMatrix4x4 *matrix)
 
void setCameraViewAngle (double viewAngle, int viewport=0)
 
void draw (const CC_DRAW_CONTEXT &context, const PCLCloud::Ptr &smCloud)
 
void draw (const CC_DRAW_CONTEXT &context, const PCLMesh::Ptr &pclMesh)
 
void draw (const CC_DRAW_CONTEXT &context, const PCLTextureMesh::Ptr &textureMesh)
 
void draw (const CC_DRAW_CONTEXT &context, const PCLPolygon::Ptr &pclPolygon, bool closed)
 
void draw (const CC_DRAW_CONTEXT &context, const ccSensor *sensor)
 
void draw (const CC_DRAW_CONTEXT &context, const cloudViewer::geometry::LineSet *lineset)
 
void transformEntities (const CC_DRAW_CONTEXT &context)
 
vtkSmartPointer< vtkTransform > getTransformation (const CC_DRAW_CONTEXT &context, const CCVector3d &origin)
 
void updateNormals (const CC_DRAW_CONTEXT &context, const PCLCloud::Ptr &smCloud)
 
void updateShadingMode (const CC_DRAW_CONTEXT &context, PCLCloud &smCloud)
 
bool removeEntities (const CC_DRAW_CONTEXT &context)
 
void hideShowActors (bool visibility, const std::string &viewID, int viewport=0)
 
void hideShowWidgets (bool visibility, const std::string &viewID, int viewport=0)
 
bool addScalarBar (const CC_DRAW_CONTEXT &context)
 
bool updateScalarBar (const CC_DRAW_CONTEXT &context)
 
bool addCaption (const std::string &text, const CCVector2 &pos2D, const CCVector3 &anchorPos, double r, double g, double b, double a, int fontSize=10, const std::string &viewID="caption", bool anchorDragable=false, int viewport=0)
 
bool updateCaption (const std::string &text, const CCVector2 &pos2D, const CCVector3 &anchorPos, double r, double g, double b, double a, int fontSize=10, const std::string &viewID="caption", int viewport=0)
 
bool getCaptionPosition (const std::string &viewID, float &posX, float &posY)
 Get caption widget 2D position (normalized coordinates 0.0-1.0) More...
 
bool addPolyline (const PCLPolygon::ConstPtr pclPolygon, double r, double g, double b, float width=1.0f, const std::string &id="multiline", int viewport=0)
 
bool updateTexture (const CC_DRAW_CONTEXT &context, const ccMaterialSet *materials)
 
bool addTextureMesh (const PCLTextureMesh &mesh, const std::string &id, int viewport)
 Add texture mesh from PCLTextureMesh (deprecated) More...
 
bool addTextureMeshFromCCMesh (ccGenericMesh *mesh, const std::string &id, int viewport=0)
 Add texture mesh directly from ccGenericMesh (preferred) More...
 
bool addTextureMeshFromOBJ (const std::string &obj_path, const std::string &id, int viewport=0, int quality=2, bool enable_cache=true)
 Load multi-texture mesh from OBJ file (enhanced version) More...
 
bool addTextureMeshFromOBJAdvanced (const std::string &obj_path, const std::string &mtl_path, const std::string &id, int viewport=0, int max_texture_size=4096, bool use_mipmaps=true, bool enable_cache=true)
 Load multi-texture mesh from OBJ file (advanced options) More...
 
void clearTextureCache ()
 Clear texture cache. More...
 
void getTextureCacheInfo (size_t &count, size_t &memory_bytes) const
 Get texture cache information. More...
 
bool addOrientedCube (const ccGLMatrixd &trans, double width, double height, double depth, double r=1.0, double g=1.0, double b=1.0, const std::string &id="cube", int viewport=0)
 
bool addOrientedCube (const Eigen::Vector3f &translation, const Eigen::Quaternionf &rotation, double width, double height, double depth, double r=1.0, double g=1.0, double b=1.0, const std::string &id="cube", int viewport=0)
 
bool addOrientedCube (const ecvOrientedBBox &obb, const std::string &id="cube", int viewport=0)
 
void displayText (const CC_DRAW_CONTEXT &context)
 
void setPointSize (const unsigned char pointSize, const std::string &viewID, int viewport=0)
 
void setScalarFieldName (const std::string &viewID, const std::string &scalarName, int viewport=0)
 
void addScalarFieldToVTK (const std::string &viewID, ccPointCloud *cloud, int scalarFieldIndex, int viewport=0)
 Add scalar field data from ccPointCloud to VTK polydata. More...
 
void syncAllScalarFieldsToVTK (const std::string &viewID, ccPointCloud *cloud, int viewport=0)
 Sync ALL scalar fields from ccPointCloud to VTK polydata. More...
 
void setCurrentSourceObject (ccHObject *obj, const std::string &viewID)
 Set the source object for selection operations. More...
 
void removeSourceObject (const std::string &viewID)
 Remove a source object from the map. More...
 
ccHObjectgetSourceObject (const std::string &viewID) const
 Get the source object for a given viewID. More...
 
ccPointCloudgetSourceCloud (const std::string &viewID) const
 Get the source object as ccPointCloud. More...
 
ccMeshgetSourceMesh (const std::string &viewID) const
 Get the source object as ccMesh. More...
 
bool hasSourceObject (const std::string &viewID) const
 Check if a source object exists for the given viewID. More...
 
void setPointCloudUniqueColor (double r, double g, double b, const std::string &viewID, int viewport=0)
 
void resetScalarColor (const std::string &viewID, bool flag=true, int viewport=0)
 
void setShapeUniqueColor (float r, float g, float b, const std::string &viewID, int viewport=0)
 
void setLineWidth (const unsigned char lineWidth, const std::string &viewID, int viewport=0)
 
void setMeshRenderingMode (MESH_RENDERING_MODE mode, const std::string &viewID, int viewport=0)
 
void setLightMode (const std::string &viewID, int viewport=0)
 
void setPointCloudOpacity (double opacity, const std::string &viewID, int viewport=0)
 
void setShapeOpacity (double opacity, const std::string &viewID, int viewport=0)
 
void setMeshOpacity (double opacity, const std::string &viewID, int viewport=0)
 Set opacity for mesh (textured or non-textured) More...
 
void setShapeShadingMode (SHADING_MODE mode, const std::string &viewID, int viewport=0)
 
void setMeshShadingMode (SHADING_MODE mode, const std::string &viewID, int viewport=0)
 
vtkSmartPointer< pcl::visualization::PCLVisualizerInteractorStyle > getPCLInteractorStyle ()
 
vtkActor * getActorById (const std::string &viewId)
 
vtkProp * getPropById (const std::string &viewId)
 
vtkSmartPointer< vtkPropCollection > getPropCollectionById (const std::string &viewId)
 
std::string getIdByActor (vtkProp *actor)
 
vtkAbstractWidget * getWidgetById (const std::string &viewId)
 
vtkRenderer * getCurrentRenderer (int viewport=0)
 
bool containWidget (const std::string &id) const
 Check if the widgets or props with the given id was already added to this visualizer. More...
 
WidgetActorMapPtr getWidgetActorMap ()
 Return a pointer to the WidgetActorMap this visualizer uses. More...
 
PropActorMapPtr getPropActorMap ()
 Return a pointer to the PropActorMap this visualizer uses. More...
 
vtkBoundingBox getVisibleGeometryBounds ()
 
vtkSmartPointer< VTKExtensions::vtkCustomInteractorStyleget2DInteractorStyle ()
 
vtkSmartPointer< VTKExtensions::vtkCustomInteractorStyleget3DInteractorStyle ()
 
bool isPointPickingEnabled ()
 
void setPointPickingEnabled (bool state)
 
void togglePointPicking ()
 
bool isAreaPickingEnabled ()
 
void setAreaPickingEnabled (bool state)
 
bool isActorPickingEnabled ()
 
void setActorPickingEnabled (bool state)
 
void toggleActorPicking ()
 
void toggleAreaPicking ()
 
void exitCallbackProcess ()
 
void setAreaPickingMode (bool state)
 
vtkActor * pickActor (double x, double y)
 
std::string pickItem (double x0=-1, double y0=-1, double x1=5.0, double y1=5.0)
 
QImage renderToImage (int zoomFactor=1, bool renderOverlayItems=false, bool silent=false, int viewport=0)
 
void setLightIntensity (double intensity)
 Set global light intensity (ParaView-style) More...
 
double getLightIntensity () const
 Get current global light intensity. More...
 
void SetDataAxesGridProperties (const std::string &viewID, const AxesGridProperties &props)
 Set Data Axes Grid properties (Unified Interface) More...
 
void GetDataAxesGridProperties (const std::string &viewID, AxesGridProperties &props) const
 Get Data Axes Grid properties (Unified Interface) More...
 
void RemoveDataAxesGrid (const std::string &viewID)
 Remove Data Axes Grid for a specific object. More...
 
void ToggleCameraOrientationWidget (bool show)
 Toggle Camera Orientation Widget visibility (ParaView-style) More...
 
bool IsCameraOrientationWidgetShown () const
 Check if Camera Orientation Widget is shown. More...
 
- Public Member Functions inherited from ecvGenericVisualizer3D
 ecvGenericVisualizer3D ()=default
 Default constructor. More...
 
virtual ~ecvGenericVisualizer3D ()=default
 Destructor. More...
 
- Public Member Functions inherited from ecvGenericVisualizer
 ecvGenericVisualizer ()=default
 Default constructor. More...
 
virtual ~ecvGenericVisualizer ()=default
 Destructor. More...
 

Static Public Member Functions

static void ExpandBounds (double bounds[6], vtkMatrix4x4 *matrix)
 

Protected Attributes

WidgetActorMapPtr m_widget_map
 Internal list with actor pointers and name IDs for widgets. More...
 
PropActorMapPtr m_prop_map
 Internal list with actor pointers and name IDs for props. More...
 
vtkBoundingBox GeometryBounds
 
vtkSmartPointer< VTKExtensions::vtkPVCenterAxesActorm_centerAxes
 
vtkSmartPointer< VTKExtensions::vtkCustomInteractorStyleTwoDInteractorStyle
 
vtkSmartPointer< VTKExtensions::vtkCustomInteractorStyleThreeDInteractorStyle
 
vtkSmartPointer< pcl::visualization::PCLVisualizerInteractorStyle > m_interactorStyle
 
int m_currentMode
 
bool m_pointPickingEnabled
 
bool m_areaPickingEnabled
 
bool m_actorPickingEnabled
 
bool m_autoUpdateCameraPos
 
std::mutex m_cloud_mutex
 
vtkSmartPointer< vtkOrientationMarkerWidget > m_axes_widget
 
vtkSmartPointer< vtkPointPicker > m_point_picker
 
vtkSmartPointer< vtkAreaPicker > m_area_picker
 
vtkSmartPointer< vtkPropPicker > m_propPicker
 
std::vector< int > m_selected_slice
 
std::map< std::string, ccHObject * > m_sourceObjectMap
 
double m_lightIntensity
 
std::map< std::string, vtkSmartPointer< vtkCubeAxesActor > > m_dataAxesGridMap
 
vtkSmartPointer< vtkCameraOrientationWidget > m_cameraOrientationWidget
 

Detailed Description

Definition at line 80 of file PCLVis.h.

Constructor & Destructor Documentation

◆ PCLVis() [1/2]

PclUtils::PCLVis::PCLVis ( vtkSmartPointer< VTKExtensions::vtkCustomInteractorStyle interactor_style,
const std::string &  viewerName = "",
bool  initIterator = false,
int  argc = 0,
char **  argv = nullptr 
)

Default constructor.

Definition at line 132 of file PCLVis.cpp.

References configCenterAxes(), and configInteractorStyle().

◆ PCLVis() [2/2]

PclUtils::PCLVis::PCLVis ( vtkSmartPointer< vtkRenderer >  ren,
vtkSmartPointer< vtkRenderWindow >  wind,
vtkSmartPointer< VTKExtensions::vtkCustomInteractorStyle interactor_style,
const std::string &  viewerName = "",
bool  initIterator = false,
int  argc = 0,
char **  argv = nullptr 
)

Definition at line 160 of file PCLVis.cpp.

References configCenterAxes(), and configInteractorStyle().

◆ ~PCLVis()

Member Function Documentation

◆ addActorToRenderer()

void PclUtils::PCLVis::addActorToRenderer ( const vtkSmartPointer< vtkProp > &  actor,
int  viewport = 0 
)

◆ addCaption()

bool PclUtils::PCLVis::addCaption ( const std::string &  text,
const CCVector2 pos2D,
const CCVector3 anchorPos,
double  r,
double  g,
double  b,
double  a,
int  fontSize = 10,
const std::string &  viewID = "caption",
bool  anchorDragable = false,
int  viewport = 0 
)

◆ addOrientedCube() [1/3]

bool PclUtils::PCLVis::addOrientedCube ( const ccGLMatrixd trans,
double  width,
double  height,
double  depth,
double  r = 1.0,
double  g = 1.0,
double  b = 1.0,
const std::string &  id = "cube",
int  viewport = 0 
)

◆ addOrientedCube() [2/3]

bool PclUtils::PCLVis::addOrientedCube ( const ecvOrientedBBox obb,
const std::string &  id = "cube",
int  viewport = 0 
)

◆ addOrientedCube() [3/3]

bool PclUtils::PCLVis::addOrientedCube ( const Eigen::Vector3f &  translation,
const Eigen::Quaternionf &  rotation,
double  width,
double  height,
double  depth,
double  r = 1.0,
double  g = 1.0,
double  b = 1.0,
const std::string &  id = "cube",
int  viewport = 0 
)

◆ addPolyline()

bool PclUtils::PCLVis::addPolyline ( const PCLPolygon::ConstPtr  pclPolygon,
double  r,
double  g,
double  b,
float  width = 1.0f,
const std::string &  id = "multiline",
int  viewport = 0 
)

◆ addScalarBar()

bool PclUtils::PCLVis::addScalarBar ( const CC_DRAW_CONTEXT context)

◆ addScalarFieldToVTK()

void PclUtils::PCLVis::addScalarFieldToVTK ( const std::string &  viewID,
ccPointCloud cloud,
int  scalarFieldIndex,
int  viewport = 0 
)

Add scalar field data from ccPointCloud to VTK polydata.

Parameters
viewIDThe cloud ID
cloudThe ccPointCloud containing scalar field
scalarFieldIndexIndex of the scalar field to extract
viewportViewport ID

Definition at line 2249 of file PCLVis.cpp.

References ccObject::getName(), cloudViewer::PointCloudTpl< T >::getScalarField(), cloudViewer::PointCloudTpl< T >::getScalarFieldName(), cloudViewer::ScalarField::getValue(), CVLog::PrintDebug(), cloudViewer::PointCloudTpl< T >::size(), and CVLog::Warning().

Referenced by syncAllScalarFieldsToVTK().

◆ addTextureMesh()

bool PclUtils::PCLVis::addTextureMesh ( const PCLTextureMesh mesh,
const std::string &  id,
int  viewport 
)

Add texture mesh from PCLTextureMesh (deprecated)

Deprecated:
Use addTextureMeshFromCCMesh instead to avoid pcl::TexMaterial encoding

Definition at line 1578 of file PCLVis.cpp.

References addActorToRenderer(), PclUtils::renders::MeshTextureApplier::ApplyPBRTextures(), color, colors, CVLog::Error(), FROM_PCL_CLOUD, getCurrentRenderer(), normal, normals, CVLog::PrintDebug(), CVLog::PrintVerbose(), and CVLog::Warning().

Referenced by draw().

◆ addTextureMeshFromCCMesh()

bool PclUtils::PCLVis::addTextureMeshFromCCMesh ( ccGenericMesh mesh,
const std::string &  id,
int  viewport = 0 
)

Add texture mesh directly from ccGenericMesh (preferred)

Parameters
meshccGenericMesh object containing geometry and materials
idUnique identifier for the mesh
viewportViewport ID (default: 0)
Returns
true on success
Note
This method directly uses ccMaterialSet, avoiding pcl::TexMaterial encoding

Definition at line 1837 of file PCLVis.cpp.

References addActorToRenderer(), PclUtils::renders::MeshTextureApplier::ApplyTexturesFromMaterialSet(), CVLog::Error(), ccGenericMesh::getAssociatedCloud(), getCurrentRenderer(), ccGenericMesh::getMaterialSet(), cc2smReader::getVtkPolyDataWithTextures(), CVLog::PrintDebug(), CVLog::PrintVerbose(), removeActorFromRenderer(), and ccHObjectCaster::ToPointCloud().

◆ addTextureMeshFromOBJ()

bool PclUtils::PCLVis::addTextureMeshFromOBJ ( const std::string &  obj_path,
const std::string &  id,
int  viewport = 0,
int  quality = 2,
bool  enable_cache = true 
)

Load multi-texture mesh from OBJ file (enhanced version)

Parameters
obj_pathOBJ file path
idUnique identifier
viewportViewport ID
qualityTexture quality (0=low, 1=medium, 2=high, 3=original)
enable_cacheWhether to enable texture cache
Returns
Returns true on success

◆ addTextureMeshFromOBJAdvanced()

bool PclUtils::PCLVis::addTextureMeshFromOBJAdvanced ( const std::string &  obj_path,
const std::string &  mtl_path,
const std::string &  id,
int  viewport = 0,
int  max_texture_size = 4096,
bool  use_mipmaps = true,
bool  enable_cache = true 
)

Load multi-texture mesh from OBJ file (advanced options)

Parameters
obj_pathOBJ file path
mtl_pathMTL file path (optional)
idUnique identifier
viewportViewport ID
max_texture_sizeMaximum texture size
use_mipmapsWhether to use mipmaps
enable_cacheWhether to enable texture cache
Returns
Returns true on success

◆ clearTextureCache()

void PclUtils::PCLVis::clearTextureCache ( )

Clear texture cache.

◆ configCenterAxes()

void PclUtils::PCLVis::configCenterAxes ( )

Definition at line 233 of file PCLVis.cpp.

References addActorToRenderer(), m_centerAxes, and VTKExtensions::vtkPVCenterAxesActor::New().

Referenced by PCLVis().

◆ configInteractorStyle()

void PclUtils::PCLVis::configInteractorStyle ( vtkSmartPointer< VTKExtensions::vtkCustomInteractorStyle interactor_style)

Definition at line 241 of file PCLVis.cpp.

References m_interactorStyle, ThreeDInteractorStyle, and TwoDInteractorStyle.

Referenced by PCLVis().

◆ containWidget()

bool PclUtils::PCLVis::containWidget ( const std::string &  id) const
inline

Check if the widgets or props with the given id was already added to this visualizer.

Parameters
[in]idthe id of the widgets or props to check
Returns
true if a widgets or props with the specified id was found

Definition at line 600 of file PCLVis.h.

Referenced by addCaption(), and addScalarBar().

◆ displayText()

◆ draw() [1/6]

◆ draw() [2/6]

void PclUtils::PCLVis::draw ( const CC_DRAW_CONTEXT context,
const cloudViewer::geometry::LineSet lineset 
)

◆ draw() [3/6]

void PclUtils::PCLVis::draw ( const CC_DRAW_CONTEXT context,
const PCLCloud::Ptr &  smCloud 
)

◆ draw() [4/6]

void PclUtils::PCLVis::draw ( const CC_DRAW_CONTEXT context,
const PCLMesh::Ptr &  pclMesh 
)

Definition at line 885 of file PCLVis.cpp.

References context, CVTools::FromQString(), and updateShadingMode().

◆ draw() [5/6]

void PclUtils::PCLVis::draw ( const CC_DRAW_CONTEXT context,
const PCLPolygon::Ptr &  pclPolygon,
bool  closed 
)

◆ draw() [6/6]

void PclUtils::PCLVis::draw ( const CC_DRAW_CONTEXT context,
const PCLTextureMesh::Ptr &  textureMesh 
)

Definition at line 907 of file PCLVis.cpp.

References addTextureMesh(), context, and CVTools::FromQString().

◆ exitCallbackProcess()

void PclUtils::PCLVis::exitCallbackProcess ( )

Definition at line 2852 of file PCLVis.cpp.

References getPCLInteractorStyle().

◆ ExpandBounds()

void PclUtils::PCLVis::ExpandBounds ( double  bounds[6],
vtkMatrix4x4 *  matrix 
)
static

Definition at line 329 of file PCLVis.cpp.

References CVLog::Warning().

◆ expandBounds()

void PclUtils::PCLVis::expandBounds ( double  bounds[6],
vtkMatrix4x4 *  matrix 
)

Definition at line 776 of file PCLVis.cpp.

References CVLog::Error().

Referenced by getReasonableClippingRange().

◆ get2DInteractorStyle()

vtkSmartPointer<VTKExtensions::vtkCustomInteractorStyle> PclUtils::PCLVis::get2DInteractorStyle ( )
inline

Definition at line 614 of file PCLVis.h.

◆ get3DInteractorStyle()

vtkSmartPointer<VTKExtensions::vtkCustomInteractorStyle> PclUtils::PCLVis::get3DInteractorStyle ( )
inline

Definition at line 619 of file PCLVis.h.

Referenced by rotateWithAxis().

◆ getActorById()

◆ getAutoUpateCameraPos()

bool PclUtils::PCLVis::getAutoUpateCameraPos ( )
inline

Definition at line 164 of file PCLVis.h.

◆ getCamera()

pcl::visualization::Camera PclUtils::PCLVis::getCamera ( int  viewport = 0)

Definition at line 2722 of file PCLVis.cpp.

References getRenderWindowInteractor(), getVtkCamera(), and M_PI.

◆ getCameraFocalDistance()

double PclUtils::PCLVis::getCameraFocalDistance ( int  viewport = 0)

Definition at line 586 of file PCLVis.cpp.

References getVtkCamera().

◆ getCaptionPosition()

bool PclUtils::PCLVis::getCaptionPosition ( const std::string &  viewID,
float posX,
float posY 
)

Get caption widget 2D position (normalized coordinates 0.0-1.0)

Returns false if widget not found or invalid

Parameters
viewIDwidget view ID
posXoutput X position (0.0-1.0, left to right)
posYoutput Y position (0.0-1.0, bottom to top in VTK coordinate system)
Returns
true if position retrieved successfully

Definition at line 1317 of file PCLVis.cpp.

References getWidgetById().

◆ getCenterOfRotation()

void PclUtils::PCLVis::getCenterOfRotation ( double  center[3])

Get the current center of rotation

Definition at line 323 of file PCLVis.cpp.

References ThreeDInteractorStyle.

Referenced by EditCameraTool::UpdateCameraInfo().

◆ getCurrentRenderer()

◆ GetDataAxesGridProperties()

◆ getGLDepth()

double PclUtils::PCLVis::getGLDepth ( int  x,
int  y 
)

Definition at line 571 of file PCLVis.cpp.

References getCurrentRenderer(), and getVtkCamera().

◆ getIdByActor()

std::string PclUtils::PCLVis::getIdByActor ( vtkProp *  actor)

Definition at line 3079 of file PCLVis.cpp.

Referenced by cvRenderViewSelectionReaction::finalizeSelection(), and pickItem().

◆ getLightIntensity()

double PclUtils::PCLVis::getLightIntensity ( ) const

Get current global light intensity.

Returns
Current light intensity (0.0-1.0)

Definition at line 3547 of file PCLVis.cpp.

References m_lightIntensity.

◆ getModelViewTransformMatrix()

void PclUtils::PCLVis::getModelViewTransformMatrix ( Eigen::Matrix4d &  view)

Definition at line 615 of file PCLVis.cpp.

References getVtkCamera().

◆ getParallelScale()

double PclUtils::PCLVis::getParallelScale ( int  viewport = 0)

Definition at line 2790 of file PCLVis.cpp.

References getVtkCamera().

Referenced by getReasonableClippingRange().

◆ getPCLInteractorStyle()

vtkSmartPointer< pcl::visualization::PCLVisualizerInteractorStyle > PclUtils::PCLVis::getPCLInteractorStyle ( )

Definition at line 2953 of file PCLVis.cpp.

Referenced by exitCallbackProcess().

◆ getPerspectiveState()

bool PclUtils::PCLVis::getPerspectiveState ( int  viewport = 0)

Definition at line 2814 of file PCLVis.cpp.

References getVtkCamera().

◆ getProjectionTransformMatrix()

void PclUtils::PCLVis::getProjectionTransformMatrix ( Eigen::Matrix4d &  proj)

Definition at line 608 of file PCLVis.cpp.

References getCurrentRenderer(), and getVtkCamera().

◆ getPropActorMap()

PropActorMapPtr PclUtils::PCLVis::getPropActorMap ( )
inline

Return a pointer to the PropActorMap this visualizer uses.

Definition at line 609 of file PCLVis.h.

◆ getPropById()

vtkProp * PclUtils::PCLVis::getPropById ( const std::string &  viewId)

Definition at line 2957 of file PCLVis.cpp.

References CVLog::Error().

Referenced by getPropCollectionById().

◆ getPropCollectionById()

vtkSmartPointer< vtkPropCollection > PclUtils::PCLVis::getPropCollectionById ( const std::string &  viewId)

Definition at line 3009 of file PCLVis.cpp.

References getPropById().

◆ getReasonableClippingRange()

void PclUtils::PCLVis::getReasonableClippingRange ( double  range[2],
int  viewport = 0 
)

◆ getRenderWindowInteractor()

◆ getRotationFactor()

double PclUtils::PCLVis::getRotationFactor ( )

Definition at line 409 of file PCLVis.cpp.

References ThreeDInteractorStyle.

Referenced by EditCameraTool::UpdateCameraInfo().

◆ getSourceCloud()

ccPointCloud * PclUtils::PCLVis::getSourceCloud ( const std::string &  viewID) const

Get the source object as ccPointCloud.

Parameters
viewIDThe view ID to look up
Returns
ccPointCloud pointer or nullptr if not a point cloud

Definition at line 2433 of file PCLVis.cpp.

References getSourceObject(), ccObject::isA(), and CV_TYPES::POINT_CLOUD.

Referenced by setCurrentSourceObject().

◆ getSourceMesh()

ccMesh * PclUtils::PCLVis::getSourceMesh ( const std::string &  viewID) const

Get the source object as ccMesh.

Parameters
viewIDThe view ID to look up
Returns
ccMesh pointer or nullptr if not a mesh

Definition at line 2443 of file PCLVis.cpp.

References getSourceObject(), ccObject::isKindOf(), and CV_TYPES::MESH.

◆ getSourceObject()

ccHObject * PclUtils::PCLVis::getSourceObject ( const std::string &  viewID) const

Get the source object for a given viewID.

Parameters
viewIDThe view ID to look up
Returns
The source ccHObject or nullptr if not found

Definition at line 2425 of file PCLVis.cpp.

References m_sourceObjectMap.

Referenced by cvRenderViewSelectionReaction::finalizeSelection(), getSourceCloud(), getSourceMesh(), and SetDataAxesGridProperties().

◆ getTextureCacheInfo()

void PclUtils::PCLVis::getTextureCacheInfo ( size_t &  count,
size_t &  memory_bytes 
) const

Get texture cache information.

Parameters
countOutput cached texture count
memory_bytesOutput cache memory usage (bytes)

◆ getTransformation()

◆ getVisibleGeometryBounds()

vtkBoundingBox PclUtils::PCLVis::getVisibleGeometryBounds ( )
inline

Definition at line 611 of file PCLVis.h.

◆ getVtkCamera()

◆ getWidgetActorMap()

WidgetActorMapPtr PclUtils::PCLVis::getWidgetActorMap ( )
inline

Return a pointer to the WidgetActorMap this visualizer uses.

Definition at line 606 of file PCLVis.h.

Referenced by getWidgetById(), and hideShowWidgets().

◆ getWidgetById()

vtkAbstractWidget * PclUtils::PCLVis::getWidgetById ( const std::string &  viewId)

Definition at line 3072 of file PCLVis.cpp.

References getWidgetActorMap().

Referenced by getCaptionPosition(), updateCaption(), and updateScalarBar().

◆ hasSourceObject()

bool PclUtils::PCLVis::hasSourceObject ( const std::string &  viewID) const

Check if a source object exists for the given viewID.

Parameters
viewIDThe view ID to check
Returns
true if source object exists

Definition at line 2453 of file PCLVis.cpp.

References m_sourceObjectMap.

◆ hideOrientationMarkerWidgetAxes()

void PclUtils::PCLVis::hideOrientationMarkerWidgetAxes ( )

Definition at line 2874 of file PCLVis.cpp.

References m_axes_widget, and CVLog::Warning().

Referenced by hidePclMarkerAxes().

◆ hidePclMarkerAxes()

void PclUtils::PCLVis::hidePclMarkerAxes ( )

Marker Axes.

Definition at line 2864 of file PCLVis.cpp.

References hideOrientationMarkerWidgetAxes(), and CVLog::PrintVerbose().

◆ hideShowActors()

void PclUtils::PCLVis::hideShowActors ( bool  visibility,
const std::string &  viewID,
int  viewport = 0 
)

Definition at line 2061 of file PCLVis.cpp.

References getActorById().

◆ hideShowWidgets()

void PclUtils::PCLVis::hideShowWidgets ( bool  visibility,
const std::string &  viewID,
int  viewport = 0 
)

Definition at line 2073 of file PCLVis.cpp.

References getWidgetActorMap().

◆ initialize()

void PclUtils::PCLVis::initialize ( )

Definition at line 254 of file PCLVis.cpp.

◆ interactorPickedEvent

void PclUtils::PCLVis::interactorPickedEvent ( vtkActor *  actor)
signal

◆ internalResetCameraClippingRange()

void PclUtils::PCLVis::internalResetCameraClippingRange ( )
inline

Definition at line 253 of file PCLVis.h.

◆ isActorPickingEnabled()

bool PclUtils::PCLVis::isActorPickingEnabled ( )
inline

Definition at line 680 of file PCLVis.h.

Referenced by ~PCLVis().

◆ isAreaPickingEnabled()

bool PclUtils::PCLVis::isAreaPickingEnabled ( )
inline

Definition at line 675 of file PCLVis.h.

Referenced by toggleAreaPicking(), and ~PCLVis().

◆ IsCameraOrientationWidgetShown()

bool PclUtils::PCLVis::IsCameraOrientationWidgetShown ( ) const

Check if Camera Orientation Widget is shown.

Returns
true if visible, false otherwise

Definition at line 3952 of file PCLVis.cpp.

References m_cameraOrientationWidget.

◆ isPointPickingEnabled()

bool PclUtils::PCLVis::isPointPickingEnabled ( )
inline

Definition at line 667 of file PCLVis.h.

Referenced by cvRenderViewSelectionReaction::endSelection(), and ~PCLVis().

◆ pclMarkerAxesShown()

bool PclUtils::PCLVis::pclMarkerAxesShown ( )

Definition at line 2870 of file PCLVis.cpp.

References m_axes_widget.

◆ pickActor()

vtkActor * PclUtils::PCLVis::pickActor ( double  x,
double  y 
)

Definition at line 3323 of file PCLVis.cpp.

References m_propPicker, x, and y.

◆ pickItem()

std::string PclUtils::PCLVis::pickItem ( double  x0 = -1,
double  y0 = -1,
double  x1 = 5.0,
double  y1 = 5.0 
)

Definition at line 3332 of file PCLVis.cpp.

References getIdByActor(), getRenderWindowInteractor(), and m_area_picker.

◆ removeActorFromRenderer()

bool PclUtils::PCLVis::removeActorFromRenderer ( const vtkSmartPointer< vtkProp > &  actor,
int  viewport = 0 
)

Internal method. Adds a vtk actor to screen.

Parameters
[in]actora pointer to the vtk actor object
[in]viewportthe view port where the actor should be added to (default: all)

Definition at line 3105 of file PCLVis.cpp.

Referenced by addTextureMeshFromCCMesh(), cvGenericFilter::removeActor(), and ~PCLVis().

◆ RemoveDataAxesGrid()

void PclUtils::PCLVis::RemoveDataAxesGrid ( const std::string &  viewID)

Remove Data Axes Grid for a specific object.

Parameters
viewIDThe view ID of the ccHObject

Definition at line 3961 of file PCLVis.cpp.

References getCurrentRenderer(), and m_dataAxesGridMap.

◆ removeEntities()

bool PclUtils::PCLVis::removeEntities ( const CC_DRAW_CONTEXT context)

◆ removeSourceObject()

void PclUtils::PCLVis::removeSourceObject ( const std::string &  viewID)

Remove a source object from the map.

Parameters
viewIDThe view ID of the object to remove

Definition at line 2421 of file PCLVis.cpp.

References m_sourceObjectMap.

◆ renderToImage()

QImage PclUtils::PCLVis::renderToImage ( int  zoomFactor = 1,
bool  renderOverlayItems = false,
bool  silent = false,
int  viewport = 0 
)

◆ resetCamera() [1/4]

void PclUtils::PCLVis::resetCamera ( )
inline

Definition at line 263 of file PCLVis.h.

Referenced by resetCamera().

◆ resetCamera() [2/4]

void PclUtils::PCLVis::resetCamera ( const ccBBox bbox)

Definition at line 621 of file PCLVis.cpp.

References cloudViewer::BoundingBoxTpl< T >::getBounds(), and resetCamera().

◆ resetCamera() [3/4]

void PclUtils::PCLVis::resetCamera ( double  bounds[6])
inline

Definition at line 266 of file PCLVis.h.

◆ resetCamera() [4/4]

void PclUtils::PCLVis::resetCamera ( double  xMin,
double  xMax,
double  yMin,
double  yMax,
double  zMin,
double  zMax 
)

Definition at line 649 of file PCLVis.cpp.

◆ resetCameraClippingRange()

void PclUtils::PCLVis::resetCameraClippingRange ( int  viewport = 0)

Automatically set up the camera based on a specified bounding box (xmin, xmax, ymin, ymax, zmin, zmax). Camera will reposition itself so that its focal point is the center of the bounding box, and adjust its distance and position to preserve its initial view plane normal (i.e., vector defined from camera position to focal point). Note: is the view plane is parallel to the view up axis, the view up axis will be reset to one of the three coordinate axes.

Definition at line 628 of file PCLVis.cpp.

References GeometryBounds, getCurrentRenderer(), and synchronizeGeometryBounds().

Referenced by setCameraViewAngle().

◆ resetCenterOfRotation()

void PclUtils::PCLVis::resetCenterOfRotation ( int  viewport = 0)

Resets the center of rotation to the focal point.

Definition at line 380 of file PCLVis.cpp.

References GeometryBounds, setCenterOfRotation(), and synchronizeGeometryBounds().

◆ resetScalarColor()

void PclUtils::PCLVis::resetScalarColor ( const std::string &  viewID,
bool  flag = true,
int  viewport = 0 
)

Definition at line 2214 of file PCLVis.cpp.

References getActorById().

◆ rotateWithAxis()

void PclUtils::PCLVis::rotateWithAxis ( const CCVector2i pos,
const CCVector3d axis,
double  angle,
int  viewport = 0 
)

◆ setActorPickingEnabled()

void PclUtils::PCLVis::setActorPickingEnabled ( bool  state)
inline

Definition at line 681 of file PCLVis.h.

Referenced by PclAnnotationTool::start(), PclAnnotationTool::stop(), and ~PCLVis().

◆ setAreaPickingEnabled()

void PclUtils::PCLVis::setAreaPickingEnabled ( bool  state)
inline

◆ setAreaPickingMode()

void PclUtils::PCLVis::setAreaPickingMode ( bool  state)

Definition at line 2822 of file PCLVis.cpp.

References m_area_picker, m_currentMode, m_point_picker, ORIENT_MODE, and SELECT_MODE.

◆ setAutoUpateCameraPos()

void PclUtils::PCLVis::setAutoUpateCameraPos ( bool  state)
inline

Definition at line 165 of file PCLVis.h.

◆ setCamera2DManipulators()

void PclUtils::PCLVis::setCamera2DManipulators ( const int  manipulators[9])
virtual

Definition at line 418 of file PCLVis.cpp.

References setCameraManipulators(), and TwoDInteractorStyle.

◆ setCamera2DMouseWheelMotionFactor()

void PclUtils::PCLVis::setCamera2DMouseWheelMotionFactor ( double  factor)
virtual

Definition at line 488 of file PCLVis.cpp.

References TwoDInteractorStyle.

◆ setCamera3DManipulators()

void PclUtils::PCLVis::setCamera3DManipulators ( const int  manipulators[9])
virtual

Definition at line 423 of file PCLVis.cpp.

References setCameraManipulators(), and ThreeDInteractorStyle.

◆ setCamera3DMouseWheelMotionFactor()

void PclUtils::PCLVis::setCamera3DMouseWheelMotionFactor ( double  factor)
virtual

Definition at line 495 of file PCLVis.cpp.

References ThreeDInteractorStyle.

◆ setCameraFocalDistance()

void PclUtils::PCLVis::setCameraFocalDistance ( double  focal_distance,
int  viewport = 0 
)

Definition at line 590 of file PCLVis.cpp.

References getVtkCamera().

◆ setCameraManipulators()

void PclUtils::PCLVis::setCameraManipulators ( VTKExtensions::vtkCustomInteractorStyle style,
const int  manipulators[9] 
)

◆ setCameraViewAngle()

void PclUtils::PCLVis::setCameraViewAngle ( double  viewAngle,
int  viewport = 0 
)

Definition at line 827 of file PCLVis.cpp.

References resetCameraClippingRange(), and UpdateScreen().

◆ setCenterAxesVisibility()

void PclUtils::PCLVis::setCenterAxesVisibility ( bool  v)

Definition at line 565 of file PCLVis.cpp.

References m_centerAxes.

◆ setCenterOfRotation() [1/2]

void PclUtils::PCLVis::setCenterOfRotation ( double  x,
double  y,
double  z 
)

Set the center of rotation. For this to work, one should have appropriate interaction style and camera manipulators that use the center of rotation They are setup correctly by default

Definition at line 389 of file PCLVis.cpp.

References m_centerAxes, ThreeDInteractorStyle, TwoDInteractorStyle, y, and z.

Referenced by resetCenterOfRotation(), and EditCameraTool::UpdateCamera().

◆ setCenterOfRotation() [2/2]

void PclUtils::PCLVis::setCenterOfRotation ( double  xyz[3])
inline

Definition at line 193 of file PCLVis.h.

◆ setCurrentSourceObject()

void PclUtils::PCLVis::setCurrentSourceObject ( ccHObject obj,
const std::string &  viewID 
)

Set the source object for selection operations.

This stores a reference to the original ccHObject (ccPointCloud or ccMesh) that is being visualized. Used for direct extraction during selection operations to bypass VTK→ccHObject conversion. Supports multiple objects in the scene via viewID mapping.

Parameters
objThe source object (ccPointCloud or ccMesh)
viewIDThe view ID for the object

Definition at line 2400 of file PCLVis.cpp.

References ccHObject::getClassID(), ccObject::getName(), getSourceCloud(), m_sourceObjectMap, CVLog::PrintDebug(), and syncAllScalarFieldsToVTK().

◆ SetDataAxesGridProperties()

void PclUtils::PCLVis::SetDataAxesGridProperties ( const std::string &  viewID,
const AxesGridProperties props 
)

Set Data Axes Grid properties (Unified Interface)

Data Axes Grid shows axes and grid lines around the data bounds. Uses vtkCubeAxesActor with FlyModeToOuterEdges. Each ccHObject has its own Data Axes Grid bound to its viewID.

Parameters
viewIDThe view ID of the ccHObject to bind the axes grid to
propsAll axes grid properties encapsulated in AxesGridProperties struct

Definition at line 3553 of file PCLVis.cpp.

References AxesGridProperties::color, getActorById(), ccHObject::getChild(), ccHObject::getChildrenNumber(), getCurrentRenderer(), ccHObject::getDisplayBB_recursive(), ccObject::getName(), ecvDisplayTools::GetSceneDB(), getSourceObject(), ccHObject::getViewId(), cloudViewer::BoundingBoxTpl< T >::isValid(), AxesGridProperties::lineWidth, m_dataAxesGridMap, cloudViewer::BoundingBoxTpl< T >::maxCorner(), cloudViewer::BoundingBoxTpl< T >::minCorner(), AxesGridProperties::opacity, CVLog::PrintVerbose(), AxesGridProperties::showGrid, AxesGridProperties::showLabels, AxesGridProperties::useCustomBounds, AxesGridProperties::visible, CVLog::Warning(), Tuple3Tpl< Type >::x, AxesGridProperties::xCustomLabels, AxesGridProperties::xMax, AxesGridProperties::xMin, AxesGridProperties::xTitle, AxesGridProperties::xUseCustomLabels, Tuple3Tpl< Type >::y, AxesGridProperties::yCustomLabels, AxesGridProperties::yMax, AxesGridProperties::yMin, AxesGridProperties::yTitle, AxesGridProperties::yUseCustomLabels, Tuple3Tpl< Type >::z, AxesGridProperties::zCustomLabels, AxesGridProperties::zMax, AxesGridProperties::zMin, AxesGridProperties::zTitle, and AxesGridProperties::zUseCustomLabels.

◆ setLightIntensity()

void PclUtils::PCLVis::setLightIntensity ( double  intensity)

Set global light intensity (ParaView-style)

Directly modifies the renderer's default light intensity. This affects all objects in the scene uniformly.

Parameters
intensityLight intensity (0.0-1.0, default 1.0)

Definition at line 3448 of file PCLVis.cpp.

References getCurrentRenderer(), ecvColor::light(), m_lightIntensity, and CVLog::Warning().

◆ setLightMode()

void PclUtils::PCLVis::setLightMode ( const std::string &  viewID,
int  viewport = 0 
)

Definition at line 2699 of file PCLVis.cpp.

References getActorById().

◆ setLineWidth()

void PclUtils::PCLVis::setLineWidth ( const unsigned char  lineWidth,
const std::string &  viewID,
int  viewport = 0 
)

Definition at line 2708 of file PCLVis.cpp.

References getActorById().

◆ setMeshOpacity()

void PclUtils::PCLVis::setMeshOpacity ( double  opacity,
const std::string &  viewID,
int  viewport = 0 
)

Set opacity for mesh (textured or non-textured)

This method properly handles transparency for meshes, including:

  • Meshes with textures: enables depth peeling and alpha blending
  • Meshes without textures: simple opacity setting
  • Automatic transparency rendering configuration when opacity < 1.0
Parameters
opacityOpacity value [0.0, 1.0] where 0.0 = fully transparent, 1.0 = opaque
viewIDThe unique identifier of the mesh
viewportThe viewport ID (default: 0)

Definition at line 2541 of file PCLVis.cpp.

References getActorById(), getCurrentRenderer(), CVLog::PrintVerbose(), and CVLog::Warning().

◆ setMeshRenderingMode()

void PclUtils::PCLVis::setMeshRenderingMode ( MESH_RENDERING_MODE  mode,
const std::string &  viewID,
int  viewport = 0 
)

◆ setMeshShadingMode()

void PclUtils::PCLVis::setMeshShadingMode ( SHADING_MODE  mode,
const std::string &  viewID,
int  viewport = 0 
)

◆ setModelViewMatrix()

void PclUtils::PCLVis::setModelViewMatrix ( const ccGLMatrixd viewMat,
int  viewport = 0 
)

Definition at line 2776 of file PCLVis.cpp.

References ccGLMatrixTpl< T >::data(), and getVtkCamera().

◆ setOrthoProjection()

void PclUtils::PCLVis::setOrthoProjection ( int  viewport = 0)

Definition at line 2794 of file PCLVis.cpp.

References getCurrentRenderer(), getVtkCamera(), and UpdateScreen().

◆ setParallelScale()

void PclUtils::PCLVis::setParallelScale ( double  scale,
int  viewport = 0 
)

Definition at line 2781 of file PCLVis.cpp.

References getVtkCamera().

◆ setPerspectiveProjection()

void PclUtils::PCLVis::setPerspectiveProjection ( int  viewport = 0)

Definition at line 2804 of file PCLVis.cpp.

References getCurrentRenderer(), getVtkCamera(), and UpdateScreen().

◆ setPointCloudOpacity()

void PclUtils::PCLVis::setPointCloudOpacity ( double  opacity,
const std::string &  viewID,
int  viewport = 0 
)

Definition at line 2514 of file PCLVis.cpp.

◆ setPointCloudUniqueColor()

void PclUtils::PCLVis::setPointCloudUniqueColor ( double  r,
double  g,
double  b,
const std::string &  viewID,
int  viewport = 0 
)

Definition at line 2205 of file PCLVis.cpp.

Referenced by updateNormals().

◆ setPointPickingEnabled()

void PclUtils::PCLVis::setPointPickingEnabled ( bool  state)
inline

◆ setPointSize()

void PclUtils::PCLVis::setPointSize ( const unsigned char  pointSize,
const std::string &  viewID,
int  viewport = 0 
)

Definition at line 2237 of file PCLVis.cpp.

References size.

◆ setRotationFactor()

void PclUtils::PCLVis::setRotationFactor ( double  factor)

Definition at line 400 of file PCLVis.cpp.

References ThreeDInteractorStyle, and TwoDInteractorStyle.

Referenced by EditCameraTool::UpdateCamera().

◆ setScalarFieldName()

void PclUtils::PCLVis::setScalarFieldName ( const std::string &  viewID,
const std::string &  scalarName,
int  viewport = 0 
)

Definition at line 2457 of file PCLVis.cpp.

References CVLog::PrintDebug().

◆ setShapeOpacity()

void PclUtils::PCLVis::setShapeOpacity ( double  opacity,
const std::string &  viewID,
int  viewport = 0 
)

Definition at line 2531 of file PCLVis.cpp.

◆ setShapeShadingMode()

void PclUtils::PCLVis::setShapeShadingMode ( SHADING_MODE  mode,
const std::string &  viewID,
int  viewport = 0 
)

Definition at line 2607 of file PCLVis.cpp.

◆ setShapeUniqueColor()

void PclUtils::PCLVis::setShapeUniqueColor ( float  r,
float  g,
float  b,
const std::string &  viewID,
int  viewport = 0 
)

Definition at line 2229 of file PCLVis.cpp.

◆ setupInteractor()

void PclUtils::PCLVis::setupInteractor ( vtkRenderWindowInteractor *  iren,
vtkRenderWindow *  win 
)

setupInteractor override to init interactor_

Parameters
iren
win

Definition at line 3164 of file PCLVis.cpp.

◆ showOrientationMarkerWidgetAxes()

void PclUtils::PCLVis::showOrientationMarkerWidgetAxes ( vtkRenderWindowInteractor *  interactor)

Definition at line 2889 of file PCLVis.cpp.

References PclTools::CreateCoordinate(), m_axes_widget, and CVLog::PrintVerbose().

Referenced by showPclMarkerAxes().

◆ showPclMarkerAxes()

void PclUtils::PCLVis::showPclMarkerAxes ( vtkRenderWindowInteractor *  interactor = nullptr)

Definition at line 2858 of file PCLVis.cpp.

References CVLog::PrintVerbose(), and showOrientationMarkerWidgetAxes().

◆ syncAllScalarFieldsToVTK()

void PclUtils::PCLVis::syncAllScalarFieldsToVTK ( const std::string &  viewID,
ccPointCloud cloud,
int  viewport = 0 
)

Sync ALL scalar fields from ccPointCloud to VTK polydata.

This method ensures all scalar fields in the ccPointCloud are available in the VTK polydata for selection/extraction operations.

Parameters
viewIDThe cloud ID
cloudThe ccPointCloud containing scalar fields
viewportViewport ID

Definition at line 2377 of file PCLVis.cpp.

References addScalarFieldToVTK(), cloudViewer::PointCloudTpl< T >::getNumberOfScalarFields(), and CVLog::PrintDebug().

Referenced by setCurrentSourceObject().

◆ synchronizeGeometryBounds()

void PclUtils::PCLVis::synchronizeGeometryBounds ( int  viewport = 0)

Synchronizes bounds information on all nodes.

Note
CallOnAllProcesses

Definition at line 525 of file PCLVis.cpp.

References GeometryBounds, getCurrentRenderer(), m_centerAxes, and updateCenterAxes().

Referenced by getReasonableClippingRange(), resetCameraClippingRange(), and resetCenterOfRotation().

◆ toggleActorPicking()

void PclUtils::PCLVis::toggleActorPicking ( )
inline

Definition at line 684 of file PCLVis.h.

◆ toggleAreaPicking()

void PclUtils::PCLVis::toggleAreaPicking ( )

◆ ToggleCameraOrientationWidget()

void PclUtils::PCLVis::ToggleCameraOrientationWidget ( bool  show)

Toggle Camera Orientation Widget visibility (ParaView-style)

The Camera Orientation Widget provides an interactive 3D gizmo for controlling camera orientation. Uses vtkCameraOrientationWidget.

Parameters
showtrue to show, false to hide

Definition at line 3872 of file PCLVis.cpp.

References getCurrentRenderer(), getRenderWindowInteractor(), m_cameraOrientationWidget, CVLog::PrintDebug(), CVLog::PrintVerbose(), and CVLog::Warning().

◆ toggleOrientationMarkerWidgetAxes()

void PclUtils::PCLVis::toggleOrientationMarkerWidgetAxes ( )

Definition at line 2907 of file PCLVis.cpp.

References m_axes_widget, and CVLog::Warning().

◆ togglePointPicking()

void PclUtils::PCLVis::togglePointPicking ( )
inline

Definition at line 671 of file PCLVis.h.

◆ transformEntities()

void PclUtils::PCLVis::transformEntities ( const CC_DRAW_CONTEXT context)

◆ updateCaption()

bool PclUtils::PCLVis::updateCaption ( const std::string &  text,
const CCVector2 pos2D,
const CCVector3 anchorPos,
double  r,
double  g,
double  b,
double  a,
int  fontSize = 10,
const std::string &  viewID = "caption",
int  viewport = 0 
)

◆ updateCenterAxes()

void PclUtils::PCLVis::updateCenterAxes ( )
virtual

updateCenterAxes(). updates CenterAxes's scale and position.

Definition at line 502 of file PCLVis.cpp.

References GeometryBounds, and m_centerAxes.

Referenced by synchronizeGeometryBounds().

◆ updateNormals()

void PclUtils::PCLVis::updateNormals ( const CC_DRAW_CONTEXT context,
const PCLCloud::Ptr &  smCloud 
)

◆ updateScalarBar()

bool PclUtils::PCLVis::updateScalarBar ( const CC_DRAW_CONTEXT context)

Definition at line 1241 of file PCLVis.cpp.

References context, CVTools::FromQString(), getWidgetById(), and PclTools::UpdateScalarBar().

Referenced by addScalarBar().

◆ UpdateScreen()

void PclUtils::PCLVis::UpdateScreen ( )

UpdateScreen - Updates/refreshes the render window This method forces a render update after actor changes.

Definition at line 3156 of file PCLVis.cpp.

Referenced by setCameraViewAngle(), cvSelectionPropertiesWidget::setHighlighter(), setOrthoProjection(), setPerspectiveProjection(), and EditCameraTool::UpdateCamera().

◆ updateShadingMode()

void PclUtils::PCLVis::updateShadingMode ( const CC_DRAW_CONTEXT context,
PCLCloud smCloud 
)

◆ updateTexture()

bool PclUtils::PCLVis::updateTexture ( const CC_DRAW_CONTEXT context,
const ccMaterialSet materials 
)

◆ zoomCamera()

void PclUtils::PCLVis::zoomCamera ( double  zoomFactor,
int  viewport = 0 
)

In perspective mode, decrease the view angle by the specified factor. In parallel mode, decrease the parallel scale by the specified factor. A value greater than 1 is a zoom-in, a value less than 1 is a zoom-out.

Note
This setting is ignored when UseExplicitProjectionTransformMatrix is true.

Definition at line 599 of file PCLVis.cpp.

References getVtkCamera().

Member Data Documentation

◆ GeometryBounds

vtkBoundingBox PclUtils::PCLVis::GeometryBounds
protected

◆ m_actorPickingEnabled

bool PclUtils::PCLVis::m_actorPickingEnabled
protected

Definition at line 707 of file PCLVis.h.

◆ m_area_picker

vtkSmartPointer<vtkAreaPicker> PclUtils::PCLVis::m_area_picker
protected

Definition at line 786 of file PCLVis.h.

Referenced by pickItem(), and setAreaPickingMode().

◆ m_areaPickingEnabled

bool PclUtils::PCLVis::m_areaPickingEnabled
protected

Definition at line 706 of file PCLVis.h.

◆ m_autoUpdateCameraPos

bool PclUtils::PCLVis::m_autoUpdateCameraPos
protected

Definition at line 709 of file PCLVis.h.

◆ m_axes_widget

vtkSmartPointer<vtkOrientationMarkerWidget> PclUtils::PCLVis::m_axes_widget
protected

◆ m_cameraOrientationWidget

vtkSmartPointer<vtkCameraOrientationWidget> PclUtils::PCLVis::m_cameraOrientationWidget
protected

◆ m_centerAxes

◆ m_cloud_mutex

std::mutex PclUtils::PCLVis::m_cloud_mutex
protected

Definition at line 711 of file PCLVis.h.

◆ m_currentMode

int PclUtils::PCLVis::m_currentMode
protected

Definition at line 704 of file PCLVis.h.

Referenced by setAreaPickingMode().

◆ m_dataAxesGridMap

std::map<std::string, vtkSmartPointer<vtkCubeAxesActor> > PclUtils::PCLVis::m_dataAxesGridMap
protected

◆ m_interactorStyle

vtkSmartPointer<pcl::visualization::PCLVisualizerInteractorStyle> PclUtils::PCLVis::m_interactorStyle
protected

Definition at line 637 of file PCLVis.h.

Referenced by configInteractorStyle().

◆ m_lightIntensity

double PclUtils::PCLVis::m_lightIntensity
protected

Definition at line 797 of file PCLVis.h.

Referenced by getLightIntensity(), and setLightIntensity().

◆ m_point_picker

vtkSmartPointer<vtkPointPicker> PclUtils::PCLVis::m_point_picker
protected

Definition at line 785 of file PCLVis.h.

Referenced by setAreaPickingMode().

◆ m_pointPickingEnabled

bool PclUtils::PCLVis::m_pointPickingEnabled
protected

Definition at line 705 of file PCLVis.h.

◆ m_prop_map

PropActorMapPtr PclUtils::PCLVis::m_prop_map
protected

Internal list with actor pointers and name IDs for props.

Definition at line 628 of file PCLVis.h.

◆ m_propPicker

vtkSmartPointer<vtkPropPicker> PclUtils::PCLVis::m_propPicker
protected

Definition at line 787 of file PCLVis.h.

Referenced by pickActor().

◆ m_selected_slice

std::vector<int> PclUtils::PCLVis::m_selected_slice
protected

Definition at line 789 of file PCLVis.h.

◆ m_sourceObjectMap

std::map<std::string, ccHObject*> PclUtils::PCLVis::m_sourceObjectMap
protected

◆ m_widget_map

WidgetActorMapPtr PclUtils::PCLVis::m_widget_map
protected

Internal list with actor pointers and name IDs for widgets.

Definition at line 625 of file PCLVis.h.

◆ ThreeDInteractorStyle

◆ TwoDInteractorStyle


The documentation for this class was generated from the following files: