Merge branch 'NDK' into NDK-ShadowMapping

Conflicts:
	SDK/include/NDK/Systems/RenderSystem.hpp
	SDK/src/NDK/Systems/RenderSystem.cpp

Former-commit-id: 2772ff703c9d68d536667c469aca85084be4b861
This commit is contained in:
Lynix
2015-09-19 14:47:02 +02:00
72 changed files with 349 additions and 136 deletions

View File

@@ -1934,7 +1934,7 @@ bool NzString::IsEmpty() const
bool NzString::IsNull() const
{
return !m_sharedString.get();
return m_sharedString.get() == GetEmptyString().get();
}
bool NzString::IsNumber(nzUInt8 base, nzUInt32 flags) const
@@ -2609,7 +2609,7 @@ NzString& NzString::Set(unsigned int rep, const char* string, unsigned int lengt
if (totalSize > 0)
{
if (m_sharedString->capacity >= totalSize)
{
{
EnsureOwnership(true);
m_sharedString->size = totalSize;
@@ -2642,7 +2642,7 @@ NzString& NzString::Set(const char* string, unsigned int length)
if (length > 0)
{
if (m_sharedString->capacity >= length)
{
{
EnsureOwnership(true);
m_sharedString->size = length;
@@ -4198,7 +4198,7 @@ bool NzString::FillHash(NzAbstractHash* hash) const
return true;
}
std::shared_ptr<NzString::SharedString> NzString::GetEmptyString()
const std::shared_ptr<NzString::SharedString>& NzString::GetEmptyString()
{
static auto emptyString = std::make_shared<SharedString>();

View File

@@ -379,6 +379,15 @@ nzGeomType NzNullGeom::GetType() const
return nzGeomType_Null;
}
void NzNullGeom::ComputeInertialMatrix(NzVector3f* inertia, NzVector3f* center) const
{
if (inertia)
inertia->MakeUnit();
if (center)
center->MakeZero();
}
NewtonCollision* NzNullGeom::CreateHandle(NzPhysWorld* world) const
{
return NewtonCreateNull(world->GetHandle());