ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cloudViewer::visualization::rendering::CloudViewerScene Class Reference

#include <CloudViewerScene.h>

Public Types

enum class  LightingProfile {
  HARD_SHADOWS , DARK_SHADOWS , MED_SHADOWS , SOFT_SHADOWS ,
  NO_SHADOWS
}
 
enum class  LOD { HIGH_DETAIL , FAST }
 

Public Member Functions

 CloudViewerScene (Renderer &renderer)
 
 ~CloudViewerScene ()
 
View * GetView () const
 
ViewHandle GetViewId () const
 
void SetViewport (std::int32_t x, std::int32_t y, std::uint32_t width, std::uint32_t height)
 
void ShowSkybox (bool enable)
 
void ShowAxes (bool enable)
 
void SetBackground (const Eigen::Vector4f &color, std::shared_ptr< geometry::Image > image=nullptr)
 
const Eigen::Vector4f GetBackgroundColor () const
 
void ShowGroundPlane (bool enable, Scene::GroundPlane plane)
 
void SetLighting (LightingProfile profile, const Eigen::Vector3f &sun_dir)
 
void SetDownsampleThreshold (size_t n_points)
 
size_t GetDownsampleThreshold () const
 
void ClearGeometry ()
 
void AddGeometry (const std::string &name, const ccHObject *geom, const MaterialRecord &mat, bool add_downsampled_copy_for_fast_rendering=true)
 Adds a geometry with the specified name. Default visible is true. More...
 
void AddGeometry (const std::string &name, const t::geometry::Geometry *geom, const MaterialRecord &mat, bool add_downsampled_copy_for_fast_rendering=true)
 
bool HasGeometry (const std::string &name) const
 
void RemoveGeometry (const std::string &name)
 
void ShowGeometry (const std::string &name, bool show)
 Shows or hides the geometry with the specified name. More...
 
bool GeometryIsVisible (const std::string &name)
 
void SetGeometryTransform (const std::string &name, const Eigen::Matrix4d &transform)
 
Eigen::Matrix4d GetGeometryTransform (const std::string &name)
 
void ModifyGeometryMaterial (const std::string &name, const MaterialRecord &mat)
 
void AddModel (const std::string &name, const TriangleMeshModel &model)
 
void UpdateMaterial (const MaterialRecord &mat)
 Updates all geometries to use this material. More...
 
void UpdateModelMaterial (const std::string &name, const TriangleMeshModel &model)
 Updates the named model to use this material. More...
 
std::vector< std::string > GetGeometries ()
 
const ccBBox & GetBoundingBox ()
 
void SetLOD (LOD lod)
 
LOD GetLOD () const
 
Scene * GetScene () const
 
Camera * GetCamera () const
 
Renderer & GetRenderer () const
 

Detailed Description

Definition at line 39 of file CloudViewerScene.h.

Member Enumeration Documentation

◆ LightingProfile

Enumerator
HARD_SHADOWS 
DARK_SHADOWS 
MED_SHADOWS 
SOFT_SHADOWS 
NO_SHADOWS 

Definition at line 58 of file CloudViewerScene.h.

◆ LOD

Enumerator
HIGH_DETAIL 
FAST 

Definition at line 111 of file CloudViewerScene.h.

Constructor & Destructor Documentation

◆ CloudViewerScene()

cloudViewer::visualization::rendering::CloudViewerScene::CloudViewerScene ( Renderer &  renderer)

◆ ~CloudViewerScene()

Member Function Documentation

◆ AddGeometry() [1/2]

void cloudViewer::visualization::rendering::CloudViewerScene::AddGeometry ( const std::string &  name,
const ccHObject *  geom,
const MaterialRecord &  mat,
bool  add_downsampled_copy_for_fast_rendering = true 
)

Adds a geometry with the specified name. Default visible is true.

Definition at line 233 of file CloudViewerScene.cpp.

References cloudViewer::visualization::rendering::Renderer::GetScene(), cloudViewer::visualization::rendering::kFastModelObjectSuffix(), and name.

◆ AddGeometry() [2/2]

◆ AddModel()

void cloudViewer::visualization::rendering::CloudViewerScene::AddModel ( const std::string &  name,
const TriangleMeshModel &  model 
)

◆ ClearGeometry()

void cloudViewer::visualization::rendering::CloudViewerScene::ClearGeometry ( )

◆ GeometryIsVisible()

bool cloudViewer::visualization::rendering::CloudViewerScene::GeometryIsVisible ( const std::string &  name)

