bounding box geometry doesn't cast/receive shadows
This commit is contained in:
@@ -263,8 +263,8 @@ class FFIAsset extends ThermionAsset {
|
|||||||
@override
|
@override
|
||||||
Future<void> setBoundingBoxVisibility(bool visible) async {
|
Future<void> setBoundingBoxVisibility(bool visible) async {
|
||||||
if (boundingBoxAsset == null) {
|
if (boundingBoxAsset == null) {
|
||||||
final boundingBox = await SceneAsset_getBoundingBox(pointer!);
|
final boundingBox = await SceneAsset_getBoundingBox(pointer);
|
||||||
|
|
||||||
final min = [
|
final min = [
|
||||||
boundingBox.centerX - boundingBox.halfExtentX,
|
boundingBox.centerX - boundingBox.halfExtentX,
|
||||||
boundingBox.centerY - boundingBox.halfExtentY,
|
boundingBox.centerY - boundingBox.halfExtentY,
|
||||||
@@ -343,6 +343,9 @@ class FFIAsset extends ThermionAsset {
|
|||||||
keepData: false,
|
keepData: false,
|
||||||
) as FFIAsset;
|
) as FFIAsset;
|
||||||
|
|
||||||
|
await viewer.setCastShadows(boundingBoxAsset!.entity, false);
|
||||||
|
await viewer.setReceiveShadows(boundingBoxAsset!.entity, false);
|
||||||
|
|
||||||
TransformManager_setParent(Engine_getTransformManager(engine),
|
TransformManager_setParent(Engine_getTransformManager(engine),
|
||||||
boundingBoxAsset!.entity, entity, false);
|
boundingBoxAsset!.entity, entity, false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,17 +92,17 @@ namespace thermion
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
Log("Creating buffers...");
|
TRACE("Creating buffers...");
|
||||||
auto [vertexBuffer, indexBuffer] = createBuffers();
|
auto [vertexBuffer, indexBuffer] = createBuffers();
|
||||||
if (!vertexBuffer || !indexBuffer)
|
if (!vertexBuffer || !indexBuffer)
|
||||||
{
|
{
|
||||||
Log("Failed to create buffers: VB=%p, IB=%p", vertexBuffer, indexBuffer);
|
Log("Failed to create buffers: VB=%p, IB=%p", vertexBuffer, indexBuffer);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
Log("Buffers created successfully: VB=%p, IB=%p", vertexBuffer, indexBuffer);
|
TRACE("Buffers created successfully: VB=%p, IB=%p", vertexBuffer, indexBuffer);
|
||||||
|
|
||||||
Box boundingBox = computeBoundingBox();
|
Box boundingBox = computeBoundingBox();
|
||||||
Log("Computed bounding box: min={%f,%f,%f}, max={%f,%f,%f}",
|
TRACE("Computed bounding box: min={%f,%f,%f}, max={%f,%f,%f}",
|
||||||
boundingBox.getMin().x, boundingBox.getMin().y, boundingBox.getMin().z,
|
boundingBox.getMin().x, boundingBox.getMin().y, boundingBox.getMin().z,
|
||||||
boundingBox.getMax().x, boundingBox.getMax().y, boundingBox.getMax().z);
|
boundingBox.getMax().x, boundingBox.getMax().y, boundingBox.getMax().z);
|
||||||
|
|
||||||
@@ -285,7 +285,7 @@ namespace thermion
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Log("Validation passed: vertices=%d, normals=%s, uvs=%d, indices=%d",
|
TRACE("Validation passed: vertices=%d, normals=%s, uvs=%d, indices=%d",
|
||||||
mVertices->size(),
|
mVertices->size(),
|
||||||
(!mNormals->empty() ? "yes" : "no"),
|
(!mNormals->empty() ? "yes" : "no"),
|
||||||
mUVs->size(),
|
mUVs->size(),
|
||||||
|
|||||||
Reference in New Issue
Block a user