livoxGen1: Rename PcloudXyzStimulusBuffer=>MeshStimulusBuffer
This commit is contained in:
@@ -509,8 +509,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Clear specialized buffer members if they match
|
// Clear specialized buffer members if they match
|
||||||
if (stimProducer.xyzStimulusBuffer == context->stimBuffer)
|
if (stimProducer.meshStimulusBuffer == context->stimBuffer)
|
||||||
{ stimProducer.xyzStimulusBuffer.reset(); }
|
{ stimProducer.meshStimulusBuffer.reset(); }
|
||||||
if (stimProducer.iStimulusBuffer == context->stimBuffer)
|
if (stimProducer.iStimulusBuffer == context->stimBuffer)
|
||||||
{ stimProducer.iStimulusBuffer.reset(); }
|
{ stimProducer.iStimulusBuffer.reset(); }
|
||||||
if (stimProducer.ambienceStimulusBuffer == context->stimBuffer)
|
if (stimProducer.ambienceStimulusBuffer == context->stimBuffer)
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
#ifndef _LIVOX_GEN1_MESH_STIMULUS_BUFFER_H
|
||||||
|
#define _LIVOX_GEN1_MESH_STIMULUS_BUFFER_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
#include <user/stimulusBuffer.h>
|
||||||
|
|
||||||
|
namespace smo {
|
||||||
|
namespace stim_buff {
|
||||||
|
|
||||||
|
// Forward declaration
|
||||||
|
class StimulusProducer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MeshStimulusBuffer is a specialized StimulusBuffer for mesh data.
|
||||||
|
*/
|
||||||
|
class MeshStimulusBuffer
|
||||||
|
: public StimulusBuffer
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
explicit MeshStimulusBuffer(
|
||||||
|
StimulusProducer& parent,
|
||||||
|
const std::shared_ptr<device::DeviceAttachmentSpec>& deviceAttachmentSpec,
|
||||||
|
int histbuffMs,
|
||||||
|
const SpMcRingBuffer::InputEngineConstraints& ringBufferConstraints)
|
||||||
|
: StimulusBuffer(
|
||||||
|
parent, deviceAttachmentSpec, histbuffMs, ringBufferConstraints)
|
||||||
|
{}
|
||||||
|
|
||||||
|
~MeshStimulusBuffer() = default;
|
||||||
|
|
||||||
|
// Non-copyable, movable
|
||||||
|
MeshStimulusBuffer(const MeshStimulusBuffer&) = delete;
|
||||||
|
MeshStimulusBuffer& operator=(const MeshStimulusBuffer&) = delete;
|
||||||
|
MeshStimulusBuffer(MeshStimulusBuffer&&) = default;
|
||||||
|
MeshStimulusBuffer& operator=(MeshStimulusBuffer&&) = default;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace stim_buff
|
||||||
|
} // namespace smo
|
||||||
|
|
||||||
|
#endif // _LIVOX_GEN1_MESH_STIMULUS_BUFFER_H
|
||||||
|
|
||||||
@@ -117,14 +117,14 @@ PcloudStimulusProducer::getOrCreateAttachedStimulusBuffer(
|
|||||||
if (existingBuffer)
|
if (existingBuffer)
|
||||||
{ return existingBuffer; }
|
{ return existingBuffer; }
|
||||||
|
|
||||||
// Create new PcloudXyzStimulusBuffer (for now, always use XYZ type)
|
// Create new MeshStimulusBuffer (for now, always use XYZ type)
|
||||||
auto buffer = std::make_shared<PcloudXyzStimulusBuffer>(
|
auto buffer = std::make_shared<MeshStimulusBuffer>(
|
||||||
*this, deviceAttachmentSpec, histbuffMs, openClInputConstraints);
|
*this, deviceAttachmentSpec, histbuffMs, openClInputConstraints);
|
||||||
|
|
||||||
// Add to collection
|
// Add to collection
|
||||||
attachedStimulusBuffers.push_back(buffer);
|
attachedStimulusBuffers.push_back(buffer);
|
||||||
// Update specialized member
|
// Update specialized member
|
||||||
xyzStimulusBuffer = buffer;
|
meshStimulusBuffer = buffer;
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
#include <user/stagingBuffer.h>
|
#include <user/stagingBuffer.h>
|
||||||
#include "ioUringAssemblyEngine.h"
|
#include "ioUringAssemblyEngine.h"
|
||||||
#include "openClCollatingAndMeshingEngine.h"
|
#include "openClCollatingAndMeshingEngine.h"
|
||||||
#include "pcloudXyzStimulusBuffer.h"
|
#include "meshStimulusBuffer.h"
|
||||||
#include "pcloudIStimulusBuffer.h"
|
#include "pcloudIStimulusBuffer.h"
|
||||||
#include "pcloudAmbienceStimulusBuffer.h"
|
#include "pcloudAmbienceStimulusBuffer.h"
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ public:
|
|||||||
IoUringAssemblyEngine ioUringAssemblyEngine;
|
IoUringAssemblyEngine ioUringAssemblyEngine;
|
||||||
StagingBuffer collationBuffer;
|
StagingBuffer collationBuffer;
|
||||||
StimulusFrame tempStimulusFrame;
|
StimulusFrame tempStimulusFrame;
|
||||||
std::shared_ptr<PcloudXyzStimulusBuffer> xyzStimulusBuffer;
|
std::shared_ptr<MeshStimulusBuffer> meshStimulusBuffer;
|
||||||
std::shared_ptr<PcloudIStimulusBuffer> iStimulusBuffer;
|
std::shared_ptr<PcloudIStimulusBuffer> iStimulusBuffer;
|
||||||
std::shared_ptr<PcloudAmbienceStimulusBuffer> ambienceStimulusBuffer;
|
std::shared_ptr<PcloudAmbienceStimulusBuffer> ambienceStimulusBuffer;
|
||||||
|
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
#ifndef _LIVOX_GEN1_PCLOUD_XYZ_STIMULUS_BUFFER_H
|
|
||||||
#define _LIVOX_GEN1_PCLOUD_XYZ_STIMULUS_BUFFER_H
|
|
||||||
|
|
||||||
#include <memory>
|
|
||||||
#include <user/stimulusBuffer.h>
|
|
||||||
|
|
||||||
namespace smo {
|
|
||||||
namespace stim_buff {
|
|
||||||
|
|
||||||
// Forward declaration
|
|
||||||
class StimulusProducer;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* PcloudXyzStimulusBuffer is a specialized StimulusBuffer for XYZ point cloud data.
|
|
||||||
*/
|
|
||||||
class PcloudXyzStimulusBuffer
|
|
||||||
: public StimulusBuffer
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
explicit PcloudXyzStimulusBuffer(
|
|
||||||
StimulusProducer& parent,
|
|
||||||
const std::shared_ptr<device::DeviceAttachmentSpec>& deviceAttachmentSpec,
|
|
||||||
int histbuffMs,
|
|
||||||
const SpMcRingBuffer::InputEngineConstraints& ringBufferConstraints)
|
|
||||||
: StimulusBuffer(
|
|
||||||
parent, deviceAttachmentSpec, histbuffMs, ringBufferConstraints)
|
|
||||||
{}
|
|
||||||
|
|
||||||
~PcloudXyzStimulusBuffer() = default;
|
|
||||||
|
|
||||||
// Non-copyable, movable
|
|
||||||
PcloudXyzStimulusBuffer(const PcloudXyzStimulusBuffer&) = delete;
|
|
||||||
PcloudXyzStimulusBuffer& operator=(const PcloudXyzStimulusBuffer&) = delete;
|
|
||||||
PcloudXyzStimulusBuffer(PcloudXyzStimulusBuffer&&) = default;
|
|
||||||
PcloudXyzStimulusBuffer& operator=(PcloudXyzStimulusBuffer&&) = default;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace stim_buff
|
|
||||||
} // namespace smo
|
|
||||||
|
|
||||||
#endif // _LIVOX_GEN1_PCLOUD_XYZ_STIMULUS_BUFFER_H
|
|
||||||
Reference in New Issue
Block a user