-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix VRPN plugin, add floor projection and OpenDeck plugin #616
Conversation
@@ -12,12 +12,16 @@ if(BRAYNS_NETWORKING_ENABLED) | |||
add_subdirectory(Rockets) | |||
endif() | |||
|
|||
option(BRAYNS_VRPN_ENABLED "Activate VRPN plugin" OFF) | |||
if(BRAYNS_OPENDECK_ENABLED) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The option should go here then, not in the top-level CMake?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
pixelPos.x = 2.0f * OPENDECK_RADIUS * (screen.x - 0.5f); | ||
pixelPos.y = 0.0f; | ||
pixelPos.z = -OPENDECK_RADIUS + OPENDECK_RADIUS * screen.y; | ||
// pixelPos.z = -OPENDECK_RADIUS * screen.y; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's the top-left vs bottom-left thing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
plugins/OpenDeck/OpenDeckPlugin.cpp
Outdated
|
||
void OpenDeckPlugin::init(PluginAPI* api) | ||
{ | ||
_api = api; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that member is actually not needed. It should be once your plugin gets unloaded to remove the buffers again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
plugins/OpenDeck/OpenDeckPlugin.h
Outdated
public: | ||
OpenDeckPlugin(const Vector2ui& wallRes, const Vector2ui& floorRes); | ||
|
||
virtual void init(PluginAPI* api); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
final
, not virtual
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
plugins/VRPN/VRPNPlugin.h
Outdated
~VRPNPlugin(); | ||
|
||
virtual void init(PluginAPI* api); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
final
, not virtual
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
plugins/VRPN/VRPNPlugin.h
Outdated
@@ -46,7 +48,7 @@ class VRPNPlugin : public ExtensionPlugin | |||
|
|||
private: | |||
PluginAPI* _api = nullptr; | |||
Camera& _camera; | |||
Camera* _camera; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use _api->getCamera()
instead, rather than having this pointer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
plugins/OpenDeck/OpenDeckPlugin.cpp
Outdated
"native OpenDeck resolution."); | ||
} | ||
|
||
const float scaling = (argc == 2) ? atof(argv[1]) : 1.0f; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use std::stof instead since atof causes undefined behaviour on garbage input.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
{ | ||
namespace | ||
{ | ||
constexpr uint32_t openDeckWallResX = 11940u; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for u suffix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the suffix !!
@@ -25,6 +25,11 @@ namespace ospray | |||
{ | |||
namespace | |||
{ | |||
constexpr uint8_t leftWall = 0u; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for u suffix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the suffix !!
plugins/OpenDeck/CMakeLists.txt
Outdated
|
||
set(BRAYNSOPENDECK_HEADERS OpenDeckPlugin.h) | ||
set(BRAYNSOPENDECK_SOURCES OpenDeckPlugin.cpp) | ||
set(BRAYNSOPENDECK_LINK_LIBRARIES PRIVATE vmmlib braynsPluginAPI) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use braynsCommon instead of vmmlib
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
CMakeLists.txt
Outdated
@@ -85,6 +85,7 @@ endif() | |||
common_find_package(Deflect) | |||
if(TARGET Deflect) | |||
option(BRAYNS_DEFLECT_ENABLED "Activate streaming to display wall" ON) | |||
option(BRAYNS_OPENDECK_ENABLED "Activate opendeck plugin and module" OFF) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -24,7 +24,6 @@ if(BRAYNS_OPTIX_ENABLED) | |||
endif() | |||
|
|||
# OpenDeck module | |||
option(BRAYNS_OPENDECK_ENABLED "Activate OpenDeck module" OFF) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert. should work when the option stays here also for the plugin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A more elaborate commit message? "Fix VRPN plugin, add floor projection and OpenDeckPlugin
221dad3
to
17d7225
Compare
retest this please |
Approve !! |
Rebase!! |
retest this please |
1 similar comment
retest this please |
APROOOOOOVE !!!!!! |
No description provided.