3es  0.7
tes::PointCloudShape Class Reference

A Shape which renders a set of points as in a point cloud. More...

#include <3espointcloudshape.h>

Inheritance diagram for tes::PointCloudShape:
tes::Shape

Public Member Functions

 PointCloudShape (const MeshResource *mesh, uint32_t id=0, uint16_t category=0, uint8_t pointSize=1)
 Construct a point cloud shape object. More...
 
 ~PointCloudShape ()
 Destructor.
 
PointCloudShapesetPointSize (uint8_t size)
 Set the desired point render size (pixels). More...
 
uint8_t pointSize () const
 Get the desired point render size (pixels). More...
 
template<typename I >
PointCloudShapesetIndices (I begin, uint32_t indexCount)
 Sets the (optional) indices for this PointCloudShape Shape. More...
 
const MeshResourcemesh () const
 Get the mesh resource containing the point data to render. More...
 
virtual bool writeCreate (PacketWriter &stream) const override
 Writes the standard create message and appends the point cloud ID (uint32_t). More...
 
virtual int writeData (PacketWriter &stream, unsigned &progressMarker) const override
 Write index data set in setIndices() if any. More...
 
virtual bool isComplex () const override
 Defines this class as a complex shape. More...
 
int enumerateResources (const Resource **resources, int capacity, int fetchOffset) const override
 Enumerates the mesh resource given on construction. More...
 
Shapeclone () const override
 Deep copy clone. More...
 
- Public Member Functions inherited from tes::Shape
 Shape (uint16_t routingId, uint32_t id=0)
 
 Shape (uint16_t routingId, uint32_t id, uint16_t category)
 Construct a box object. More...
 
uint16_t routingId () const
 
uint32_t id () const
 
ShapesetId (uint32_t id)
 
uint16_t category () const
 
ShapesetCategory (uint16_t category)
 
ShapesetWireframe (bool wire)
 Sets the wireframe flag value for this shape. More...
 
bool isWireframe () const
 Returns true if the wireframe flag is set. More...
 
ShapesetTransparent (bool transparent)
 Sets the transparent flag value for this shape. More...
 
bool isTransparent () const
 Returns true if the transparent flag is set. More...
 
ShapesetTwoSided (bool twoSided)
 Sets the two sided shader flag value for this shape. More...
 
bool isTwoSided () const
 Returns true if the two sided shader flag is set. More...
 
ShapesetFlags (uint16_t flags)
 Set the full set of ObjectFlag values. More...
 
uint16_t flags () const
 Retrieve the full set of ObjectFlag values. More...
 
ShapesetPosition (const V3Arg &pos)
 
Vector3f position () const
 
ShapesetPosX (float p)
 
ShapesetPosY (float p)
 
ShapesetPosZ (float p)
 
ShapesetRotation (const QuaternionArg &rot)
 
Quaternionf rotation () const
 
ShapesetScale (const V3Arg &scale)
 
Vector3f scale () const
 
ShapesetColour (const Colour &colour)
 
Colour colour () const
 
virtual void updateFrom (const Shape &other)
 Update the attributes of this shape to match other. More...
 
bool writeUpdate (PacketWriter &stream) const
 
bool writeDestroy (PacketWriter &stream) const
 

Additional Inherited Members

- Protected Member Functions inherited from tes::Shape
void onClone (Shape *copy) const
 Called when copy is created from this object to copy appropriate attributes to copy. More...
 
void init (uint32_t id, uint16_t cat=0, uint16_t flags=0)
 
- Protected Attributes inherited from tes::Shape
uint16_t _routingId
 
CreateMessage _data
 

Detailed Description

A Shape which renders a set of points as in a point cloud.

The points are contained in a MeshResource (e.g., PointCloud) and may be shared between PointCloudShape shapes. The MeshResource should have a MeshResource.drawType() of DtPoints or the behaviour may be undefined.

The PointCloudShape shape supports limiting the view into the MeshResource by having its own set of indices (see setIndices()).

Constructor & Destructor Documentation

◆ PointCloudShape()

tes::PointCloudShape::PointCloudShape ( const MeshResource mesh,
uint32_t  id = 0,
uint16_t  category = 0,
uint8_t  pointSize = 1 
)
inline

Construct a point cloud shape object.

mesh The mesh resource to render point data from. See class comments.

Parameters
idThe shape ID, unique among Arrow objects, or zero for a transient shape.
categoryThe category grouping for the shape used for filtering.
pointSizeDesired point render size (pixels).

Member Function Documentation

◆ clone()

Shape* tes::PointCloudShape::clone ( ) const
overridevirtual

Deep copy clone.

The source is only cloned if ownSource() is true. It is shared otherwise.

Returns
A deep copy.

Reimplemented from tes::Shape.

◆ enumerateResources()

int tes::PointCloudShape::enumerateResources ( const Resource **  resources,
int  capacity,
int  fetchOffset 
) const
overridevirtual

Enumerates the mesh resource given on construction.

See Shape::enumerateResources().

Parameters
resourcesResource output array.
capacityof resources.
fetchOffsetIndexing offset for the resources in this object.

Reimplemented from tes::Shape.

◆ isComplex()

virtual bool tes::PointCloudShape::isComplex ( ) const
inlineoverridevirtual

Defines this class as a complex shape.

See Shape::isComplex().

Returns
true

Reimplemented from tes::Shape.

◆ mesh()

const MeshResource* tes::PointCloudShape::mesh ( ) const
inline

Get the mesh resource containing the point data to render.

Returns
The point cloud mesh resource.

◆ pointSize()

uint8_t tes::PointCloudShape::pointSize ( ) const
inline

Get the desired point render size (pixels).

Returns
The desired point render size.

◆ setIndices()

template<typename I >
PointCloudShape & tes::PointCloudShape::setIndices ( begin,
uint32_t  indexCount 
)

Sets the (optional) indices for this PointCloudShape Shape.

This shape will only visualise the indexed points from its PointSource. This allows multiple PointCloudShape shapes to reference the same cloud, but reveal sub-sets of the cloud.

This method is designed to copy any iterable sequence between begin and end, however the number of elements must be provided in indexCount.

Template Parameters
IAn iterable item. Must support dereferencing to an unsigned integer and an increment operator.
Parameters
iterThe index iterator.
indexCountThe number of elements to copy from iter.
Returns
This.

◆ setPointSize()

PointCloudShape& tes::PointCloudShape::setPointSize ( uint8_t  size)
inline

Set the desired point render size (pixels).

Parameters
sizeThe desired render size (pixels).
Returns
*this

◆ writeCreate()

virtual bool tes::PointCloudShape::writeCreate ( PacketWriter stream) const
overridevirtual

Writes the standard create message and appends the point cloud ID (uint32_t).

Parameters
streamThe stream to write to.
Returns
True on success.

Reimplemented from tes::Shape.

◆ writeData()

virtual int tes::PointCloudShape::writeData ( PacketWriter stream,
unsigned &  progressMarker 
) const
overridevirtual

Write index data set in setIndices() if any.

Parameters
streamThe data stream to write to.
[in,out]progressMarkerIndicates data transfer progress. Initially zero, the Shape manages its own semantics.
Returns
Indicates completion progress. 0 indicates completion, 1 indicates more data are available and more calls should be made. -1 indicates an error. No more calls should be made.

Reimplemented from tes::Shape.


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