ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
PCLDisplayTools Class Reference

CC to PCL cloud converter. More...

#include <PCLDisplayTools.h>

Inheritance diagram for PCLDisplayTools:
Collaboration diagram for PCLDisplayTools:

Public Member Functions

 PCLDisplayTools ()=default
 Constructor. More...
 
virtual ~PCLDisplayTools () override
 Destructor. More...
 
virtual ecvGenericVisualizer3DgetVisualizer3D () override
 
virtual ecvGenericVisualizer2DgetVisualizer2D () override
 
QVTKWidgetCustomgetQVtkWidget ()
 
virtual void toWorldPoint (const CCVector3d &input2D, CCVector3d &output3D) override
 
virtual void toWorldPoint (const CCVector3 &input2D, CCVector3d &output3D) override
 
virtual void toDisplayPoint (const CCVector3d &worldPos, CCVector3d &displayPos) override
 
virtual void toDisplayPoint (const CCVector3 &worldPos, CCVector3d &displayPos) override
 
virtual void displayText (const CC_DRAW_CONTEXT &context) override
 
virtual void toggle2Dviewer (bool state) override
 
virtual void drawWidgets (const WIDGETS_PARAMETER &param) override
 
virtual void changeEntityProperties (PROPERTY_PARAM &param) override
 
virtual void transformCameraView (const ccGLMatrixd &viewMat) override
 
virtual void transformCameraProjection (const ccGLMatrixd &projMat) override
 
virtual void draw (const CC_DRAW_CONTEXT &context, const ccHObject *obj) override
 
virtual void updateMeshTextures (const CC_DRAW_CONTEXT &context, const ccGenericMesh *mesh) override
 
bool checkEntityNeedUpdate (std::string &viewID, const ccHObject *obj)
 
virtual void drawBBox (const CC_DRAW_CONTEXT &context, const ccBBox *bbox) override
 
virtual void drawOrientedBBox (const CC_DRAW_CONTEXT &context, const ecvOrientedBBox *obb) override
 
virtual bool orientationMarkerShown () override
 
virtual void toggleOrientationMarker (bool state) override
 
virtual void removeEntities (const CC_DRAW_CONTEXT &context) override
 
virtual bool hideShowEntities (const CC_DRAW_CONTEXT &context) override
 
virtual void createViewPort (double xmin, double ymin, double xmax, double ymax, int &viewport) override
 Create a new viewport from [xmin,ymin] -> [xmax,ymax]. More...
 
virtual void resetCameraViewpoint (const std::string &viewID) override
 
virtual void setBackgroundColor (const CC_DRAW_CONTEXT &context) override
 
virtual void showOrientationMarker () override
 
virtual void drawCoordinates (double scale=1.0, const std::string &id="reference", int viewport=0) override
 
virtual void rotateWithAxis (const CCVector2i &pos, const CCVector3d &axis, double angle, int viewport=0) override
 
virtual void resetCamera () override
 
virtual void resetCamera (const ccBBox *bbox) override
 
virtual void updateCamera () override
 
virtual void updateScene () override
 
virtual void setAutoUpateCameraPos (bool state) override
 
virtual void getCenterOfRotation (double center[3]) override
 
virtual void resetCenterOfRotation (int viewport=0) override
 
virtual void setCenterOfRotation (double x, double y, double z) override
 
void setCenterOfRotation (const double xyz[3])
 
virtual void setPivotVisibility (bool state) override
 
virtual void resetCameraClippingRange (int viewport=0) override
 
virtual double getGLDepth (int x, int y) override
 
virtual void zoomCamera (double zoomFactor, int viewport=0) override
 
virtual double getCameraFocalDistance (int viewport=0) override
 
virtual void setCameraFocalDistance (double focal_distance, int viewport=0) override
 
virtual void getCameraPos (double *pos, int viewport=0) override
 
virtual void getCameraFocal (double *focal, int viewport=0) override
 
virtual void getCameraUp (double *up, int viewport=0) override
 
virtual void setCameraPosition (const CCVector3d &pos, int viewport=0) override
 
virtual void setCameraPosition (const double *pos, const double *focal, const double *up, int viewport=0) override
 
virtual void setCameraPosition (const double *pos, const double *up, int viewport=0) override
 
virtual void setCameraPosition (double pos_x, double pos_y, double pos_z, double view_x, double view_y, double view_z, double up_x, double up_y, double up_z, int viewport=0) override
 
virtual void setRenderWindowSize (int xw, int yw) override
 
virtual void fullScreen (bool state) override
 
virtual void setOrthoProjection (int viewport=0) override
 
virtual void setPerspectiveProjection (int viewport=0) override
 
virtual void getCameraClip (double *clipPlanes, int viewport=0) override
 
virtual void setCameraClip (double znear, double zfar, int viewport=0) override
 
virtual double getCameraFovy (int viewport=0) override
 
virtual void setCameraFovy (double fovy, int viewport=0) override
 
virtual double getParallelScale (int viewport=0) override
 
virtual void setParallelScale (double scale, int viewport=0) override
 
virtual void saveScreenshot (const std::string &file) override
 Save the current rendered image to disk, as a PNG screen shot. More...
 
virtual void saveCameraParameters (const std::string &file) override
 Save or Load the current rendered camera parameters to disk or current camera. More...
 
virtual void loadCameraParameters (const std::string &file) override
 
virtual void setUseVbos (bool useVbos) override
 Use Vertex Buffer Objects renderers. This is an optimization for the obsolete OpenGL backend. Modern OpenGL2 backend (VTK6.3) uses vertex buffer objects by default, transparently for the user. More...
 
virtual void setLookUpTableID (const std::string &viewID) override
 Set the ID of a cloud or shape to be used for LUT display. More...
 
virtual void getProjectionMatrix (double *projArray, int viewport=0) override
 
virtual void getViewMatrix (double *ViewArray, int viewport=0) override
 
virtual void setViewMatrix (const ccGLMatrixd &viewMat, int viewport=0) override
 
virtual void changeOpacity (double opacity, const std::string &viewID, int viewport=0) override
 
PclUtils::PCLVisget3DViewer ()
 
PclUtils::ImageVisget2DViewer ()
 
virtual QString pick2DLabel (int x, int y) override
 
virtual QString pick3DItem (int x=-1, int y=-1) override
 
virtual QString pickObject (double x=-1, double y=-1) override
 
virtual QImage renderToImage (int zoomFactor=1, bool renderOverlayItems=false, bool silent=false, int viewport=0) override
 
virtual void setScaleBarVisible (bool visible) override
 
void SetDataAxesGridProperties (const std::string &viewID, bool visible, const std::array< double, 3 > &color, double lineWidth, double spacing, int subdivisions, bool showLabels, double opacity)
 Set Data Axes Grid properties (ParaView-style) Each ccHObject has its own Data Axes Grid bound to its viewID. More...
 
void GetDataAxesGridProperties (const std::string &viewID, bool &visible, std::array< double, 3 > &color, double &lineWidth, double &spacing, int &subdivisions, bool &showLabels, double &opacity) const
 Get Data Axes Grid properties 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...
 
void toggleCameraOrientationWidget (bool show) override
 
bool isCameraOrientationWidgetShown () const override
 
void setLightIntensity (double intensity) override
 Set global light intensity (ParaView-style) Directly modifies the renderer's default light intensity. More...
 
double getLightIntensity () const override
 Get current Light Kit intensity. More...
 
void setDataAxesGridProperties (const QString &viewID, const AxesGridProperties &props, int viewport=0) override
 Set Data Axes Grid properties (Unified Interface) More...
 
void getDataAxesGridProperties (const QString &viewID, AxesGridProperties &props, int viewport=0) const override
 Get Data Axes Grid properties (Unified Interface) More...
 
- Public Member Functions inherited from ecvDisplayTools
virtual ~ecvDisplayTools () override
 Destructor. More...
 
void scheduleFullRedraw (unsigned maxDelay_ms)
 Schedules a full redraw. More...
 
void cancelScheduledRedraw ()
 Cancels any scheduled redraw. More...
 
virtual void setViewAxesGridVisible (bool visible, int viewport=0)
 
virtual void setViewAxesGridProperties (bool visible, const CCVector3 &color, double lineWidth, double spacing, int subdivisions, bool showLabels, double opacity, int viewport=0)
 
virtual void getViewAxesGridProperties (bool &visible, CCVector3 &color, double &lineWidth, double &spacing, int &subdivisions, bool &showLabels, double &opacity, int viewport=0) const
 Get view axes grid properties. More...
 
