![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <VisualizerWithCustomAnimation.h>


Public Member Functions | |
| VisualizerWithCustomAnimation () | |
| ~VisualizerWithCustomAnimation () override | |
| VisualizerWithCustomAnimation (const VisualizerWithCustomAnimation &)=delete | |
| VisualizerWithCustomAnimation & | operator= (const VisualizerWithCustomAnimation &)=delete |
| void | PrintVisualizerHelp () override |
| void | UpdateWindowTitle () override |
| void | Play (bool recording=false, bool recording_depth=false, bool close_window_when_animation_ends=false) |
| void | RegisterRecordingImageFormat (const std::string &basedir, const std::string &format, const std::string &trajectory) |
| void | RegisterRecordingDepthFormat (const std::string &basedir, const std::string &format, const std::string &trajectory) |
Public Member Functions inherited from cloudViewer::visualization::Visualizer | |
| Visualizer () | |
| virtual | ~Visualizer () |
| Visualizer (Visualizer &&)=delete | |
| Visualizer (const Visualizer &)=delete | |
| Visualizer & | operator= (const Visualizer &)=delete |
| bool | CreateVisualizerWindow (const std::string &window_name="CloudViewer", const int width=640, const int height=480, const int left=50, const int top=50, const bool visible=true) |
| Function to create a window and initialize GLFW. More... | |
| void | DestroyVisualizerWindow () |
| Function to destroy a window. More... | |
| void | RegisterAnimationCallback (std::function< bool(Visualizer *)> callback_func) |
| Function to register a callback function for animation. More... | |
| void | Run () |
| Function to activate the window. More... | |
| void | Close () |
| Function to to notify the window to be closed. More... | |
| bool | WaitEvents () |
| Function to process the event queue and return if the window is closed. More... | |
| bool | PollEvents () |
| virtual bool | AddGeometry (std::shared_ptr< const ccHObject > geometry_ptr, bool reset_bounding_box=true) |
| Function to add geometry to the scene and create corresponding shaders. More... | |
| virtual bool | RemoveGeometry (std::shared_ptr< const ccHObject > geometry_ptr, bool reset_bounding_box=true) |
| Function to remove geometry from the scene. More... | |
| virtual bool | ClearGeometries () |
| virtual bool | UpdateGeometry (std::shared_ptr< const ccHObject > geometry_ptr=nullptr) |
| Function to update geometry. More... | |
| virtual bool | HasGeometry () const |
| virtual void | UpdateRender () |
| Function to inform render needed to be updated. More... | |
| virtual void | SetFullScreen (bool fullscreen) |
| Functions to change between fullscreen and windowed modes. More... | |
| virtual void | ToggleFullScreen () |
| virtual bool | IsFullScreen () |
| virtual void | BuildUtilities () |
| ViewControl & | GetViewControl () |
| Function to retrieve the associated ViewControl. More... | |
| RenderOption & | GetRenderOption () |
| Function to retrieve the associated RenderOption. More... | |
| std::shared_ptr< geometry::Image > | CaptureScreenFloatBuffer (bool do_render=true) |
| Function to capture screen and store RGB in a float buffer. More... | |
| void | CaptureScreenImage (const std::string &filename="", bool do_render=true) |
| Function to capture and save a screen image. More... | |
| std::shared_ptr< geometry::Image > | CaptureDepthFloatBuffer (bool do_render=true) |
| void | CaptureDepthImage (const std::string &filename="", bool do_render=true, double depth_scale=1000.0) |
| void | CaptureDepthPointCloud (const std::string &filename="", bool do_render=true, bool convert_to_world_coordinate=false) |
| Function to capture and save local point cloud. More... | |
| void | CaptureRenderOption (const std::string &filename="") |
| void | ResetViewPoint (bool reset_bounding_box=false) |
| Function to reset view point. More... | |
| const std::string & | GetWindowName () const |
Protected Member Functions | |
| bool | InitViewControl () override |
| Function to initialize ViewControl. More... | |
| void | MouseMoveCallback (GLFWwindow *window, double x, double y) override |
| void | MouseScrollCallback (GLFWwindow *window, double x, double y) override |
| void | MouseButtonCallback (GLFWwindow *window, int button, int action, int mods) override |
| void | KeyPressCallback (GLFWwindow *window, int key, int scancode, int action, int mods) override |
Protected Member Functions inherited from cloudViewer::visualization::Visualizer | |
| virtual bool | InitOpenGL () |
| Function to initialize OpenGL. More... | |
| virtual bool | InitRenderOption () |
| Function to initialize RenderOption. More... | |
| virtual void | Render (bool render_screen=false) |
| void | CopyViewStatusToClipboard () |
| void | CopyViewStatusFromClipboard () |
| virtual void | WindowRefreshCallback (GLFWwindow *window) |
| virtual void | WindowResizeCallback (GLFWwindow *window, int w, int h) |
| virtual void | WindowCloseCallback (GLFWwindow *window) |
| Function to notify the window to be closed. More... | |
Protected Attributes | |
| std::string | recording_image_basedir_ = "image/" |
| std::string | recording_image_filename_format_ = "image_{:06d}.png" |
| std::string | recording_image_trajectory_filename_ = "image_trajectory.json" |
| std::string | recording_depth_basedir_ = "depth/" |
| std::string | recording_depth_filename_format_ = "depth_{:06d}.png" |
| std::string | recording_depth_trajectory_filename_ = "depth_trajectory.json" |
| size_t | recording_file_index_ = 0 |
Protected Attributes inherited from cloudViewer::visualization::Visualizer | |
| GLFWwindow * | window_ = nullptr |
| std::string | window_name_ = "CloudViewer" |
| std::shared_ptr< GLFWContext > | glfw_context_ = nullptr |
| Shared GLFW context. More... | |
| Eigen::Vector2i | saved_window_size_ = Eigen::Vector2i::Zero() |
| Eigen::Vector2i | saved_window_pos_ = Eigen::Vector2i::Zero() |
| std::function< bool(Visualizer *)> | animation_callback_func_ = nullptr |
| std::function< bool(Visualizer *)> | animation_callback_func_in_loop_ |
| MouseControl | mouse_control_ |
| bool | is_redraw_required_ = true |
| bool | is_initialized_ = false |
| GLuint | vao_id_ = 0 |
| GLuint | render_fbo_ = 0 |
| GLuint | render_rgb_tex_ = 0 |
| GLuint | render_depth_stencil_rbo_ = 0 |
| std::unique_ptr< ViewControl > | view_control_ptr_ |
| std::unique_ptr< RenderOption > | render_option_ptr_ |
| std::unordered_set< std::shared_ptr< const ccHObject > > | geometry_ptrs_ |
| std::unordered_set< std::shared_ptr< glsl::GeometryRenderer > > | geometry_renderer_ptrs_ |
| std::vector< std::shared_ptr< const ccHObject > > | utility_ptrs_ |
| std::vector< std::shared_ptr< glsl::GeometryRenderer > > | utility_renderer_ptrs_ |
| std::unordered_map< std::shared_ptr< glsl::GeometryRenderer >, RenderOption > | utility_renderer_opts_ |
| std::shared_ptr< ccMesh > | coordinate_frame_mesh_ptr_ |
| std::shared_ptr< glsl::CoordinateFrameRenderer > | coordinate_frame_mesh_renderer_ptr_ |
Definition at line 15 of file VisualizerWithCustomAnimation.h.
| cloudViewer::visualization::VisualizerWithCustomAnimation::VisualizerWithCustomAnimation | ( | ) |
Definition at line 22 of file VisualizerWithCustomAnimation.cpp.
|
override |
Definition at line 24 of file VisualizerWithCustomAnimation.cpp.
|
delete |
|
overrideprotectedvirtual |
Function to initialize ViewControl.
Reimplemented from cloudViewer::visualization::Visualizer.
Definition at line 151 of file VisualizerWithCustomAnimation.cpp.
References cloudViewer::visualization::Visualizer::ResetViewPoint(), and cloudViewer::visualization::Visualizer::view_control_ptr_.
|
overrideprotectedvirtual |
Reimplemented from cloudViewer::visualization::Visualizer.
Definition at line 158 of file VisualizerWithCustomAnimation.cpp.
References cloudViewer::visualization::Visualizer::is_redraw_required_, cloudViewer::visualization::Visualizer::KeyPressCallback(), LogDebug, Play(), UpdateWindowTitle(), and cloudViewer::visualization::Visualizer::view_control_ptr_.
|
overrideprotectedvirtual |
Reimplemented from cloudViewer::visualization::Visualizer.
Definition at line 286 of file VisualizerWithCustomAnimation.cpp.
References cloudViewer::visualization::Visualizer::MouseButtonCallback(), and cloudViewer::visualization::Visualizer::view_control_ptr_.
|
overrideprotectedvirtual |
Reimplemented from cloudViewer::visualization::Visualizer.
Definition at line 258 of file VisualizerWithCustomAnimation.cpp.
References cloudViewer::visualization::Visualizer::MouseMoveCallback(), and cloudViewer::visualization::Visualizer::view_control_ptr_.
|
overrideprotectedvirtual |
Reimplemented from cloudViewer::visualization::Visualizer.
Definition at line 269 of file VisualizerWithCustomAnimation.cpp.
References cloudViewer::visualization::Visualizer::is_redraw_required_, cloudViewer::visualization::Visualizer::MouseScrollCallback(), UpdateWindowTitle(), and cloudViewer::visualization::Visualizer::view_control_ptr_.
|
delete |
| void cloudViewer::visualization::VisualizerWithCustomAnimation::Play | ( | bool | recording = false, |
| bool | recording_depth = false, |
||
| bool | close_window_when_animation_ends = false |
||
| ) |
Definition at line 67 of file VisualizerWithCustomAnimation.cpp.
References cloudViewer::visualization::Visualizer::CaptureDepthImage(), cloudViewer::visualization::Visualizer::CaptureScreenImage(), cloudViewer::visualization::Visualizer::Close(), format, cloudViewer::visualization::Visualizer::is_redraw_required_, LogWarning, cloudViewer::utility::filesystem::MakeDirectoryHierarchy(), progress_bar, recording_depth_basedir_, recording_depth_filename_format_, recording_depth_trajectory_filename_, recording_file_index_, recording_image_basedir_, recording_image_filename_format_, recording_image_trajectory_filename_, cloudViewer::visualization::Visualizer::RegisterAnimationCallback(), UpdateWindowTitle(), cloudViewer::visualization::Visualizer::view_control_ptr_, and cloudViewer::io::WriteIJsonConvertible().
Referenced by KeyPressCallback(), and main().
|
overridevirtual |
Reimplemented from cloudViewer::visualization::Visualizer.
Definition at line 26 of file VisualizerWithCustomAnimation.cpp.
References LogInfo, and cloudViewer::visualization::Visualizer::PrintVisualizerHelp().
|
inline |
Definition at line 37 of file VisualizerWithCustomAnimation.h.
References format, recording_depth_basedir_, recording_depth_filename_format_, and recording_depth_trajectory_filename_.
|
inline |
Definition at line 30 of file VisualizerWithCustomAnimation.h.
References format, recording_image_basedir_, recording_image_filename_format_, and recording_image_trajectory_filename_.
|
overridevirtual |
Reimplemented from cloudViewer::visualization::Visualizer.
Definition at line 57 of file VisualizerWithCustomAnimation.cpp.
References cloudViewer::visualization::Visualizer::view_control_ptr_, cloudViewer::visualization::Visualizer::window_, and cloudViewer::visualization::Visualizer::window_name_.
Referenced by cloudViewer::visualization::DrawGeometriesWithCustomAnimation(), KeyPressCallback(), MouseScrollCallback(), and Play().
|
protected |
Definition at line 63 of file VisualizerWithCustomAnimation.h.
Referenced by Play(), and RegisterRecordingDepthFormat().
|
protected |
Definition at line 64 of file VisualizerWithCustomAnimation.h.
Referenced by Play(), and RegisterRecordingDepthFormat().
|
protected |
Definition at line 65 of file VisualizerWithCustomAnimation.h.
Referenced by Play(), and RegisterRecordingDepthFormat().
|
protected |
Definition at line 66 of file VisualizerWithCustomAnimation.h.
Referenced by Play().
|
protected |
Definition at line 60 of file VisualizerWithCustomAnimation.h.
Referenced by Play(), and RegisterRecordingImageFormat().
|
protected |
Definition at line 61 of file VisualizerWithCustomAnimation.h.
Referenced by Play(), and RegisterRecordingImageFormat().
|
protected |
Definition at line 62 of file VisualizerWithCustomAnimation.h.
Referenced by Play(), and RegisterRecordingImageFormat().