ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
NumpyCloud Class Reference
Inheritance diagram for NumpyCloud:
Collaboration diagram for NumpyCloud:

Public Member Functions

 NumpyCloud (const py::array &array)
 
const CCVector3getPoint (unsigned int index) const override
 
void getPoint (unsigned int index, CCVector3 &P) const override
 
unsigned int size () const override
 Returns the number of points. More...
 
void forEach (genericPointAction action) override
 Fast iteration mechanism. More...
 
void getBoundingBox (CCVector3 &bbMin, CCVector3 &bbMax) override
 Returns the cloud bounding box. More...
 
void placeIteratorAtBeginning () override
 Sets the cloud iterator at the beginning. More...
 
const CCVector3getNextPoint () override
 Returns the next point (relatively to the global iterator position) More...
 
bool enableScalarField () override
 Enables the scalar field associated to the cloud. More...
 
bool isScalarFieldEnabled () const override
 Returns true if the scalar field is enabled, false otherwise. More...
 
void setPointScalarValue (unsigned int pointIndex, ScalarType value) override
 
ScalarType getPointScalarValue (unsigned int pointIndex) const override
 
- Public Member Functions inherited from cloudViewer::GenericIndexedCloud
 ~GenericIndexedCloud () override=default
 Default destructor. More...
 
virtual const CCVector3getPoint (unsigned index) const =0
 Returns the ith point. More...
 
virtual void getPoint (unsigned index, CCVector3 &P) const =0
 Returns the ith point. More...
 
virtual void getPoint (unsigned index, double P[3]) const
 
virtual bool normalsAvailable () const
 Returns whether normals are available. More...
 
virtual const CCVector3getNormal (unsigned index) const
 If per-point normals are available, returns the one at a specific index. More...
 
- Public Member Functions inherited from cloudViewer::GenericCloud
 GenericCloud ()=default
 Default constructor. More...
 
virtual ~GenericCloud ()=default
 Default destructor. More...
 
virtual bool hasPoints () const
 
virtual unsigned char testVisibility (const CCVector3 &P) const
 
virtual void setPointScalarValue (unsigned pointIndex, ScalarType value)=0
 Sets the ith point associated scalar value. More...
 
virtual ScalarType getPointScalarValue (unsigned pointIndex) const =0
 Returns the ith point associated scalar value. More...
 

Additional Inherited Members

- Public Types inherited from cloudViewer::GenericCloud
using genericPointAction = std::function< void(const CCVector3 &, ScalarType &)>
 Generic function applied to a point (used by foreach) More...
 

Detailed Description

Definition at line 131 of file cccorelib.cpp.

Constructor & Destructor Documentation

◆ NumpyCloud()

NumpyCloud::NumpyCloud ( const py::array &  array)
inlineexplicit

Definition at line 134 of file cccorelib.cpp.

Member Function Documentation

◆ enableScalarField()

bool NumpyCloud::enableScalarField ( )
inlineoverridevirtual

Enables the scalar field associated to the cloud.

If the scalar field structure is not yet initialized/allocated, this method gives the signal for its creation. Otherwise, if possible the structure size should be pre-reserved with the same number of elements as the point cloud.

Implements cloudViewer::GenericCloud.

Definition at line 240 of file cccorelib.cpp.

◆ forEach()

void NumpyCloud::forEach ( genericPointAction  action)
inlineoverridevirtual

Fast iteration mechanism.

Virtual method to apply a function to the whole cloud

Parameters
actionthe function to apply (see GenericCloud::genericPointAction)

Implements cloudViewer::GenericCloud.

Definition at line 204 of file cccorelib.cpp.

References size, Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.

◆ getBoundingBox()

void NumpyCloud::getBoundingBox ( CCVector3 bbMin,
CCVector3 bbMax 
)
inlineoverridevirtual

Returns the cloud bounding box.

Virtual method to request the cloud bounding box limits

Parameters
bbMinlower bounding-box limits (Xmin,Ymin,Zmin)
bbMaxhigher bounding-box limits (Xmax,Ymax,Zmax)

Implements cloudViewer::GenericCloud.

Definition at line 221 of file cccorelib.cpp.

References max(), min(), Tuple3Tpl< Type >::x, point::x, Tuple3Tpl< Type >::y, point::y, and Tuple3Tpl< Type >::z.

◆ getNextPoint()

const CCVector3* NumpyCloud::getNextPoint ( )
inlineoverridevirtual

Returns the next point (relatively to the global iterator position)

Virtual method to handle the cloud global iterator. Global iterator position should be increased by one each time this method is called. Warning:

  • the returned object may not be persistent!
  • THIS METHOD MAY NOT BE COMPATIBLE WITH PARALLEL STRATEGIES (see the DgmOctree::executeFunctionForAllCellsAtLevel_MT and DgmOctree::executeFunctionForAllCellsAtStartingLevel_MT methods).
    Returns
    pointer on next point (or 0 if no more)

Implements cloudViewer::GenericCloud.

Definition at line 236 of file cccorelib.cpp.

◆ getPoint() [1/2]

const CCVector3* NumpyCloud::getPoint ( unsigned int  index) const
inlineoverride

Definition at line 184 of file cccorelib.cpp.

References Tuple3Tpl< Type >::x.

◆ getPoint() [2/2]

void NumpyCloud::getPoint ( unsigned int  index,
CCVector3 P 
) const
inlineoverride

Definition at line 191 of file cccorelib.cpp.

References Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.

◆ getPointScalarValue()

ScalarType NumpyCloud::getPointScalarValue ( unsigned int  pointIndex) const
inlineoverride

Definition at line 249 of file cccorelib.cpp.

◆ isScalarFieldEnabled()

bool NumpyCloud::isScalarFieldEnabled ( ) const
inlineoverridevirtual

Returns true if the scalar field is enabled, false otherwise.

Implements cloudViewer::GenericCloud.

Definition at line 244 of file cccorelib.cpp.

◆ placeIteratorAtBeginning()

void NumpyCloud::placeIteratorAtBeginning ( )
inlineoverridevirtual

Sets the cloud iterator at the beginning.

Virtual method to handle the cloud global iterator

Implements cloudViewer::GenericCloud.

Definition at line 235 of file cccorelib.cpp.

◆ setPointScalarValue()

void NumpyCloud::setPointScalarValue ( unsigned int  pointIndex,
ScalarType  value 
)
inlineoverride

Definition at line 248 of file cccorelib.cpp.

◆ size()

unsigned int NumpyCloud::size ( ) const
inlineoverridevirtual

Returns the number of points.

Virtual method to request the cloud size

Returns
the cloud size

Implements cloudViewer::GenericCloud.

Definition at line 197 of file cccorelib.cpp.

References max(), and min().


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