mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 16:13:28 +02:00
changed quad entity to PolyLine
This commit is contained in:
parent
a117a7aa3b
commit
ad54b4c0b0
11 changed files with 66 additions and 66 deletions
|
@ -42,7 +42,7 @@
|
|||
#include "RenderableZoneEntityItem.h"
|
||||
#include "RenderableLineEntityItem.h"
|
||||
#include "RenderablePolyVoxEntityItem.h"
|
||||
#include "RenderableQuadEntityItem.h"
|
||||
#include "RenderablePolyLineEntityItem.h"
|
||||
#include "EntitiesRendererLogging.h"
|
||||
#include "AddressManager.h"
|
||||
|
||||
|
@ -70,7 +70,7 @@ EntityTreeRenderer::EntityTreeRenderer(bool wantScripts, AbstractViewStateInterf
|
|||
REGISTER_ENTITY_TYPE_WITH_FACTORY(Zone, RenderableZoneEntityItem::factory)
|
||||
REGISTER_ENTITY_TYPE_WITH_FACTORY(Line, RenderableLineEntityItem::factory)
|
||||
REGISTER_ENTITY_TYPE_WITH_FACTORY(PolyVox, RenderablePolyVoxEntityItem::factory)
|
||||
REGISTER_ENTITY_TYPE_WITH_FACTORY(Quad, RenderableQuadEntityItem::factory)
|
||||
REGISTER_ENTITY_TYPE_WITH_FACTORY(PolyLine, RenderablePolyLineEntityItem::factory)
|
||||
|
||||
_currentHoverOverEntityID = UNKNOWN_ENTITY_ID;
|
||||
_currentClickingOnEntityID = UNKNOWN_ENTITY_ID;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// RenderableQuadEntityItem.cpp
|
||||
// RenderablePolyLineEntityItem.cpp
|
||||
// libraries/entities-renderer/src/
|
||||
//
|
||||
// Created by Eric Levin on 6/22/15
|
||||
|
@ -17,7 +17,7 @@
|
|||
#include <DeferredLightingEffect.h>
|
||||
#include <PerfStat.h>
|
||||
|
||||
#include "RenderableQuadEntityItem.h"
|
||||
#include "RenderablePolyLineEntityItem.h"
|
||||
|
||||
|
||||
|
||||
|
@ -25,20 +25,20 @@
|
|||
|
||||
|
||||
|
||||
EntityItemPointer RenderableQuadEntityItem::factory(const EntityItemID& entityID, const EntityItemProperties& properties) {
|
||||
return EntityItemPointer(new RenderableQuadEntityItem(entityID, properties));
|
||||
EntityItemPointer RenderablePolyLineEntityItem::factory(const EntityItemID& entityID, const EntityItemProperties& properties) {
|
||||
return EntityItemPointer(new RenderablePolyLineEntityItem(entityID, properties));
|
||||
}
|
||||
|
||||
RenderableQuadEntityItem::RenderableQuadEntityItem(const EntityItemID& entityItemID, const EntityItemProperties& properties) :
|
||||
QuadEntityItem(entityItemID, properties) {
|
||||
RenderablePolyLineEntityItem::RenderablePolyLineEntityItem(const EntityItemID& entityItemID, const EntityItemProperties& properties) :
|
||||
PolyLineEntityItem(entityItemID, properties) {
|
||||
_numVertices = 0;
|
||||
|
||||
}
|
||||
|
||||
gpu::PipelinePointer RenderableQuadEntityItem::_pipeline;
|
||||
gpu::Stream::FormatPointer RenderableQuadEntityItem::_format;
|
||||
gpu::PipelinePointer RenderablePolyLineEntityItem::_pipeline;
|
||||
gpu::Stream::FormatPointer RenderablePolyLineEntityItem::_format;
|
||||
|
||||
void RenderableQuadEntityItem::createPipeline() {
|
||||
void RenderablePolyLineEntityItem::createPipeline() {
|
||||
static const int NORMAL_OFFSET = 12;
|
||||
static const int COLOR_OFFSET = 24;
|
||||
_format.reset(new gpu::Stream::Format());
|
||||
|
@ -71,7 +71,7 @@ int generateColor() {
|
|||
((int(255.0f) & 0xFF) << 24);
|
||||
}
|
||||
|
||||
void RenderableQuadEntityItem::updateGeometry() {
|
||||
void RenderablePolyLineEntityItem::updateGeometry() {
|
||||
QReadLocker lock(&_quadReadWriteLock);
|
||||
int compactColor = generateColor();
|
||||
_numVertices = 0;
|
||||
|
@ -98,7 +98,7 @@ void RenderableQuadEntityItem::updateGeometry() {
|
|||
|
||||
|
||||
|
||||
void RenderableQuadEntityItem::render(RenderArgs* args) {
|
||||
void RenderablePolyLineEntityItem::render(RenderArgs* args) {
|
||||
if (_points.size() < 2 || _vertices.size() != _normals.size() * 2) {
|
||||
return;
|
||||
}
|
||||
|
@ -107,8 +107,8 @@ void RenderableQuadEntityItem::render(RenderArgs* args) {
|
|||
createPipeline();
|
||||
}
|
||||
|
||||
PerformanceTimer perfTimer("RenderableQuadEntityItem::render");
|
||||
Q_ASSERT(getType() == EntityTypes::Quad);
|
||||
PerformanceTimer perfTimer("RenderablePolyLineEntityItem::render");
|
||||
Q_ASSERT(getType() == EntityTypes::PolyLine);
|
||||
|
||||
Q_ASSERT(args->_batch);
|
||||
if (_pointsChanged) {
|
|
@ -9,21 +9,21 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
#ifndef hifi_RenderableQuadEntityItem_h
|
||||
#define hifi_RenderableQuadEntityItem_h
|
||||
#ifndef hifi_RenderablePolyLineEntityItem_h
|
||||
#define hifi_RenderablePolyLineEntityItem_h
|
||||
|
||||
#include <gpu/Batch.h>
|
||||
#include <QuadEntityItem.h>
|
||||
#include <PolyLineEntityItem.h>
|
||||
#include "RenderableDebugableEntityItem.h"
|
||||
#include "RenderableEntityItem.h"
|
||||
#include <GeometryCache.h>
|
||||
#include <QReadWriteLock>
|
||||
|
||||
class RenderableQuadEntityItem : public QuadEntityItem {
|
||||
class RenderablePolyLineEntityItem : public PolyLineEntityItem {
|
||||
public:
|
||||
static EntityItemPointer factory(const EntityItemID& entityID, const EntityItemProperties& properties);
|
||||
static void createPipeline();
|
||||
RenderableQuadEntityItem(const EntityItemID& entityItemID, const EntityItemProperties& properties);
|
||||
RenderablePolyLineEntityItem(const EntityItemID& entityItemID, const EntityItemProperties& properties);
|
||||
|
||||
virtual void render(RenderArgs* args);
|
||||
|
||||
|
@ -40,4 +40,4 @@ protected:
|
|||
};
|
||||
|
||||
|
||||
#endif // hifi_RenderableQuadEntityItem_h
|
||||
#endif // hifi_RenderablePolyLineEntityItem_h
|
|
@ -28,7 +28,7 @@
|
|||
#include "ZoneEntityItem.h"
|
||||
#include "PolyVoxEntityItem.h"
|
||||
#include "LineEntityItem.h"
|
||||
#include "QuadEntityItem.h"
|
||||
#include "PolyLineEntityItem.h"
|
||||
|
||||
AtmospherePropertyGroup EntityItemProperties::_staticAtmosphere;
|
||||
SkyboxPropertyGroup EntityItemProperties::_staticSkybox;
|
||||
|
@ -819,7 +819,7 @@ bool EntityItemProperties::encodeEntityEditPacket(PacketType command, EntityItem
|
|||
APPEND_ENTITY_PROPERTY(PROP_LINE_POINTS, properties.getLinePoints());
|
||||
}
|
||||
|
||||
if (properties.getType() == EntityTypes::Quad) {
|
||||
if (properties.getType() == EntityTypes::PolyLine) {
|
||||
APPEND_ENTITY_PROPERTY(PROP_LINE_WIDTH, properties.getLineWidth());
|
||||
APPEND_ENTITY_PROPERTY(PROP_LINE_POINTS, properties.getLinePoints());
|
||||
APPEND_ENTITY_PROPERTY(PROP_NORMALS, properties.getNormals());
|
||||
|
@ -1076,7 +1076,7 @@ bool EntityItemProperties::decodeEntityEditPacket(const unsigned char* data, int
|
|||
}
|
||||
|
||||
|
||||
if (properties.getType() == EntityTypes::Quad) {
|
||||
if (properties.getType() == EntityTypes::PolyLine) {
|
||||
READ_ENTITY_PROPERTY_TO_PROPERTIES(PROP_LINE_WIDTH, float, setLineWidth);
|
||||
READ_ENTITY_PROPERTY_TO_PROPERTIES(PROP_LINE_POINTS, QVector<glm::vec3>, setLinePoints);
|
||||
READ_ENTITY_PROPERTY_TO_PROPERTIES(PROP_NORMALS, QVector<glm::vec3>, setNormals);
|
||||
|
|
|
@ -55,7 +55,7 @@ class EntityItemProperties {
|
|||
friend class WebEntityItem; // TODO: consider removing this friend relationship and use public methods
|
||||
friend class LineEntityItem; // TODO: consider removing this friend relationship and use public methods
|
||||
friend class PolyVoxEntityItem; // TODO: consider removing this friend relationship and use public methods
|
||||
friend class QuadEntityItem; // TODO: consider removing this friend relationship and use public methods
|
||||
friend class PolyLineEntityItem; // TODO: consider removing this friend relationship and use public methods
|
||||
public:
|
||||
EntityItemProperties();
|
||||
virtual ~EntityItemProperties();
|
||||
|
|
|
@ -468,16 +468,16 @@ bool EntityScriptingInterface::setPoints(EntityItemPointer entity, std::function
|
|||
return success;
|
||||
}
|
||||
|
||||
bool EntityScriptingInterface::setPoints(EntityItemPointer entity, std::function<bool(QuadEntityItem&)> actor) {
|
||||
bool EntityScriptingInterface::setPoints(EntityItemPointer entity, std::function<bool(PolyLineEntityItem&)> actor) {
|
||||
if (!_entityTree) {
|
||||
return false;
|
||||
}
|
||||
|
||||
auto now = usecTimestampNow();
|
||||
|
||||
QuadEntityItem* quadEntity = static_cast<QuadEntityItem*>(entity.get());
|
||||
PolyLineEntityItem* PolyLineEntity = static_cast<PolyLineEntityItem*>(entity.get());
|
||||
_entityTree->lockForWrite();
|
||||
bool success = actor(*quadEntity);
|
||||
bool success = actor(*PolyLineEntity);
|
||||
entity->setLastEdited(now);
|
||||
entity->setLastBroadcast(now);
|
||||
_entityTree->unlock();
|
||||
|
@ -527,10 +527,10 @@ bool EntityScriptingInterface::setAllPoints(QUuid entityID, const QVector<glm::v
|
|||
});
|
||||
}
|
||||
|
||||
if (entityType == EntityTypes::Quad) {
|
||||
return setPoints(entity, [points](QuadEntityItem& quadEntity) -> bool
|
||||
if (entityType == EntityTypes::PolyLine) {
|
||||
return setPoints(entity, [points](PolyLineEntityItem& PolyLineEntity) -> bool
|
||||
{
|
||||
return quadEntity.setLinePoints(points);
|
||||
return PolyLineEntity.setLinePoints(points);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -552,10 +552,10 @@ bool EntityScriptingInterface::appendPoint(QUuid entityID, const glm::vec3& poin
|
|||
});
|
||||
}
|
||||
|
||||
if (entityType == EntityTypes::Quad) {
|
||||
return setPoints(entity, [point](QuadEntityItem& quadEntity) -> bool
|
||||
if (entityType == EntityTypes::PolyLine) {
|
||||
return setPoints(entity, [point](PolyLineEntityItem& PolyLineEntity) -> bool
|
||||
{
|
||||
return quadEntity.appendPoint(point);
|
||||
return PolyLineEntity.appendPoint(point);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <RegisteredMetaTypes.h>
|
||||
#include "PolyVoxEntityItem.h"
|
||||
#include "LineEntityItem.h"
|
||||
#include "QuadEntityItem.h"
|
||||
#include "PolyLineEntityItem.h"
|
||||
|
||||
#include "EntityEditPacketSender.h"
|
||||
|
||||
|
@ -163,7 +163,7 @@ private:
|
|||
bool actionWorker(const QUuid& entityID, std::function<bool(EntitySimulation*, EntityItemPointer)> actor);
|
||||
bool setVoxels(QUuid entityID, std::function<void(PolyVoxEntityItem&)> actor);
|
||||
bool setPoints(EntityItemPointer entity, std::function<bool(LineEntityItem&)> actor);
|
||||
bool setPoints(EntityItemPointer entity, std::function<bool(QuadEntityItem&)> actor);
|
||||
bool setPoints(EntityItemPointer entity, std::function<bool(PolyLineEntityItem&)> actor);
|
||||
void queueEntityMessage(PacketType packetType, EntityItemID entityID, const EntityItemProperties& properties);
|
||||
|
||||
/// actually does the work of finding the ray intersection, can be called in locking mode or tryLock mode
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "ZoneEntityItem.h"
|
||||
#include "LineEntityItem.h"
|
||||
#include "PolyVoxEntityItem.h"
|
||||
#include "QuadEntityItem.h"
|
||||
#include "PolyLineEntityItem.h"
|
||||
|
||||
QMap<EntityTypes::EntityType, QString> EntityTypes::_typeToNameMap;
|
||||
QMap<QString, EntityTypes::EntityType> EntityTypes::_nameToTypeMap;
|
||||
|
@ -48,7 +48,7 @@ REGISTER_ENTITY_TYPE(ParticleEffect)
|
|||
REGISTER_ENTITY_TYPE(Zone)
|
||||
REGISTER_ENTITY_TYPE(Line)
|
||||
REGISTER_ENTITY_TYPE(PolyVox)
|
||||
REGISTER_ENTITY_TYPE(Quad);
|
||||
REGISTER_ENTITY_TYPE(PolyLine);
|
||||
|
||||
const QString& EntityTypes::getEntityTypeName(EntityType entityType) {
|
||||
QMap<EntityType, QString>::iterator matchedTypeName = _typeToNameMap.find(entityType);
|
||||
|
|
|
@ -46,8 +46,8 @@ public:
|
|||
Web,
|
||||
Line,
|
||||
PolyVox,
|
||||
Quad,
|
||||
LAST = Quad
|
||||
PolyLine,
|
||||
LAST = PolyLine
|
||||
} EntityType;
|
||||
|
||||
static const QString& getEntityTypeName(EntityType entityType);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// QuadEntityItem.cpp
|
||||
// PolyLineEntityItem.cpp
|
||||
// libraries/entities/src
|
||||
//
|
||||
// Created by Eric Levin on 6/22/15.
|
||||
|
@ -14,7 +14,7 @@
|
|||
|
||||
#include <ByteCountCoding.h>
|
||||
|
||||
#include "QuadEntityItem.h"
|
||||
#include "PolyLineEntityItem.h"
|
||||
#include "EntityTree.h"
|
||||
#include "EntitiesLogging.h"
|
||||
#include "EntityTreeElement.h"
|
||||
|
@ -22,16 +22,16 @@
|
|||
|
||||
|
||||
|
||||
const float QuadEntityItem::DEFAULT_LINE_WIDTH = 0.1f;
|
||||
const int QuadEntityItem::MAX_POINTS_PER_LINE = 70;
|
||||
const float PolyLineEntityItem::DEFAULT_LINE_WIDTH = 0.1f;
|
||||
const int PolyLineEntityItem::MAX_POINTS_PER_LINE = 70;
|
||||
|
||||
|
||||
EntityItemPointer QuadEntityItem::factory(const EntityItemID& entityID, const EntityItemProperties& properties) {
|
||||
EntityItemPointer result { new QuadEntityItem(entityID, properties) };
|
||||
EntityItemPointer PolyLineEntityItem::factory(const EntityItemID& entityID, const EntityItemProperties& properties) {
|
||||
EntityItemPointer result { new PolyLineEntityItem(entityID, properties) };
|
||||
return result;
|
||||
}
|
||||
|
||||
QuadEntityItem::QuadEntityItem(const EntityItemID& entityItemID, const EntityItemProperties& properties) :
|
||||
PolyLineEntityItem::PolyLineEntityItem(const EntityItemID& entityItemID, const EntityItemProperties& properties) :
|
||||
EntityItem(entityItemID) ,
|
||||
_lineWidth(DEFAULT_LINE_WIDTH),
|
||||
_pointsChanged(true),
|
||||
|
@ -40,12 +40,12 @@ _vertices(QVector<glm::vec3>(0)),
|
|||
_normals(QVector<glm::vec3>(0)),
|
||||
_strokeWidths(QVector<float>(0))
|
||||
{
|
||||
_type = EntityTypes::Quad;
|
||||
_type = EntityTypes::PolyLine;
|
||||
_created = properties.getCreated();
|
||||
setProperties(properties);
|
||||
}
|
||||
|
||||
EntityItemProperties QuadEntityItem::getProperties() const {
|
||||
EntityItemProperties PolyLineEntityItem::getProperties() const {
|
||||
_quadReadWriteLock.lockForWrite();
|
||||
EntityItemProperties properties = EntityItem::getProperties(); // get the properties from our base class
|
||||
|
||||
|
@ -66,7 +66,7 @@ EntityItemProperties QuadEntityItem::getProperties() const {
|
|||
return properties;
|
||||
}
|
||||
|
||||
bool QuadEntityItem::setProperties(const EntityItemProperties& properties) {
|
||||
bool PolyLineEntityItem::setProperties(const EntityItemProperties& properties) {
|
||||
_quadReadWriteLock.lockForWrite();
|
||||
bool somethingChanged = false;
|
||||
somethingChanged = EntityItem::setProperties(properties); // set the properties in our base class
|
||||
|
@ -84,7 +84,7 @@ bool QuadEntityItem::setProperties(const EntityItemProperties& properties) {
|
|||
if (wantDebug) {
|
||||
uint64_t now = usecTimestampNow();
|
||||
int elapsed = now - getLastEdited();
|
||||
qCDebug(entities) << "QuadEntityItem::setProperties() AFTER update... edited AGO=" << elapsed <<
|
||||
qCDebug(entities) << "PolyLineEntityItem::setProperties() AFTER update... edited AGO=" << elapsed <<
|
||||
"now=" << now << " getLastEdited()=" << getLastEdited();
|
||||
}
|
||||
setLastEdited(properties._lastEdited);
|
||||
|
@ -95,7 +95,7 @@ bool QuadEntityItem::setProperties(const EntityItemProperties& properties) {
|
|||
|
||||
}
|
||||
|
||||
bool QuadEntityItem::appendPoint(const glm::vec3& point) {
|
||||
bool PolyLineEntityItem::appendPoint(const glm::vec3& point) {
|
||||
if (_points.size() > MAX_POINTS_PER_LINE - 1) {
|
||||
qDebug() << "MAX POINTS REACHED!";
|
||||
return false;
|
||||
|
@ -110,12 +110,12 @@ bool QuadEntityItem::appendPoint(const glm::vec3& point) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool QuadEntityItem::setStrokeWidths(const QVector<float>& strokeWidths ) {
|
||||
bool PolyLineEntityItem::setStrokeWidths(const QVector<float>& strokeWidths ) {
|
||||
_strokeWidths = strokeWidths;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool QuadEntityItem::setNormals(const QVector<glm::vec3>& normals) {
|
||||
bool PolyLineEntityItem::setNormals(const QVector<glm::vec3>& normals) {
|
||||
if (_points.size () < 2 || _strokeWidths.size() < 2) {
|
||||
return false;
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ bool QuadEntityItem::setNormals(const QVector<glm::vec3>& normals) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool QuadEntityItem::setLinePoints(const QVector<glm::vec3>& points) {
|
||||
bool PolyLineEntityItem::setLinePoints(const QVector<glm::vec3>& points) {
|
||||
if (points.size() > MAX_POINTS_PER_LINE) {
|
||||
return false;
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ bool QuadEntityItem::setLinePoints(const QVector<glm::vec3>& points) {
|
|||
return true;
|
||||
}
|
||||
|
||||
int QuadEntityItem::readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
||||
int PolyLineEntityItem::readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
||||
ReadBitstreamToTreeParams& args,
|
||||
EntityPropertyFlags& propertyFlags, bool overwriteLocalData) {
|
||||
_quadReadWriteLock.lockForWrite();
|
||||
|
@ -202,7 +202,7 @@ int QuadEntityItem::readEntitySubclassDataFromBuffer(const unsigned char* data,
|
|||
|
||||
|
||||
// TODO: eventually only include properties changed since the params.lastViewFrustumSent time
|
||||
EntityPropertyFlags QuadEntityItem::getEntityProperties(EncodeBitstreamParams& params) const {
|
||||
EntityPropertyFlags PolyLineEntityItem::getEntityProperties(EncodeBitstreamParams& params) const {
|
||||
EntityPropertyFlags requestedProperties = EntityItem::getEntityProperties(params);
|
||||
requestedProperties += PROP_COLOR;
|
||||
requestedProperties += PROP_LINE_WIDTH;
|
||||
|
@ -211,7 +211,7 @@ EntityPropertyFlags QuadEntityItem::getEntityProperties(EncodeBitstreamParams& p
|
|||
return requestedProperties;
|
||||
}
|
||||
|
||||
void QuadEntityItem::appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
||||
void PolyLineEntityItem::appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
||||
EntityTreeElementExtraEncodeData* modelTreeElementExtraEncodeData,
|
||||
EntityPropertyFlags& requestedProperties,
|
||||
EntityPropertyFlags& propertyFlags,
|
||||
|
@ -228,7 +228,7 @@ void QuadEntityItem::appendSubclassData(OctreePacketData* packetData, EncodeBits
|
|||
APPEND_ENTITY_PROPERTY(PROP_STROKE_WIDTHS, getStrokeWidths());
|
||||
}
|
||||
|
||||
void QuadEntityItem::debugDump() const {
|
||||
void PolyLineEntityItem::debugDump() const {
|
||||
quint64 now = usecTimestampNow();
|
||||
qCDebug(entities) << " QUAD EntityItem id:" << getEntityItemID() << "---------------------------------------------";
|
||||
qCDebug(entities) << " color:" << _color[0] << "," << _color[1] << "," << _color[2];
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// QuadEntityItem.h
|
||||
// PolyLineEntityItem.h
|
||||
// libraries/entities/src
|
||||
//
|
||||
// Created by Seth Alves on 5/11/15.
|
||||
|
@ -9,16 +9,16 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
#ifndef hifi_QuadEntityItem_h
|
||||
#define hifi_QuadEntityItem_h
|
||||
#ifndef hifi_PolyLineEntityItem_h
|
||||
#define hifi_PolyLineEntityItem_h
|
||||
|
||||
#include "EntityItem.h"
|
||||
|
||||
class QuadEntityItem : public EntityItem {
|
||||
class PolyLineEntityItem : public EntityItem {
|
||||
public:
|
||||
static EntityItemPointer factory(const EntityItemID& entityID, const EntityItemProperties& properties);
|
||||
|
||||
QuadEntityItem(const EntityItemID& entityItemID, const EntityItemProperties& properties);
|
||||
PolyLineEntityItem(const EntityItemID& entityItemID, const EntityItemProperties& properties);
|
||||
|
||||
ALLOW_INSTANTIATION // This class can be instantiated
|
||||
|
||||
|
@ -67,7 +67,7 @@ class QuadEntityItem : public EntityItem {
|
|||
|
||||
virtual ShapeType getShapeType() const { return SHAPE_TYPE_LINE; }
|
||||
|
||||
// never have a ray intersection pick a QuadEntityItem.
|
||||
// never have a ray intersection pick a PolyLineEntityItem.
|
||||
virtual bool supportsDetailedRayIntersection() const { return true; }
|
||||
virtual bool findDetailedRayIntersection(const glm::vec3& origin, const glm::vec3& direction,
|
||||
bool& keepSearching, OctreeElement*& element, float& distance, BoxFace& face,
|
||||
|
@ -88,4 +88,4 @@ class QuadEntityItem : public EntityItem {
|
|||
mutable QReadWriteLock _quadReadWriteLock;
|
||||
};
|
||||
|
||||
#endif // hifi_QuadEntityItem_h
|
||||
#endif // hifi_PolyLineEntityItem_h
|
Loading…
Reference in a new issue