Loading...
Searching...
No Matches
cartoonModel.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
// $Id: cartoonModel.h,v 1.32.18.1 2007/03/25 21:26:05 oliver Exp $
//
#ifndef BALL_VIEW_MODELS_CARTOONMODEL_H
#define BALL_VIEW_MODELS_CARTOONMODEL_H
#ifndef BALL_VIEW_MODELS_BACKBONEMODEL_H
# include <BALL/VIEW/MODELS/backboneModel.h>
#endif
namespace BALL
{
namespace VIEW
{
class Mesh;
class BALL_VIEW_EXPORT AddCartoonModel
: public AddBackboneModel
{
public:
enum Types
{
STRAND = NUCLEIC_ACID + 1,
HELIX
};
BALL_CREATE(AddCartoonModel)
AddCartoonModel();
AddCartoonModel(const AddCartoonModel& cartoon_model);
virtual ~AddCartoonModel();
void setHelixRadius(float radius)
{ helix_radius_ = radius;}
float getHelixRadius() const
{ return helix_radius_;}
void setArrowWidth(float width)
{arrow_width_ = width;}
float getArrowWidth() const
{ return arrow_width_;}
void setStrandHeight(float heigth)
{ strand_height_ = heigth;}
float getStrandHeight() const
{ return strand_height_;}
void setStrandWidth(float w)
{ strand_width_ = w;}
float getStrandWidth() const
{ return strand_width_;}
void setDNABaseRadius(float r)
{ DNA_base_radius_ = r;}
float getDNABaseRadius() const
{ return DNA_base_radius_;}
void setDNAHelixRadius(float r)
{ DNA_helix_radius_ = r;}
float getDNAHelixRadius() const
{ return DNA_helix_radius_;}
void setDNALadderRadius(float r)
{ DNA_ladder_radius_ = r;}
float getDNALadderRadius() const
{ return DNA_ladder_radius_;}
void setDrawDNAAsLadderModel(bool state)
{ draw_DNA_as_ladder_ = state;}
bool drawDNAAsLadderModel()
{ return draw_DNA_as_ladder_;}
void enableRibbons(bool state)
{ draw_ribbon_ = state;}
bool ribbonsEnabled() const
{return draw_ribbon_;}
protected:
void insertTriangle_(Position v1, Position v2, Position v3, Mesh& mesh);
inline void drawStrand_(const Vector3& start,
Vector3& right,
Vector3& hn,
float arrow_width,
Position& last_vertices,
Mesh& mesh);
void calculateComplementaryBases_(const Composite& composite);
bool assignNucleotideAtoms_(Residue& r, Size nr_atoms, String atom_names[10], Atom* atoms[10]);
void drawRiboseAtoms_(const Atom* atom1, const Atom* atom2, const Vector3& v1, const Vector3& v2);
void calculateModelParts(Protein& protein);
void assignModelType(ModelPart& part);
void createModel_(Position set_pos, Position part_pos);
void createStrand_(Position set_pos, Position part_pos);
void createHelix_(Position set_first, Position part_pos);
void createTubeHelix_(Position set_first, Position part_pos);
void createWatsonCrickModel_(Position set_pos, Position part_pos);
void createSimpleNucleicAcid_(Position set_pos, Position part_pos);
void renderNucleotideOutline_(const vector<Vector3>& positions, Vector3 uv, Mesh& mesh);
Mesh* createDoubleRing_(const vector<Vector3>& positions);
Mesh* create6Ring_(vector<Vector3> positions);
virtual void refineGuidePoints_();
float helix_radius_;
float helix_height_;
float helix_width_;
float arrow_width_;
float strand_width_;
float strand_height_;
float DNA_helix_radius_;
float DNA_ladder_radius_;
float DNA_base_radius_;
float ribbon_width_;
float ribbon_radius_;
bool draw_DNA_as_ladder_;
bool draw_ribbon_;
HashMap<const Residue*, const Residue*> complementary_bases_;
};
} // namespace VIEW
} // namespace BALL
#endif // BALL_VIEW_MODELS_CARTOONMODEL_H
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition COMMON/global.h:52
backboneModel.h
BALL::Atom
Definition atom.h:90
BALL::Composite
Definition composite.h:74
BALL::HashMap
HashMap class based on the STL map (containing serveral convenience functions).
Definition hashMap.h:74
BALL::Protein
Definition protein.h:30
BALL::Residue
Definition residue.h:38
BALL::String
Definition string.h:57
BALL::VIEW::AddBackboneModel::AddBackboneModel
AddBackboneModel()
Default Constructor.
BALL::VIEW::AddBackboneModel::start
virtual bool start()
BALL::VIEW::AddBackboneModel::NUCLEIC_ACID
@ NUCLEIC_ACID
Definition backboneModel.h:68
BALL::VIEW::AddCartoonModel
Definition cartoonModel.h:30
BALL::VIEW::AddCartoonModel::setDNABaseRadius
void setDNABaseRadius(float r)
Definition cartoonModel.h:83
BALL::VIEW::AddCartoonModel::getStrandWidth
float getStrandWidth() const
Definition cartoonModel.h:79
BALL::VIEW::AddCartoonModel::DNA_base_radius_
float DNA_base_radius_
Definition cartoonModel.h:161
BALL::VIEW::AddCartoonModel::createStrand_
void createStrand_(Position set_pos, Position part_pos)
BALL::VIEW::AddCartoonModel::assignModelType
void assignModelType(ModelPart &part)
BALL::VIEW::AddCartoonModel::refineGuidePoints_
virtual void refineGuidePoints_()
BALL::VIEW::AddCartoonModel::getDNABaseRadius
float getDNABaseRadius() const
Definition cartoonModel.h:87
BALL::VIEW::AddCartoonModel::drawStrand_
void drawStrand_(const Vector3 &start, Vector3 &right, Vector3 &hn, float arrow_width, Position &last_vertices, Mesh &mesh)
BALL::VIEW::AddCartoonModel::getStrandHeight
float getStrandHeight() const
Definition cartoonModel.h:71
BALL::VIEW::AddCartoonModel::create6Ring_
Mesh * create6Ring_(vector< Vector3 > positions)
BALL::VIEW::AddCartoonModel::drawRiboseAtoms_
void drawRiboseAtoms_(const Atom *atom1, const Atom *atom2, const Vector3 &v1, const Vector3 &v2)
BALL::VIEW::AddCartoonModel::createDoubleRing_
Mesh * createDoubleRing_(const vector< Vector3 > &positions)
BALL::VIEW::AddCartoonModel::setStrandHeight
void setStrandHeight(float heigth)
Definition cartoonModel.h:67
BALL::VIEW::AddCartoonModel::getDNALadderRadius
float getDNALadderRadius() const
Definition cartoonModel.h:103
BALL::VIEW::AddCartoonModel::createTubeHelix_
void createTubeHelix_(Position set_first, Position part_pos)
BALL::VIEW::AddCartoonModel::calculateModelParts
void calculateModelParts(Protein &protein)
BALL::VIEW::AddCartoonModel::createWatsonCrickModel_
void createWatsonCrickModel_(Position set_pos, Position part_pos)
BALL::VIEW::AddCartoonModel::ribbonsEnabled
bool ribbonsEnabled() const
Definition cartoonModel.h:119
BALL::VIEW::AddCartoonModel::drawDNAAsLadderModel
bool drawDNAAsLadderModel()
Definition cartoonModel.h:111
BALL::VIEW::AddCartoonModel::ribbon_radius_
float ribbon_radius_
Definition cartoonModel.h:163
BALL::VIEW::AddCartoonModel::createSimpleNucleicAcid_
void createSimpleNucleicAcid_(Position set_pos, Position part_pos)
BALL::VIEW::AddCartoonModel::setArrowWidth
void setArrowWidth(float width)
Definition cartoonModel.h:59
BALL::VIEW::AddCartoonModel::setDrawDNAAsLadderModel
void setDrawDNAAsLadderModel(bool state)
Definition cartoonModel.h:107
BALL::VIEW::AddCartoonModel::draw_DNA_as_ladder_
bool draw_DNA_as_ladder_
Definition cartoonModel.h:165
BALL::VIEW::AddCartoonModel::getArrowWidth
float getArrowWidth() const
Definition cartoonModel.h:63
BALL::VIEW::AddCartoonModel::complementary_bases_
HashMap< const Residue *, const Residue * > complementary_bases_
Definition cartoonModel.h:168
BALL::VIEW::AddCartoonModel::helix_radius_
float helix_radius_
Definition cartoonModel.h:153
BALL::VIEW::AddCartoonModel::createHelix_
void createHelix_(Position set_first, Position part_pos)
BALL::VIEW::AddCartoonModel::assignNucleotideAtoms_
bool assignNucleotideAtoms_(Residue &r, Size nr_atoms, String atom_names[10], Atom *atoms[10])
BALL::VIEW::AddCartoonModel::strand_width_
float strand_width_
Definition cartoonModel.h:157
BALL::VIEW::AddCartoonModel::setStrandWidth
void setStrandWidth(float w)
Definition cartoonModel.h:75
BALL::VIEW::AddCartoonModel::setDNAHelixRadius
void setDNAHelixRadius(float r)
Definition cartoonModel.h:91
BALL::VIEW::AddCartoonModel::strand_height_
float strand_height_
Definition cartoonModel.h:158
BALL::VIEW::AddCartoonModel::DNA_ladder_radius_
float DNA_ladder_radius_
Definition cartoonModel.h:160
BALL::VIEW::AddCartoonModel::draw_ribbon_
bool draw_ribbon_
Definition cartoonModel.h:166
BALL::VIEW::AddCartoonModel::arrow_width_
float arrow_width_
Definition cartoonModel.h:156
BALL::VIEW::AddCartoonModel::getDNAHelixRadius
float getDNAHelixRadius() const
Definition cartoonModel.h:95
BALL::VIEW::AddCartoonModel::helix_height_
float helix_height_
Definition cartoonModel.h:154
BALL::VIEW::AddCartoonModel::AddCartoonModel
AddCartoonModel()
Default Constructor.
BALL::VIEW::AddCartoonModel::createModel_
void createModel_(Position set_pos, Position part_pos)
BALL::VIEW::AddCartoonModel::insertTriangle_
void insertTriangle_(Position v1, Position v2, Position v3, Mesh &mesh)
BALL::VIEW::AddCartoonModel::enableRibbons
void enableRibbons(bool state)
Definition cartoonModel.h:115
BALL::VIEW::AddCartoonModel::calculateComplementaryBases_
void calculateComplementaryBases_(const Composite &composite)
BALL::VIEW::AddCartoonModel::getHelixRadius
float getHelixRadius() const
Definition cartoonModel.h:55
BALL::VIEW::AddCartoonModel::helix_width_
float helix_width_
Definition cartoonModel.h:155
BALL::VIEW::AddCartoonModel::Types
Types
Definition cartoonModel.h:34
BALL::VIEW::AddCartoonModel::STRAND
@ STRAND
Definition cartoonModel.h:35
BALL::VIEW::AddCartoonModel::HELIX
@ HELIX
Definition cartoonModel.h:36
BALL::VIEW::AddCartoonModel::setDNALadderRadius
void setDNALadderRadius(float r)
Definition cartoonModel.h:99
BALL::VIEW::AddCartoonModel::setHelixRadius
void setHelixRadius(float radius)
Definition cartoonModel.h:51
BALL::VIEW::AddCartoonModel::DNA_helix_radius_
float DNA_helix_radius_
Definition cartoonModel.h:159
BALL::VIEW::AddCartoonModel::renderNucleotideOutline_
void renderNucleotideOutline_(const vector< Vector3 > &positions, Vector3 uv, Mesh &mesh)
BALL::VIEW::AddCartoonModel::ribbon_width_
float ribbon_width_
Definition cartoonModel.h:162
BALL::VIEW::Mesh
Definition mesh.h:42
BALL_CREATE
#define BALL_CREATE(name)
Definition create.h:62
BALL::atoms
BALL_EXPORT AtomList atoms(const AtomContainer &fragment, const String &expression=String())
BALL::VIEW
Definition constraints.h:35
BALL
Definition constants.h:13
BALL::Size
BALL_SIZE_TYPE Size
Definition COMMON/global.h:114
BALL::Position
BALL_SIZE_TYPE Position
Definition COMMON/global.h:140
BALL::Vector3
TVector3< float > Vector3
Definition vector3.h:1084
BALL::VIEW::AddBackboneModel::ModelPart
Definition backboneModel.h:47