void TrackingTimeStdMessage::RecalculateChecksum() { if (!_isCorrect) { return; } auto message = ToByteArray(); _cs = ChecksumComputer::ComputeCs8(message, message.size() - 1); }
void RotationMatrixAndVectorsStdMessage::RecalculateChecksum() { if (!_isCorrect) { return; } auto message = ToByteArray(); _cs = ChecksumComputer::ComputeCs8(message, message.size() - 1); }
void RcvBeiDouTimeOffsetStdMessage::RecalculateChecksum() { if (!_isCorrect) { return; } auto message = ToByteArray(); _cs = ChecksumComputer::ComputeCs8(message, message.size() - 1); }
bool RotationMatrixAndVectorsStdMessage::Validate() const { if (!_isCorrect || !StdMessage::Validate()) { return false; } auto message = ToByteArray(); return validateChecksum8Bin(message.data(), message.size()); }
bool TrackingTimeStdMessage::Validate() const { if (!_isCorrect || !StdMessage::Validate()) { return false; } auto message = ToByteArray(); return validateChecksum8Bin(message.data(), message.size()); }
bool RcvBeiDouTimeOffsetStdMessage::Validate() const { if (!_isCorrect || !StdMessage::Validate()) { return false; } auto message = ToByteArray(); return validateChecksum8Bin(message.data(), message.size()); }
void ezInstanceData::UpdateInstanceData(ezRenderContext* pRenderContext, ezUInt32 uiCount) { EZ_ASSERT_DEV(m_uiBufferOffset + uiCount <= m_uiBufferSize, "Implementation error"); ezGALContext* pGALContext = pRenderContext->GetGALContext(); ezUInt32 uiDestOffset = m_uiBufferOffset * sizeof(ezPerInstanceData); auto pSourceData = m_perInstanceData.GetArrayPtr().GetSubArray(m_uiBufferOffset, uiCount); ezGALUpdateMode::Enum updateMode = (m_uiBufferOffset == 0) ? ezGALUpdateMode::Discard : ezGALUpdateMode::NoOverwrite; pGALContext->UpdateBuffer(m_hInstanceDataBuffer, uiDestOffset, pSourceData.ToByteArray(), updateMode); ezObjectConstants* pConstants = pRenderContext->GetConstantBufferData<ezObjectConstants>(m_hConstantBuffer); pConstants->InstanceDataOffset = m_uiBufferOffset; m_uiBufferOffset += uiCount; }