ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
wrappers.h File Reference
#include <CVShareable.h>
#include <CVTypes.h>
#include <PointCloudTpl.h>
#include <pybind11/numpy.h>
#include <pybind11/pybind11.h>
#include <stdexcept>
#include <type_traits>
Include dependency graph for wrappers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CCShareableHolder< T >
 

Namespaces

 PyCC
 

Macros

#define DEFINE_POINTCLOUDTPL(T, module, name)
 

Typedefs

template<class T >
using observer_ptr = std::unique_ptr< T, py::nodelete >
 A unique_ptr that never free its ptr. More...
 

Functions

 PYBIND11_DECLARE_HOLDER_TYPE (T, CCShareableHolder< T >)
 
void PyCC::NoOpDelete (void *)
 
template<class T >
py::array_t< T > PyCC::SpanAsNumpyArray (T *data, py::array::ShapeContainer shape)
 
template<class T >
py::array_t< T > PyCC::SpanAsNumpyArray (T *data, size_t len)
 
template<class T >
py::array_t< T > PyCC::VectorAsNumpyArray (std::vector< T > &vector)
 
template<class PointCloudType >
void PyCC::addPointsFromArrays (PointCloudType &self, py::array_t< PointCoordinateType > &xs, py::array_t< PointCoordinateType > &ys, py::array_t< PointCoordinateType > &zs)
 

Variables

static constexpr const char ADD_SCALAR_FIELD_DOCSTRING []
 
static constexpr const char SIZE_SCALAR_FIELD_DOCSTRING []
 

Macro Definition Documentation

◆ DEFINE_POINTCLOUDTPL

#define DEFINE_POINTCLOUDTPL (   T,
  module,
  name 
)

Definition at line 155 of file wrappers.h.

Typedef Documentation

◆ observer_ptr

template<class T >
using observer_ptr = std::unique_ptr<T, py::nodelete>

A unique_ptr that never free its ptr.

Definition at line 24 of file wrappers.h.

Function Documentation

◆ PYBIND11_DECLARE_HOLDER_TYPE()

PYBIND11_DECLARE_HOLDER_TYPE ( ,
CCShareableHolder< T >   
)

Variable Documentation

◆ ADD_SCALAR_FIELD_DOCSTRING

constexpr const char ADD_SCALAR_FIELD_DOCSTRING[]
staticconstexpr
Initial value:
= R"doc(
Adds a scalar field with the given name to the point cloud.
Parameters
----------
name: str
name of the scalar field that will be added.
values: optional, numpy.array, list of float
values to use when initializing the new scalar field
Raises
------
RuntimeError if the point cloud already has a scalar field with the given ``name``
ValueError if values are provided don't have the same length (size) as the point cloud
)doc"

Definition at line 127 of file wrappers.h.

◆ SIZE_SCALAR_FIELD_DOCSTRING

constexpr const char SIZE_SCALAR_FIELD_DOCSTRING[]
staticconstexpr
Initial value:
= R"doc(
Returns the size (number of points) in the point cloud.
``len`` also works as an alias to size.
.. code:: Python
pc = pycc.ccPointCloud("name")
assert len(pc) == pc.size()
)doc"

Definition at line 144 of file wrappers.h.