Skip to content

Commit

Permalink
PVA() and indexAsset
Browse files Browse the repository at this point in the history
  • Loading branch information
OVOAOVO committed Dec 20, 2023
1 parent 4f5e7df commit f8316dd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
11 changes: 8 additions & 3 deletions private/Producers/EffekseerProducer/EffekseerProducerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ EffekseerProducerImpl::EffekseerProducerImpl(const char16_t* pFilePath) :
{
}

void EffekseerProducerImpl::PushPVA(Effekseer::ParameterTranslationPVA* pParameter)
{
m_particlePos.push_back(pParameter->location);
m_particleVelocity.push_back(pParameter->velocity);
m_particleAccelerate.push_back(pParameter->acceleration);
}

void EffekseerProducerImpl::PushAllColor(Effekseer::AllTypeColorParameter* pAllColor)
{
if (pAllColor->type == pAllColor->Fixed)
Expand Down Expand Up @@ -105,9 +112,7 @@ void EffekseerProducerImpl::TraverseNodeRecursively(Effekseer::EffectNode* pNode
//PVA
m_particleType.push_back(nodeType);
auto* pSpriteNode = static_cast<Effekseer::EffectNodeSprite*>(pNode);
m_particlePos.push_back(pSpriteNode->TranslationParam.TranslationPVA.location);
m_particleVelocity.push_back(pSpriteNode->TranslationParam.TranslationPVA.velocity);
m_particleAccelerate.push_back(pSpriteNode->TranslationParam.TranslationPVA.acceleration);
PushPVA(&pSpriteNode->TranslationParam.TranslationPVA);
PushAllColor(&pSpriteNode->SpriteAllColor);
PushRotate(pSpriteNode);
PushScale(pSpriteNode);
Expand Down
7 changes: 5 additions & 2 deletions private/Producers/EffekseerProducer/EffekseerProducerImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ class EffekseerProducerImpl final

void TraverseNodeRecursively(Effekseer::EffectNode* pNode);

void PushAllColor(Effekseer::AllTypeColorParameter* AllColor);
void PushPVA(Effekseer::ParameterTranslationPVA* pParameter);

void PushAllColor(Effekseer::AllTypeColorParameter* pAllColor);

void PushRotate(Effekseer::EffectNodeSprite* pNode);

void PushScale(Effekseer::EffectNodeSprite* pNode);

void JudgeRotationType(Effekseer::RotationParameter* Type);
void JudgeRotationType(Effekseer::RotationParameter* pParameter);

void Execute(cd::SceneDatabase* pSceneDatabase);

Expand All @@ -48,6 +50,7 @@ class EffekseerProducerImpl final
std::vector<Effekseer::Vector3D> m_fixedRotation;
std::vector<Effekseer::Vector3D> m_fixedScale;

cd::ObjectIDGenerator<cd::MeshID> m_particleMeshID;
cd::ObjectIDGenerator<cd::ParticleEmitterID> m_particleEmitterIDGenerator;
};

Expand Down
4 changes: 2 additions & 2 deletions private/Scene/SceneDatabaseImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -484,8 +484,8 @@ void SceneDatabaseImpl::Validate() const

for (uint32_t particleIndex = 0U; particleIndex < GetParticleEmitterCount(); ++particleIndex)
{
const cd::ParticleEmitter& PE = GetParticleEmitter(particleIndex);
assert(particleIndex == PE.GetID().Data());
const cd::ParticleEmitter& ParticleEmitter = GetParticleEmitter(particleIndex);
assert(particleIndex == ParticleEmitter.GetID().Data());
}
}

Expand Down

0 comments on commit f8316dd

Please sign in to comment.