27 #include "ObjCryst/ObjCryst/Crystal.h"
28 #include "ObjCryst/ObjCryst/Scatterer.h"
30 #include "ObjCryst/Quirks/VFNStreamFormat.h"
32 #include "ObjCryst/Quirks/VFNDebug.h"
35 #include "ObjCryst/wxCryst/wxScatterer.h"
38 #include "ObjCryst/ObjCryst/Colours.h"
46 const RefParType *gpRefParTypeScatt=0;
47 const RefParType *gpRefParTypeScattTransl=0;
48 const RefParType *gpRefParTypeScattTranslX=0;
49 const RefParType *gpRefParTypeScattTranslY=0;
50 const RefParType *gpRefParTypeScattTranslZ=0;
51 const RefParType *gpRefParTypeScattOrient=0;
52 const RefParType *gpRefParTypeScattConform=0;
53 const RefParType *gpRefParTypeScattConformBondLength=0;
54 const RefParType *gpRefParTypeScattConformBondAngle=0;
55 const RefParType *gpRefParTypeScattConformDihedAngle=0;
56 const RefParType *gpRefParTypeScattConformX=0;
57 const RefParType *gpRefParTypeScattConformY=0;
58 const RefParType *gpRefParTypeScattConformZ=0;
59 const RefParType *gpRefParTypeScattOccup=0;
60 long NiftyStaticGlobalObjectsInitializer_Scatterer::mCount=0;
71 VFN_DEBUG_MESSAGE(
"Scatterer::Scatterer()",5)
81 mOccupancy(old.mOccupancy),
82 mColourName(old.mColourName),mpCryst(old.mpCryst)
84 VFN_DEBUG_MESSAGE(
"Scatterer::Scatterer(&old)",5)
93 VFN_DEBUG_MESSAGE(
"Scatterer::~Scatterer():("<<
mName<<
")",5)
99 const static string className=
"Scatterer";
118 Scatterer::operator string()
const {
return this->GetName();}
143 VFN_DEBUG_MESSAGE(
"Scatterer::InitRGBColour()",2)
154 if(strncmp(gPOVRayColours[i].
mName,
"",3 )==0)
156 cout <<
"Could not find colour:"<<
mColourName<<
" for scaterrer "<<mName<<endl;
string mColourName
Colour for this scatterer (from POVRay)
const RefinableObjClock & GetClockScatterer() const
Last time anything in the scatterer was changed (atoms, positions, scattering power) ...
We need to record exactly when refinable objects have been modified for the last time (to avoid re-co...
CrystVector_REAL mXYZ
coordinates of the scatterer (or of its center..)
float mColourRGB[3]
Colour for this scatterer using RGB.
void Click()
Record an event for this clock (generally, the 'time' an object has been modified, or some computation has been made)
void AddChild(const RefinableObjClock &)
Add a 'child' clock.
virtual const float * GetColourRGB() const
Colour associated to this scatterer, 3 RGB Coordinates.
RefinablePar & GetPar(const long i)
Access all parameters in the order they were inputted.
RefinableObjClock mClockMaster
Master clock, which is changed whenever the object has been altered.
REAL GetZ() const
Z coordinate (fractionnal) of the scatterer (for complex scatterers, this corresponds to the position...
REAL GetOccupancy() const
Get the occupancy of the scatterer (0.
Abstract base class for all objects in wxCryst.
string mName
Name for this RefinableObject. Should be unique, at least in the same scope.+.
virtual void SetY(const REAL y)
Y coordinate (fractionnal) of the scatterer (for complex scatterers, this corresponds to the position...
REAL GetX() const
X coordinate (fractionnal) of the scatterer (for complex scatterers, this corresponds to the position...
virtual ~Scatterer()
Destructor.
REAL mOccupancy
Occupancy : 0 <= occ <= 1 For a multi-atom scatterer (polyhedron,..), this is the overall occupancy o...
virtual const string & GetColour() const
Colour associated to this scatterer (using POVRay names)
virtual void SetX(const REAL x)
X coordinate (fractionnal) of the scatterer (for complex scatterers, this corresponds to the position...
void SetCrystal(Crystal &)
Set the crystal in which is included this Scatterer.
const Crystal & GetCrystal() const
In which crystal is this Scatterer included ?
ObjRegistry< Scatterer > gScattererRegistry("Global Scatterer Registry")
Global registry for all Scatterer objects.
The namespace which includes all objects (crystallographic and algorithmic) in ObjCryst++.
virtual const string & GetName() const
Name of the object.
Crystal class: Unit cell, spacegroup, scatterers.
virtual const string & GetClassName() const
Name for this class ("RefinableObj", "Crystal",...).
REAL GetY() const
Y coordinate (fractionnal) of the scatterer (for complex scatterers, this corresponds to the position...
RefinableObjClock mClockScatterer
Last time anything (number of atoms, positions, scattering power) was changed.
virtual void SetOccupancy(const REAL occupancy)
Change the occupancy of the scatterer (0.
virtual void InitRGBColour()
Get RGB Colour coordinates from Colour Name.
Generic type of scatterer: can be an atom, or a more complex assembly of atoms.
Crystal * mpCryst
The crystal in which the Scatterer is This is needed so that we can know which scattering powers are ...
virtual void SetZ(const REAL z)
Z coordinate (fractionnal) of the scatterer (for complex scatterers, this corresponds to the position...
base wxCryst class for Scatterers