Open3D (C++ API)
Public Types | Public Member Functions | Data Fields
open3d::visualization::SelectionPolygon Class Reference

#include <SelectionPolygon.h>

Inheritance diagram for open3d::visualization::SelectionPolygon:
open3d::geometry::Geometry2D open3d::geometry::Geometry

Public Types

enum  SectionPolygonType { SectionPolygonType::Unfilled = 0, SectionPolygonType::Rectangle = 1, SectionPolygonType::Polygon = 2 }
 
- Public Types inherited from open3d::geometry::Geometry
enum  GeometryType {
  GeometryType::Unspecified = 0, GeometryType::PointCloud = 1, GeometryType::VoxelGrid = 2, GeometryType::Octree = 3,
  GeometryType::LineSet = 4, GeometryType::MeshBase = 5, GeometryType::TriangleMesh = 6, GeometryType::HalfEdgeTriangleMesh = 7,
  GeometryType::Image = 8, GeometryType::RGBDImage = 9, GeometryType::TetraMesh = 10, GeometryType::OrientedBoundingBox = 11,
  GeometryType::AxisAlignedBoundingBox = 12
}
 Specifies possible geometry types. More...
 

Public Member Functions

 SelectionPolygon ()
 
 ~SelectionPolygon () override
 
SelectionPolygonClear () override
 Clear all elements in the geometry. More...
 
bool IsEmpty () const override
 Returns true iff the geometry is empty. More...
 
Eigen::Vector2d GetMinBound () const final
 Returns min bounds for geometry coordinates. More...
 
Eigen::Vector2d GetMaxBound () const final
 Returns max bounds for geometry coordinates. More...
 
void FillPolygon (int width, int height)
 
std::shared_ptr< geometry::PointCloudCropPointCloud (const geometry::PointCloud &input, const ViewControl &view)
 
std::shared_ptr< geometry::TriangleMeshCropTriangleMesh (const geometry::TriangleMesh &input, const ViewControl &view)
 
std::shared_ptr< SelectionPolygonVolumeCreateSelectionPolygonVolume (const ViewControl &view)
 
- Public Member Functions inherited from open3d::geometry::Geometry2D
 ~Geometry2D () override
 
- Public Member Functions inherited from open3d::geometry::Geometry
virtual ~Geometry ()
 
GeometryType GetGeometryType () const
 Returns one of registered geometry types. More...
 
int Dimension () const
 Returns whether the geometry is 2D or 3D. More...
 
std::string GetName () const
 
void SetName (const std::string &name)
 

Data Fields

std::vector< Eigen::Vector2d > polygon_
 
bool is_closed_ = false
 
geometry::Image polygon_interior_mask_
 
SectionPolygonType polygon_type_ = SectionPolygonType::Unfilled
 

Additional Inherited Members

- Protected Member Functions inherited from open3d::geometry::Geometry2D
 Geometry2D (GeometryType type)
 Parameterized Constructor. More...
 
- Protected Member Functions inherited from open3d::geometry::Geometry
 Geometry (GeometryType type, int dimension)
 Parameterized Constructor. More...
 

Detailed Description

A 2D polygon used for selection on screen It is a utility class for Visualization The coordinates in SelectionPolygon are lower-left corner based (the OpenGL convention).

Member Enumeration Documentation

◆ SectionPolygonType

Enumerator
Unfilled 
Rectangle 
Polygon 

Constructor & Destructor Documentation

◆ SelectionPolygon()

open3d::visualization::SelectionPolygon::SelectionPolygon ( )
inline

◆ ~SelectionPolygon()

open3d::visualization::SelectionPolygon::~SelectionPolygon ( )
inlineoverride

Member Function Documentation

◆ Clear()

SelectionPolygon & open3d::visualization::SelectionPolygon::Clear ( )
overridevirtual

Clear all elements in the geometry.

Implements open3d::geometry::Geometry2D.

◆ CreateSelectionPolygonVolume()

std::shared_ptr< SelectionPolygonVolume > open3d::visualization::SelectionPolygon::CreateSelectionPolygonVolume ( const ViewControl view)

◆ CropPointCloud()

std::shared_ptr< geometry::PointCloud > open3d::visualization::SelectionPolygon::CropPointCloud ( const geometry::PointCloud input,
const ViewControl view 
)

◆ CropTriangleMesh()

std::shared_ptr< geometry::TriangleMesh > open3d::visualization::SelectionPolygon::CropTriangleMesh ( const geometry::TriangleMesh input,
const ViewControl view 
)

◆ FillPolygon()

void open3d::visualization::SelectionPolygon::FillPolygon ( int  width,
int  height 
)

◆ GetMaxBound()

Eigen::Vector2d open3d::visualization::SelectionPolygon::GetMaxBound ( ) const
finalvirtual

Returns max bounds for geometry coordinates.

Implements open3d::geometry::Geometry2D.

◆ GetMinBound()

Eigen::Vector2d open3d::visualization::SelectionPolygon::GetMinBound ( ) const
finalvirtual

Returns min bounds for geometry coordinates.

Implements open3d::geometry::Geometry2D.

◆ IsEmpty()

bool open3d::visualization::SelectionPolygon::IsEmpty ( ) const
overridevirtual

Returns true iff the geometry is empty.

Implements open3d::geometry::Geometry2D.

Field Documentation

◆ is_closed_

bool open3d::visualization::SelectionPolygon::is_closed_ = false

◆ polygon_

std::vector<Eigen::Vector2d> open3d::visualization::SelectionPolygon::polygon_

◆ polygon_interior_mask_

geometry::Image open3d::visualization::SelectionPolygon::polygon_interior_mask_

◆ polygon_type_

SectionPolygonType open3d::visualization::SelectionPolygon::polygon_type_ = SectionPolygonType::Unfilled

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