mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 05:52:38 +02:00
cleanup
This commit is contained in:
parent
a25d50387e
commit
779f326452
7 changed files with 3 additions and 52 deletions
|
@ -364,9 +364,6 @@ void HmdDisplayPlugin::updateFrameData() {
|
|||
|
||||
_presentExtraLaser = _extraLaser;
|
||||
_presentExtraLaserStart = _extraLaserStart;
|
||||
|
||||
_presentExtraLaserPose = _extraLaserPose;
|
||||
|
||||
});
|
||||
|
||||
auto compositorHelper = DependencyManager::get<CompositorHelper>();
|
||||
|
@ -436,24 +433,7 @@ void HmdDisplayPlugin::updateFrameData() {
|
|||
|
||||
// compute the glow point interesections
|
||||
if (_presentExtraLaser.valid()) {
|
||||
const auto& handLaser = _presentExtraLaser;
|
||||
|
||||
const vec3& laserDirection = handLaser.direction;
|
||||
|
||||
/*
|
||||
mat4 model = _presentExtraLaserPose;
|
||||
vec3 castStart = vec3(model[3]);
|
||||
vec3 castDirection = glm::quat_cast(model) * laserDirection;
|
||||
if (glm::abs(glm::length2(castDirection) - 1.0f) > EPSILON) {
|
||||
castDirection = glm::normalize(castDirection);
|
||||
castDirection = glm::inverse(_presentUiModelTransform.getRotation()) * castDirection;
|
||||
}
|
||||
|
||||
// FIXME - no offset
|
||||
vec3 grabPointOffset {0};
|
||||
castStart += glm::quat_cast(model) * grabPointOffset;
|
||||
*/
|
||||
|
||||
const vec3& laserDirection = _presentExtraLaser.direction;
|
||||
vec3 castStart = _presentExtraLaserStart;
|
||||
vec3 castDirection = laserDirection;
|
||||
|
||||
|
@ -680,20 +660,6 @@ bool HmdDisplayPlugin::setHandLaser(uint32_t hands, HandLaserMode mode, const ve
|
|||
return true;
|
||||
}
|
||||
|
||||
bool HmdDisplayPlugin::setExtraLaser(mat4 extraLaserPose, HandLaserMode mode, const vec4& color, const vec3& direction) {
|
||||
HandLaserInfo info;
|
||||
info.mode = mode;
|
||||
info.color = color;
|
||||
info.direction = direction;
|
||||
withNonPresentThreadLock([&] {
|
||||
_extraLaser = info;
|
||||
_extraLaserPose = extraLaserPose;
|
||||
});
|
||||
// FIXME defer to a child class plugin to determine if hand lasers are actually
|
||||
// available based on the presence or absence of hand controllers
|
||||
return true;
|
||||
}
|
||||
|
||||
bool HmdDisplayPlugin::setExtraLaser(HandLaserMode mode, const vec4& color, const glm::vec3& sensorSpaceStart, const vec3& sensorSpaceDirection) {
|
||||
HandLaserInfo info;
|
||||
info.mode = mode;
|
||||
|
|
|
@ -38,8 +38,6 @@ public:
|
|||
virtual glm::mat4 getHeadPose() const override;
|
||||
|
||||
bool setHandLaser(uint32_t hands, HandLaserMode mode, const vec4& color, const vec3& direction) override;
|
||||
|
||||
bool setExtraLaser(mat4 extraLaserPose, HandLaserMode mode, const vec4& color, const vec3& direction) override;
|
||||
bool setExtraLaser(HandLaserMode mode, const vec4& color, const glm::vec3& sensorSpaceStart, const vec3& sensorSpaceDirection) override;
|
||||
|
||||
bool wantVsync() const override {
|
||||
|
@ -91,11 +89,6 @@ protected:
|
|||
vec3 _presentExtraLaserStart;
|
||||
std::pair<vec3, vec3> _presentExtraLaserPoints;
|
||||
|
||||
// FIXME - kill these
|
||||
mat4 _extraLaserPose;
|
||||
mat4 _presentExtraLaserPose;
|
||||
|
||||
|
||||
std::array<mat4, 2> _eyeOffsets;
|
||||
std::array<mat4, 2> _eyeProjections;
|
||||
std::array<mat4, 2> _eyeInverseProjections;
|
||||
|
|
|
@ -115,9 +115,6 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
virtual bool setExtraLaser(mat4 extraLaserPose, HandLaserMode mode, const vec4& color, const vec3& direction) {
|
||||
return false;
|
||||
}
|
||||
virtual bool setExtraLaser(HandLaserMode mode, const vec4& color, const glm::vec3& sensorSpaceStart, const vec3& sensorSpaceDirection) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1585,7 +1585,6 @@ void GeometryCache::renderLine(gpu::Batch& batch, const glm::vec2& p1, const glm
|
|||
}
|
||||
|
||||
|
||||
// FIXME -- there's a memory leak of GPU buffers in this method
|
||||
void GeometryCache::renderGlowLine(gpu::Batch& batch, const glm::vec3& p1, const glm::vec3& p2,
|
||||
const glm::vec4& color, float glowIntensity, float glowWidth, int id) {
|
||||
|
||||
|
|
|
@ -894,9 +894,6 @@ function MyController(hand) {
|
|||
};
|
||||
|
||||
this.overlayLineOn = function(closePoint, farPoint, color) {
|
||||
print("overlayLineOn()... closePoint:", closePoint.x +","+closePoint.y+","+closePoint.z,
|
||||
"farPoint:", farPoint.x +","+farPoint.y+","+farPoint.z);
|
||||
|
||||
if (this.overlayLine === null) {
|
||||
var lineProperties = {
|
||||
glow: 1.0,
|
||||
|
|
|
@ -204,7 +204,7 @@ function overlayFromWorldPoint(point) {
|
|||
}
|
||||
|
||||
function activeHudPoint2d(activeHand) { // if controller is valid, update reticle position and answer 2d point. Otherwise falsey.
|
||||
var controllerPose = getControllerWorldLocation(activeHand, true); // note: this will use head pose of hand pose is invalid (third eye)
|
||||
var controllerPose = getControllerWorldLocation(activeHand, true); // note: this will return head pose if hand pose is invalid (third eye)
|
||||
if (!controllerPose.valid) {
|
||||
return; // Controller is cradled.
|
||||
}
|
||||
|
@ -500,7 +500,7 @@ function update() {
|
|||
return off();
|
||||
}
|
||||
|
||||
if (true) {
|
||||
if (!HMD.isHandControllerAvailable()) {
|
||||
var color = (activeTrigger.state === 'full') ? LASER_TRIGGER_COLOR_XYZW : LASER_SEARCH_COLOR_XYZW;
|
||||
|
||||
var position = MyAvatar.getHeadPosition();
|
||||
|
|
|
@ -43,7 +43,6 @@ getControllerWorldLocation = function (handController, doOffset) {
|
|||
position = Vec3.sum(position, Vec3.multiplyQbyV(orientation, getGrabPointSphereOffset(handController)));
|
||||
}
|
||||
} else if (!HMD.isHandControllerAvailable()) {
|
||||
//print("getControllerWorldLocation(), no hand controllers -- use head");
|
||||
position = MyAvatar.getHeadPosition();
|
||||
orientation = Quat.multiply(MyAvatar.headOrientation, Quat.angleAxis(-90, { x: 1, y: 0, z: 0 }));
|
||||
valid = true;
|
||||
|
|
Loading…
Reference in a new issue