Skip to content
Snippets Groups Projects
Commit d1dace5f authored by Ansgar Philippsen's avatar Ansgar Philippsen
Browse files

added temporary implementation to allow tube rendering with per-residue diameter

parent 2447ee5b
No related branches found
No related tags found
No related merge requests found
......@@ -84,11 +84,15 @@ public:
// determine atom to add to list
mol::AtomHandle ca = res.GetCentralAtom();
if (ca) {
float rad=1.0;
if(ca.HasProp("trace_rad")) {
rad=ca.GetFloatProp("trace_rad");
}
NodeEntry entry={ca, GfxObj::Ele2Color(ca.GetElement()),
GfxObj::Ele2Color(ca.GetElement()),
geom::Vec3(), // this will be set by the gfx trace obj
res.GetCentralNormal(),
1.0,
rad,
geom::Vec3(),geom::Vec3(),geom::Vec3(), // for later use in NA rendering
false,id_counter_++};
list_.push_back(entry);
......@@ -164,7 +168,13 @@ void BackboneTrace::OnUpdatedPositions()
for(NodeEntryListList::iterator nitnit=node_list_list_.begin();nitnit!=node_list_list_.end();++nitnit) {
NodeEntryList& nlist=*nitnit;
for(NodeEntryList::iterator nit=nlist.begin();nit!=nlist.end();++nit) {
nit->normal=nit->atom.GetResidue().GetCentralNormal();
mol::AtomHandle ca=nit->atom;
nit->normal=ca.GetResidue().GetCentralNormal();
if(ca.HasProp("trace_rad")) {
nit->rad=ca.GetFloatProp("trace_rad");
} else {
nit->rad=1.0;
}
}
PrepList(nlist);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment