mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-16 14:57:50 +02:00
61 lines
2.8 KiB
C++
61 lines
2.8 KiB
C++
//
|
|
// Created by Bradley Austin Davis on 2015/05/12
|
|
// Copyright 2013 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_WebEntityItem_h
|
|
#define hifi_WebEntityItem_h
|
|
|
|
#include "EntityItem.h"
|
|
|
|
class WebEntityItem : public EntityItem {
|
|
public:
|
|
static const QString DEFAULT_SOURCE_URL;
|
|
|
|
static EntityItemPointer factory(const EntityItemID& entityID, const EntityItemProperties& properties);
|
|
|
|
WebEntityItem(const EntityItemID& entityItemID, const EntityItemProperties& properties);
|
|
|
|
ALLOW_INSTANTIATION // This class can be instantiated
|
|
|
|
/// set dimensions in domain scale units (0.0 - 1.0) this will also reset radius appropriately
|
|
virtual void setDimensions(const glm::vec3& value);
|
|
virtual ShapeType getShapeType() const { return SHAPE_TYPE_BOX; }
|
|
|
|
// methods for getting/setting all properties of an entity
|
|
virtual EntityItemProperties getProperties(EntityPropertyFlags desiredProperties = EntityPropertyFlags()) const;
|
|
virtual bool setProperties(const EntityItemProperties& properties);
|
|
|
|
// TODO: eventually only include properties changed since the params.lastViewFrustumSent time
|
|
virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params) const;
|
|
|
|
virtual void appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
|
EntityTreeElementExtraEncodeData* modelTreeElementExtraEncodeData,
|
|
EntityPropertyFlags& requestedProperties,
|
|
EntityPropertyFlags& propertyFlags,
|
|
EntityPropertyFlags& propertiesDidntFit,
|
|
int& propertyCount,
|
|
OctreeElement::AppendState& appendState) const;
|
|
|
|
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
|
ReadBitstreamToTreeParams& args,
|
|
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
|
bool& somethingChanged);
|
|
|
|
virtual bool supportsDetailedRayIntersection() const { return true; }
|
|
virtual bool findDetailedRayIntersection(const glm::vec3& origin, const glm::vec3& direction,
|
|
bool& keepSearching, OctreeElementPointer& element, float& distance,
|
|
BoxFace& face, glm::vec3& surfaceNormal,
|
|
void** intersectedObject, bool precisionPicking) const;
|
|
|
|
virtual void setSourceUrl(const QString& value);
|
|
const QString& getSourceUrl() const;
|
|
|
|
protected:
|
|
QString _sourceUrl;
|
|
};
|
|
|
|
#endif // hifi_WebEntityItem_h
|