On GameLib/ActorInstanceAttach.cpp is said:
//1.1 Search:
bool CActorInstance::IntersectDefendingSphere()
//1.2 Add ABOVE:
void CActorInstance::RenderAllAttachingEffect()
{
for (const auto& it : m_AttachingEffectList)
CEffectManager::Instance().RenderOne(it.dwEffectIndex);
}
but i don't have that bool inside that file, i have it inside ActorInstance.cpp so i did :
void CActorInstance::RenderAllAttachingEffect()
{
for (const auto& it : m_AttachingEffectList)
CEffectManager::Instance().RenderOne(it.dwEffectIndex);
}
bool CActorInstance::IntersectDefendingSphere()
{
for (TCollisionPointInstanceList::iterator it = m_DefendingPointInstanceList.begin(); it != m_DefendingPointInstanceList.end(); ++it)
{
CDynamicSphereInstanceVector & rSphereInstanceVector = (*it).SphereInstanceVector;
CDynamicSphereInstanceVector::iterator it2 = rSphereInstanceVector.begin();
for (; it2 != rSphereInstanceVector.end(); ++it2)
{
CDynamicSphereInstance & rInstance = *it2;
D3DXVECTOR3 v3SpherePosition = rInstance.v3Position;
float fRadius = rInstance.fRadius;
D3DXVECTOR3 v3Orig;
D3DXVECTOR3 v3Dir;
float fRange;
ms_Ray.GetStartPoint(&v3Orig);
ms_Ray.GetDirection(&v3Dir, &fRange);
D3DXVECTOR3 v3Distance = v3Orig - v3SpherePosition;
float b = D3DXVec3Dot(&v3Dir, &v3Distance);
float c = D3DXVec3Dot(&v3Distance, &v3Distance) - fRadius*fRadius;
if (b*b - c >= 0)
return true;
}
}
return false;
}
BUT INSIDE ACTORINSTANCE.CPP
is that ok ?