Skip to content
Snippets Groups Projects
Commit 593cf688 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

code layout

parent 9949776e
No related branches found
No related tags found
No related merge requests found
......@@ -68,7 +68,8 @@ void ParticleCoreShell::setAmbientMaterial(const IMaterial& material)
const IMaterial* ParticleCoreShell::getAmbientMaterial() const
{
if (!mp_shell) return 0;
if (!mp_shell)
return nullptr;
return mp_shell->getAmbientMaterial();
}
......@@ -100,7 +101,7 @@ IFormFactor* ParticleCoreShell::createTransformedFormFactor(const IRotation* p_r
return P_result.release();
}
void ParticleCoreShell::addAndRegisterCore(const Particle &core, kvector_t relative_core_position)
void ParticleCoreShell::addAndRegisterCore(const Particle& core, kvector_t relative_core_position)
{
if(mp_core) {
deregisterChild(mp_core);
......@@ -112,7 +113,7 @@ void ParticleCoreShell::addAndRegisterCore(const Particle &core, kvector_t relat
}
void ParticleCoreShell::addAndRegisterShell(const Particle &shell)
void ParticleCoreShell::addAndRegisterShell(const Particle& shell)
{
if(mp_shell) {
deregisterChild(mp_shell);
......
......@@ -53,8 +53,8 @@ public:
const Particle* getShellParticle() const { return mp_shell; }
protected:
void addAndRegisterCore(const Particle &core, kvector_t relative_core_position);
void addAndRegisterShell(const Particle &shell);
void addAndRegisterCore(const Particle& core, kvector_t relative_core_position);
void addAndRegisterShell(const Particle& shell);
ParticleCoreShell();
Particle* mp_shell;
......
......@@ -68,6 +68,7 @@ const IMaterial* ParticleDistribution::getAmbientMaterial() const
return mP_particle->getAmbientMaterial();
}
//! Initializes list of new particles generated according to a distribution.
void ParticleDistribution::generateParticles(
std::vector<const IParticle*>& particle_vector) const
{
......
......@@ -30,25 +30,21 @@ public:
ParticleDistribution(const IParticle& prototype, const ParameterDistribution& par_distr);
virtual ParticleDistribution* clone() const;
//! Returns a clone with inverted magnetic fields
virtual ParticleDistribution* cloneInvertB() const;
//! calls the ISampleVisitor's visit method
virtual void accept(ISampleVisitor* visitor) const;
//! Returns textual representation of* this and its descendants.
//! Returns textual representation of *this and its descendants.
virtual std::string to_str(int indent=0) const;
//! Sets the refractive index of the ambient material (which influences its
//! scattering power)
//! Sets the refractive index of the ambient material.
virtual void setAmbientMaterial(const IMaterial& material);
//! Returns particle's material.
virtual const IMaterial* getAmbientMaterial() const;
//! Initializes list of new particles generated according to a distribution
virtual void generateParticles(std::vector<const IParticle* >& particle_vector) const;
//! Initializes list of new particles generated according to a distribution.
virtual void generateParticles(std::vector<const IParticle*>& particle_vector) const;
//! Returns the distributed parameter data
ParameterDistribution getParameterDistribution() const { return m_par_distribution; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment