MPQC
3.0.0-alpha
molrender.h
1
//
2
// molrender.h
3
//
4
// Copyright (C) 1996 Limit Point Systems, Inc.
5
//
6
// Author: Curtis Janssen <cljanss@limitpt.com>
7
// Maintainer: LPS
8
//
9
// This file is part of the SC Toolkit.
10
//
11
// The SC Toolkit is free software; you can redistribute it and/or modify
12
// it under the terms of the GNU Library General Public License as published by
13
// the Free Software Foundation; either version 2, or (at your option)
14
// any later version.
15
//
16
// The SC Toolkit is distributed in the hope that it will be useful,
17
// but WITHOUT ANY WARRANTY; without even the implied warranty of
18
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
// GNU Library General Public License for more details.
20
//
21
// You should have received a copy of the GNU Library General Public License
22
// along with the SC Toolkit; see the file COPYING.LIB. If not, write to
23
// the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24
//
25
// The U.S. Government is granted a limited license as per AL 91-7.
26
//
27
28
#ifndef _chemistry_molecule_molrender_h
29
#define _chemistry_molecule_molrender_h
30
31
#include <util/render/object.h>
32
#include <util/keyval/keyval.h>
33
#include <chemistry/molecule/molecule.h>
34
#include <chemistry/molecule/atominfo.h>
35
#include <math/isosurf/surf.h>
36
37
namespace
sc
{
38
39
class
RenderedMolecule
:
public
RenderedObject
{
40
protected
:
41
Ref<RenderedObject>
object_;
42
Ref<Molecule>
mol_;
43
Ref<AtomInfo>
atominfo_;
44
45
public
:
46
RenderedMolecule
(
const
Ref<KeyVal>
& keyval);
47
~
RenderedMolecule
();
48
49
Ref<Molecule>
molecule() {
return
mol_; }
50
51
// init must be called if the molecule changes
52
virtual
void
init() = 0;
53
54
void
render(
const
Ref<Render>
&);
55
};
56
57
58
class
RenderedStickMolecule
:
public
RenderedMolecule
{
59
protected
:
60
int
use_color_;
61
public
:
62
RenderedStickMolecule
(
const
Ref<KeyVal>
& keyval);
63
~
RenderedStickMolecule
();
64
65
void
init();
66
};
67
68
class
RenderedBallMolecule
:
public
RenderedMolecule
{
69
protected
:
70
public
:
71
RenderedBallMolecule
(
const
Ref<KeyVal>
& keyval);
72
~
RenderedBallMolecule
();
73
74
void
init();
75
};
76
77
class
MoleculeColorizer
:
public
DescribedClass
{
78
protected
:
79
Ref<Molecule>
mol_;
80
public
:
81
MoleculeColorizer
(
const
Ref<Molecule>
&);
82
MoleculeColorizer
(
const
Ref<KeyVal>
&);
83
~
MoleculeColorizer
();
84
85
virtual
void
colorize(
const
Ref<RenderedPolygons>
&) = 0;
86
};
87
88
89
class
AtomProximityColorizer
:
public
MoleculeColorizer
{
90
protected
:
91
Ref<AtomInfo>
atominfo_;
92
public
:
93
AtomProximityColorizer
(
const
Ref<Molecule>
&,
const
Ref<AtomInfo>
&);
94
AtomProximityColorizer
(
const
Ref<KeyVal>
&);
95
~
AtomProximityColorizer
();
96
97
void
colorize(
const
Ref<RenderedPolygons>
&);
98
};
99
100
class
RenderedMolecularSurface
:
public
RenderedMolecule
{
101
protected
:
102
Ref<TriangulatedImplicitSurface>
surf_;
103
Ref<MoleculeColorizer>
colorizer_;
104
public
:
105
RenderedMolecularSurface
(
const
Ref<KeyVal>
& keyval);
106
~
RenderedMolecularSurface
();
107
108
void
init(
int
reinit_surf);
109
void
init();
110
};
111
112
}
113
114
#endif
115
116
// Local Variables:
117
// mode: c++
118
// c-file-style: "CLJ"
119
// End:
sc::Ref
A template class that maintains references counts.
Definition:
ref.h:361
sc::RenderedObject
Definition:
object.h:42
sc::RenderedMolecule
Definition:
molrender.h:39
sc::AtomProximityColorizer
Definition:
molrender.h:89
sc::RenderedMolecularSurface
Definition:
molrender.h:100
sc::RenderedStickMolecule
Definition:
molrender.h:58
sc::DescribedClass
Classes which need runtime information about themselves and their relationship to other classes can v...
Definition:
class.h:233
sc::RenderedBallMolecule
Definition:
molrender.h:68
sc
Contains all MPQC code up to version 3.
Definition:
mpqcin.h:14
sc::MoleculeColorizer
Definition:
molrender.h:77
Generated at Sun Jan 26 2020 23:23:57 for
MPQC
3.0.0-alpha using the documentation package
Doxygen
1.8.16.