Skip to content

Commit

Permalink
create CPlanarProjection.hpp & IPlanarProjection.hpp classes, add…
Browse files Browse the repository at this point in the history
… 61_UI/cameras.json. Make a few changes to interface classes, load demo data from the json file. TODO for tomorrow: use loaded planar projections vector to interact with the application.
  • Loading branch information
AnastaZIuk committed Dec 17, 2024
1 parent 10fe3b2 commit 3ea910c
Show file tree
Hide file tree
Showing 14 changed files with 668 additions and 152 deletions.
5 changes: 4 additions & 1 deletion 61_UI/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ if(NBL_BUILD_IMGUI)

nbl_create_executable_project("${NBL_EXTRA_SOURCES}" "" "${NBL_INCLUDE_SERACH_DIRECTORIES}" "${NBL_LIBRARIES}" "${NBL_EXECUTABLE_PROJECT_CREATION_PCH_TARGET}")
LINK_BUILTIN_RESOURCES_TO_TARGET(${EXECUTABLE_NAME} geometryCreatorSpirvBRD)
endif()
endif()

add_dependencies(${EXECUTABLE_NAME} argparse)
target_include_directories(${EXECUTABLE_NAME} PUBLIC $<TARGET_PROPERTY:argparse,INTERFACE_INCLUDE_DIRECTORIES>)
105 changes: 105 additions & 0 deletions 61_UI/cameras.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
{
"cameras": [
{
"type": "FPS",
"position": [-2.238, 1.438, -1.558],
"orientation": [0.253, 0.368, -0.105, 0.888]
},
{
"type": "FPS",
"position": [-2.017, 0.386, 0.684],
"orientation": [0.047, 0.830, -0.072, 0.55]
}
],
"projections": [
{
"type": "perspective",
"fov": 60.0,
"zNear": 0.1,
"zFar": 100.0,
"leftHanded": true
},
{
"type": "orthographic",
"orthoWidth": 10.0,
"zNear": 0.1,
"zFar": 100.0,
"leftHanded": true
}
],
"viewports": [
{
"camera": 0,
"planarControllerSet": [
{
"projection": 0,
"controllers": {
"keyboard": 0,
"mouse": 0
}
},
{
"projection": 1,
"controllers": {
"keyboard": 1,
"mouse": 0
}
}
]
},
{
"camera": 1,
"planarControllerSet": [
{
"projection": 0,
"controllers": {
"keyboard": 0,
"mouse": 0
}
},
{
"projection": 1,
"controllers": {
"keyboard": 1,
"mouse": 0
}
}
]
}
],
"controllers": {
"keyboard": [
{
"mappings": {
"W": "MoveForward",
"S": "MoveBackward",
"A": "MoveLeft",
"D": "MoveRight",
"I": "TiltDown",
"K": "TiltUp",
"J": "PanLeft",
"L": "PanRight"
}
},
{
"mappings": {
"W": "MoveUp",
"S": "MoveDown",
"A": "MoveLeft",
"D": "MoveRight"
}
}
],
"mouse": [
{
"mappings": {
"RELATIVE_POSITIVE_MOVEMENT_X": "PanRight",
"RELATIVE_NEGATIVE_MOVEMENT_X": "PanLeft",
"RELATIVE_POSITIVE_MOVEMENT_Y": "TiltUp",
"RELATIVE_NEGATIVE_MOVEMENT_Y": "TiltDown"
}
}
]
}
}

28 changes: 0 additions & 28 deletions 61_UI/config.json.template

This file was deleted.

1 change: 1 addition & 0 deletions 61_UI/include/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include "camera/CCubeProjection.hpp"
#include "camera/CLinearProjection.hpp"
#include "camera/CPlanarProjection.hpp"

// the example's headers
#include "nbl/ui/ICursorControl.h"
Expand Down
Loading

0 comments on commit 3ea910c

Please sign in to comment.