Switch from Nz prefix to namespace Nz
What a huge commit Former-commit-id: 38ac5eebf70adc1180f571f6006192d28fb99897
This commit is contained in:
@@ -6,112 +6,115 @@
|
||||
#include <Nazara/Core/Config.hpp>
|
||||
#include <Nazara/Core/Debug.hpp>
|
||||
|
||||
void NzPrimitiveList::AddBox(const NzVector3f& lengths, const NzVector3ui& subdivision, const NzMatrix4f& transformMatrix)
|
||||
namespace Nz
|
||||
{
|
||||
m_primitives.push_back(NzPrimitive::Box(lengths, subdivision, transformMatrix));
|
||||
}
|
||||
|
||||
void NzPrimitiveList::AddBox(const NzVector3f& lengths, const NzVector3ui& subdivision, const NzVector3f& position, const NzQuaternionf& rotation)
|
||||
{
|
||||
m_primitives.push_back(NzPrimitive::Box(lengths, subdivision, position, rotation));
|
||||
}
|
||||
|
||||
void NzPrimitiveList::AddCone(float length, float radius, unsigned int subdivision, const NzMatrix4f& transformMatrix)
|
||||
{
|
||||
m_primitives.push_back(NzPrimitive::Cone(length, radius, subdivision, transformMatrix));
|
||||
}
|
||||
|
||||
void NzPrimitiveList::AddCone(float length, float radius, unsigned int subdivision, const NzVector3f& position, const NzQuaternionf& rotation)
|
||||
{
|
||||
m_primitives.push_back(NzPrimitive::Cone(length, radius, subdivision, position, rotation));
|
||||
}
|
||||
|
||||
void NzPrimitiveList::AddCubicSphere(float size, unsigned int subdivision, const NzMatrix4f& transformMatrix)
|
||||
{
|
||||
m_primitives.push_back(NzPrimitive::CubicSphere(size, subdivision, transformMatrix));
|
||||
}
|
||||
|
||||
void NzPrimitiveList::AddCubicSphere(float size, unsigned int subdivision, const NzVector3f& position, const NzQuaternionf& rotation)
|
||||
{
|
||||
m_primitives.push_back(NzPrimitive::CubicSphere(size, subdivision, position, rotation));
|
||||
}
|
||||
|
||||
void NzPrimitiveList::AddIcoSphere(float size, unsigned int recursionLevel, const NzMatrix4f& transformMatrix)
|
||||
{
|
||||
m_primitives.push_back(NzPrimitive::IcoSphere(size, recursionLevel, transformMatrix));
|
||||
}
|
||||
|
||||
void NzPrimitiveList::AddIcoSphere(float size, unsigned int recursionLevel, const NzVector3f& position, const NzQuaternionf& rotation)
|
||||
{
|
||||
m_primitives.push_back(NzPrimitive::IcoSphere(size, recursionLevel, position, rotation));
|
||||
}
|
||||
|
||||
void NzPrimitiveList::AddPlane(const NzVector2f& size, const NzVector2ui& subdivision, const NzMatrix4f& transformMatrix)
|
||||
{
|
||||
m_primitives.push_back(NzPrimitive::Plane(size, subdivision, transformMatrix));
|
||||
}
|
||||
|
||||
void NzPrimitiveList::AddPlane(const NzVector2f& size, const NzVector2ui& subdivision, const NzPlanef& planeInfo)
|
||||
{
|
||||
m_primitives.push_back(NzPrimitive::Plane(size, subdivision, planeInfo));
|
||||
}
|
||||
|
||||
void NzPrimitiveList::AddPlane(const NzVector2f& size, const NzVector2ui& subdivision, const NzVector3f& position, const NzQuaternionf& rotation)
|
||||
{
|
||||
m_primitives.push_back(NzPrimitive::Plane(size, subdivision, position, rotation));
|
||||
}
|
||||
|
||||
void NzPrimitiveList::AddUVSphere(float size, unsigned int sliceCount, unsigned int stackCount, const NzMatrix4f& transformMatrix)
|
||||
{
|
||||
m_primitives.push_back(NzPrimitive::UVSphere(size, sliceCount, stackCount, transformMatrix));
|
||||
}
|
||||
|
||||
void NzPrimitiveList::AddUVSphere(float size, unsigned int sliceCount, unsigned int stackCount, const NzVector3f& position, const NzQuaternionf& rotation)
|
||||
{
|
||||
m_primitives.push_back(NzPrimitive::UVSphere(size, sliceCount, stackCount, position, rotation));
|
||||
}
|
||||
|
||||
NzPrimitive& NzPrimitiveList::GetPrimitive(unsigned int i)
|
||||
{
|
||||
#if NAZARA_CORE_SAFE
|
||||
if (i >= m_primitives.size())
|
||||
void PrimitiveList::AddBox(const Vector3f& lengths, const Vector3ui& subdivision, const Matrix4f& transformMatrix)
|
||||
{
|
||||
NazaraError("Primitive index out of range (" + NzString::Number(i) + " >= " + NzString::Number(m_primitives.size()) + ')');
|
||||
|
||||
static NzPrimitive dummy;
|
||||
return dummy;
|
||||
m_primitives.push_back(Primitive::Box(lengths, subdivision, transformMatrix));
|
||||
}
|
||||
#endif
|
||||
|
||||
return m_primitives[i];
|
||||
}
|
||||
|
||||
const NzPrimitive& NzPrimitiveList::GetPrimitive(unsigned int i) const
|
||||
{
|
||||
#if NAZARA_CORE_SAFE
|
||||
if (i >= m_primitives.size())
|
||||
void PrimitiveList::AddBox(const Vector3f& lengths, const Vector3ui& subdivision, const Vector3f& position, const Quaternionf& rotation)
|
||||
{
|
||||
NazaraError("Primitive index out of range (" + NzString::Number(i) + " >= " + NzString::Number(m_primitives.size()) + ')');
|
||||
|
||||
static NzPrimitive dummy;
|
||||
return dummy;
|
||||
m_primitives.push_back(Primitive::Box(lengths, subdivision, position, rotation));
|
||||
}
|
||||
#endif
|
||||
|
||||
return m_primitives[i];
|
||||
}
|
||||
void PrimitiveList::AddCone(float length, float radius, unsigned int subdivision, const Matrix4f& transformMatrix)
|
||||
{
|
||||
m_primitives.push_back(Primitive::Cone(length, radius, subdivision, transformMatrix));
|
||||
}
|
||||
|
||||
unsigned int NzPrimitiveList::GetSize() const
|
||||
{
|
||||
return m_primitives.size();
|
||||
}
|
||||
void PrimitiveList::AddCone(float length, float radius, unsigned int subdivision, const Vector3f& position, const Quaternionf& rotation)
|
||||
{
|
||||
m_primitives.push_back(Primitive::Cone(length, radius, subdivision, position, rotation));
|
||||
}
|
||||
|
||||
NzPrimitive& NzPrimitiveList::operator()(unsigned int i)
|
||||
{
|
||||
return GetPrimitive(i);
|
||||
}
|
||||
void PrimitiveList::AddCubicSphere(float size, unsigned int subdivision, const Matrix4f& transformMatrix)
|
||||
{
|
||||
m_primitives.push_back(Primitive::CubicSphere(size, subdivision, transformMatrix));
|
||||
}
|
||||
|
||||
const NzPrimitive& NzPrimitiveList::operator()(unsigned int i) const
|
||||
{
|
||||
return GetPrimitive(i);
|
||||
void PrimitiveList::AddCubicSphere(float size, unsigned int subdivision, const Vector3f& position, const Quaternionf& rotation)
|
||||
{
|
||||
m_primitives.push_back(Primitive::CubicSphere(size, subdivision, position, rotation));
|
||||
}
|
||||
|
||||
void PrimitiveList::AddIcoSphere(float size, unsigned int recursionLevel, const Matrix4f& transformMatrix)
|
||||
{
|
||||
m_primitives.push_back(Primitive::IcoSphere(size, recursionLevel, transformMatrix));
|
||||
}
|
||||
|
||||
void PrimitiveList::AddIcoSphere(float size, unsigned int recursionLevel, const Vector3f& position, const Quaternionf& rotation)
|
||||
{
|
||||
m_primitives.push_back(Primitive::IcoSphere(size, recursionLevel, position, rotation));
|
||||
}
|
||||
|
||||
void PrimitiveList::AddPlane(const Vector2f& size, const Vector2ui& subdivision, const Matrix4f& transformMatrix)
|
||||
{
|
||||
m_primitives.push_back(Primitive::Plane(size, subdivision, transformMatrix));
|
||||
}
|
||||
|
||||
void PrimitiveList::AddPlane(const Vector2f& size, const Vector2ui& subdivision, const Planef& planeInfo)
|
||||
{
|
||||
m_primitives.push_back(Primitive::Plane(size, subdivision, planeInfo));
|
||||
}
|
||||
|
||||
void PrimitiveList::AddPlane(const Vector2f& size, const Vector2ui& subdivision, const Vector3f& position, const Quaternionf& rotation)
|
||||
{
|
||||
m_primitives.push_back(Primitive::Plane(size, subdivision, position, rotation));
|
||||
}
|
||||
|
||||
void PrimitiveList::AddUVSphere(float size, unsigned int sliceCount, unsigned int stackCount, const Matrix4f& transformMatrix)
|
||||
{
|
||||
m_primitives.push_back(Primitive::UVSphere(size, sliceCount, stackCount, transformMatrix));
|
||||
}
|
||||
|
||||
void PrimitiveList::AddUVSphere(float size, unsigned int sliceCount, unsigned int stackCount, const Vector3f& position, const Quaternionf& rotation)
|
||||
{
|
||||
m_primitives.push_back(Primitive::UVSphere(size, sliceCount, stackCount, position, rotation));
|
||||
}
|
||||
|
||||
Primitive& PrimitiveList::GetPrimitive(unsigned int i)
|
||||
{
|
||||
#if NAZARA_CORE_SAFE
|
||||
if (i >= m_primitives.size())
|
||||
{
|
||||
NazaraError("Primitive index out of range (" + String::Number(i) + " >= " + String::Number(m_primitives.size()) + ')');
|
||||
|
||||
static Primitive dummy;
|
||||
return dummy;
|
||||
}
|
||||
#endif
|
||||
|
||||
return m_primitives[i];
|
||||
}
|
||||
|
||||
const Primitive& PrimitiveList::GetPrimitive(unsigned int i) const
|
||||
{
|
||||
#if NAZARA_CORE_SAFE
|
||||
if (i >= m_primitives.size())
|
||||
{
|
||||
NazaraError("Primitive index out of range (" + String::Number(i) + " >= " + String::Number(m_primitives.size()) + ')');
|
||||
|
||||
static Primitive dummy;
|
||||
return dummy;
|
||||
}
|
||||
#endif
|
||||
|
||||
return m_primitives[i];
|
||||
}
|
||||
|
||||
unsigned int PrimitiveList::GetSize() const
|
||||
{
|
||||
return m_primitives.size();
|
||||
}
|
||||
|
||||
Primitive& PrimitiveList::operator()(unsigned int i)
|
||||
{
|
||||
return GetPrimitive(i);
|
||||
}
|
||||
|
||||
const Primitive& PrimitiveList::operator()(unsigned int i) const
|
||||
{
|
||||
return GetPrimitive(i);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user