virtual void setCenterAxesVisible (bool visible, int viewport=0)
 
virtual void toggleExclusiveFullScreen (bool state)
 
virtual bool getPerspectiveState (int viewport=0) const override
 
- Public Member Functions inherited from ecvGenericDisplayTools
virtual ~ecvGenericDisplayTools ()
 Default destructor. More...
 

Protected Member Functions

virtual void registerVisualizer (QMainWindow *widget, bool stereoMode=false) override
 register visualizer callback function More...
 
- Protected Member Functions inherited from ecvDisplayTools
 ecvDisplayTools ()=default
 
- Protected Member Functions inherited from ecvGenericDisplayTools
 ecvGenericDisplayTools ()
 Default constructor. More...
 

Protected Attributes

QVTKWidgetCustomm_vtkWidget = nullptr
 
PclUtils::ImageVisPtr m_visualizer2D = nullptr
 
PclUtils::PCLVisPtr m_visualizer3D = nullptr
 
- Protected Attributes inherited from ecvDisplayTools
QWidget * m_currentScreen
 
QWidget * m_mainScreen
 
QMainWindow * m_win
 

Additional Inherited Members

- Public Types inherited from ecvDisplayTools
enum  PICKING_MODE {
  NO_PICKING , ENTITY_PICKING , ENTITY_RECT_PICKING , FAST_PICKING ,
  POINT_PICKING , TRIANGLE_PICKING , POINT_OR_TRIANGLE_PICKING , POINT_OR_TRIANGLE_OR_LABEL_PICKING ,
  LABEL_PICKING , DEFAULT_PICKING
}
 Picking mode. More...
 
enum  INTERACTION_FLAG {
  INTERACT_NONE = 0 , INTERACT_ROTATE = 1 , INTERACT_PAN = 2 , INTERACT_CTRL_PAN = 4 ,
  INTERACT_ZOOM_CAMERA = 8 , INTERACT_2D_ITEMS = 16 , INTERACT_CLICKABLE_ITEMS = 32 , INTERACT_TRANSFORM_ENTITIES = 64 ,
  INTERACT_SIG_RB_CLICKED = 128 , INTERACT_SIG_LB_CLICKED = 256 , INTERACT_SIG_MOUSE_MOVED , INTERACT_SIG_BUTTON_RELEASED = 1024 ,
  INTERACT_SIG_MB_CLICKED = 2048 , INTERACT_SEND_ALL_SIGNALS , MODE_PAN_ONLY , MODE_TRANSFORM_CAMERA = INTERACT_ROTATE | MODE_PAN_ONLY ,
  MODE_TRANSFORM_ENTITIES
}
 Interaction flags (mostly with the mouse) More...
 
enum  MessagePosition { LOWER_LEFT_MESSAGE , UPPER_CENTER_MESSAGE , SCREEN_CENTER_MESSAGE }
 Default message positions on screen. More...
 
enum  MessageType {
  CUSTOM_MESSAGE , SCREEN_SIZE_MESSAGE , PERSPECTIVE_STATE_MESSAGE , SUN_LIGHT_STATE_MESSAGE ,
  CUSTOM_LIGHT_STATE_MESSAGE , MANUAL_TRANSFORMATION_MESSAGE , MANUAL_SEGMENTATION_MESSAGE , ROTAION_LOCK_MESSAGE ,
  FULL_SCREEN_MESSAGE
}
 Message type. More...
 
enum  PivotVisibility { PIVOT_HIDE , PIVOT_SHOW_ON_MOVE , PIVOT_ALWAYS_SHOW }
 Pivot symbol visibility. More...
 
- Public Types inherited from ecvGenericDisplayTools
enum  TextAlign {
  ALIGN_HLEFT = 1 , ALIGN_HMIDDLE = 2 , ALIGN_HRIGHT = 4 , ALIGN_VTOP = 8 ,
  ALIGN_VMIDDLE = 16 , ALIGN_VBOTTOM = 32 , ALIGN_DEFAULT = 1 | 8
}
 Text alignment. More...
 
- Public Slots inherited from ecvDisplayTools
void onItemPickedFast (ccHObject *pickedEntity, int pickedItemIndex, int x, int y)
 Reacts to the itemPickedFast signal. More...
 
void onPointPicking (const CCVector3 &p, int index, const std::string &id)
 
void checkScheduledRedraw ()
 Checks for scheduled redraw. More...
 
void doPicking ()
 
void onWheelEvent (float wheelDelta_deg)
 
- Signals inherited from ecvDisplayTools
void entitySelectionChanged (ccHObject *entity)
 Signal emitted when an entity is selected in the 3D view. More...
 
void entitiesSelectionChanged (std::unordered_set< int > entIDs)
 Signal emitted when multiple entities are selected in the 3D view. More...
 
void itemPicked (ccHObject *entity, unsigned subEntityID, int x, int y, const CCVector3 &P)
 Signal emitted when a point (or a triangle) is picked. More...
 
void itemPickedFast (ccHObject *entity, int subEntityID, int x, int y)
 Signal emitted when an item is picked (FAST_PICKING mode only) More...
 
void fastPickingFinished ()
 Signal emitted when fast picking is finished (FAST_PICKING mode only) More...
 
void viewMatRotated (const ccGLMatrixd &rotMat)
 
void cameraDisplaced (float ddx, float ddy)
 Signal emitted when the camera is interactively displaced. More...
 
void mouseWheelRotated (float wheelDelta_deg)
 Signal emitted when the mouse wheel is rotated. More...
 
void mouseWheelChanged (QWheelEvent *event)
 
void perspectiveStateChanged ()
 
void baseViewMatChanged (const ccGLMatrixd &newViewMat)
 Signal emitted when the window 'base view' matrix is changed. More...
 
void pixelSizeChanged (float pixelSize)
 Signal emitted when the pixel size is changed. More...
 
void fovChanged (float fov)
 Signal emitted when the f.o.v. changes. More...
 
void zNearCoefChanged (float coef)
 Signal emitted when the zNear coef changes. More...
 
void pivotPointChanged (const CCVector3d &)
 Signal emitted when the pivot point is changed. More...
 
void cameraPosChanged (const CCVector3d &)
 Signal emitted when the camera position is changed. More...
 
void translation (const CCVector3d &t)
 Signal emitted when the selected object is translated by the user. More...
 
void rotation (const ccGLMatrixd &rotMat)
 Signal emitted when the selected object is rotated by the user. More...
 
void leftButtonClicked (int x, int y)
 Signal emitted when the left mouse button is cliked on the window. More...
 
void rightButtonClicked (int x, int y)
 Signal emitted when the right mouse button is cliked on the window. More...
 
void doubleButtonClicked (int x, int y)
 Signal emitted when the double mouse button is cliked on the window. More...
 
void mouseMoved (int x, int y, Qt::MouseButtons buttons)
 Signal emitted when the mouse is moved. More...
 
void buttonReleased ()
 Signal emitted when a mouse button is released (cursor on the window) More...
 
void drawing3D ()
 Signal emitted during 3D pass of OpenGL display process. More...
 
void filesDropped (const QStringList &filenames, bool displayDialog)
 Signal emitted when files are dropped on the window. More...
 
void newLabel (ccHObject *obj)
 Signal emitted when a new label is created. More...
 
void exclusiveFullScreenToggled (bool exclusive)
 Signal emitted when the exclusive fullscreen is toggled. More...
 
void autoPickPivot (bool state)
 
void labelmove2D (int x, int y, int dx, int dy)
 
void mousePosChanged (const QPoint &pos)
 
void pointPicked (double x, double y, double z)
 
void cameraParamChanged ()
 
- Static Public Member Functions inherited from ecvDisplayTools
static void Init (ecvDisplayTools *displayTools, QMainWindow *win, bool stereoMode=false)
 
static ecvDisplayToolsTheInstance ()
 
static void ReleaseInstance ()
 
static INTERACTION_FLAGS PAN_ONLY ()
 
static INTERACTION_FLAGS TRANSFORM_CAMERA ()
 
static INTERACTION_FLAGS TRANSFORM_ENTITIES ()
 
static void DisplayText (const QString &text, int x, int y, unsigned char align=ALIGN_DEFAULT, float bkgAlpha=0.0f, const unsigned char *rgbColor=nullptr, const QFont *font=nullptr, const QString &id="")
 Displays a string at a given 2D position. More...
 
static void DisplayText (const CC_DRAW_CONTEXT &CONTEXT)
 
