Overte C++ Documentation
RenderableLineEntityItem.h
1 //
2 // RenderableLineEntityItem.h
3 // libraries/entities-renderer/src/
4 //
5 // Created by Seth Alves on 5/11/15.
6 // Copyright 2015 High Fidelity, Inc.
7 //
8 // Distributed under the Apache License, Version 2.0.
9 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10 //
11 
12 #ifndef hifi_RenderableLineEntityItem_h
13 #define hifi_RenderableLineEntityItem_h
14 
15 #include "RenderableEntityItem.h"
16 #include <LineEntityItem.h>
17 #include <GeometryCache.h>
18 
19 
20 namespace render { namespace entities {
21 
22 class LineEntityRenderer : public TypedEntityRenderer<LineEntityItem> {
23  using Parent = TypedEntityRenderer<LineEntityItem>;
24  friend class EntityRenderer;
25 
26 public:
27  LineEntityRenderer(const EntityItemPointer& entity) : Parent(entity) { }
28 
29 protected:
30  virtual void onRemoveFromSceneTyped(const TypedEntityPointer& entity) override;
31  virtual void doRenderUpdateAsynchronousTyped(const TypedEntityPointer& entity) override;
32  virtual void doRender(RenderArgs* args) override;
33 
34 private:
35  int _lineVerticesID { GeometryCache::UNKNOWN_ID };
36  QVector<glm::vec3> _linePoints;
37 };
38 
39 } } // namespace
40 
41 #endif // hifi_RenderableLineEntityItem_h