| 1 |
/****************************************************************************** |
| 2 |
This source file is part of the Avogadro project. |
| 3 |
This source code is released under the 3-Clause BSD License, (see "LICENSE"). |
| 4 |
******************************************************************************/ |
| 5 |
|
| 6 |
#include "drawable.h" |
| 7 |
|
| 8 |
#include "visitor.h" |
| 9 |
|
| 10 |
namespace Avogadro::Rendering { |
| 11 |
|
| 12 |
using Core::Array; |
| 13 |
|
| 14 |
Drawable::Drawable() |
| 15 |
: m_parent(nullptr), m_visible(true), m_renderPass(OpaquePass) |
| 16 |
{ |
| 17 |
} |
| 18 |
|
| 19 |
Drawable::Drawable(const Drawable& other) |
| 20 |
: m_parent(other.m_parent), m_visible(other.m_visible), |
| 21 |
m_renderPass(other.m_renderPass), m_identifier(other.m_identifier) |
| 22 |
{ |
| 23 |
} |
| 24 |
|
| 25 |
Drawable::~Drawable() {} |
| 26 |
|
| 27 |
void Drawable::accept(Visitor& visitor) |
| 28 |
{ |
| 29 |
visitor.visit(*this); |
| 30 |
} |
| 31 |
|
| 32 |
void Drawable::render(const Camera&) {} |
| 33 |
|
| 34 |
std::multimap<float, Identifier> Drawable::hits(const Vector3f&, |
| 35 |
const Vector3f&, |
| 36 |
const Vector3f&) const |
| 37 |
{ |
| 38 |
return std::multimap<float, Identifier>(); |
| 39 |
} |
| 40 |
|
| 41 |
Array<Identifier> Drawable::areaHits(const Frustrum&) const |
| 42 |
{ |
| 43 |
return Array<Identifier>(); |
| 44 |
} |
| 45 |
|
| 46 |
void Drawable::clear() {} |
| 47 |
|
| 48 |
void Drawable::setParent(GeometryNode* parent_) |
| 49 |
{ |
| 50 |
m_parent = parent_; |
| 51 |
} |
| 52 |
|
| 53 |
} // namespace Avogadro::Rendering |