static void Display3DLabel (const QString &str, const CCVector3 &pos3D, const ecvColor::Rgbub *color=nullptr, const QFont &font=QFont())
 Displays a string at a given 3D position. More...
 
static void SetFocusToScreen ()
 Draws the main 3D layer. More...
 
static void ToBeRefreshed ()
 
static void RefreshDisplay (bool only2D=false, bool forceRedraw=true)
 
static void RedrawDisplay (bool only2D=false, bool forceRedraw=true)
 
static void CheckIfRemove ()
 
static void Draw (const CC_DRAW_CONTEXT &context, const ccHObject *obj)
 
static void UpdateMeshTextures (const CC_DRAW_CONTEXT &context, const ccGenericMesh *mesh)
 
static void DrawBBox (const CC_DRAW_CONTEXT &context, const ccBBox *bbox)
 
static void DrawOrientedBBox (const CC_DRAW_CONTEXT &context, const ecvOrientedBBox *obb)
 
static void RemoveBB (CC_DRAW_CONTEXT context)
 
static void RemoveBB (const QString &viewId)
 
static void ChangeEntityProperties (PROPERTY_PARAM &propertyParam, bool autoUpdate=true)
 
static void DrawWidgets (const WIDGETS_PARAMETER &param, bool update=false)
 
static void RemoveWidgets (const WIDGETS_PARAMETER &param, bool update=false)
 
static void RemoveAllWidgets (bool update=true)
 
static void Remove3DLabel (const QString &view_id)
 
static void DrawCoordinates (double scale=1.0, const std::string &id="reference", int viewport=0)
 
static void RotateWithAxis (const CCVector2i &pos, const CCVector3d &axis, double angle, int viewport=0)
 
static void ToggleOrientationMarker (bool state=true)
 
static bool OrientationMarkerShown ()
 
static void SetDataAxesGridProperties (const QString &viewID, const AxesGridProperties &props, int viewport=0)
 Set Data Axes Grid properties (Unified Interface) Each ccHObject has its own Data Axes Grid bound to its viewID. More...
 
static void GetDataAxesGridProperties (const QString &viewID, AxesGridProperties &props, int viewport=0)
 Get Data Axes Grid properties (Unified Interface) More...
 
static void SetViewAxesGridVisible (bool visible, int viewport=0)
 Enable/disable view axes grid (aligned with camera/view) More...
 
static void SetViewAxesGridProperties (bool visible, const CCVector3 &color, double lineWidth, double spacing, int subdivisions, bool showLabels, double opacity, int viewport=0)
 Configure view axes grid properties. More...
 
static void SetCenterAxesVisible (bool visible, int viewport=0)
 Enable/disable center axes visualization. More...
 
static void ToggleCameraOrientationWidget (bool show)
 
static bool IsCameraOrientationWidgetShown ()
 Check if Camera Orientation Widget is shown. More...
 
static void SetLightIntensity (double intensity)
 
static double GetLightIntensity ()
 
static ecvGenericVisualizer3DGetVisualizer3D ()
 
static ecvGenericVisualizer2DGetVisualizer2D ()
 
static QWidget * GetCurrentScreen ()
 
static void SetCurrentScreen (QWidget *widget)
 
static QWidget * GetMainScreen ()
 
static void SetMainScreen (QWidget *widget)
 
static QMainWindow * GetMainWindow ()
 
static void SetMainWindow (QMainWindow *win)
 
static QPointF ToCenteredGLCoordinates (int x, int y)
 
static CCVector3d ToVtkCoordinates (int x, int y, int z=0)
 
static void ToVtkCoordinates (CCVector3d &sP)
 
static void ToVtkCoordinates (CCVector2i &sP)
 
static ccHObjectGetOwnDB ()
 Returns window own DB. More...
 
static void AddToOwnDB (ccHObject *obj, bool noDependency=true)
 Adds an entity to window own DB. More...
 
static void RemoveFromOwnDB (ccHObject *obj)
 Removes an entity from window own DB. More...
 
static void SetSceneDB (ccHObject *root)
 
static ccHObjectGetSceneDB ()
 
static void UpdateNamePoseRecursive ()
 
static void SetRedrawRecursive (bool redraw=false)
 
static void SetRedrawRecursive (ccHObject *obj, bool redraw=false)
 
static void GetVisibleObjectsBB (ccBBox &box)
 Returns the visible objects bounding-box. More...
 
static void RotateBaseViewMat (const ccGLMatrixd &rotMat)
 Rotates the base view matrix. More...
 
static ccGLMatrixdGetBaseViewMat ()
 
static void SetBaseViewMat (ccGLMatrixd &mat)
 
static void SetRemoveViewIDs (std::vector< removeInfo > &removeinfos)
 
static void SetRemoveAllFlag (bool state)
 
static void TransformCameraView (const ccGLMatrixd &viewMat)
 
static void TransformCameraProjection (const ccGLMatrixd &projMat)
 
static int GetDevicePixelRatio ()
 
static int GetOptimizedFontSize (int baseFontSize=12)
 
static double GetPlatformAwareDPIScale ()
 
static QRect GetScreenRect ()
 
static void SetScreenSize (int xw, int yw)
 
static void DoResize (int xw, int yw)
 
static void DoResize (const QSize &size)
 
static QSize GetScreenSize ()
 
static void SetRenderWindowSize (int xw, int yw)
 
static void FullScreen (bool state)
 
static void ZoomCamera (double zoomFactor, int viewport=0)
 
static double GetCameraFocalDistance (int viewport=0)
 
static void SetCameraFocalDistance (double focal_distance, int viewport=0)
 
static void GetCameraPos (double *pos, int viewport=0)
 
static void GetCameraFocal (double *focal, int viewport=0)
 
static void GetCameraUp (double *up, int viewport=0)
 
static void SetCameraPosition (const CCVector3d &pos, int viewport=0)
 
static void SetCameraPosition (const double *pos, const double *focal, const double *up, int viewport=0)
 
static void SetCameraPosition (const double *pos, const double *up, int viewport=0)
 
static void SetCameraPosition (double pos_x, double pos_y, double pos_z, double view_x, double view_y, double view_z, double up_x, double up_y, double up_z, int viewport=0)
 
static void GetCameraClip (double *clipPlanes, int viewport=0)
 
static void SetCameraClip (double znear, double zfar, int viewport=0)
 
static void ResetCameraClippingRange (int viewport=0)
 
static double GetCameraFovy (int viewport=0)
 
static void SetCameraFovy (double fovy, int viewport=0)
 
static void GetViewerPos (int *viewPos, int viewport=0)
 
static void SaveScreenshot (const std::string &file)
 Save the current rendered image to disk, as a PNG screenshot. More...
 
static void SaveCameraParameters (const std::string &file)
 Save or Load the current rendered camera parameters to disk or current camera. More...
 
static void LoadCameraParameters (const std::string &file)
 
static void ShowOrientationMarker ()
 
static void SetOrthoProjection (int viewport=0)
 
static void SetPerspectiveProjection (int viewport=0)
 
static void SetUseVbos (bool useVbos)
 Use Vertex Buffer Objects renderers. This is an optimization for the obsolete OpenGL backend. Modern OpenGL2 backend (VTK \A1\DD 6.3) uses vertex buffer objects by default, transparently for the user. More...
 
static void SetLookUpTableID (const std::string &viewID)
 Set the ID of a cloud or shape to be used for LUT display. More...
 
static void GetProjectionMatrix (double *projArray, int viewport=0)
 
static void GetViewMatrix (double *viewArray, int viewport=0)
 
static void SetViewMatrix (const ccGLMatrixd &viewMat, int viewport=0)
 
static bool HideShowEntities (const ccHObject *obj, bool visible)
 
static bool HideShowEntities (const CC_DRAW_CONTEXT &CONTEXT)
 
static void HideShowEntities (const QStringList &viewIDs, ENTITY_TYPE hideShowEntityType, bool visibility=false)
 
static void RemoveEntities (const ccHObject *obj)
 
static void RemoveEntities (const QStringList &viewIDs, ENTITY_TYPE removeEntityType)
 
static void RemoveEntities (const CC_DRAW_CONTEXT &CONTEXT)
 
static void DrawBackground (CC_DRAW_CONTEXT &CONTEXT)
 
static void DrawForeground (CC_DRAW_CONTEXT &CONTEXT)
 
static void Update2DLabel (bool immediateUpdate=false)
 
static void Pick2DLabel (int x, int y)
 
static void Redraw2DLabel ()
 
static QString Pick3DItem (int x=-1, int y=-1)
 
static QString PickObject (double x=-1, double y=-1)
 
