moving classes
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
This commit is contained in:
parent
5e7a5ecf03
commit
edecb36599
@ -1781,6 +1781,7 @@ Grid alignment cursor
|
|||||||
Furniture spawner items triggers grid alignment cursor
|
Furniture spawner items triggers grid alignment cursor
|
||||||
Grid aligned entity work
|
Grid aligned entity work
|
||||||
Grid alignment visualization work
|
Grid alignment visualization work
|
||||||
|
Move around entity debug tab classes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,10 +6,19 @@ import java.util.Set;
|
|||||||
|
|
||||||
import org.joml.Quaterniond;
|
import org.joml.Quaterniond;
|
||||||
import org.joml.Vector3d;
|
import org.joml.Vector3d;
|
||||||
import org.ode4j.ode.DBody;
|
|
||||||
|
|
||||||
import electrosphere.client.entity.debug.DebugVisualizerUtils;
|
import electrosphere.client.entity.debug.DebugVisualizerUtils;
|
||||||
import electrosphere.client.interact.ClientInteractionEngine;
|
import electrosphere.client.interact.ClientInteractionEngine;
|
||||||
|
import electrosphere.client.ui.menu.debug.entity.tabs.ImGuiEntityActorTab;
|
||||||
|
import electrosphere.client.ui.menu.debug.entity.tabs.ImGuiEntityDebugActions;
|
||||||
|
import electrosphere.client.ui.menu.debug.entity.tabs.ImGuiEntityFoliageTab;
|
||||||
|
import electrosphere.client.ui.menu.debug.entity.tabs.ImGuiEntityHitboxTab;
|
||||||
|
import electrosphere.client.ui.menu.debug.entity.tabs.ImGuiEntityInstancedActorTab;
|
||||||
|
import electrosphere.client.ui.menu.debug.entity.tabs.ImGuiEntityInteractionTab;
|
||||||
|
import electrosphere.client.ui.menu.debug.entity.tabs.ImGuiEntityInventoryTab;
|
||||||
|
import electrosphere.client.ui.menu.debug.entity.tabs.ImGuiEntityPhysicsTab;
|
||||||
|
import electrosphere.client.ui.menu.debug.entity.tabs.ImGuiEntityServerTab;
|
||||||
|
import electrosphere.client.ui.menu.debug.entity.tabs.ImGuiEntityToolbarTab;
|
||||||
import electrosphere.collision.PhysicsEntityUtils;
|
import electrosphere.collision.PhysicsEntityUtils;
|
||||||
import electrosphere.data.creature.equip.EquipPoint;
|
import electrosphere.data.creature.equip.EquipPoint;
|
||||||
import electrosphere.data.foliage.FoliageType;
|
import electrosphere.data.foliage.FoliageType;
|
||||||
@ -541,70 +550,6 @@ public class ImGuiEntityMacros {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Physics details
|
|
||||||
*/
|
|
||||||
protected static void drawPhysicsDetails(){
|
|
||||||
if(showPhysicsTab && ImGui.collapsingHeader("Physics")){
|
|
||||||
ImGui.indent();
|
|
||||||
if(PhysicsEntityUtils.getDBody(detailViewEntity) != null){
|
|
||||||
DBody physicsBody = PhysicsEntityUtils.getDBody(detailViewEntity);
|
|
||||||
if(physicsBody != null){
|
|
||||||
ImGui.text("Position: " + EntityUtils.getPosition(detailViewEntity));
|
|
||||||
ImGui.text("Rotation: " + EntityUtils.getRotation(detailViewEntity));
|
|
||||||
ImGui.text("Velocity: " + physicsBody.getLinearVel());
|
|
||||||
ImGui.text("Force: " + physicsBody.getForce());
|
|
||||||
ImGui.text("Angular Velocity: " + physicsBody.getAngularVel());
|
|
||||||
ImGui.text("Torque: " + physicsBody.getTorque());
|
|
||||||
ImGui.text("Move Vector: " + CreatureUtils.getFacingVector(detailViewEntity));
|
|
||||||
ImGui.text("Velocity: " + CreatureUtils.getVelocity(detailViewEntity));
|
|
||||||
}
|
|
||||||
//synchronized data
|
|
||||||
if(
|
|
||||||
Globals.clientSceneWrapper.getScene().getEntityFromId(detailViewEntity.getId()) != null &&
|
|
||||||
Globals.clientSceneWrapper.mapClientToServerId(detailViewEntity.getId()) != -1
|
|
||||||
){
|
|
||||||
//detailViewEntity is a client entity
|
|
||||||
//get server entity
|
|
||||||
int serverIdForClientEntity = Globals.clientSceneWrapper.mapClientToServerId(detailViewEntity.getId());
|
|
||||||
Entity serverEntity = EntityLookupUtils.getEntityById(serverIdForClientEntity);
|
|
||||||
DBody serverPhysicsBody = PhysicsEntityUtils.getDBody(serverEntity);
|
|
||||||
if(serverPhysicsBody != null){
|
|
||||||
ImGui.newLine();
|
|
||||||
ImGui.text("Linked server entity:");
|
|
||||||
ImGui.text("Position (Server): " + EntityUtils.getPosition(serverEntity));
|
|
||||||
ImGui.text("Rotation (Server): " + EntityUtils.getRotation(serverEntity));
|
|
||||||
ImGui.text("Velocity (Server): " + serverPhysicsBody.getLinearVel());
|
|
||||||
ImGui.text("Force (Server): " + serverPhysicsBody.getForce());
|
|
||||||
ImGui.text("Angular Velocity: " + serverPhysicsBody.getAngularVel());
|
|
||||||
ImGui.text("Torque: " + serverPhysicsBody.getTorque());
|
|
||||||
ImGui.text("Move Vector (Server): "+ CreatureUtils.getFacingVector(serverEntity));
|
|
||||||
ImGui.text("Velocity (Server): " + CreatureUtils.getVelocity(serverEntity));
|
|
||||||
}
|
|
||||||
} else if(Globals.clientSceneWrapper.containsServerId(detailViewEntity.getId())){
|
|
||||||
//detailViewEntity is a server entity
|
|
||||||
//get client entity
|
|
||||||
int clientId = Globals.clientSceneWrapper.mapServerToClientId(detailViewEntity.getId());
|
|
||||||
Entity clientEntity = Globals.clientSceneWrapper.getScene().getEntityFromId(clientId);
|
|
||||||
DBody clientPhysicsBody = PhysicsEntityUtils.getDBody(clientEntity);
|
|
||||||
if(clientPhysicsBody != null){
|
|
||||||
ImGui.newLine();
|
|
||||||
ImGui.text("Linked client entity:");
|
|
||||||
ImGui.text("Position (Client): " + EntityUtils.getPosition(clientEntity));
|
|
||||||
ImGui.text("Rotation (Client): " + EntityUtils.getRotation(clientEntity));
|
|
||||||
ImGui.text("Velocity (Client): " + clientPhysicsBody.getLinearVel());
|
|
||||||
ImGui.text("Force (Client): " + clientPhysicsBody.getForce());
|
|
||||||
ImGui.text("Angular Velocity: " + clientPhysicsBody.getAngularVel());
|
|
||||||
ImGui.text("Torque: " + clientPhysicsBody.getTorque());
|
|
||||||
ImGui.text("Move Vector (Client): " + CreatureUtils.getFacingVector(clientEntity));
|
|
||||||
ImGui.text("Velocity (Client): " + CreatureUtils.getVelocity(clientEntity));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ImGui.unindent();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the displayed name of an entity (ie creature type, foliage type, terrain, etc)
|
* Gets the displayed name of an entity (ie creature type, foliage type, terrain, etc)
|
||||||
* @param entity
|
* @param entity
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
package electrosphere.client.ui.menu.debug.entity;
|
package electrosphere.client.ui.menu.debug.entity.tabs;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
@ -29,7 +29,7 @@ public class ImGuiEntityActorTab {
|
|||||||
/**
|
/**
|
||||||
* Client scene entity view
|
* Client scene entity view
|
||||||
*/
|
*/
|
||||||
protected static void drawActorView(boolean show, Entity detailViewEntity){
|
public static void drawActorView(boolean show, Entity detailViewEntity){
|
||||||
if(show && ImGui.collapsingHeader("Actor Details")){
|
if(show && ImGui.collapsingHeader("Actor Details")){
|
||||||
ImGui.indent();
|
ImGui.indent();
|
||||||
if(detailViewEntity != null && EntityUtils.getActor(detailViewEntity) != null){
|
if(detailViewEntity != null && EntityUtils.getActor(detailViewEntity) != null){
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package electrosphere.client.ui.menu.debug.entity;
|
package electrosphere.client.ui.menu.debug.entity.tabs;
|
||||||
|
|
||||||
import electrosphere.engine.Globals;
|
import electrosphere.engine.Globals;
|
||||||
import electrosphere.entity.Entity;
|
import electrosphere.entity.Entity;
|
||||||
@ -14,7 +14,7 @@ public class ImGuiEntityDebugActions {
|
|||||||
/**
|
/**
|
||||||
* Debug actions view
|
* Debug actions view
|
||||||
*/
|
*/
|
||||||
protected static void drawDebugActions(boolean show, Entity detailViewEntity){
|
public static void drawDebugActions(boolean show, Entity detailViewEntity){
|
||||||
if(show && ImGui.collapsingHeader("Debug Actions")){
|
if(show && ImGui.collapsingHeader("Debug Actions")){
|
||||||
ImGui.indent();
|
ImGui.indent();
|
||||||
if(detailViewEntity != null){
|
if(detailViewEntity != null){
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package electrosphere.client.ui.menu.debug.entity;
|
package electrosphere.client.ui.menu.debug.entity.tabs;
|
||||||
|
|
||||||
import electrosphere.client.terrain.foliage.FoliageModel;
|
import electrosphere.client.terrain.foliage.FoliageModel;
|
||||||
import electrosphere.data.foliage.FoliageType;
|
import electrosphere.data.foliage.FoliageType;
|
||||||
@ -43,7 +43,7 @@ public class ImGuiEntityFoliageTab {
|
|||||||
/**
|
/**
|
||||||
* Client scene entity view
|
* Client scene entity view
|
||||||
*/
|
*/
|
||||||
protected static void drawFoliageView(boolean show, Entity detailViewEntity){
|
public static void drawFoliageView(boolean show, Entity detailViewEntity){
|
||||||
if(show && ImGui.collapsingHeader("Foliage Data")){
|
if(show && ImGui.collapsingHeader("Foliage Data")){
|
||||||
FoliageType foliageData = (FoliageType)CommonEntityUtils.getCommonData(detailViewEntity);
|
FoliageType foliageData = (FoliageType)CommonEntityUtils.getCommonData(detailViewEntity);
|
||||||
ImGui.indent();
|
ImGui.indent();
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package electrosphere.client.ui.menu.debug.entity;
|
package electrosphere.client.ui.menu.debug.entity.tabs;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -40,7 +40,7 @@ public class ImGuiEntityHitboxTab {
|
|||||||
/**
|
/**
|
||||||
* Hitbox data view
|
* Hitbox data view
|
||||||
*/
|
*/
|
||||||
protected static void drawHitboxTab(boolean show, Entity detailViewEntity){
|
public static void drawHitboxTab(boolean show, Entity detailViewEntity){
|
||||||
if(show && ImGui.collapsingHeader("Hitbox Data")){
|
if(show && ImGui.collapsingHeader("Hitbox Data")){
|
||||||
ImGui.indent();
|
ImGui.indent();
|
||||||
if(detailViewEntity != null && HitboxCollectionState.hasHitboxState(detailViewEntity)){
|
if(detailViewEntity != null && HitboxCollectionState.hasHitboxState(detailViewEntity)){
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package electrosphere.client.ui.menu.debug.entity;
|
package electrosphere.client.ui.menu.debug.entity.tabs;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ public class ImGuiEntityInstancedActorTab {
|
|||||||
/**
|
/**
|
||||||
* Client scene entity view
|
* Client scene entity view
|
||||||
*/
|
*/
|
||||||
protected static void drawInstancedActorView(boolean show, Entity detailViewEntity){
|
public static void drawInstancedActorView(boolean show, Entity detailViewEntity){
|
||||||
if(show && ImGui.collapsingHeader("Instanced Actor Details")){
|
if(show && ImGui.collapsingHeader("Instanced Actor Details")){
|
||||||
ImGui.indent();
|
ImGui.indent();
|
||||||
float[] limbScalarFalloffFactor = new float[1];
|
float[] limbScalarFalloffFactor = new float[1];
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package electrosphere.client.ui.menu.debug.entity;
|
package electrosphere.client.ui.menu.debug.entity.tabs;
|
||||||
|
|
||||||
import org.ode4j.ode.DBody;
|
import org.ode4j.ode.DBody;
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ public class ImGuiEntityInteractionTab {
|
|||||||
/**
|
/**
|
||||||
* Interaction view
|
* Interaction view
|
||||||
*/
|
*/
|
||||||
protected static void drawInteractionTab(boolean show, Entity detailViewEntity){
|
public static void drawInteractionTab(boolean show, Entity detailViewEntity){
|
||||||
if(detailViewEntity == null){
|
if(detailViewEntity == null){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package electrosphere.client.ui.menu.debug.entity;
|
package electrosphere.client.ui.menu.debug.entity.tabs;
|
||||||
|
|
||||||
import electrosphere.entity.Entity;
|
import electrosphere.entity.Entity;
|
||||||
import electrosphere.entity.state.inventory.InventoryUtils;
|
import electrosphere.entity.state.inventory.InventoryUtils;
|
||||||
@ -14,7 +14,7 @@ public class ImGuiEntityInventoryTab {
|
|||||||
/**
|
/**
|
||||||
* Inventory view
|
* Inventory view
|
||||||
*/
|
*/
|
||||||
protected static void drawInventoryTab(boolean show, Entity detailViewEntity){
|
public static void drawInventoryTab(boolean show, Entity detailViewEntity){
|
||||||
if(detailViewEntity == null){
|
if(detailViewEntity == null){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package electrosphere.client.ui.menu.debug.entity;
|
package electrosphere.client.ui.menu.debug.entity.tabs;
|
||||||
|
|
||||||
import org.ode4j.ode.DBody;
|
import org.ode4j.ode.DBody;
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ public class ImGuiEntityPhysicsTab {
|
|||||||
/**
|
/**
|
||||||
* Physics view
|
* Physics view
|
||||||
*/
|
*/
|
||||||
protected static void drawPhysicsView(boolean show, Entity detailViewEntity){
|
public static void drawPhysicsView(boolean show, Entity detailViewEntity){
|
||||||
if(show && ImGui.collapsingHeader("Physics Details")){
|
if(show && ImGui.collapsingHeader("Physics Details")){
|
||||||
ImGui.indent();
|
ImGui.indent();
|
||||||
if(PhysicsEntityUtils.getDBody(detailViewEntity) != null){
|
if(PhysicsEntityUtils.getDBody(detailViewEntity) != null){
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package electrosphere.client.ui.menu.debug.entity;
|
package electrosphere.client.ui.menu.debug.entity.tabs;
|
||||||
|
|
||||||
import electrosphere.client.ui.menu.debug.server.ImGuiServerDataCell;
|
import electrosphere.client.ui.menu.debug.server.ImGuiServerDataCell;
|
||||||
import electrosphere.engine.Globals;
|
import electrosphere.engine.Globals;
|
||||||
@ -14,7 +14,7 @@ public class ImGuiEntityServerTab {
|
|||||||
/**
|
/**
|
||||||
* Physics view
|
* Physics view
|
||||||
*/
|
*/
|
||||||
protected static void drawServerView(boolean show, Entity detailViewEntity){
|
public static void drawServerView(boolean show, Entity detailViewEntity){
|
||||||
if(show && ImGui.collapsingHeader("Server Details")){
|
if(show && ImGui.collapsingHeader("Server Details")){
|
||||||
ImGui.indent();
|
ImGui.indent();
|
||||||
ServerDataCell serverDataCell = Globals.entityDataCellMapper.getEntityDataCell(detailViewEntity);
|
ServerDataCell serverDataCell = Globals.entityDataCellMapper.getEntityDataCell(detailViewEntity);
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package electrosphere.client.ui.menu.debug.entity;
|
package electrosphere.client.ui.menu.debug.entity.tabs;
|
||||||
|
|
||||||
import electrosphere.entity.Entity;
|
import electrosphere.entity.Entity;
|
||||||
import electrosphere.entity.state.equip.ClientToolbarState;
|
import electrosphere.entity.state.equip.ClientToolbarState;
|
||||||
@ -12,7 +12,7 @@ public class ImGuiEntityToolbarTab {
|
|||||||
/**
|
/**
|
||||||
* Client scene entity view
|
* Client scene entity view
|
||||||
*/
|
*/
|
||||||
protected static void drawToolbarTab(boolean show, Entity detailViewEntity){
|
public static void drawToolbarTab(boolean show, Entity detailViewEntity){
|
||||||
if(show && ImGui.collapsingHeader("Toolbar Data")){
|
if(show && ImGui.collapsingHeader("Toolbar Data")){
|
||||||
ClientToolbarState clientToolbarState = ClientToolbarState.getClientToolbarState(detailViewEntity);
|
ClientToolbarState clientToolbarState = ClientToolbarState.getClientToolbarState(detailViewEntity);
|
||||||
ImGui.indent();
|
ImGui.indent();
|
||||||
Loading…
Reference in New Issue
Block a user