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

Useful class to (try to) statically cast a basic ccHObject to a given type. More...

#include <ecvHObjectCaster.h>

Static Public Member Functions

static ccPointCloudToPointCloud (ccHObject *obj, bool *isLockedVertices=nullptr)
 Converts current object to 'equivalent' ccPointCloud. More...
 
static ccGenericPointCloudToGenericPointCloud (ccHObject *obj, bool *isLockedVertices=nullptr)
 Converts current object to 'equivalent' ccGenericPointCloud. More...
 
static ccShiftedObjectToShifted (ccHObject *obj, bool *isLockedVertices=nullptr)
 Converts current object to 'equivalent' ccShiftedObject. More...
 
static ccGenericMeshToGenericMesh (ccHObject *obj)
 Converts current object to ccGenericMesh (if possible) More...
 
static ccMeshToMesh (ccHObject *obj)
 Converts current object to ccMesh (if possible) More...
 
static ccSubMeshToSubMesh (ccHObject *obj)
 Converts current object to ccSubMesh (if possible) More...
 
static ccPolylineToPolyline (ccHObject *obj)
 Converts current object to ccPolyline (if possible) More...
 
static ccCircleToCircle (ccHObject *obj)
 Converts current object to ccCircle (if possible) More...
 
static ccFacetToFacet (ccHObject *obj)
 Converts current object to ccFacet (if possible) More...
 
static ccPlanarEntityInterfaceToPlanarEntity (ccHObject *obj)
 Converts current object to ccPlanarEntityInterface (if possible) More...
 
static ccGenericPrimitiveToPrimitive (ccHObject *obj)
 Converts current object to ccGenericPrimitive (if possible) More...
 
static ccSphereToSphere (ccHObject *obj)
 Converts current object to ccSphere (if possible) More...
 
static ccCylinderToCylinder (ccHObject *obj)
 Converts current object to ccCylinder (if possible) More...
 
static ccConeToCone (ccHObject *obj)
 Converts current object to ccCone (if possible) More...
 
static ccPlaneToPlane (ccHObject *obj)
 Converts current object to ccPlane (if possible) More...
 
static ccQuadricToQuadric (ccHObject *obj)
 Converts current object to ccQuadric (if possible) More...
 
static ccBoxToBox (ccHObject *obj)
 Converts current object to ccBox (if possible) More...
 
static ccDiscToDisc (ccHObject *obj)
 Converts current object to ccDisc (if possible) More...
 
static ccDishToDish (ccHObject *obj)
 Converts current object to ccDish (if possible) More...
 
static ccExtruToExtru (ccHObject *obj)
 Converts current object to ccExtru (if possible) More...
 
static ccTorusToTorus (ccHObject *obj)
 Converts current object to ccTorus (if possible) More...
 
static ccOctreeProxyToOctreeProxy (ccHObject *obj)
 Converts current object to ccOctreeProxy (if possible) More...
 
static ccOctreeToOctree (ccHObject *obj)
 Converts current object to ccOctree (if possible) More...
 
static ccKdTreeToKdTree (ccHObject *obj)
 Converts current object to ccKdTree (if possible) More...
 
static ccSensorToSensor (ccHObject *obj)
 Converts current object to ccSensor (if possible) More...
 
static ccGBLSensorToGBLSensor (ccHObject *obj)
 
static ccCameraSensorToCameraSensor (ccHObject *obj)
 
static ccImageToImage (ccHObject *obj)
 
static cc2DLabelTo2DLabel (ccHObject *obj)
 Converts current object to cc2DLabel (if possible) More...
 
static cc2DViewportLabelTo2DViewportLabel (ccHObject *obj)
 Converts current object to cc2DViewportLabel (if possible) More...
 
static cc2DViewportObjectTo2DViewportObject (ccHObject *obj)
 Converts current object to cc2DViewportObject (if possible) More...
 
static ccIndexedTransformationBufferToTransBuffer (ccHObject *obj)
 Converts current object to ccIndexedTransformationBuffer (if possible) More...
 
static cloudViewer::geometry::ImageToImage2 (ccHObject *obj)
 
static cloudViewer::geometry::RGBDImageToRGBDImage (ccHObject *obj)
 
static cloudViewer::geometry::VoxelGridToVoxelGrid (ccHObject *obj)
 
static cloudViewer::geometry::LineSetToLineSet (ccHObject *obj)
 
static cloudViewer::geometry::OctreeToOctree2 (ccHObject *obj)
 
static ccBBoxToBBox (ccHObject *obj)
 
static ecvOrientedBBoxToOrientedBBox (ccHObject *obj)
 
static ccCoordinateSystemToCoordinateSystem (ccHObject *obj)
 Converts current object to ccCoordinateSystem (if possible) More...
 
static bool CloneChildren (const ccHObject *sourceEntity, ccHObject *destEntity, std::vector< int > *newPointOrTriangleIndex=nullptr, const ccHObject *sourceEntityProxy=nullptr, ccHObject *destEntityProxy=nullptr)
 

Detailed Description

Useful class to (try to) statically cast a basic ccHObject to a given type.

Definition at line 63 of file ecvHObjectCaster.h.

