Graphics/CullingList: Fix compilation errors on MSVC with /permissive-
This commit is contained in:
@@ -41,9 +41,9 @@ namespace Nz
|
||||
|
||||
std::size_t Cull(const Frustumf& frustum, bool* forceInvalidation = nullptr);
|
||||
|
||||
NoTestEntry RegisterNoTest(const T* renderable);
|
||||
SphereEntry RegisterSphereTest(const T* renderable);
|
||||
VolumeEntry RegisterVolumeTest(const T* renderable);
|
||||
void RegisterNoTest(const T* renderable, NoTestEntry* entry);
|
||||
void RegisterSphereTest(const T* renderable, SphereEntry* entry);
|
||||
void RegisterVolumeTest(const T* renderable, VolumeEntry* entry);
|
||||
|
||||
CullingList& operator=(const CullingList& renderable) = delete;
|
||||
CullingList& operator=(CullingList&& renderable) = delete;
|
||||
@@ -135,41 +135,53 @@ namespace Nz
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class CullingList<T>::NoTestEntry : public CullingList::template Entry<CullTest::NoTest>
|
||||
class CullingList<T>::NoTestEntry : public CullingList<T>::template Entry<CullTest::NoTest>
|
||||
{
|
||||
friend CullingList;
|
||||
|
||||
public:
|
||||
NoTestEntry();
|
||||
NoTestEntry(NoTestEntry&&) = default;
|
||||
~NoTestEntry() = default;
|
||||
|
||||
NoTestEntry& operator=(NoTestEntry&&) = default;
|
||||
|
||||
private:
|
||||
NoTestEntry(CullingList* parent, std::size_t index);
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class CullingList<T>::SphereEntry : public CullingList::template Entry<CullTest::Sphere>
|
||||
class CullingList<T>::SphereEntry : public CullingList<T>::template Entry<CullTest::Sphere>
|
||||
{
|
||||
friend CullingList;
|
||||
|
||||
public:
|
||||
SphereEntry();
|
||||
SphereEntry(SphereEntry&&) = default;
|
||||
~SphereEntry() = default;
|
||||
|
||||
void UpdateSphere(const Spheref& sphere);
|
||||
|
||||
SphereEntry& operator=(SphereEntry&&) = default;
|
||||
|
||||
private:
|
||||
SphereEntry(CullingList* parent, std::size_t index);
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class CullingList<T>::VolumeEntry : public CullingList::template Entry<CullTest::Volume>
|
||||
class CullingList<T>::VolumeEntry : public CullingList<T>::template Entry<CullTest::Volume>
|
||||
{
|
||||
friend CullingList;
|
||||
|
||||
public:
|
||||
VolumeEntry();
|
||||
VolumeEntry(VolumeEntry&&) = default;
|
||||
~VolumeEntry() = default;
|
||||
|
||||
void UpdateVolume(const BoundingVolumef& sphere);
|
||||
|
||||
VolumeEntry& operator=(VolumeEntry&&) = default;
|
||||
|
||||
private:
|
||||
VolumeEntry(CullingList* parent, std::size_t index);
|
||||
};
|
||||
|
||||
@@ -71,30 +71,26 @@ namespace Nz
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
typename CullingList<T>::NoTestEntry CullingList<T>::RegisterNoTest(const T* renderable)
|
||||
void CullingList<T>::RegisterNoTest(const T* renderable, NoTestEntry* entry)
|
||||
{
|
||||
NoTestEntry entry(this, m_noTestList.size());
|
||||
m_noTestList.emplace_back(NoTestVisibilityEntry{&entry, renderable, false}); //< Address of entry will be updated when moving
|
||||
*entry = NoTestEntry(this, m_noTestList.size());
|
||||
m_noTestList.emplace_back(NoTestVisibilityEntry{entry, renderable, false}); //< Address of entry will be updated when moving
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void CullingList<T>::RegisterSphereTest(const T* renderable, SphereEntry* entry)
|
||||
{
|
||||
*entry = SphereEntry(this, m_sphereTestList.size());
|
||||
m_sphereTestList.emplace_back(SphereVisibilityEntry{Nz::Spheref(), entry, renderable, false}); //< Address of entry will be updated when moving
|
||||
|
||||
return entry;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
typename CullingList<T>::SphereEntry CullingList<T>::RegisterSphereTest(const T* renderable)
|
||||
void CullingList<T>::RegisterVolumeTest(const T* renderable, VolumeEntry* entry)
|
||||
{
|
||||
SphereEntry entry(this, m_sphereTestList.size());
|
||||
m_sphereTestList.emplace_back(SphereVisibilityEntry{Nz::Spheref(), &entry, renderable, false}); //< Address of entry will be updated when moving
|
||||
|
||||
return entry;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
typename CullingList<T>::VolumeEntry CullingList<T>::RegisterVolumeTest(const T* renderable)
|
||||
{
|
||||
VolumeEntry entry(this, m_volumeTestList.size());
|
||||
m_volumeTestList.emplace_back(VolumeVisibilityEntry{Nz::BoundingVolumef(), &entry, renderable, false}); //< Address of entry will be updated when moving
|
||||
|
||||
return entry;
|
||||
*entry = VolumeEntry(this, m_volumeTestList.size());
|
||||
m_volumeTestList.emplace_back(VolumeVisibilityEntry{Nz::BoundingVolumef(), entry, renderable, false}); //< Address of entry will be updated when moving
|
||||
}
|
||||
|
||||
// Interface STD
|
||||
|
||||
Reference in New Issue
Block a user