Compare commits
3 Commits
bca63a7fc8
...
79c5bbf2f6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
79c5bbf2f6 | ||
|
|
460ea3b8ba | ||
|
|
ada911ba0c |
24
.agents/skills/object_context.md
Normal file
24
.agents/skills/object_context.md
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# Skill: Creating Objects and adding to context
|
||||||
|
|
||||||
|
In uLib the context is meant to hold a set of objects and their hierarchy. In addition ObjectFactory is used to create objects from a predefined registry.
|
||||||
|
|
||||||
|
## Geant Physical Volumes
|
||||||
|
|
||||||
|
The Geant library add a further layer of complexity. The physical volumes are created from a what is called LogicalVolume (which holds information about the shape, material and daughter volumes) and represent the actual instances of the volumes in the detector. So in this sense they represent what could be the Prop3D in the uLib Vtk library. The PhysicalVolume is created from the LogicalVolume and is the one that is actually placed in the scene, with its own relative TRS: position and rotation (rotation here is a rotation matrix comprising the scaling).
|
||||||
|
|
||||||
|
so Adding a Solid or a Logical volume on the scene is not enough. We need to create a PhysicalVolume from the LogicalVolume and add it to the scene to see its instance and apply the TRS to the PhysicalVolume and so to eventually to the representation.
|
||||||
|
|
||||||
|
## Gcompose interaction with objects that have Prop3d and object without 3D actor
|
||||||
|
|
||||||
|
In VTK and Qt the objects are organized in a tree structure. When We will add a new object to the scene it will be added to the tree structure and it will be displayed once wrapped in a vtk representation (like vtkContainerBox for instance).
|
||||||
|
|
||||||
|
For objects without 3D representation, they are added to the tree structure but they are not displayed in the scene. But when Object have a internal member that is a reference to another object, this will be represented in the tree structure as a child of the object that contains a reference to it. It is also important to note that the reference can be either the object itself or a smart pointer to the object. So the representation of the child in the tree structure is a placeholder for the object that is referenced and it can be added to many parents, creating multiple instances of the same reference in the tree structure.
|
||||||
|
|
||||||
|
When a object contains a reference to another object, the reference can be set from properties by selecting form the possible instances in the context that are compatible (can be casted) to the type of the reference.
|
||||||
|
In this way the reference appears also as a child in the tree. On the other hand the same add operation can be performed by dragging the object from the tree structure and dropping it on the property of the object that contains the reference. In this case the reference will be set to the parent selecting the compatible menber automatically.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
22
.vscode/settings.json
vendored
22
.vscode/settings.json
vendored
@@ -1,13 +1,14 @@
|
|||||||
{
|
{
|
||||||
|
"clangd.path": "/home/share/micromamba/envs/uLib/bin/clangd",
|
||||||
"clangd.fallbackFlags": [
|
"clangd.fallbackFlags": [
|
||||||
"-I/home/rigoni/devel/cmt/uLib/src",
|
"-I/home/rigoni/devel/cmt/uLib/src",
|
||||||
"-isystem/home/share/micromamba/envs/mutom/include",
|
"-isystem/home/share/micromamba/envs/uLib/include",
|
||||||
"-isystem/home/share/micromamba/envs/mutom/include/eigen3",
|
"-isystem/home/share/micromamba/envs/uLib/include/eigen3",
|
||||||
"-isystem/home/share/micromamba/envs/mutom/targets/x86_64-linux/include",
|
"-isystem/home/share/micromamba/envs/uLib/targets/x86_64-linux/include",
|
||||||
"-isystem/home/share/micromamba/envs/mutom/lib/gcc/x86_64-conda-linux-gnu/14.3.0/include/c++",
|
"-isystem/home/share/micromamba/envs/uLib/lib/gcc/x86_64-conda-linux-gnu/14.3.0/include/c++",
|
||||||
"-isystem/home/share/micromamba/envs/mutom/lib/gcc/x86_64-conda-linux-gnu/14.3.0/include/c++/x86_64-conda-linux-gnu",
|
"-isystem/home/share/micromamba/envs/uLib/lib/gcc/x86_64-conda-linux-gnu/14.3.0/include/c++/x86_64-conda-linux-gnu",
|
||||||
"-isystem/home/share/micromamba/envs/mutom/x86_64-conda-linux-gnu/sysroot/usr/include",
|
"-isystem/home/share/micromamba/envs/uLib/x86_64-conda-linux-gnu/sysroot/usr/include",
|
||||||
"--gcc-toolchain=/home/share/micromamba/envs/mutom",
|
"--gcc-toolchain=/home/share/micromamba/envs/uLib",
|
||||||
"-D__host__=",
|
"-D__host__=",
|
||||||
"-D__device__=",
|
"-D__device__=",
|
||||||
"-D__global__=",
|
"-D__global__=",
|
||||||
@@ -18,8 +19,8 @@
|
|||||||
],
|
],
|
||||||
"clangd.semanticHighlighting.enable": true,
|
"clangd.semanticHighlighting.enable": true,
|
||||||
"clangd.arguments": [
|
"clangd.arguments": [
|
||||||
"--compile-commands-dir=build",
|
"--compile-commands-dir=build/clang-make",
|
||||||
"--query-driver=/home/share/micromamba/envs/mutom/bin/*",
|
"--query-driver=/home/share/micromamba/envs/uLib/bin/*",
|
||||||
"--all-scopes-completion",
|
"--all-scopes-completion",
|
||||||
"--completion-style=detailed",
|
"--completion-style=detailed",
|
||||||
"--header-insertion=never",
|
"--header-insertion=never",
|
||||||
@@ -27,5 +28,6 @@
|
|||||||
"--pch-storage=memory",
|
"--pch-storage=memory",
|
||||||
"--background-index",
|
"--background-index",
|
||||||
"--log=verbose"
|
"--log=verbose"
|
||||||
]
|
],
|
||||||
|
"C_Cpp.intelliSenseEngine": "disabled"
|
||||||
}
|
}
|
||||||
@@ -3,10 +3,31 @@
|
|||||||
##### CMAKE LISTS ##############################################################
|
##### CMAKE LISTS ##############################################################
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
|
# Save compiler and launcher paths if they are absolute (e.g. from presets or CLI)
|
||||||
|
# to prevent conan_toolchain.cmake from overwriting them with relative names.
|
||||||
|
set(_ULIB_SAVE_CC "${CMAKE_C_COMPILER}")
|
||||||
|
set(_ULIB_SAVE_CXX "${CMAKE_CXX_COMPILER}")
|
||||||
|
set(_ULIB_SAVE_CC_LAUNCHER "${CMAKE_C_COMPILER_LAUNCHER}")
|
||||||
|
set(_ULIB_SAVE_CXX_LAUNCHER "${CMAKE_CXX_COMPILER_LAUNCHER}")
|
||||||
|
|
||||||
if(EXISTS "${CMAKE_BINARY_DIR}/conan_toolchain.cmake")
|
if(EXISTS "${CMAKE_BINARY_DIR}/conan_toolchain.cmake")
|
||||||
include("${CMAKE_BINARY_DIR}/conan_toolchain.cmake")
|
include("${CMAKE_BINARY_DIR}/conan_toolchain.cmake")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(_ULIB_SAVE_CC AND IS_ABSOLUTE "${_ULIB_SAVE_CC}")
|
||||||
|
set(CMAKE_C_COMPILER "${_ULIB_SAVE_CC}" CACHE FILEPATH "C compiler" FORCE)
|
||||||
|
endif()
|
||||||
|
if(_ULIB_SAVE_CXX AND IS_ABSOLUTE "${_ULIB_SAVE_CXX}")
|
||||||
|
set(CMAKE_CXX_COMPILER "${_ULIB_SAVE_CXX}" CACHE FILEPATH "C++ compiler" FORCE)
|
||||||
|
endif()
|
||||||
|
if(_ULIB_SAVE_CC_LAUNCHER AND IS_ABSOLUTE "${_ULIB_SAVE_CC_LAUNCHER}")
|
||||||
|
set(CMAKE_C_COMPILER_LAUNCHER "${_ULIB_SAVE_CC_LAUNCHER}" CACHE FILEPATH "C compiler launcher" FORCE)
|
||||||
|
endif()
|
||||||
|
if(_ULIB_SAVE_CXX_LAUNCHER AND IS_ABSOLUTE "${_ULIB_SAVE_CXX_LAUNCHER}")
|
||||||
|
set(CMAKE_CXX_COMPILER_LAUNCHER "${_ULIB_SAVE_CXX_LAUNCHER}" CACHE FILEPATH "C++ compiler launcher" FORCE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
cmake_minimum_required (VERSION 3.26)
|
cmake_minimum_required (VERSION 3.26)
|
||||||
|
|
||||||
set(QT_NO_VERSION_CHECK TRUE)
|
set(QT_NO_VERSION_CHECK TRUE)
|
||||||
|
|||||||
@@ -20,12 +20,12 @@
|
|||||||
"binaryDir": "${sourceDir}/build/${presetName}",
|
"binaryDir": "${sourceDir}/build/${presetName}",
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_BUILD_TYPE": "Release",
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
"CMAKE_C_COMPILER": "clang",
|
"CMAKE_C_COMPILER": "/home/share/micromamba/envs/uLib/bin/clang",
|
||||||
"CMAKE_CXX_COMPILER": "clang++",
|
"CMAKE_CXX_COMPILER": "/home/share/micromamba/envs/uLib/bin/clang++",
|
||||||
"CMAKE_EXE_LINKER_FLAGS": "-fuse-ld=lld",
|
"CMAKE_EXE_LINKER_FLAGS": "-fuse-ld=lld",
|
||||||
"CMAKE_SHARED_LINKER_FLAGS": "-fuse-ld=lld",
|
"CMAKE_SHARED_LINKER_FLAGS": "-fuse-ld=lld",
|
||||||
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache",
|
"CMAKE_CXX_COMPILER_LAUNCHER": "/home/share/micromamba/envs/uLib/bin/ccache",
|
||||||
"CMAKE_C_COMPILER_LAUNCHER": "ccache"
|
"CMAKE_C_COMPILER_LAUNCHER": "/home/share/micromamba/envs/uLib/bin/ccache"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -36,12 +36,12 @@
|
|||||||
"binaryDir": "${sourceDir}/build/${presetName}",
|
"binaryDir": "${sourceDir}/build/${presetName}",
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_BUILD_TYPE": "Release",
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
"CMAKE_C_COMPILER": "clang",
|
"CMAKE_C_COMPILER": "/home/share/micromamba/envs/uLib/bin/clang",
|
||||||
"CMAKE_CXX_COMPILER": "clang++",
|
"CMAKE_CXX_COMPILER": "/home/share/micromamba/envs/uLib/bin/clang++",
|
||||||
"CMAKE_EXE_LINKER_FLAGS": "-fuse-ld=lld",
|
"CMAKE_EXE_LINKER_FLAGS": "-fuse-ld=lld",
|
||||||
"CMAKE_SHARED_LINKER_FLAGS": "-fuse-ld=lld",
|
"CMAKE_SHARED_LINKER_FLAGS": "-fuse-ld=lld",
|
||||||
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache",
|
"CMAKE_CXX_COMPILER_LAUNCHER": "/home/share/micromamba/envs/uLib/bin/ccache",
|
||||||
"CMAKE_C_COMPILER_LAUNCHER": "ccache"
|
"CMAKE_C_COMPILER_LAUNCHER": "/home/share/micromamba/envs/uLib/bin/ccache"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -52,12 +52,12 @@
|
|||||||
"binaryDir": "${sourceDir}/build/${presetName}",
|
"binaryDir": "${sourceDir}/build/${presetName}",
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_BUILD_TYPE": "Release",
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
"CMAKE_C_COMPILER": "clang",
|
"CMAKE_C_COMPILER": "/home/share/micromamba/envs/uLib/bin/clang",
|
||||||
"CMAKE_CXX_COMPILER": "clang++",
|
"CMAKE_CXX_COMPILER": "/home/share/micromamba/envs/uLib/bin/clang++",
|
||||||
"CMAKE_EXE_LINKER_FLAGS": "-fuse-ld=lld",
|
"CMAKE_EXE_LINKER_FLAGS": "-fuse-ld=lld",
|
||||||
"CMAKE_SHARED_LINKER_FLAGS": "-fuse-ld=lld",
|
"CMAKE_SHARED_LINKER_FLAGS": "-fuse-ld=lld",
|
||||||
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache",
|
"CMAKE_CXX_COMPILER_LAUNCHER": "/home/share/micromamba/envs/uLib/bin/ccache",
|
||||||
"CMAKE_C_COMPILER_LAUNCHER": "ccache",
|
"CMAKE_C_COMPILER_LAUNCHER": "/home/share/micromamba/envs/uLib/bin/ccache",
|
||||||
"USE_CUDA": "ON"
|
"USE_CUDA": "ON"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user