static void FilterByEntityType (ccHObject::Container &labels, CV_CLASS_ENUM type)
 
static void CreateViewPort (double xmin, double ymin, double xmax, double ymax, int &viewport)
 Create a new viewport from [xmin,ymin] -> [xmax,ymax]. More...
 
static void ResetCameraViewpoint (const std::string &viewID)
 
static void SetPointSize (float size, bool silent=false, int viewport=0)
 
static void SetPointSizeRecursive (int size)
 
static void SetLineWidth (float width, bool silent=false, int viewport=0)
 Sets line width. More...
 
static void SetLineWithRecursive (PointCoordinateType with)
 
static void Toggle2Dviewer (bool state)
 
static void DisplayNewMessage (const QString &message, MessagePosition pos, bool append=false, int displayMaxDelay_sec=2, MessageType type=CUSTOM_MESSAGE)
 Displays a status message in the bottom-left corner. More...
 
static const ecvGui::ParamStructGetDisplayParameters ()
 Returns current parameters for this display (const version) More...
 
static void SetDisplayParameters (const ecvGui::ParamStruct &params)
 Sets current parameters for this display. More...
 
static void UpdateDisplayParameters ()
 
static void SetupProjectiveViewport (const ccGLMatrixd &cameraMatrix, float fov_deg=0.0f, float ar=1.0f, bool viewerBasedPerspective=true, bool bubbleViewMode=false)
 
static void SetAspectRatio (float ar)
 Sets current camera aspect ratio (width/height) More...
 
static void ResizeGL (int w, int h)
 Sets current zoom. More...
 
static void UpdateScreenSize ()
 
static void Update ()
 
static void UpdateScreen ()
 
static void ResetCamera (const ccBBox *bbox)
 
static void ResetCamera ()
 
static void UpdateCamera ()
 
static void UpdateScene ()
 
static void SetAutoUpateCameraPos (bool state)
 
static void GetCenterOfRotation (double center[3])
 
static void GetCenterOfRotation (CCVector3d &center)
 
static void ResetCenterOfRotation (int viewport=0)
 
static void SetCenterOfRotation (double x, double y, double z)
 
static void SetCenterOfRotation (const double xyz[3])
 
static void SetCenterOfRotation (const CCVector3d &center)
 
static double GetGLDepth (int x, int y)
 
static void ChangeOpacity (double opacity, const std::string &viewID, int viewport=0)
 
static CCVector3d ConvertMousePositionToOrientation (int x, int y)
 Converts a given (mouse) position in pixels to an orientation. More...
 
static void UpdateActiveItemsList (int x, int y, bool extendToSelectedLabels=false)
 Updates currently active items list (m_activeItems) More...
 
static void SetGLViewport (int x, int y, int w, int h)
 Sets the OpenGL viewport (shortut) More...
 
static void SetGLViewport (const QRect &rect)
 Sets the OpenGL viewport. More...
 
static void drawCross ()
 
static void drawTrihedron ()
 
static bool RenderToFile (QString filename, float zoomFactor=1.0f, bool dontScaleFeatures=false, bool renderOverlayItems=false)
 Renders screen to a file. More...
 
static QImage RenderToImage (int zoomFactor=1, bool renderOverlayItems=false, bool silent=false, int viewport=0)
 
static void SetScaleBarVisible (bool visible)
 
static void DisplayTexture2DPosition (QImage image, const QString &id, int x, int y, int w, int h, unsigned char alpha=255)
 
static void DrawClickableItems (int xStart, int &yStart)
 
static void RenderText (int x, int y, const QString &str, const QFont &font=QFont(), const ecvColor::Rgbub &color=ecvColor::defaultLabelBkgColor, const QString &id="")
 
static void RenderText (double x, double y, double z, const QString &str, const QFont &font=QFont(), const ecvColor::Rgbub &color=ecvColor::defaultLabelBkgColor, const QString &id="")
 
static void ToggleExclusiveFullScreen (bool state)
 Toggles (exclusive) full-screen mode. More...
 
static bool ExclusiveFullScreen ()
 Returns whether the window is in exclusive full screen mode or not. More...
 
static void SetExclusiveFullScreenFlage (bool state)
 
static void SetPixelSize (float pixelSize)
 Sets pixel size (i.e. zoom base) More...
 
static void UpdateConstellationCenterAndZoom (const ccBBox *aBox=nullptr, bool redraw=true)
 Center and zoom on a given bounding box. More...
 
static void GetContext (CC_DRAW_CONTEXT &CONTEXT)
 Returns context information. More...
 
static void GetGLCameraParameters (ccGLCameraParameters &params)
 Returns the current OpenGL camera parameters. More...
 
static void SetInteractionMode (INTERACTION_FLAGS flags)
 
static INTERACTION_FLAGS GetInteractionMode ()
 Returns the current interaction flags. More...
 
static void SetView (CC_VIEW_ORIENTATION orientation, ccBBox *bbox)
 
static void SetView (CC_VIEW_ORIENTATION orientation, bool forceRedraw=false)
 
static ccGLMatrixd GenerateViewMat (CC_VIEW_ORIENTATION orientation)
 
static void SetPerspectiveState (bool state, bool objectCenteredView)
 Set perspective state/mode. More...
 
static bool GetPerspectiveState (int viewport=0)
 
static bool ObjectPerspectiveEnabled ()
 Shortcut: returns whether object-based perspective mode is enabled. More...
 
static bool ViewerPerspectiveEnabled ()
 Shortcut: returns whether viewer-based perspective mode is enabled. More...
 
static float ComputePerspectiveZoom ()
 
static void SetFov (float fov)
 Sets current camera f.o.v. (field of view) in degrees. More...
 
static float GetFov ()
 Returns the current f.o.v. (field of view) in degrees. More...
 
static void ZoomGlobal ()
 
static CCVector3d GetCurrentViewDir ()
 Returns current viewing direction. More...
 
static CCVector3d GetCurrentUpDir ()
 Returns current up direction. More...
 
static void SetCameraPos (const CCVector3d &P)
 Sets camera position. More...
 
static void MoveCamera (float dx, float dy, float dz)
 Displaces camera. More...
 
static void MoveCamera (const CCVector3d &v)
 Displaces camera. More...
 
static void SetPickingMode (PICKING_MODE mode=DEFAULT_PICKING)
 
static PICKING_MODE GetPickingMode ()
 
static void LockPickingMode (bool state)
 Locks picking mode. More...
 
static bool IsPickingModeLocked ()
 Returns whether picking mode is locked or not. More...
 
static void SetZoom (float value)
 Sets current zoom. More...
 
static void UpdateZoom (float zoomFactor)
 Updates current zoom. More...
 
static void SetPivotPoint (const CCVector3d &P, bool autoUpdateCameraPos=false, bool verbose=false)
 Sets pivot point. More...
 
static void SetPivotVisibility (PivotVisibility vis)
 Sets pivot visibility. More...
 
static void SetPivotVisibility (bool state)
 
static PivotVisibility GetPivotVisibility ()
 Returns pivot visibility. More...
 
static void ShowPivotSymbol (bool state)
 Shows or hide the pivot symbol. More...
 
static void SetViewportParameters (const ecvViewportParameters &params)
 
static const ecvViewportParametersGetViewportParameters ()
 
static double GetParallelScale (int viewport=0)
 
static void SetParallelScale (double scale, int viewport=0)
 
static ccGLMatrixdGetModelViewMatrix ()
 
static ccGLMatrixdGetProjectionMatrix ()
 
static void UpdateModelViewMatrix ()
 
static void UpdateProjectionMatrix ()
 
static ccGLMatrixd ComputeModelViewMatrix ()
 Computes the model view matrix. More...
 
static ccGLMatrixd ComputeProjectionMatrix (bool withGLfeatures, ProjectionMetrics *metrics=nullptr, double *eyeOffset=nullptr)
 Computes the projection matrix. More...
 
static void Deprecate3DLayer ()
 
static void InvalidateViewport ()
 
static void InvalidateVisualization ()
 
static CCVector3d GetRealCameraCenter ()
 
static double ComputeActualPixelSize ()
 
static bool IsRectangularPickingAllowed ()
 Returns whether rectangular picking is allowed or not. More...
 
static void SetRectangularPickingAllowed (bool state)
 Sets whether rectangular picking is allowed or not. More...
 
static void SetBubbleViewMode (bool state)
 Sets bubble-view mode state. More...
 
static bool BubbleViewModeEnabled ()
 Returns whether bubble-view mode is enabled or no. More...
 