◆ GetBackgroundColor()

const Eigen::Vector4f cloudViewer::visualization::rendering::CloudViewerScene::GetBackgroundColor ( ) const

Definition at line 158 of file CloudViewerScene.cpp.

◆ GetBoundingBox()

const ccBBox& cloudViewer::visualization::rendering::CloudViewerScene::GetBoundingBox ( )
inline

Definition at line 109 of file CloudViewerScene.h.

◆ GetCamera()

◆ GetDownsampleThreshold()

size_t cloudViewer::visualization::rendering::CloudViewerScene::GetDownsampleThreshold ( ) const
inline

Definition at line 74 of file CloudViewerScene.h.

◆ GetGeometries()

std::vector< std::string > cloudViewer::visualization::rendering::CloudViewerScene::GetGeometries ( )

◆ GetGeometryTransform()

Eigen::Matrix4d cloudViewer::visualization::rendering::CloudViewerScene::GetGeometryTransform ( const std::string &  name)

◆ GetLOD()

CloudViewerScene::LOD cloudViewer::visualization::rendering::CloudViewerScene::GetLOD ( ) const

Definition at line 466 of file CloudViewerScene.cpp.

◆ GetRenderer()

Renderer & cloudViewer::visualization::rendering::CloudViewerScene::GetRenderer ( ) const

◆ GetScene()

◆ GetView()

View * cloudViewer::visualization::rendering::CloudViewerScene::GetView ( ) const

◆ GetViewId()

ViewHandle cloudViewer::visualization::rendering::CloudViewerScene::GetViewId ( ) const
inline

Definition at line 45 of file CloudViewerScene.h.

◆ HasGeometry()

bool cloudViewer::visualization::rendering::CloudViewerScene::HasGeometry ( const std::string &  name) const

◆ ModifyGeometryMaterial()

void cloudViewer::visualization::rendering::CloudViewerScene::ModifyGeometryMaterial ( const std::string &  name,
const MaterialRecord &  mat 
)

◆ RemoveGeometry()

void cloudViewer::visualization::rendering::CloudViewerScene::RemoveGeometry ( const std::string &  name)

◆ SetBackground()

void cloudViewer::visualization::rendering::CloudViewerScene::SetBackground ( const Eigen::Vector4f &  color,
std::shared_ptr< geometry::Image >  image = nullptr 
)

◆ SetDownsampleThreshold()

void cloudViewer::visualization::rendering::CloudViewerScene::SetDownsampleThreshold ( size_t  n_points)
inline

Sets the maximum number of points before AddGeometry also adds a downsampled point cloud with number of points, used when rendering speed is important.

Definition at line 71 of file CloudViewerScene.h.

◆ SetGeometryTransform()

void cloudViewer::visualization::rendering::CloudViewerScene::SetGeometryTransform ( const std::string &  name,
const Eigen::Matrix4d &  transform 
)

◆ SetLighting()

◆ SetLOD()

void cloudViewer::visualization::rendering::CloudViewerScene::SetLOD ( LOD  lod)

Definition at line 427 of file CloudViewerScene.cpp.

◆ SetViewport()

void cloudViewer::visualization::rendering::CloudViewerScene::SetViewport ( std::int32_t  x,
std::int32_t  y,
std::uint32_t  width,
std::uint32_t  height 
)

Definition at line 121 of file CloudViewerScene.cpp.

References GetView(), height, and width.

◆ ShowAxes()

void cloudViewer::visualization::rendering::CloudViewerScene::ShowAxes ( bool  enable)

◆ ShowGeometry()

void cloudViewer::visualization::rendering::CloudViewerScene::ShowGeometry ( const std::string &  name,
bool  show 
)

Shows or hides the geometry with the specified name.

Definition at line 366 of file CloudViewerScene.cpp.

References name.

◆ ShowGroundPlane()

void cloudViewer::visualization::rendering::CloudViewerScene::ShowGroundPlane ( bool  enable,
Scene::GroundPlane  plane 
)

◆ ShowSkybox()

void cloudViewer::visualization::rendering::CloudViewerScene::ShowSkybox ( bool  enable)

◆ UpdateMaterial()

void cloudViewer::visualization::rendering::CloudViewerScene::UpdateMaterial ( const MaterialRecord &  mat)

◆ UpdateModelMaterial()

void cloudViewer::visualization::rendering::CloudViewerScene::UpdateModelMaterial ( const std::string &  name,
const TriangleMeshModel &  model 
)

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