Skip to content
Snippets Groups Projects
Commit b04be941 authored by marco's avatar marco
Browse files

POV export for SIMPLE render mode

This is essentially the same as the CUSTOM renderer export, but with
a very thin tube and sphere radius.

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@1859 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent c63e115c
Branches
Tags
No related merge requests found
......@@ -24,7 +24,7 @@
#include <ost/gfx/gl_helper.hh>
#include <ost/gfx/scene.hh>
#include <ost/gfx/entity.hh>
#include <ost/gfx/povray.hh>
#include "simple_renderer.hh"
namespace ost { namespace gfx { namespace impl {
......@@ -316,4 +316,28 @@ SimpleRenderer::~SimpleRenderer()
}
void SimpleRenderer::RenderPov(PovState& pov, const std::string& name)
{
pov.write_merge_or_union(name);
for (AtomEntryMap::const_iterator it=view_.atom_map.begin();
it!=view_.atom_map.end();++it) {
pov.write_sphere(it->second.atom.GetPos(),
options_->GetLineWidth()*0.05,
it->second.color,
name);
}
for(BondEntryList::const_iterator it=view_.bond_list.begin();it!=view_.bond_list.end();++it) {
const geom::Vec3& p0=it->bond.GetFirst().GetPos();
const geom::Vec3& p2=it->bond.GetSecond().GetPos();
geom::Vec3 p1=(p0+p2)*0.5;
pov.write_cyl(p0,p1,options_->GetLineWidth()*0.05,
it->atom1->color,name,true);
pov.write_cyl(p1,p2,options_->GetLineWidth()*0.05,
it->atom2->color,name,true);
}
pov.inc() << " }\n";
}
}}}
......@@ -45,7 +45,7 @@ public:
virtual void Render(RenderPass pass);
virtual ~SimpleRenderer();
virtual void RenderPov(PovState& pov, const std::string& name);
void BlurSnapshot();
private:
void RenderBlur();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment