9 #ifndef hifi_RenderableShapeEntityItem_h
10 #define hifi_RenderableShapeEntityItem_h
12 #include "RenderableEntityItem.h"
14 #include <GeometryCache.h>
15 #include <procedural/Procedural.h>
16 #include <ShapeEntityItem.h>
18 namespace render {
namespace entities {
20 class ShapeEntityRenderer :
public TypedEntityRenderer<ShapeEntityItem> {
21 using Parent = TypedEntityRenderer<ShapeEntityItem>;
22 using Pointer = std::shared_ptr<ShapeEntityRenderer>;
24 ShapeEntityRenderer(
const EntityItemPointer& entity);
26 virtual scriptable::ScriptableModelBase getScriptableModel()
override;
29 ShapeKey getShapeKey()
override;
30 Item::Bound getBound(RenderArgs* args)
override;
33 virtual void onRemoveFromSceneTyped(
const TypedEntityPointer& entity)
override;
34 virtual bool needsRenderUpdate()
const override;
35 virtual void doRenderUpdateSynchronousTyped(
const ScenePointer& scene, Transaction& transaction,
const TypedEntityPointer& entity)
override;
36 virtual void doRenderUpdateAsynchronousTyped(
const TypedEntityPointer& entity)
override;
37 virtual void doRender(RenderArgs* args)
override;
38 virtual bool isTransparent()
const override;
40 QString _proceduralData;
41 EntityShape _shape { EntityShape::Sphere };
42 float _innerRadius { 0.0f };
44 PulsePropertyGroup _pulseProperties;
45 std::shared_ptr<graphics::ProceduralMaterial> _material { std::make_shared<graphics::ProceduralMaterial>() };
46 glm::vec3 _color { NAN };
48 bool _unlit {
false };
50 gpu::BufferPointer _colorBuffer { std::make_shared<gpu::Buffer>(gpu::Buffer::VertexBuffer) };
51 int _torusID { GeometryCache::UNKNOWN_ID };
53 FadeBuffers _fadeBuffers;