static void SetBubbleViewFov (float fov_deg)
 Set bubble-view f.o.v. (in degrees) More...
 
static void ShowCursorCoordinates (bool state)
 
static bool CursorCoordinatesShown ()
 
static void SetAutoPickPivotAtCenter (bool state)
 
static void SendAutoPickPivotAtCenter (bool state)
 
static bool AutoPickPivotAtCenter ()
 Whether the pivot point is automatically set at the center of the screen. More...
 
static void LockRotationAxis (bool state, const CCVector3d &axis)
 Lock the rotation axis. More...
 
static bool IsRotationAxisLocked ()
 Returns whether the rotation axis is locaked or not. More...
 
static bool GetClick3DPos (int x, int y, CCVector3d &P3D)
 Returns the approximate 3D position of the clicked pixel. More...
 
static void DrawPivot ()
 
static void EnableDebugTrace (bool state)
 Shows debug info on screen. More...
 
static void ToggleDebugTrace ()
 Toggles debug info on screen. More...
 
static bool ProcessClickableItems (int x, int y)
 Processes the clickable items. More...
 
static void SetZNearCoef (double coef)
 Sets current camera 'zNear' coefficient. More...
 
static void StartPicking (PickingParameters &params)
 Starts picking process. More...
 
static ccHObjectGetPickedEntity (const PickingParameters &params)
 
static void StartOpenGLPicking (const PickingParameters &params)
 Performs the picking with OpenGL. More...
 
static void StartCPUBasedPointPicking (const PickingParameters &params)
 Starts OpenGL picking process. More...
 
static void ProcessPickingResult (const PickingParameters &params, ccHObject *pickedEntity, int pickedItemIndex, const CCVector3 *nearestPoint=nullptr, const std::unordered_set< int > *selectedIDs=nullptr)
 Processes the picking process result and sends the corresponding signal. More...
 
static void SetFontPointSize (int pixelSize)
 Sets current font size. More...
 
static int GetFontPointSize ()
 Returns current font size. More...
 
static int GetLabelFontPointSize ()
 Returns current font size for labels. More...
 
static void SetClickableItemsVisible (bool state)
 
static bool GetClickableItemsVisible ()
 
static QFont GetLabelDisplayFont ()
 
static QFont GetTextDisplayFont ()
 
static ENTITY_TYPE ConvertToEntityType (const CV_CLASS_ENUM &type)
 
static void SetPickingRadius (int radius)
 Sets picking radius. More...
 
static int GetPickingRadius ()
 Returns the current picking radius. More...
 
static void DisplayOverlayEntities (bool state)
 
static bool OverlayEntitiesAreDisplayed ()
 
static int Width ()
 
static int Height ()
 
static QSize size ()
 
static int GlWidth ()
 Returns the OpenGL context width. More...
 
static int GlHeight ()
 Returns the OpenGL context height. More...
 
static QSize GlSize ()
 Returns the OpenGL context size. More...
 
static void ClearBubbleView ()
 
- Static Public Member Functions inherited from ecvGenericDisplayTools
static ecvGenericDisplayToolsGetInstance ()
 
static void SetInstance (ecvGenericDisplayTools *tool)
 
static int FontSizeModifier (int fontSize, float zoomFactor)
 
static bool GetPerspectiveState ()
 Returns perspective mode. More...
 
template<typename iType , typename oType >
static void ToWorldPoint (const Vector3Tpl< iType > &input2D, Vector3Tpl< oType > &output3D)
 
template<typename iType , typename oType >
static void ToDisplayPoint (const Vector3Tpl< iType > &input3D, Vector3Tpl< oType > &output2D)
 
static ccGLMatrixd Frustum (double left, double right, double bottom, double top, double znear, double zfar)
 
static ccGLMatrixd Perspective (double fovyInDegrees, double aspectRatio, double znear, double zfar)
 
static ccGLMatrixd Ortho (double left, double right, double bottom, double top, double nearVal, double farVal)
 
static ccGLMatrixd Ortho (double w, double h, double d)
 
template<typename iType , typename oType >
static bool Project (const Vector3Tpl< iType > &input3D, const oType *modelview, const oType *projection, const int *viewport, Vector3Tpl< oType > &output2D, bool *inFrustum=nullptr)
 
static double MAT (const double *m, int r, int c)
 
static float MAT (const float *m, int r, int c)
 
static double & MAT (double *m, int r, int c)
 
static floatMAT (float *m, int r, int c)
 
template<typename Type >
static bool InvertMatrix (const Type *m, Type *out)
 
template<typename iType , typename oType >
static bool Unproject (const Vector3Tpl< iType > &input2D, const oType *modelview, const oType *projection, const int *viewport, Vector3Tpl< oType > &output3D)
 
static void PickMatrix (double x, double y, double width, double height, int viewport[4], double m[16])
 
- Public Attributes inherited from ecvDisplayTools
std::list< MessageToDisplaym_messagesToDisplay
 List of messages to display. More...
 
std::list< ccInteractor * > m_activeItems
 Currently active items. More...
 
ecvViewportParameters m_viewportParams
 Viewport parameters (zoom, etc.) More...
 
std::vector< ClickableItemm_clickableItems
 Currently displayed clickable items. More...
 
bool m_clickableItemsVisible
 Whether clickable items are visible (= mouse over) or not. More...
 
INTERACTION_FLAGS m_interactionFlags
 Current intercation flags. More...
 
PICKING_MODE m_pickingMode
 
bool m_pickingModeLocked
 Whether picking mode is locked or not. More...
 
QElapsedTimer m_timer
 Internal timer. More...
 
bool m_touchInProgress
 Touch event in progress. More...
 
qreal m_touchBaseDist
 Touch gesture initial distance. More...
 
QTimer m_scheduleTimer
 Scheduler timer. More...
 
qint64 m_scheduledFullRedrawTime
 Scheduled full redraw (no LOD) More...
 
ecvGui::ParamStruct m_overridenDisplayParameters
 Overridden display parameter. More...
 
bool m_displayOverlayEntities
 Whether to display overlay entities or not (scale, tetrahedron, etc.) More...
 
bool m_overridenDisplayParametersEnabled
 Whether display parameters are overidden for this window. More...
 
bool m_exclusiveFullscreen
 Wether exclusive full screen is enabled or not. More...
 
bool m_showCursorCoordinates
 
bool m_autoPickPivotAtCenter
 
bool m_shouldBeRefreshed
 Whether the display should be refreshed on next call to 'refresh'. More...
 
CCVector3d m_autoPivotCandidate
 Candidate pivot point (will be used when the mouse is released) More...
 
QRect m_glViewport
 viewport More...
 
bool m_showDebugTraces
 Debug traces visibility. More...
 
int m_pickRadius
 Picking radius (pixels) More...
 
bool m_autoRefresh
 Auto-refresh mode. More...
 
bool m_rotationAxisLocked
 Wheter the rotation axis is locked or not. More...
 
CCVector3d m_lockedRotationAxis
 Locked rotation axis. More...
 
ccGLMatrixd m_viewMatd
 Complete visualization matrix (GL style - double version) More...
 
bool m_validModelviewMatrix
 Whether the model veiw matrix is valid (or need to be recomputed) More...
 
ccGLMatrixd m_projMatd
 Projection matrix (GL style - double version) More...
 
bool m_validProjectionMatrix
 Whether the projection matrix is valid (or need to be recomputed) More...
 
double m_cameraToBBCenterDist
 Distance between the camera and the displayed objects bounding-box. More...
 
double m_bbHalfDiag
 Half size of the displayed objects bounding-box. More...
 
PivotVisibility m_pivotVisibility
 Pivot symbol visibility. More...
 
bool m_pivotSymbolShown
 Whether pivot symbol should be shown or not. More...
 
bool m_allowRectangularEntityPicking
 Whether rectangular picking is allowed or not. More...
 
ccPolylinem_rectPickingPoly
 Rectangular picking polyline. More...
 
cloudViewer::geometry::LineSetm_scale_lineset
 
ccHObjectm_winDBRoot
 Window own DB. More...
 
ccHObjectm_globalDBRoot
 CV main DB. More...
 
bool m_removeFlag
 
bool m_removeAllFlag
 
std::vector< removeInfom_removeInfos
 
bool m_alwaysUseFBO
 Whether to always use FBO or only for GL filters. More...
 
bool m_updateFBO
 
float m_sunLightPos [4]
 Sun light position. More...
 
bool m_sunLightEnabled
 Whether sun light is enabled or not. More...
 
