render entrypoints to current structure data
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good

This commit is contained in:
austin 2025-05-16 18:52:32 -04:00
parent 1a12ec45b8
commit 6d420a3b88
2 changed files with 30 additions and 0 deletions

View File

@ -1853,6 +1853,7 @@ Room detection within structures
Structure metadata organization Structure metadata organization
Break out room solver Break out room solver
Solve for entrypoints to room Solve for entrypoints to room
Render entrypoints to current structure data rooms

View File

@ -103,6 +103,7 @@ public class DebugContentPipeline implements RenderPipeline {
} }
} }
//render current structure data
if(Globals.clientState.currentStructureData != null){ if(Globals.clientState.currentStructureData != null){
if(Globals.clientState.currentStructureData.getBoundingArea() != null){ if(Globals.clientState.currentStructureData.getBoundingArea() != null){
DebugContentPipeline.renderAreaSelection( DebugContentPipeline.renderAreaSelection(
@ -115,6 +116,10 @@ public class DebugContentPipeline implements RenderPipeline {
openGLState, renderPipelineState, modelTransformMatrix, openGLState, renderPipelineState, modelTransformMatrix,
roomArea.getArea(), AssetDataStrings.TEXTURE_TEAL_TRANSPARENT roomArea.getArea(), AssetDataStrings.TEXTURE_TEAL_TRANSPARENT
); );
//render entry points
for(Vector3d entrypoint : roomArea.getEntryPoints()){
DebugContentPipeline.renderPoint(openGLState, renderPipelineState, modelTransformMatrix, entrypoint, 0.5f, AssetDataStrings.TEXTURE_RED_TRANSPARENT);
}
} }
} }
} }
@ -364,6 +369,30 @@ public class DebugContentPipeline implements RenderPipeline {
} }
} }
/**
* Renders an area select
* @param openGLState The opengl state
* @param renderPipelineState The render pipeline state
* @param modelTransformMatrix The model transform matrix
* @param areaSelection The area selection
*/
static void renderPoint(OpenGLState openGLState, RenderPipelineState renderPipelineState, Matrix4d modelTransformMatrix, Vector3d point, double size, String texturePath){
Model model = Globals.assetManager.fetchModel(AssetDataStrings.UNITSPHERE);
if(model != null){
Texture texture = Globals.assetManager.fetchTexture(texturePath);
if(texture != null){
texture.bind(openGLState);
}
//calculate camera-modified vector3d
Vector3d cameraModifiedPosition = new Vector3d(point).sub(CameraEntityUtils.getCameraCenter(Globals.clientState.playerCamera));
modelTransformMatrix.identity();
modelTransformMatrix.translate(cameraModifiedPosition);
modelTransformMatrix.scale(new Vector3d(size));
model.setModelMatrix(modelTransformMatrix);
model.draw(renderPipelineState,openGLState);
}
}
/** /**
* Gets the bone debugging pipeline * Gets the bone debugging pipeline
* @return The bone debugging pipeline * @return The bone debugging pipeline