Exemplo n.º 1
0
	void Group::copyChildren(const Group& group,bool createBase)
	{
		Registerable::copyChildren(group,createBase);

		model = dynamic_cast<Model*>(copyChild(group.model,createBase));
		renderer = dynamic_cast<Renderer*>(copyChild(group.renderer,createBase));

		// we clear the copies of pointers pushed in the vectors by the copy constructor
		emitters.clear();
		modifiers.clear();

		for (std::vector<Emitter*>::const_iterator it = group.emitters.begin(); it != group.emitters.end(); ++it)
			emitters.push_back(dynamic_cast<Emitter*>(copyChild(*it,createBase)));
		for (std::vector<Modifier*>::const_iterator it = group.modifiers.begin(); it != group.modifiers.end(); ++it)
			modifiers.push_back(dynamic_cast<Modifier*>(copyChild(*it,createBase)));
	}
Exemplo n.º 2
0
void Group::copyChildren(const Registerable& object, bool createBase)
{
	const Group& group = dynamic_cast<const Group&>(object);
	Registerable::copyChildren(group, createBase);

	model = dynamic_cast<Model*>(copyChild(group.model, createBase));
	renderer = dynamic_cast<Renderer*>(copyChild(group.renderer, createBase));

	// we clear the copies of pointers pushed in the vectors by the copy constructor
	emitters.clear();
	modifiers.clear();

	for( Emitter** it = group.emitters.begin(); it < group.emitters.end(); ++it )
		emitters.add(dynamic_cast<Emitter*>(copyChild(*it, createBase)));
	for( Modifier** it = group.modifiers.begin(); it < group.modifiers.end(); ++it )
		modifiers.add(dynamic_cast<Modifier*>(copyChild(*it, createBase)));
}
Exemplo n.º 3
0
	void System::copyChildren(const Registerable& object,bool createBase)
	{
		const System& system = dynamic_cast<const System&>(object);
		Registerable::copyChildren(system,createBase);

		// we clear the copies of pointers pushed in the vectors by the copy constructor
		groups.clear();

		for (std::vector<Group*>::const_iterator it = system.groups.begin(); it != system.groups.end(); ++it)
			groups.push_back(dynamic_cast<Group*>(copyChild(*it,createBase)));
	}
Exemplo n.º 4
0
void ModifierGroup::copyChildren(const Registerable& object,bool createBase)
{
    const ModifierGroup& modifier = dynamic_cast<const ModifierGroup&>(object);
    Modifier::copyChildren(modifier,createBase);

    // we clear the copies of pointers pushed in the vectors by the copy constructor
    modifiers.clear();

    for (std::vector<Modifier*>::const_iterator it = modifier.modifiers.begin(); it != modifier.modifiers.end(); ++it)
        modifiers.push_back(dynamic_cast<Modifier*>(copyChild(*it,createBase)));
}
void NormalEmitter::copyChildren(const Registerable& object, bool createBase)
{
	const NormalEmitter& emitter = dynamic_cast<const NormalEmitter&>(object);
	Emitter::copyChildren(emitter,createBase);
	normalZone = dynamic_cast<Zone*>(copyChild(emitter.normalZone,createBase));	
}
Exemplo n.º 6
0
	void Emitter::copyChildren(const Registerable& object,bool createBase)
	{
		const Emitter& emitter = dynamic_cast<const Emitter&>(object);
		Registerable::copyChildren(emitter,createBase);
		zone = dynamic_cast<Zone*>(copyChild(emitter.zone,createBase));	
	}
Exemplo n.º 7
0
	void Modifier::copyChildren(const Modifier& modifier,bool createBase)
	{
		Registerable::copyChildren(modifier,createBase);
		zone = dynamic_cast<Zone*>(copyChild(modifier.zone,createBase));
	}