void ParticleEmitter3D::LoadParticleLayerFromYaml(const YamlNode* yamlNode, bool isLong) { ParticleLayer3D* layer = new ParticleLayer3D(this); layer->SetLong(isLong); AddLayer(layer); layer->LoadFromYaml(configPath, yamlNode); SafeRelease(layer); }
void ParticleEmitterNode::GetDataNodes(Set<DataNode*> & dataNodes) { if(emitter) { int32 layersCount = emitter->GetLayers().size(); for(int32 i = 0; i < layersCount; ++i) { ParticleLayer3D * layer = dynamic_cast<ParticleLayer3D*>(emitter->GetLayers()[i]); dataNodes.insert(layer->GetMaterial()); } } Entity::GetDataNodes(dataNodes); }
ParticleLayer * ParticleLayer3D::Clone(ParticleLayer * dstLayer /*= 0*/) { if(!dstLayer) { // YuriCoder, 2013/04/30. TODO - this part isn't supposed to work, since // dstLayer is always NULL here. Return to it later. ParticleEmitter* parentFor3DLayer = NULL; if (dynamic_cast<ParticleLayer3D*>(dstLayer)) { parentFor3DLayer = (dynamic_cast<ParticleLayer3D*>(dstLayer))->GetParent(); } ParticleLayer3D *dst = new ParticleLayer3D(parentFor3DLayer); GetMaterial()->Clone(dst->GetMaterial()); dstLayer = dst; dstLayer->SetLong(this->isLong); } ParticleLayer::Clone(dstLayer); return dstLayer; }