load mesh data and structure meshes

This commit is contained in:
2024-01-16 10:40:07 -06:00
parent 05e90d495f
commit 9d8f800c2a
5 changed files with 33 additions and 11 deletions
+6 -1
View File
@@ -9,6 +9,7 @@
package engine.devcmd.cmds;
import engine.CollisionEngine.Mesh;
import engine.Enum;
import engine.Enum.BuildingGroup;
import engine.Enum.GameObjectType;
@@ -244,7 +245,11 @@ public class InfoCmd extends AbstractDevCmd {
for (Regions regions : targetBuilding.getBounds().getRegions()) {
//TODO ADD REGION INFO
}
output += "Mesh Count: " + targetBuilding.buildingMeshes.size();
output += "-------Mesh Data-------" + newline;
output += "Mesh Count: " + targetBuilding.buildingMeshes.size() + newline;
for(Mesh mesh : targetBuilding.buildingMeshes){
output += "Mesh Rect: " + mesh.boundsRect + newline;
}
break;
case PlayerCharacter:
output += newline;
+3 -1
View File
@@ -48,10 +48,12 @@ public class RegionCmd extends AbstractDevCmd {
this.throwbackInfo(pc, output);
}
if(building != null){
this.throwbackInfo(pc, "Building Rect: " + building.buildingRect);
for (Mesh mesh : building.buildingMeshes){
this.throwbackInfo(pc, "Mesh Rect: " + mesh.boundsRect);
//this.throwbackInfo(pc, "Mesh Rect: " + mesh.boundsRect);
if(mesh.boundsRect.contains(pc.loc.x,pc.loc.z)) {
this.throwbackInfo(pc, "Inside A Mesh's Bounds");
this.throwbackInfo(pc, "Rect: " + mesh.boundsRect);
return;
}
}