render entrypoints to current structure data
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
This commit is contained in:
parent
1a12ec45b8
commit
6d420a3b88
@ -1853,6 +1853,7 @@ Room detection within structures
|
||||
Structure metadata organization
|
||||
Break out room solver
|
||||
Solve for entrypoints to room
|
||||
Render entrypoints to current structure data rooms
|
||||
|
||||
|
||||
|
||||
|
||||
@ -103,6 +103,7 @@ public class DebugContentPipeline implements RenderPipeline {
|
||||
}
|
||||
}
|
||||
|
||||
//render current structure data
|
||||
if(Globals.clientState.currentStructureData != null){
|
||||
if(Globals.clientState.currentStructureData.getBoundingArea() != null){
|
||||
DebugContentPipeline.renderAreaSelection(
|
||||
@ -115,6 +116,10 @@ public class DebugContentPipeline implements RenderPipeline {
|
||||
openGLState, renderPipelineState, modelTransformMatrix,
|
||||
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
|
||||
* @return The bone debugging pipeline
|
||||
|
||||
Loading…
Reference in New Issue
Block a user