float m_customLightPos [4]
 Custom light position. More...
 
bool m_customLightEnabled
 Whether custom light is enabled or not. More...
 
bool m_bubbleViewModeEnabled
 Bubble-view mode state. More...
 
float m_bubbleViewFov_deg
 Bubble-view mode f.o.v. (degrees) More...
 
ecvViewportParameters m_preBubbleViewParameters
 Pre-bubble-view camera parameters (backup) More...
 
int m_uniqueID
 Unique ID. More...
 
QFont m_font
 Default font. More...
 
CaptureModeOptions m_captureMode
 Display capturing mode options. More...
 
QTimer m_deferredPickingTimer
 Deferred picking. More...
 
CCVector3 m_last_picked_point
 
int m_last_point_index = -1
 
QString m_last_picked_id = QString()
 
qint64 m_lastClickTime_ticks
 Last click time (msec) More...
 
HotZonem_hotZone
 Hot zone. More...
 
QPoint m_lastMousePos
 Last mouse position. More...
 
QPoint m_lastMouseMovePos
 
QStringList m_diagStrings
 
bool m_mouseMoved
 Whether the mouse (cursor) has moved after being pressed or not. More...
 
bool m_mouseButtonPressed
 Whether the mouse is currently pressed or not. More...
 
bool m_ignoreMouseReleaseEvent
 Ignore next mouse release event. More...
 
bool m_widgetClicked
 
- Static Public Attributes inherited from ecvDisplayTools
static const int DefaultPickRadius = 5
 Default picking radius value. More...
 
static bool USE_2D = true
 
static bool USE_VTK_PICK = false
 

Detailed Description

CC to PCL cloud converter.

Definition at line 45 of file PCLDisplayTools.h.

Constructor & Destructor Documentation

◆ PCLDisplayTools()

PCLDisplayTools::PCLDisplayTools ( )
default

Constructor.

◆ ~PCLDisplayTools()

PCLDisplayTools::~PCLDisplayTools ( )
overridevirtual

Destructor.

Definition at line 95 of file PCLDisplayTools.cpp.

References m_vtkWidget.

Member Function Documentation

◆ changeEntityProperties()

◆ changeOpacity()

void PCLDisplayTools::changeOpacity ( double  opacity,
const std::string &  viewID,
int  viewport = 0 
)
overridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 1227 of file PCLDisplayTools.cpp.

References m_visualizer2D.

◆ checkEntityNeedUpdate()

◆ createViewPort()

virtual void PCLDisplayTools::createViewPort ( double  xmin,
double  ymin,
double  xmax,
double  ymax,
int &  viewport 
)
inlineoverridevirtual

Create a new viewport from [xmin,ymin] -> [xmax,ymax].

Parameters
[in]xminthe minimum X coordinate for the viewport (0.0 <= 1.0)
[in]yminthe minimum Y coordinate for the viewport (0.0 <= 1.0)
[in]xmaxthe maximum X coordinate for the viewport (0.0 <= 1.0)
[in]ymaxthe maximum Y coordinate for the viewport (0.0 <= 1.0)
[in]viewportthe id of the new viewport
Note
If no renderer for the current window exists, one will be created, and the viewport will be set to 0 ('all'). In case one or multiple renderers do exist, the viewport ID will be set to the total number of renderers - 1.

Reimplemented from ecvDisplayTools.

Definition at line 123 of file PCLDisplayTools.h.

◆ displayText()

◆ draw()

◆ drawBBox()

◆ drawCoordinates()

virtual void PCLDisplayTools::drawCoordinates ( double  scale = 1.0,
const std::string &  id = "reference",
int  viewport = 0 
)
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 149 of file PCLDisplayTools.h.

◆ drawOrientedBBox()

void PCLDisplayTools::drawOrientedBBox ( const CC_DRAW_CONTEXT context,
const ecvOrientedBBox obb 
)
overridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 743 of file PCLDisplayTools.cpp.

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

◆ drawWidgets()

void PCLDisplayTools::drawWidgets ( const WIDGETS_PARAMETER param)
overridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 848 of file PCLDisplayTools.cpp.

References ecvColor::RgbaTpl< Type >::a, ecvColor::RgbaTpl< Type >::b, WIDGETS_PARAMETER::center, color, WIDGETS_PARAMETER::color, ccDrawableObject::colorsShown(), context, WIDGETS_PARAMETER::context, ecvTextParam::display3D, ecvDisplayTools::DrawWidgets(), WIDGETS_PARAMETER::entity, WIDGETS_PARAMETER::filled, ecvTextParam::font, WIDGETS_PARAMETER::fontSize, CVTools::FromQString(), ecvColor::FromRgb(), ecvColor::FromRgbafToRgb(), ecvColor::RgbaTpl< Type >::g, ccPolyline::getColor(), ecvDisplayTools::GetContext(), ecvDisplayTools::GetLabelDisplayFont(), cloudViewer::ReferenceCloud::getPoint(), ccDrawableObject::getTempColor(), ccHObject::getViewId(), ecvColor::green(), WIDGETS_PARAMETER::handleEnabled, WIDGETS_PARAMETER::image, ccPolyline::is2DMode(), cloudViewer::Polyline::isClosed(), ccDrawableObject::isColorOverridden(), ccObject::isKindOf(), LineWidget::lineColor, LineWidget::lineEd, LineWidget::lineSt, WIDGETS_PARAMETER::lineWidget, LineWidget::lineWidth, m_visualizer2D, m_visualizer3D, ecvTextParam::opacity, WIDGETS_PARAMETER::opacity, WIDGETS_PARAMETER::p1, WIDGETS_PARAMETER::p2, WIDGETS_PARAMETER::p3, WIDGETS_PARAMETER::p4, CV_TYPES::POLY_LINE, WIDGETS_PARAMETER::pos, ecvColor::RgbaTpl< Type >::r, WIDGETS_PARAMETER::radius, WIDGETS_PARAMETER::rect, cloudViewer::ReferenceCloud::size(), ecvTextParam::text, WIDGETS_PARAMETER::text, ecvTextParam::textPos, ccHObjectCaster::ToPolyline(), ecvTools::TransFormRGB(), WIDGETS_PARAMETER::type, LineWidget::valid, WIDGETS_PARAMETER::viewID, WIDGETS_PARAMETER::viewport, CVLog::Warning(), WIDGET_BBOX, WIDGET_CAPTION, WIDGET_CIRCLE_2D, WIDGET_COORDINATE, WIDGET_IMAGE, WIDGET_LINE_2D, WIDGET_LINE_3D, WIDGET_POINTS_2D, WIDGET_POLYLINE, WIDGET_POLYLINE_2D, WIDGET_RECTANGLE_2D, WIDGET_SCALAR_BAR, WIDGET_SPHERE, WIDGET_T2D, WIDGET_TRIANGLE_2D, Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.

◆ fullScreen()

virtual void PCLDisplayTools::fullScreen ( bool  state)
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 330 of file PCLDisplayTools.h.

◆ get2DViewer()

PclUtils::ImageVis* PCLDisplayTools::get2DViewer ( )
inline

Definition at line 421 of file PCLDisplayTools.h.

◆ get3DViewer()

PclUtils::PCLVis* PCLDisplayTools::get3DViewer ( )
inline

Definition at line 420 of file PCLDisplayTools.h.

◆ getCameraClip()

virtual void PCLDisplayTools::getCameraClip ( double *  clipPlanes,
int  viewport = 0 
)
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 348 of file PCLDisplayTools.h.

◆ getCameraFocal()

virtual void PCLDisplayTools::getCameraFocal ( double *  focal,
int  viewport = 0 
)
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 274 of file PCLDisplayTools.h.

◆ getCameraFocalDistance()

virtual double PCLDisplayTools::getCameraFocalDistance ( int  viewport = 0)
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 259 of file PCLDisplayTools.h.

◆ getCameraFovy()

virtual double PCLDisplayTools::getCameraFovy ( int  viewport = 0)
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 364 of file PCLDisplayTools.h.

References cloudViewer::RadiansToDegrees().

◆ getCameraPos()

virtual void PCLDisplayTools::getCameraPos ( double *  pos,
int  viewport = 0 
)
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 267 of file PCLDisplayTools.h.

◆ getCameraUp()

virtual void PCLDisplayTools::getCameraUp ( double *  up,
int  viewport = 0 
)
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 282 of file PCLDisplayTools.h.

◆ getCenterOfRotation()

virtual void PCLDisplayTools::getCenterOfRotation ( double  center[3])
inlineoverridevirtual

Get the current center of rotation

