23#ifndef VCL_BGFX_DRAWABLE_DRAWABLE_DIRECTIONAL_LIGHT_H
24#define VCL_BGFX_DRAWABLE_DRAWABLE_DIRECTIONAL_LIGHT_H
26#include "uniforms/drawable_directional_light_uniforms.h"
28#include <vclib/render/drawable/drawable_object.h>
29#include <vclib/render/viewer/lights/directional_light.h>
30#include <vclib/space/core/matrix.h>
32#include <vclib/bgfx/buffers/vertex_buffer.h>
33#include <vclib/bgfx/context.h>
41 bool mVisible =
false;
43 Matrix44f mTransform = vcl::Matrix44f::Identity();
45 std::vector<float> mVertices;
72 const vcl::Color& linesColor()
const {
return mColor; }
78 void draw(uint viewId)
const override;
82 std::shared_ptr<DrawableObject>
clone()
const&
override;
84 std::shared_ptr<DrawableObject>
clone() &&
override;
86 bool isVisible()
const override {
return mVisible; }
91 void createVertexBuffer();
A class representing a box in N-dimensional space.
Definition box.h:46
The Color class represents a 32 bit color.
Definition color.h:48
Definition drawable_directional_light.h:40
void setVisibility(bool vis) override
This member function is used to set the visibility of the object.
Definition drawable_directional_light.h:88
Box3d boundingBox() const override
This member function is used to find a good camera position to render object. It should return the th...
Definition drawable_directional_light.cpp:131
bool isVisible() const override
This member function is used to check if the object is visible.
Definition drawable_directional_light.h:86
std::shared_ptr< DrawableObject > clone() const &override
This member function is used to create a new copy of the DrawableObject. Each derived class must impl...
Definition drawable_directional_light.cpp:136
void draw(uint viewId) const override
This member function must draw the object. It will be called at every frame.
Definition drawable_directional_light.cpp:110
The DrawableObject class is the base class for all the objects that can be drawn in a 3D viewer.
Definition drawable_object.h:55
The VertexBuffer manages the lifetime of a bgfx::VertexBufferHandle.
Definition vertex_buffer.h:43