Easy3D 3.0.0
Loading...
Searching...
No Matches
PointData Class Reference

Immutable point positions in draw order, mapped to original source slots. More...

#include <render_device.h>

Public Member Functions

 PointData (std::vector< vec3 > positions, std::vector< std::uint32_t > source_ids={}, std::uint32_t source_count=0)
 Create a point-data snapshot.
 
virtual ~PointData ()=default
 Destroy the point-data snapshot.
 
PointData & operator= (const PointData &)=delete
 Copy assignment is disabled; snapshots are shared by const ownership.
 
const std::vector< vec3 > & positions () const
 
const std::vector< std::uint32_t > & source_ids () const
 
std::uint32_t source_count () const
 

Detailed Description

Immutable point positions in draw order, mapped to original source slots.

Both backend adapters consume CPU-backed snapshots supplied by the caller or host. Deleted or otherwise nonfinite positions are retained and skipped during selection. Devices cache the position resource independently of vertex attributes and transforms.

Constructor & Destructor Documentation

◆ PointData()

PointData ( std::vector< vec3 >  positions,
std::vector< std::uint32_t >  source_ids = {},
std::uint32_t  source_count = 0 
)
explicit

Create a point-data snapshot.

Parameters
positionsPoint centers in draw/instance order.
source_idsOriginal source slots corresponding to each point. An empty vector indicates identity ordering.
source_countNumber of original source slots, including absent slots.

Member Function Documentation

◆ positions()

const std::vector< vec3 > & positions ( ) const
inline

Return positions in draw/instance order.

Returns
Point centers in draw/instance order.

◆ source_count()

std::uint32_t source_count ( ) const
inline

Return the number of source slots represented by this snapshot.

Returns
Number of original source slots.

◆ source_ids()

const std::vector< std::uint32_t > & source_ids ( ) const
inline

Return the original source slot for each position, or an empty vector for identity order.

Returns
Original source slots, or an empty vector for identity ordering.

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