Member Function Documentation

◆ CloneChildren()

static bool ccHObjectCaster::CloneChildren ( const ccHObject sourceEntity,
ccHObject destEntity,
std::vector< int > *  newPointOrTriangleIndex = nullptr,
const ccHObject sourceEntityProxy = nullptr,
ccHObject destEntityProxy = nullptr 
)
static

Helper: clones the children of sourceEntity and set the resulting entities as children of destEntity

Warning
: Not all children can be cloned this way. Only simple ones for now (labels, sensors, images, etc.).
Parameters
sourceEntitysource entity
destEntitydestination entity (can be the same as the source entity)
newPointOrTriangleIndexoptional: provides a mapping of the entity elements (points or triangles) between the source and the destination (-1 means no correspondance)
sourceEntityProxyfor internal use
destEntityProxyfor internal use
    \return success

◆ To2DLabel()

◆ To2DViewportLabel()

static cc2DViewportLabel* ccHObjectCaster::To2DViewportLabel ( ccHObject obj)
static

Converts current object to cc2DViewportLabel (if possible)

Referenced by cloudViewer::geometry::pybind_geometry_classes(), and ccDBRoot::setData().

◆ To2DViewportObject()

static cc2DViewportObject* ccHObjectCaster::To2DViewportObject ( ccHObject obj)
static

◆ ToBBox()

static ccBBox* ccHObjectCaster::ToBBox ( ccHObject obj)
static

◆ ToBox()

static ccBox* ccHObjectCaster::ToBox ( ccHObject obj)
static

Converts current object to ccBox (if possible)

Referenced by cloudViewer::geometry::pybind_geometry_classes().

◆ ToCameraSensor()

◆ ToCircle()

static ccCircle* ccHObjectCaster::ToCircle ( ccHObject obj)
static

Converts current object to ccCircle (if possible)

Referenced by ccPropertiesTreeDelegate::setEditorData().

◆ ToCone()

static ccCone* ccHObjectCaster::ToCone ( ccHObject obj)
static

Converts current object to ccCone (if possible)

Referenced by cloudViewer::geometry::pybind_geometry_classes(), and ccPropertiesTreeDelegate::setEditorData().

◆ ToCoordinateSystem()

static ccCoordinateSystem* ccHObjectCaster::ToCoordinateSystem ( ccHObject obj)
static

◆ ToCylinder()

static ccCylinder* ccHObjectCaster::ToCylinder ( ccHObject obj)
static

Converts current object to ccCylinder (if possible)

Referenced by cloudViewer::geometry::pybind_geometry_classes().

◆ ToDisc()

static ccDisc* ccHObjectCaster::ToDisc ( ccHObject obj)
static

Converts current object to ccDisc (if possible)

Referenced by ccPropertiesTreeDelegate::setEditorData().

◆ ToDish()

static ccDish* ccHObjectCaster::ToDish ( ccHObject obj)
static

Converts current object to ccDish (if possible)

Referenced by cloudViewer::geometry::pybind_geometry_classes().

◆ ToExtru()

static ccExtru* ccHObjectCaster::ToExtru ( ccHObject obj)
static

Converts current object to ccExtru (if possible)

Referenced by cloudViewer::geometry::pybind_geometry_classes().

◆ ToFacet()

static ccFacet* ccHObjectCaster::ToFacet ( ccHObject obj)
static

◆ ToGBLSensor()

◆ ToGenericMesh()

◆ ToGenericPointCloud()

◆ ToImage()

◆ ToImage2()

static cloudViewer::geometry::Image* ccHObjectCaster::ToImage2 ( ccHObject obj)
static

◆ ToKdTree()

static ccKdTree* ccHObjectCaster::ToKdTree ( ccHObject obj)
static

Converts current object to ccKdTree (if possible)

Referenced by ccPropertiesTreeDelegate::fillModel(), and cloudViewer::geometry::pybind_geometry_classes().

◆ ToLineSet()

static cloudViewer::geometry::LineSet* ccHObjectCaster::ToLineSet ( ccHObject obj)
static

◆ ToMesh()

◆ ToOctree()

static ccOctree* ccHObjectCaster::ToOctree ( ccHObject obj)
static

Converts current object to ccOctree (if possible)

Referenced by ccPropertiesTreeDelegate::fillModel(), and ccPropertiesTreeDelegate::setEditorData().

◆ ToOctree2()

static cloudViewer::geometry::Octree* ccHObjectCaster::ToOctree2 ( ccHObject obj)
static

◆ ToOctreeProxy()

static ccOctreeProxy* ccHObjectCaster::ToOctreeProxy ( ccHObject obj)
static

Converts current object to ccOctreeProxy (if possible)

Referenced by cloudViewer::geometry::pybind_geometry_classes().

◆ ToOrientedBBox()

static ecvOrientedBBox* ccHObjectCaster::ToOrientedBBox ( ccHObject obj)
static

◆ ToPlanarEntity()

static ccPlanarEntityInterface* ccHObjectCaster::ToPlanarEntity ( ccHObject obj)
static

Converts current object to ccPlanarEntityInterface (if possible)

