Loading...
Searching...
No Matches
ballAndStickModel.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
// $Id: ballAndStickModel.h,v 1.17.18.1 2007/03/25 21:26:05 oliver Exp $
//
#ifndef BALL_VIEW_MODELS_BALLANDSTICKMODEL_H
#define BALL_VIEW_MODELS_BALLANDSTICKMODEL_H
#ifndef BALL_VIEW_MODELS_ATOMBONDMODELBASEPROCESSOR_H
# include <BALL/VIEW/MODELS/atomBondModelBaseProcessor.h>
#endif
#ifndef BALL_KERNEL_ATOM_H
#include <BALL/KERNEL/atom.h>
#endif
namespace BALL
{
class Atom;
namespace VIEW
{
class BALL_VIEW_EXPORT AddBallAndStickModel: public AtomBondModelBaseProcessor
{
public:
BALL_CREATE(AddBallAndStickModel)
//@{
AddBallAndStickModel();
AddBallAndStickModel(const AddBallAndStickModel& add_ball_and_stick_model);
virtual ~AddBallAndStickModel();
virtual void clear();
void set(const AddBallAndStickModel& add_ball_and_stick_model);
const AddBallAndStickModel& operator = (const AddBallAndStickModel& processor);
void setBallRadius(const float radius);
float getBallRadius() const;
void setStickRadius(const float radius);
float getStickRadius() const;
void enableBallAndStickModel();
void enableStickModel();
virtual Processor::Result operator() (Composite& composite);
bool isBallAndStickModel() const;
bool isStickModel() const;
bool dashedBondsEnabled() const
{ return dashed_bonds_;}
void enableDashedBonds(bool state)
{ dashed_bonds_ = state;}
virtual void dump(std::ostream& s = std::cout, Size depth = 0) const;
virtual bool createGeometricObjects();
protected:
void visualiseBond_(const Bond& bond);
virtual void visualiseRings_();
inline void renderStandardBond_(const Bond& bond);
inline void renderMultipleBond_(const Bond& bond, Vector3 normal, Vector3 dir);
inline void renderDashedBond_(const Bond& bond, Vector3 n);
void collectRingBonds_();
Vector3 getSP2Plane_(const Atom& atom, const Bond& bond, const Vector3& dir) const;
private:
float ball_radius_;
float stick_radius_;
float special_radius_;
bool ball_and_stick_;
bool dashed_bonds_;
vector<vector<Bond*> > ring_bonds_;
};
# ifndef BALL_NO_INLINE_FUNCTIONS
# include <BALL/VIEW/MODELS/ballAndStickModel.iC>
# endif
} // namespace VIEW
} // namespace BALL
#endif // BALL_VIEW_MODELS_BALLANDSTICKMODEL_H
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition COMMON/global.h:52
atomBondModelBaseProcessor.h
atom.h
BALL::Atom
Definition atom.h:90
BALL::Bond
Definition bond.h:57
BALL::Composite
Definition composite.h:74
BALL::Processor
Definition processor.h:32
BALL::Result
Definition result.h:22
BALL::VIEW::AddBallAndStickModel::visualiseBond_
void visualiseBond_(const Bond &bond)
BALL::VIEW::AddBallAndStickModel::renderMultipleBond_
void renderMultipleBond_(const Bond &bond, Vector3 normal, Vector3 dir)
BALL::VIEW::AddBallAndStickModel::enableStickModel
void enableStickModel()
BALL::VIEW::AddBallAndStickModel::getStickRadius
float getStickRadius() const
BALL::VIEW::AddBallAndStickModel::renderStandardBond_
void renderStandardBond_(const Bond &bond)
BALL::VIEW::AddBallAndStickModel::AddBallAndStickModel
AddBallAndStickModel()
BALL::VIEW::AddBallAndStickModel::setStickRadius
void setStickRadius(const float radius)
BALL::VIEW::AddBallAndStickModel::setBallRadius
void setBallRadius(const float radius)
BALL::VIEW::AddBallAndStickModel::clear
virtual void clear()
BALL::VIEW::AddBallAndStickModel::getBallRadius
float getBallRadius() const
BALL::VIEW::AddBallAndStickModel::enableBallAndStickModel
void enableBallAndStickModel()
BALL::VIEW::AddBallAndStickModel::dump
virtual void dump(std::ostream &s=std::cout, Size depth=0) const
BALL::VIEW::AddBallAndStickModel::collectRingBonds_
void collectRingBonds_()
BALL::VIEW::AddBallAndStickModel::isBallAndStickModel
bool isBallAndStickModel() const
BALL::VIEW::AddBallAndStickModel::getSP2Plane_
Vector3 getSP2Plane_(const Atom &atom, const Bond &bond, const Vector3 &dir) const
BALL::VIEW::AddBallAndStickModel::set
void set(const AddBallAndStickModel &add_ball_and_stick_model)
BALL::VIEW::AddBallAndStickModel::enableDashedBonds
void enableDashedBonds(bool state)
Definition ballAndStickModel.h:166
BALL::VIEW::AddBallAndStickModel::visualiseRings_
virtual void visualiseRings_()
BALL::VIEW::AddBallAndStickModel::renderDashedBond_
void renderDashedBond_(const Bond &bond, Vector3 n)
BALL::VIEW::AddBallAndStickModel::dashedBondsEnabled
bool dashedBondsEnabled() const
Definition ballAndStickModel.h:162
BALL::VIEW::AddBallAndStickModel::createGeometricObjects
virtual bool createGeometricObjects()
BALL::VIEW::AddBallAndStickModel::isStickModel
bool isStickModel() const
BALL::VIEW::AtomBondModelBaseProcessor::AtomBondModelBaseProcessor
AtomBondModelBaseProcessor()
BALL_CREATE
#define BALL_CREATE(name)
Definition create.h:62
BALL::VIEW
Definition constraints.h:35
BALL
Definition constants.h:13
BALL::Size
BALL_SIZE_TYPE Size
Definition COMMON/global.h:114
BALL::Vector3
TVector3< float > Vector3
Definition vector3.h:1084