Update mesh config defines to match a single format

This commit is contained in:
Wojtek Figat
2024-12-29 23:03:09 +01:00
parent e7132086a5
commit ab99a25cee
7 changed files with 35 additions and 21 deletions

View File

@@ -108,7 +108,7 @@ void TextRender::UpdateLayout()
_localBox = BoundingBox(Vector3::Zero);
BoundingBox::Transform(_localBox, _transform, _box);
BoundingSphere::FromBox(_box, _sphere);
#if USE_PRECISE_MESH_INTERSECTS
#if MODEL_USE_PRECISE_MESH_INTERSECTS
_collisionProxy.Clear();
#endif
@@ -314,7 +314,7 @@ void TextRender::UpdateLayout()
_drawChunks.Add(drawChunk);
}
#if USE_PRECISE_MESH_INTERSECTS
#if MODEL_USE_PRECISE_MESH_INTERSECTS
// Setup collision proxy for detailed collision detection for triangles
const int32 totalIndicesCount = _ib.Data.Count() / sizeof(uint16);
_collisionProxy.Init(_vb0.Data.Count() / sizeof(Float3), totalIndicesCount / 3, (Float3*)_vb0.Data.Get(), (uint16*)_ib.Data.Get());
@@ -420,7 +420,7 @@ void TextRender::OnLayerChanged()
bool TextRender::IntersectsItself(const Ray& ray, Real& distance, Vector3& normal)
{
#if USE_PRECISE_MESH_INTERSECTS
#if MODEL_USE_PRECISE_MESH_INTERSECTS
if (_box.Intersects(ray))
{
return _collisionProxy.Intersects(ray, _transform, distance, normal);