mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-30 14:20:34 +02:00
36 lines
821 B
C++
36 lines
821 B
C++
//
|
|
// VoxelAgentData.cpp
|
|
// hifi
|
|
//
|
|
// Created by Stephen Birarda on 3/21/13.
|
|
//
|
|
//
|
|
|
|
#include "VoxelAgentData.h"
|
|
#include <cstring>
|
|
#include <cstdio>
|
|
|
|
VoxelAgentData::VoxelAgentData() {
|
|
rootMarkerNode = new MarkerNode();
|
|
}
|
|
|
|
VoxelAgentData::~VoxelAgentData() {
|
|
delete rootMarkerNode;
|
|
}
|
|
|
|
VoxelAgentData::VoxelAgentData(const VoxelAgentData &otherAgentData) {
|
|
memcpy(position, otherAgentData.position, sizeof(float) * 3);
|
|
rootMarkerNode = new MarkerNode();
|
|
}
|
|
|
|
VoxelAgentData* VoxelAgentData::clone() const {
|
|
return new VoxelAgentData(*this);
|
|
}
|
|
|
|
void VoxelAgentData::parseData(unsigned char* sourceBuffer, int numBytes) {
|
|
// push past the packet header
|
|
sourceBuffer++;
|
|
|
|
// pull the position from the interface agent data packet
|
|
memcpy(&position, sourceBuffer, sizeof(float) * 3);
|
|
}
|