Skip to content
Snippets Groups Projects
Commit 0d8fb8f8 authored by Marco Biasini's avatar Marco Biasini
Browse files

global variables are *EVIL*

parent 91297c11
No related branches found
No related tags found
No related merge requests found
......@@ -12,14 +12,16 @@ namespace detail {
class CBetaInserter:public EntityVisitor {
public:
CBetaInserter(mol::EntityHandle ent);
CBetaInserter(mol::EntityHandle ent, bool include_gly);
virtual bool VisitResidue(const mol::ResidueHandle& res);
private:
XCSEditor edi_;
bool include_gly_;
};
CBetaInserter::CBetaInserter(mol::EntityHandle ent) {
CBetaInserter::CBetaInserter(mol::EntityHandle ent, bool include_gly) {
edi_=ent.EditXCS(BUFFERED_EDIT);
include_gly_=include_gly;
}
bool CBetaInserter::VisitResidue(const mol::ResidueHandle& res)
......@@ -53,8 +55,7 @@ bool CBetaInserter::VisitResidue(const mol::ResidueHandle& res)
// ensure that C-betas are added to the view as well
void ConstructCBetas(mol::EntityHandle& entity_handle, bool include_gly)
{
include_gly_=include_gly;
detail::CBetaInserter cbi(entity_handle);
detail::CBetaInserter cbi(entity_handle, include_gly);
entity_handle.Apply(cbi);
}
......
......@@ -26,16 +26,16 @@ namespace ost { namespace mol { namespace alg {
geom::Vec3 DLLEXPORT_OST_MOL_ALG CBetaPosition(const ResidueHandle& residue,
Real bond_length=1.5);
Real bond_length=1.5);
geom::Vec3 DLLEXPORT_OST_MOL_ALG CBetaPosition(const geom::Vec3& n_pos,
const geom::Vec3& ca_pos,
const geom::Vec3& c_pos,
Real bond_length=1.5);
const geom::Vec3& ca_pos,
const geom::Vec3& c_pos,
Real bond_length=1.5);
void DLLEXPORT_OST_MOL_ALG ConstructCBetas(EntityHandle& entity_handle, bool include_gly=false);
void DLLEXPORT_OST_MOL_ALG ConstructCBetas(EntityHandle& entity_handle,
bool include_gly=false);
bool include_gly_;
}}} // ns
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment