Class cwipc_source
Defined in File api.h
Inheritance Relationships
Derived Types
public cwipc_activesource(Class cwipc_activesource)public cwipc_decoder(Class cwipc_decoder)
Class Documentation
-
class cwipc_source
A generator of pointclouds, abstract C++ interface.
This interface is provided by capturers and decoders and such. It allows the user of this interface to get cwipc pointcloud data.
Subclassed by cwipc_activesource, cwipc_decoder
Public Functions
-
inline virtual ~cwipc_source()
Destructor. Does not free underlying generator.
You must call free() before calling the destructor (unless you have passed the cwipc object across an implementation language boundary and a reference may still be held there).
-
virtual void free() = 0
Deallocate the pointcloud source.
Because the pointcloud source may be used in a different implementation language or DLL than where it is implemented we do not count on refcounting and such. Call this method if you no longer need the source.
-
virtual bool seek(uint64_t timestamp) = 0
Position the source to a specific timestamp.
- Parameters:
timestamp – The timestamp to seek to.
- Returns:
True if the seek was successful.
-
virtual bool eof() = 0
Return true if no more pointclouds are forthcoming.
-
virtual bool available(bool wait) = 0
Return true if a pointcloud is currently available.
If this cwipc_source is not multi-threading capable the wait parameter is ignored. If it is multi-threaded aware and no pointcloud is currently available it may wait a reasonable amount of time (think: about a second) to see whether one becomes available.
- Parameters:
wait – Set to true if the caller is willing to wait until a pointcloud is available.
-
virtual cwipc_pointcloud *get() = 0
Get a new pointcloud.
- Returns:
The new pointcloud.
-
inline virtual ~cwipc_source()