46 lines
1.2 KiB
C++
46 lines
1.2 KiB
C++
|
|
#ifndef _LG1_PCLOUD_AMBIENCE_STENCIL_H
|
||
|
|
#define _LG1_PCLOUD_AMBIENCE_STENCIL_H
|
||
|
|
|
||
|
|
#include "livoxGen1.h"
|
||
|
|
#include <user/pcloudAmbienceStencil.h>
|
||
|
|
#include <user/stagingBuffer.h>
|
||
|
|
#include <unistd.h>
|
||
|
|
|
||
|
|
namespace smo {
|
||
|
|
namespace stim_buff {
|
||
|
|
|
||
|
|
/**
|
||
|
|
* LG1PcloudAmbienceStencil represents Livox Gen1-specific stencils for
|
||
|
|
* ambience data. The StagingBuffer is sized to handle the worst-case scenario
|
||
|
|
* where every ambience body spot requires its own descriptor
|
||
|
|
* (nDgramsPerFrame slots).
|
||
|
|
*/
|
||
|
|
class LG1PcloudAmbienceStencil
|
||
|
|
: public PcloudAmbienceStencil
|
||
|
|
{
|
||
|
|
public:
|
||
|
|
// Common IOEngineConstraints for stencil buffer (used for both input and output)
|
||
|
|
static const StagingBuffer::IOEngineConstraints stencilBufferConstraints;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Constructor
|
||
|
|
* @param nDgramsPerFrame Number of datagrams per frame, used to size the
|
||
|
|
* stencil buffer for worst-case scenario (one descriptor per dgram)
|
||
|
|
*/
|
||
|
|
explicit LG1PcloudAmbienceStencil(size_t nDgramsPerFrame)
|
||
|
|
: PcloudAmbienceStencil(),
|
||
|
|
stencilBuffer(
|
||
|
|
stencilBufferConstraints, // Input constraints
|
||
|
|
stencilBufferConstraints, // Output constraints (same as input)
|
||
|
|
nDgramsPerFrame)
|
||
|
|
{}
|
||
|
|
|
||
|
|
public:
|
||
|
|
StagingBuffer stencilBuffer;
|
||
|
|
};
|
||
|
|
|
||
|
|
} // namespace stim_buff
|
||
|
|
} // namespace smo
|
||
|
|
|
||
|
|
#endif // _LG1_PCLOUD_AMBIENCE_STENCIL_H
|