Reimplemented from ecvDisplayTools.

Definition at line 202 of file PCLDisplayTools.h.

◆ getDataAxesGridProperties()

void PCLDisplayTools::getDataAxesGridProperties ( const QString &  viewID,
AxesGridProperties props,
int  viewport = 0 
) const
overridevirtual

Get Data Axes Grid properties (Unified Interface)

Parameters
viewIDThe view ID of the ccHObject
propsOutput: current axes grid properties
viewportViewport ID (default: 0)

Reimplemented from ecvDisplayTools.

Definition at line 1389 of file PCLDisplayTools.cpp.

References CVTools::FromQString(), and m_visualizer3D.

◆ GetDataAxesGridProperties()

void PCLDisplayTools::GetDataAxesGridProperties ( const std::string &  viewID,
bool &  visible,
std::array< double, 3 > &  color,
double &  lineWidth,
double &  spacing,
int &  subdivisions,
bool &  showLabels,
double &  opacity 
) const

Get Data Axes Grid properties for a specific object.

Parameters
viewIDThe view ID of the ccHObject

◆ getGLDepth()

virtual double PCLDisplayTools::getGLDepth ( int  x,
int  y 
)
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 246 of file PCLDisplayTools.h.

References x, and y.

◆ getLightIntensity()

double PCLDisplayTools::getLightIntensity ( ) const
overridevirtual

Get current Light Kit intensity.

Returns
Current key light intensity

Reimplemented from ecvDisplayTools.

Definition at line 1361 of file PCLDisplayTools.cpp.

References m_visualizer3D.

◆ getParallelScale()

double PCLDisplayTools::getParallelScale ( int  viewport = 0)
overridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 1161 of file PCLDisplayTools.cpp.

References m_visualizer3D.

◆ getProjectionMatrix()

void PCLDisplayTools::getProjectionMatrix ( double *  projArray,
int  viewport = 0 
)
overridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 1175 of file PCLDisplayTools.cpp.

References m_visualizer3D.

◆ getQVtkWidget()

QVTKWidgetCustom* PCLDisplayTools::getQVtkWidget ( )
inline

◆ getViewMatrix()

void PCLDisplayTools::getViewMatrix ( double *  ViewArray,
int  viewport = 0 
)
overridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 1198 of file PCLDisplayTools.cpp.

References m_visualizer3D.

◆ getVisualizer2D()

virtual ecvGenericVisualizer2D* PCLDisplayTools::getVisualizer2D ( )
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 57 of file PCLDisplayTools.h.

◆ getVisualizer3D()

virtual ecvGenericVisualizer3D* PCLDisplayTools::getVisualizer3D ( )
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 54 of file PCLDisplayTools.h.

◆ hideShowEntities()

bool PCLDisplayTools::hideShowEntities ( const CC_DRAW_CONTEXT context)
overridevirtual

◆ IsCameraOrientationWidgetShown()

bool PCLDisplayTools::IsCameraOrientationWidgetShown ( ) const

Check if Camera Orientation Widget is shown.

Returns
true if visible, false otherwise

Definition at line 1333 of file PCLDisplayTools.cpp.

References m_visualizer3D.

Referenced by isCameraOrientationWidgetShown().

◆ isCameraOrientationWidgetShown()

bool PCLDisplayTools::isCameraOrientationWidgetShown ( ) const
overridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 1347 of file PCLDisplayTools.cpp.

References IsCameraOrientationWidgetShown().

◆ loadCameraParameters()

virtual void PCLDisplayTools::loadCameraParameters ( const std::string &  file)
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 389 of file PCLDisplayTools.h.

◆ orientationMarkerShown()

bool PCLDisplayTools::orientationMarkerShown ( )
overridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 759 of file PCLDisplayTools.cpp.

References m_visualizer3D.

◆ pick2DLabel()

QString PCLDisplayTools::pick2DLabel ( int  x,
int  y 
)
overridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 1115 of file PCLDisplayTools.cpp.

References m_visualizer2D, x, and y.

◆ pick3DItem()

QString PCLDisplayTools::pick3DItem ( int  x = -1,
int  y = -1 
)
overridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 1123 of file PCLDisplayTools.cpp.

References m_visualizer3D, x, and y.

◆ pickObject()

QString PCLDisplayTools::pickObject ( double  x = -1,
double  y = -1 
)
overridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 1131 of file PCLDisplayTools.cpp.

References m_visualizer3D, x, and y.

◆ registerVisualizer()

void PCLDisplayTools::registerVisualizer ( QMainWindow *  win,
bool  stereoMode = false 
)
overrideprotectedvirtual

◆ removeEntities()

void PCLDisplayTools::removeEntities ( const CC_DRAW_CONTEXT context)
overridevirtual

◆ renderToImage()

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

Reimplemented from ecvDisplayTools.

Definition at line 1145 of file PCLDisplayTools.cpp.

References CVLog::Error(), and m_visualizer3D.

◆ resetCamera() [1/2]

virtual void PCLDisplayTools::resetCamera ( )
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 164 of file PCLDisplayTools.h.

◆ resetCamera() [2/2]

virtual void PCLDisplayTools::resetCamera ( const ccBBox bbox)
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 167 of file PCLDisplayTools.h.

◆ resetCameraClippingRange()

virtual void PCLDisplayTools::resetCameraClippingRange ( int  viewport = 0)
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 240 of file PCLDisplayTools.h.

◆ resetCameraViewpoint()

virtual void PCLDisplayTools::resetCameraViewpoint ( const std::string &  viewID)
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 131 of file PCLDisplayTools.h.

◆ resetCenterOfRotation()

virtual void PCLDisplayTools::resetCenterOfRotation ( int  viewport = 0)
inlineoverridevirtual

Resets the center of rotation to the focal point.

Reimplemented from ecvDisplayTools.

Definition at line 211 of file PCLDisplayTools.h.

◆ rotateWithAxis()

virtual void PCLDisplayTools::rotateWithAxis ( const CCVector2i pos,
const CCVector3d axis,
double  angle,
int  viewport = 0 
)
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 155 of file PCLDisplayTools.h.

◆ saveCameraParameters()

virtual void PCLDisplayTools::saveCameraParameters ( const std::string &  file)
inlineoverridevirtual

Save or Load the current rendered camera parameters to disk or current camera.

Parameters
[in]filethe name of the param file

Reimplemented from ecvDisplayTools.

Definition at line 386 of file PCLDisplayTools.h.

◆ saveScreenshot()

virtual void PCLDisplayTools::saveScreenshot ( const std::string &  file)
inlineoverridevirtual

Save the current rendered image to disk, as a PNG screen shot.

Parameters
[in]filethe name of the PNG file

Reimplemented from ecvDisplayTools.

Definition at line 379 of file PCLDisplayTools.h.

◆ setAutoUpateCameraPos()

virtual void PCLDisplayTools::setAutoUpateCameraPos ( bool  state)
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 193 of file PCLDisplayTools.h.

◆ setBackgroundColor()

virtual void PCLDisplayTools::setBackgroundColor ( const CC_DRAW_CONTEXT context)
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 136 of file PCLDisplayTools.h.

References context, and ecvTools::TransFormRGB().

◆ setCameraClip()

virtual void PCLDisplayTools::setCameraClip ( double  znear,
double  zfar,
int  viewport = 0 
)
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 355 of file PCLDisplayTools.h.

◆ setCameraFocalDistance()

virtual void PCLDisplayTools::setCameraFocalDistance ( double  focal_distance,
int  viewport = 0 
)
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 262 of file PCLDisplayTools.h.

◆ setCameraFovy()

virtual void PCLDisplayTools::setCameraFovy ( double  fovy,
int  viewport = 0 
)
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 368 of file PCLDisplayTools.h.

◆ setCameraPosition() [1/4]

virtual void PCLDisplayTools::setCameraPosition ( const CCVector3d pos,
int  viewport = 0 
)
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 290 of file PCLDisplayTools.h.

◆ setCameraPosition() [2/4]

virtual void PCLDisplayTools::setCameraPosition ( const double *  pos,
const double *  focal,
const double *  up,
int  viewport = 0 
)
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 295 of file PCLDisplayTools.h.

◆ setCameraPosition() [3/4]

virtual void PCLDisplayTools::setCameraPosition ( const double *  pos,
const double *  up,
int  viewport = 0 
)
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 304 of file PCLDisplayTools.h.

◆ setCameraPosition() [4/4]

