mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 17:03:58 +02:00
Derive VoxelAgentData from AvatarData to get access to camera details
- Changed base class for VoxelAgentData - changed parseData() method to call base class implementation - added avatars library to cmake scripts
This commit is contained in:
parent
e1da39e2bb
commit
893996675a
3 changed files with 10 additions and 5 deletions
|
@ -24,5 +24,8 @@ link_hifi_library(shared ${TARGET_NAME} ${ROOT_DIR})
|
|||
# link in the hifi voxels library
|
||||
link_hifi_library(voxels ${TARGET_NAME} ${ROOT_DIR})
|
||||
|
||||
# link in the hifi avatars library
|
||||
link_hifi_library(avatars ${TARGET_NAME} ${ROOT_DIR})
|
||||
|
||||
# find required libraries
|
||||
find_package(GLM REQUIRED)
|
||||
|
|
|
@ -28,9 +28,10 @@ VoxelAgentData* VoxelAgentData::clone() const {
|
|||
}
|
||||
|
||||
void VoxelAgentData::parseData(unsigned char* sourceBuffer, int numBytes) {
|
||||
// push past the packet header
|
||||
sourceBuffer++;
|
||||
// call base class to parse the data
|
||||
AvatarData::parseData(sourceBuffer,numBytes);
|
||||
|
||||
// pull the position from the interface agent data packet
|
||||
memcpy(&position, sourceBuffer, sizeof(float) * 3);
|
||||
// make sure our class knows it's position
|
||||
memcpy(&position, &_bodyPosition, sizeof(_bodyPosition));
|
||||
}
|
||||
|
||||
|
|
|
@ -11,9 +11,10 @@
|
|||
|
||||
#include <iostream>
|
||||
#include <AgentData.h>
|
||||
#include <AvatarData.h>
|
||||
#include "MarkerNode.h"
|
||||
|
||||
class VoxelAgentData : public AgentData {
|
||||
class VoxelAgentData : public AvatarData {
|
||||
public:
|
||||
float position[3];
|
||||
MarkerNode *rootMarkerNode;
|
||||
|
|
Loading…
Reference in a new issue