mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 21:48:46 +02:00
CR feedback
This commit is contained in:
parent
62f63f32a7
commit
ed4279783d
3 changed files with 10 additions and 8 deletions
|
@ -111,6 +111,8 @@ public:
|
|||
void setDisplayPlugin(const DisplayPluginPointer& displayPlugin) { _currentDisplayPlugin = displayPlugin; }
|
||||
void setFrameInfo(uint32_t frame, const glm::mat4& camera) { _currentCamera = camera; }
|
||||
|
||||
float getHmdUiRadius() const { return _hmdUIRadius; }
|
||||
|
||||
signals:
|
||||
void allowMouseCaptureChanged();
|
||||
void alphaChanged();
|
||||
|
|
|
@ -368,8 +368,11 @@ void HmdDisplayPlugin::updateFrameData() {
|
|||
|
||||
auto compositorHelper = DependencyManager::get<CompositorHelper>();
|
||||
glm::mat4 modelMat = compositorHelper->getModelTransform().getMatrix();
|
||||
std::array<vec2, NUMBER_OF_HANDS> handGlowPoints{ { vec2(-1), vec2(-1) } };
|
||||
vec2 extraGlowPoint(-1);
|
||||
static const float OUT_OF_BOUNDS = -1;
|
||||
std::array<vec2, NUMBER_OF_HANDS> handGlowPoints { { vec2(OUT_OF_BOUNDS), vec2(OUT_OF_BOUNDS) } };
|
||||
vec2 extraGlowPoint(OUT_OF_BOUNDS);
|
||||
|
||||
float uiRadius = compositorHelper->getHmdUiRadius();
|
||||
|
||||
// compute the glow point interesections
|
||||
for (size_t i = 0; i < NUMBER_OF_HANDS; ++i) {
|
||||
|
@ -396,9 +399,6 @@ void HmdDisplayPlugin::updateFrameData() {
|
|||
}
|
||||
castStart += glm::quat_cast(model) * grabPointOffset;
|
||||
|
||||
// FIXME fetch the actual UI radius from... somewhere?
|
||||
float uiRadius = 1.0f;
|
||||
|
||||
// Find the intersection of the laser with he UI and use it to scale the model matrix
|
||||
float distance;
|
||||
if (!glm::intersectRaySphere(castStart, castDirection,
|
||||
|
|
Loading…
Reference in a new issue