virtual void PCLDisplayTools::setCameraPosition ( double  pos_x,
double  pos_y,
double  pos_z,
double  view_x,
double  view_y,
double  view_z,
double  up_x,
double  up_y,
double  up_z,
int  viewport = 0 
)
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 311 of file PCLDisplayTools.h.

◆ setCenterOfRotation() [1/2]

void PCLDisplayTools::setCenterOfRotation ( const double  xyz[3])
inline

Definition at line 230 of file PCLDisplayTools.h.

References ecvDisplayTools::setCenterOfRotation().

◆ setCenterOfRotation() [2/2]

virtual void PCLDisplayTools::setCenterOfRotation ( double  x,
double  y,
double  z 
)
inlineoverridevirtual

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

Reimplemented from ecvDisplayTools.

Definition at line 223 of file PCLDisplayTools.h.

References x, y, and z.

◆ setDataAxesGridProperties()

void PCLDisplayTools::setDataAxesGridProperties ( const QString &  viewID,
const AxesGridProperties props,
int  viewport = 0 
)
overridevirtual

Set Data Axes Grid properties (Unified Interface)

Parameters
viewIDThe view ID of the ccHObject
propsAll axes grid properties encapsulated in AxesGridProperties struct
viewportViewport ID (default: 0)

Reimplemented from ecvDisplayTools.

Definition at line 1375 of file PCLDisplayTools.cpp.

References CVTools::FromQString(), m_visualizer3D, and CVLog::Warning().

◆ SetDataAxesGridProperties()

void PCLDisplayTools::SetDataAxesGridProperties ( const std::string &  viewID,
bool  visible,
const std::array< double, 3 > &  color,
double  lineWidth,
double  spacing,
int  subdivisions,
bool  showLabels,
double  opacity 
)

Set Data Axes Grid properties (ParaView-style) Each ccHObject has its own Data Axes Grid bound to its viewID.

Parameters
viewIDThe view ID of the ccHObject
visibleWhether the grid is visible
colorRGB color of axes and grid lines
lineWidthWidth of grid lines
spacingSpacing between grid lines
subdivisionsNumber of subdivisions
showLabelsWhether to show axis labels
opacityOpacity of axes and grid lines

◆ setLightIntensity()

void PCLDisplayTools::setLightIntensity ( double  intensity)
overridevirtual

Set global light intensity (ParaView-style) Directly modifies the renderer's default light intensity.

Parameters
intensityLight intensity (0.0-1.0, default 1.0)

Reimplemented from ecvDisplayTools.

Definition at line 1351 of file PCLDisplayTools.cpp.

References m_visualizer3D, and CVLog::Warning().

◆ setLookUpTableID()

virtual void PCLDisplayTools::setLookUpTableID ( const std::string &  viewID)
inlineoverridevirtual

Set the ID of a cloud or shape to be used for LUT display.

Parameters
[in]idThe id of the cloud/shape look up table to be displayed The look up table is displayed by pressing 'u' in the PCLVisualizer

Reimplemented from ecvDisplayTools.

Definition at line 405 of file PCLDisplayTools.h.

◆ setOrthoProjection()

virtual void PCLDisplayTools::setOrthoProjection ( int  viewport = 0)
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 334 of file PCLDisplayTools.h.

◆ setParallelScale()

void PCLDisplayTools::setParallelScale ( double  scale,
int  viewport = 0 
)
overridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 1169 of file PCLDisplayTools.cpp.

References m_visualizer3D.

◆ setPerspectiveProjection()

virtual void PCLDisplayTools::setPerspectiveProjection ( int  viewport = 0)
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 340 of file PCLDisplayTools.h.

◆ setPivotVisibility()

virtual void PCLDisplayTools::setPivotVisibility ( bool  state)
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 234 of file PCLDisplayTools.h.

◆ setRenderWindowSize()

virtual void PCLDisplayTools::setRenderWindowSize ( int  xw,
int  yw 
)
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 325 of file PCLDisplayTools.h.

◆ setScaleBarVisible()

virtual void PCLDisplayTools::setScaleBarVisible ( bool  visible)
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 433 of file PCLDisplayTools.h.

◆ setUseVbos()

virtual void PCLDisplayTools::setUseVbos ( bool  useVbos)
inlineoverridevirtual

Use Vertex Buffer Objects renderers. This is an optimization for the obsolete OpenGL backend. Modern OpenGL2 backend (VTK6.3) uses vertex buffer objects by default, transparently for the user.

Parameters
[in]use_vbosset to true to use VBOs

Reimplemented from ecvDisplayTools.

Definition at line 398 of file PCLDisplayTools.h.

◆ setViewMatrix()

void PCLDisplayTools::setViewMatrix ( const ccGLMatrixd viewMat,
int  viewport = 0 
)
overridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 1221 of file PCLDisplayTools.cpp.

References m_visualizer3D.

◆ showOrientationMarker()

virtual void PCLDisplayTools::showOrientationMarker ( )
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 144 of file PCLDisplayTools.h.

◆ toDisplayPoint() [1/2]

virtual void PCLDisplayTools::toDisplayPoint ( const CCVector3 worldPos,
CCVector3d displayPos 
)
inlineoverridevirtual

Reimplemented from ecvGenericDisplayTools.

Definition at line 76 of file PCLDisplayTools.h.

◆ toDisplayPoint() [2/2]

virtual void PCLDisplayTools::toDisplayPoint ( const CCVector3d worldPos,
CCVector3d displayPos 
)
inlineoverridevirtual

Reimplemented from ecvGenericDisplayTools.

Definition at line 72 of file PCLDisplayTools.h.

◆ toggle2Dviewer()

void PCLDisplayTools::toggle2Dviewer ( bool  state)
overridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 1109 of file PCLDisplayTools.cpp.

References m_visualizer2D.

◆ ToggleCameraOrientationWidget()

void PCLDisplayTools::ToggleCameraOrientationWidget ( bool  show)

Toggle Camera Orientation Widget visibility (ParaView-style)

Parameters
showtrue to show, false to hide

Definition at line 1323 of file PCLDisplayTools.cpp.

References m_visualizer3D, and CVLog::Warning().

Referenced by toggleCameraOrientationWidget().

◆ toggleCameraOrientationWidget()

void PCLDisplayTools::toggleCameraOrientationWidget ( bool  show)
overridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 1343 of file PCLDisplayTools.cpp.

References ToggleCameraOrientationWidget().

◆ toggleOrientationMarker()

void PCLDisplayTools::toggleOrientationMarker ( bool  state)
overridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 763 of file PCLDisplayTools.cpp.

References m_visualizer3D.

◆ toWorldPoint() [1/2]

virtual void PCLDisplayTools::toWorldPoint ( const CCVector3 input2D,
CCVector3d output3D 
)
inlineoverridevirtual

Reimplemented from ecvGenericDisplayTools.

Definition at line 67 of file PCLDisplayTools.h.

◆ toWorldPoint() [2/2]

virtual void PCLDisplayTools::toWorldPoint ( const CCVector3d input2D,
CCVector3d output3D 
)
inlineoverridevirtual

Reimplemented from ecvGenericDisplayTools.

Definition at line 63 of file PCLDisplayTools.h.

◆ transformCameraProjection()

void PCLDisplayTools::transformCameraProjection ( const ccGLMatrixd projMat)
overridevirtual

◆ transformCameraView()

void PCLDisplayTools::transformCameraView ( const ccGLMatrixd viewMat)
overridevirtual

◆ updateCamera()

virtual void PCLDisplayTools::updateCamera ( )
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 170 of file PCLDisplayTools.h.

◆ updateMeshTextures()

void PCLDisplayTools::updateMeshTextures ( const CC_DRAW_CONTEXT context,
const ccGenericMesh mesh 
)
overridevirtual

◆ updateScene()

virtual void PCLDisplayTools::updateScene ( )
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 189 of file PCLDisplayTools.h.

◆ zoomCamera()

virtual void PCLDisplayTools::zoomCamera ( double  zoomFactor,
int  viewport = 0 
)
inlineoverridevirtual

Reimplemented from ecvDisplayTools.

Definition at line 254 of file PCLDisplayTools.h.

Member Data Documentation

◆ m_visualizer2D

PclUtils::ImageVisPtr PCLDisplayTools::m_visualizer2D = nullptr
protected

◆ m_visualizer3D

◆ m_vtkWidget

QVTKWidgetCustom* PCLDisplayTools::m_vtkWidget = nullptr
protected

Definition at line 543 of file PCLDisplayTools.h.

Referenced by registerVisualizer(), and ~PCLDisplayTools().


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