mirror of
https://github.com/overte-org/overte.git
synced 2025-04-16 10:28:57 +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,
|
||||
|
|
|
@ -455,10 +455,10 @@ function clearSystemLaser() {
|
|||
function setColoredLaser() { // answer trigger state if lasers supported, else falsey.
|
||||
var color = (activeTrigger.state === 'full') ? LASER_TRIGGER_COLOR_XYZW : LASER_SEARCH_COLOR_XYZW;
|
||||
|
||||
if (!HMD.isHandControllerAvailable()){
|
||||
if (!HMD.isHandControllerAvailable()) {
|
||||
var position = MyAvatar.getHeadPosition();
|
||||
var direction = Quat.getUp(Quat.multiply(MyAvatar.headOrientation, Quat.angleAxis(-90, { x: 1, y: 0, z: 0 })));
|
||||
return HMD.setExtraLaser(position,true, color, direction);
|
||||
return HMD.setExtraLaser(position, true, color, direction);
|
||||
}
|
||||
|
||||
return HMD.setHandLasers(activeHudLaser, true, color, SYSTEM_LASER_DIRECTION) && activeTrigger.state;
|
||||
|
@ -510,7 +510,7 @@ function update() {
|
|||
var color = (activeTrigger.state === 'full') ? LASER_TRIGGER_COLOR_XYZW : LASER_SEARCH_COLOR_XYZW;
|
||||
var position = MyAvatar.getHeadPosition();
|
||||
var direction = Quat.getUp(Quat.multiply(MyAvatar.headOrientation, Quat.angleAxis(-90, { x: 1, y: 0, z: 0 })));
|
||||
HMD.setExtraLaser(position,true, color, direction);
|
||||
HMD.setExtraLaser(position, true, color, direction);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue