mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 11:45:36 +02:00
change VoxelAgentData to not include position, use AvatarData _bodyPosition instead
This commit is contained in:
parent
cea4170270
commit
a79659a5d4
5 changed files with 4 additions and 15 deletions
|
@ -267,7 +267,7 @@ void VoxelTree::readCodeColorBufferToTree(unsigned char *codeColorBuffer) {
|
|||
unsigned char * VoxelTree::loadBitstreamBuffer(unsigned char *& bitstreamBuffer,
|
||||
VoxelNode *currentVoxelNode,
|
||||
MarkerNode *currentMarkerNode,
|
||||
float * agentPosition,
|
||||
const glm::vec3& agentPosition,
|
||||
float thisNodePosition[3],
|
||||
const ViewFrustum& viewFrustum,
|
||||
bool viewFrustumCulling,
|
||||
|
|
|
@ -51,7 +51,7 @@ public:
|
|||
unsigned char * loadBitstreamBuffer(unsigned char *& bitstreamBuffer,
|
||||
VoxelNode *currentVoxelNode,
|
||||
MarkerNode *currentMarkerNode,
|
||||
float * agentPosition,
|
||||
const glm::vec3& agentPosition,
|
||||
float thisNodePosition[3],
|
||||
const ViewFrustum& viewFrustum,
|
||||
bool viewFrustumCulling,
|
||||
|
|
|
@ -19,19 +19,10 @@ VoxelAgentData::~VoxelAgentData() {
|
|||
}
|
||||
|
||||
VoxelAgentData::VoxelAgentData(const VoxelAgentData &otherAgentData) {
|
||||
memcpy(position, otherAgentData.position, sizeof(float) * 3);
|
||||
memcpy(&_bodyPosition, &otherAgentData._bodyPosition, sizeof(_bodyPosition));
|
||||
rootMarkerNode = new MarkerNode();
|
||||
}
|
||||
|
||||
VoxelAgentData* VoxelAgentData::clone() const {
|
||||
return new VoxelAgentData(*this);
|
||||
}
|
||||
|
||||
void VoxelAgentData::parseData(unsigned char* sourceBuffer, int numBytes) {
|
||||
// call base class to parse the data
|
||||
AvatarData::parseData(sourceBuffer,numBytes);
|
||||
|
||||
// make sure our class knows it's position
|
||||
memcpy(&position, &_bodyPosition, sizeof(_bodyPosition));
|
||||
}
|
||||
|
||||
|
|
|
@ -16,14 +16,12 @@
|
|||
|
||||
class VoxelAgentData : public AvatarData {
|
||||
public:
|
||||
float position[3];
|
||||
MarkerNode *rootMarkerNode;
|
||||
|
||||
VoxelAgentData();
|
||||
~VoxelAgentData();
|
||||
VoxelAgentData(const VoxelAgentData &otherAgentData);
|
||||
|
||||
void parseData(unsigned char* sourceBuffer, int numBytes);
|
||||
VoxelAgentData* clone() const;
|
||||
};
|
||||
|
||||
|
|
|
@ -199,7 +199,7 @@ void *distributeVoxelsToListeners(void *args) {
|
|||
stopOctal = randomTree.loadBitstreamBuffer(voxelPacketEnd,
|
||||
randomTree.rootNode,
|
||||
agentData->rootMarkerNode,
|
||||
agentData->position,
|
||||
agentData->getBodyPosition(),
|
||||
treeRoot,
|
||||
viewFrustum,
|
||||
::viewFrustumCulling,
|
||||
|
|
Loading…
Reference in a new issue