const CSampleDataStream *m_SamplePacket;
const CMeshTriangleBatch *m_Batch;
CMeshRandomVolumeSamplerStructures *m_SamplerStructures;
hh_u32 m_SamplingMask;
// hh_u32 m_PrimitiveTypeIndexMasker;
hh_u32 m_ElementCount;
hh_u32 m_OutIndex;
TStridedMemoryView<const CFloat3> m_Positions;
TStridedMemoryView<const CFloat3> m_Normals;
TStridedMemoryView<const CFloat4> m_Tangents;
TStridedMemoryView<const CFloat2> m_Texcoords;
TStridedMemoryView<const CFloat4> m_Colors;
SContext(const CMeshTriangleBatch *batch, const CSampleDataStream &samplePacket, CMeshRandomVolumeSamplerStructures *samplingStructures, hh_u32 samplingMask, const CMeshNew:

SamplerSourceOverride *sourceOverride)
: m_SamplePacket(&samplePacket)
, m_Batch(batch)
, m_SamplerStructures(samplingStructures)
, m_SamplingMask(samplingMask)
, m_ElementCount(0)
, m_OutIndex(0)
, m_Positions(batch->m_VStream.Positions())
, m_Normals(batch->m_VStream.Normals())
, m_Tangents(batch->m_VStream.Tangents())
, m_Texcoords(batch->m_VStream.Texcoords())
, m_Colors(batch->m_VStream.Colors())
{
if (sourceOverride != null)
{
if (!sourceOverride->m_PositionsOverride.Empty())
{
m_Positions = sourceOverride->m_PositionsOverride;
}
if (!sourceOverride->m_NormalsOverride.Empty())
{
m_Normals = sourceOverride->m_NormalsOverride;
}
if (!sourceOverride->m_TangentsOverride.Empty())
{
m_Tangents = sourceOverride->m_TangentsOverride;
}
}
}
bool Valid() const { return m_Batch != null && m_SamplePacket != null; }