◆ ToPlane()

static ccPlane* ccHObjectCaster::ToPlane ( ccHObject obj)
static

Converts current object to ccPlane (if possible)

Referenced by cloudViewer::geometry::pybind_geometry_classes().

◆ ToPointCloud()

static ccPointCloud* ccHObjectCaster::ToPointCloud ( ccHObject obj,
bool *  isLockedVertices = nullptr 
)
static

Converts current object to 'equivalent' ccPointCloud.

Warning: if a mesh is passed, this method returns its vertices.

Parameters
objccHObject to dynamically cast to a ccPointCloud object
isLockedVerticesthe caller can be warned if the returned cloud corresponds to locked vertices

Referenced by ccEntityAction::changeColorLevels(), ccEntityAction::computeStatParams(), ccEntityAction::ConvexHull(), G3Point::G3PointAction::createAction(), ccPropertiesTreeDelegate::createEditor(), ccEntityAction::DBScanCluster(), qPCV::doAction(), ccEntityAction::enhanceRGBWithIntensities(), ccEntityAction::exportCoordToSF(), ccEntityAction::exportNormalToSF(), qFacets::extractFacets(), cloudViewer::pipelines::integration::UniformTSDFVolume::ExtractTriangleMesh(), ccPropertiesTreeDelegate::fillSFWithPointCloud(), ccLibAlgorithms::GetDefaultCloudKernelSize(), FastGlobalRegistrationFilter::getParametersFromDialog(), ccDBRoot::getSelectedEntities(), BasePclModule::getSelectedEntityAsCCPointCloud(), ccRegistrationTools::ICP(), ccEntityAction::importToSF(), ccEntityAction::interpolateSFs(), ccEntityAction::invertNormals(), ccColorLevelsDlg::onApply(), BasePclModule::performAction(), CommandExtractVertices::process(), CommandColorBanding::process(), CommandSFArithmetic::process(), CommandSFOperation::process(), CommandSFRename::process(), CommandICP::process(), CommandM3C2::process(), CommandRANSAC::process(), PCVCommand::Process(), cloudViewer::geometry::pybind_geometry_classes(), cloudViewer::geometry::pybind_trianglemesh(), ccEntityAction::RansacSegmentation(), cloudViewer::io::ReadTriangleMeshFromOBJ(), cloudViewer::io::ReadTriangleMeshFromPLY(), ccEntityAction::rgbGaussianFilter(), PcdFilter::saveToFile(), SimpleBinFilter::saveToFile(), LASFWFFilter::saveToFile(), ccPropertiesTreeDelegate::setEditorData(), cloudViewer::pipelines::color_map::SetGeometryColorAverage(), cloudViewer::io::rpc::SetTriangleMesh(), ccEntityAction::sfAddIdField(), ccEntityAction::sfArithmetic(), ccEntityAction::sfConvertToRandomRGB(), ccEntityAction::sfConvertToRGB(), ccEntityAction::sfFromColor(), ccEntityAction::sfGaussianFilter(), ccEntityAction::sfRename(), ecvPoissonReconDlg::start(), ecvAnnotationsTool::start(), ccEntityAction::statisticalTest(), cloudViewer::visualization::VisualizerWithVertexSelection::UpdateGeometry(), and ccEntityAction::VoxelSampling().

◆ ToPolyline()

◆ ToPrimitive()

static ccGenericPrimitive* ccHObjectCaster::ToPrimitive ( ccHObject obj)
static

◆ ToQuadric()

static ccQuadric* ccHObjectCaster::ToQuadric ( ccHObject obj)
static

Converts current object to ccQuadric (if possible)

Referenced by cloudViewer::geometry::pybind_geometry_classes().

◆ ToRGBDImage()

static cloudViewer::geometry::RGBDImage* ccHObjectCaster::ToRGBDImage ( ccHObject obj)
static

◆ ToSensor()

◆ ToShifted()

static ccShiftedObject* ccHObjectCaster::ToShifted ( ccHObject obj,
bool *  isLockedVertices = nullptr 
)
static

◆ ToSphere()

static ccSphere* ccHObjectCaster::ToSphere ( ccHObject obj)
static

Converts current object to ccSphere (if possible)

Referenced by cloudViewer::geometry::pybind_geometry_classes(), and ccPropertiesTreeDelegate::setEditorData().

◆ ToSubMesh()

static ccSubMesh* ccHObjectCaster::ToSubMesh ( ccHObject obj)
static

Converts current object to ccSubMesh (if possible)

Referenced by ecvFilterByLabelDlg::apply(), and cloudViewer::geometry::pybind_geometry_classes().

◆ ToTorus()

static ccTorus* ccHObjectCaster::ToTorus ( ccHObject obj)
static

Converts current object to ccTorus (if possible)

Referenced by cloudViewer::geometry::pybind_geometry_classes().

◆ ToTransBuffer()

static ccIndexedTransformationBuffer* ccHObjectCaster::ToTransBuffer ( ccHObject obj)
static

◆ ToVoxelGrid()

static cloudViewer::geometry::VoxelGrid* ccHObjectCaster::ToVoxelGrid ( ccHObject obj)
static

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