39 result.emplace_back(p);
46 std::vector<std::unique_ptr<IParticle>> result;
50 const auto sublist = particle->decompose();
51 for (
const auto& subparticle : sublist) {
54 new_subparticle->
rotate(*rot);
56 result.emplace_back(new_subparticle);
77 for (
size_t i = 0; i < positions.size(); ++i)
83 std::vector<const IParticle*> result;
85 result.emplace_back(p);
Defines the macro ASSERT.
Defines class ParticleComposition.
Defines IRotation classes.
Abstract base class for Particle, ParticleComposition, ParticleCoreShell, MesoCrystal....
IParticle * translate(R3 translation)
Translates the particle, and returns this.
const IRotation * rotation() const
Returns rotation object.
IParticle * rotate(const IRotation &rotation)
Rotates the particle, and returns this.
std::vector< const INode * > nodeChildren() const override
Returns all children.
IParticle * clone() const override=0
Returns a clone of this ISampleNode object.
std::unique_ptr< IRotation > m_rotation
R3 particlePosition() const
Returns particle position.
A composition of particles at fixed positions.
void addParticle(const IParticle &particle)
void addParticles(const IParticle &particle, std::vector< R3 > positions)
std::vector< std::unique_ptr< IParticle > > decompose() const override
Decompose in constituent IParticle objects.
std::vector< const INode * > nodeChildren() const override
Returns all children.
std::vector< const IParticle * > particles() const
OwningVector< IParticle > m_particles
~ParticleComposition() override
ParticleComposition * clone() const override
Returns a clone of this ISampleNode object.