29 #ifndef CDPL_SHAPE_GAUSSIANSHAPE_HPP
30 #define CDPL_SHAPE_GAUSSIANSHAPE_HPP
69 position(pos), radius(radius), hardness(hardness), color(color) {}
104 this->radius = radius;
140 this->hardness = hardness;
151 typedef std::vector<Element> ElementList;
267 ElementList elements;
Definition of class CDPL::Base::PropertyContainer.
Definition of the preprocessor macro CDPL_SHAPE_API.
#define CDPL_SHAPE_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Definition of vector data types.
Base class providing methods for the storage and lookup of object properties.
Definition: PropertyContainer.hpp:75
Data structure representing a single sphere of the Gaussian shape, characterized by a position,...
Definition: GaussianShape.hpp:58
std::size_t getColor() const
Returns the color attribute of the sphere.
Definition: GaussianShape.hpp:111
void setRadius(double radius)
Sets the sphere radius.
Definition: GaussianShape.hpp:102
void setHardness(double hardness)
Sets the hardness of the Gaussian.
Definition: GaussianShape.hpp:138
const Math::Vector3D & getPosition() const
Returns the position of the sphere center.
Definition: GaussianShape.hpp:75
void setPosition(const Math::Vector3D &pos)
Sets the position of the sphere center.
Definition: GaussianShape.hpp:84
Element(const Math::Vector3D &pos, double radius, std::size_t color=0, double hardness=2.7)
Constructs an Element with the given attributes.
Definition: GaussianShape.hpp:68
double getHardness() const
Returns the hardness of the Gaussian.
Definition: GaussianShape.hpp:129
double getRadius() const
Returns the sphere radius.
Definition: GaussianShape.hpp:93
void setColor(std::size_t color)
Sets the color attribute of the sphere.
Definition: GaussianShape.hpp:120
Data type for the descripton of arbitrary shapes composed of spheres approximated by gaussian functio...
Definition: GaussianShape.hpp:51
Element & getElement(std::size_t idx)
Returns a reference to the element at index idx.
ElementList::iterator ElementIterator
A mutable iterator over the elements of the shape.
Definition: GaussianShape.hpp:167
ConstElementIterator begin() const
Returns a constant iterator pointing to the first element (range-based for support).
ConstElementIterator getElementsBegin() const
Returns a constant iterator pointing to the first element.
ElementIterator begin()
Returns a mutable iterator pointing to the first element (range-based for support).
ConstElementIterator end() const
Returns a constant iterator pointing one past the last element (range-based for support).
ElementIterator end()
Returns a mutable iterator pointing one past the last element (range-based for support).
void removeElement(std::size_t idx)
Removes the element at index idx.
void addElement(const Element &elem)
Adds the given element to the shape.
void addElement(const Math::Vector3D &pos, double radius, std::size_t color=0, double hardness=2.7)
Adds a new element to the shape.
ElementList::const_iterator ConstElementIterator
A constant iterator over the elements of the shape.
Definition: GaussianShape.hpp:162
ElementIterator getElementsBegin()
Returns a mutable iterator pointing to the first element.
ConstElementIterator getElementsEnd() const
Returns a constant iterator pointing one past the last element.
std::size_t getNumElements() const
Returns the number of elements in the shape.
void clear()
Removes all elements from the shape.
const Element & getElement(std::size_t idx) const
Returns a const reference to the element at index idx.
ElementIterator getElementsEnd()
Returns a mutable iterator pointing one past the last element.
std::shared_ptr< GaussianShape > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated GaussianShape instances.
Definition: GaussianShape.hpp:157
CVector< double, 3 > Vector3D
Bounded 3 element vector holding floating point values of type double.
Definition: Vector.hpp:2937
The namespace of the Chemical Data Processing Library.