WIP on materials

This commit is contained in:
Lynix
2017-12-10 22:17:41 +01:00
parent f1b84bfc9e
commit afa874de26
10 changed files with 151 additions and 3 deletions

View File

@@ -59,6 +59,7 @@ namespace Ndk
m_staticBody = std::make_unique<Nz::RigidBody3D>(&physWorld, m_geom);
m_staticBody->EnableAutoSleep(false);
m_staticBody->SetUserdata(reinterpret_cast<void*>(static_cast<std::ptrdiff_t>(m_entity->GetId())));
}
/*!

View File

@@ -42,6 +42,7 @@ namespace Ndk
m_object = std::make_unique<Nz::RigidBody3D>(&world, geom, matrix);
m_object->SetMass(1.f);
m_object->SetUserdata(reinterpret_cast<void*>(static_cast<std::ptrdiff_t>(m_entity->GetId())));
}
/*!

View File

@@ -134,7 +134,7 @@ namespace Ndk
Nz::Vector3f textBox = m_textSprite->GetBoundingVolume().obb.localBox.GetLengths();
m_textEntity->GetComponent<NodeComponent>().SetPosition(origin.x + checkboxSize.x + (m_adaptativeMargin ? checkboxSize.x / 2.f : m_textMargin),
origin.y + checkboxSize.y / 2.f - textBox.y / 2.f);
origin.y + checkboxSize.y / 2.f - textBox.y / 2.f);
}
void CheckboxWidget::OnMouseButtonRelease(int x, int y, Nz::Mouse::Button button)