overte-Armored-Dragon/libraries/entities/src/EntityTreeHeadlessViewer.h
2014-12-02 11:13:37 -08:00

51 lines
1.4 KiB
C++

//
// EntityTreeHeadlessViewer.h
// libraries/models/src
//
// Created by Brad Hefta-Gaub on 2/26/14.
// Copyright 2014 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef hifi_EntityTreeHeadlessViewer_h
#define hifi_EntityTreeHeadlessViewer_h
#include <PacketHeaders.h>
#include <SharedUtil.h>
#include <Octree.h>
#include <OctreePacketData.h>
#include <OctreeHeadlessViewer.h>
#include <ViewFrustum.h>
#include "EntityTree.h"
class EntitySimulation;
// Generic client side Octree renderer class.
class EntityTreeHeadlessViewer : public OctreeHeadlessViewer {
Q_OBJECT
public:
EntityTreeHeadlessViewer();
virtual ~EntityTreeHeadlessViewer();
virtual char getMyNodeType() const { return NodeType::EntityServer; }
virtual PacketType getMyQueryMessageType() const { return PacketTypeEntityQuery; }
virtual PacketType getExpectedPacketType() const { return PacketTypeEntityData; }
void update();
EntityTree* getTree() { return (EntityTree*)_tree; }
void processEraseMessage(const QByteArray& dataByteArray, const SharedNodePointer& sourceNode);
virtual void init();
protected:
virtual Octree* createTree() { return new EntityTree(true); }
EntitySimulation* _simulation;
};
#endif // hifi_EntityTreeHeadlessViewer_h