问题标签 [oculus]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
namespaces - 模棱两可的符号。需要保留两个命名空间
我正在从 Oculus Rift 读取并通过串行写入来控制 Arduino,但是由于我是 C++ 新手,所以我在命名空间方面遇到了一些问题。
我的代码开头是这样的:
当我尝试使用 String 时出现原始错误,因为它是在 System 和 OVR 中定义的。我将代码更改为 System::String 但现在我收到一个错误,告诉我 System 不明确,因为它已在 OVR::System 中定义
有什么方法可以避免这种冲突吗?排除 OVR::String 和 OVR::System 不受“使用”子句影响的某种方式?我无法摆脱其中一个“使用”子句,因为我的代码中有很多对这些名称空间成员的引用。
c++ - 链接错误 - Qt 和 VS2013 上的 Oculus Rift 库(Linux - Windows)
一周以来,我一直对这个错误感到困惑,但我没有任何解决方案......
Linux - Qt 创建者 5.2
我正在尝试在使用 Oculus Rift 库的 Qt 上制作程序,但尽管有可能在 Qt 创建者上链接库,但不幸的是,我总是发现同样的错误。
我已经尝试了 3 种不同的方法来实现它,你可以在这里看到:
-直接链接到路径(方式 2)
-使用 QtCreator 静态编译库并将输出链接到我的项目(方式 1)
- Qt Creator -> Project(右键)-> Add Library -> Path to the Lib(方式3)
这是我的 .pro 文件
错误
我没有复制过去的所有内容,但它给了你一个想法。主文件由以下教程中的基本教程组成:https ://developer.oculusvr.com/
/home/why/Documents/Test/build-TestOVR3-Desktop-Debug/../TestOVR3/main.cpp:49:未定义对OVR::SensorFusion::~SensorFusion()'
/home/why/Documents/Test/build-TestOVR3-Desktop-Debug/../TestOVR3/main.cpp:51: undefined reference to
OVR::System::Destroy()' main.o 的引用:在函数OVR::Allocator::GetInstance()':
/home/why/Documents/Test/build-TestOVR3-Desktop-Debug/../../OculusSDK/LibOVR/Include/../Src/Kernel/OVR_Allocator.h:216: undefined reference to
OVR:: Allocator::pInstance' main.o:在函数 `OVR::Log::ConfigureDefaultLog(unsigned int)' 中:/home/why/Documents/Test/build-TestOVR3-Desktop-Debug/../../OculusSDK/ LibOVR/Include/../Src/Kernel/OVR_Log.h:159:未定义的引用
有人有想法吗?:S
Visual Studio 2013 & Qt 插件 VS2013
完全相同的错误:S
opengl - OpenGL 3.1 版和 Oculus Rift 的 glFramebufferTexture 的替代品
因此 Oculus Rift SDK 接受使用glFramebufferTexture函数创建的帧缓冲纹理 ID 。
例子:
但是,glFramebufferTexture 函数仅在 OpenGL 3.2+ 中可用。
是否可以创建一个在功能上与 Oculus Rift SDK 相同且可接受的解决方法?
c++ - OpenGL - 使用帧缓冲区和 Oculus Rift 的空白屏幕
下面的代码尝试显示到 Oculus Rift,但我得到一个空白屏幕。
什么都没有显示,我不知道为什么。
请注意,我省略了一个相当大的项目的部分内容,但如果您觉得需要更多信息来解决问题,请询问!
编辑
忘了我的着色器...
unity3d - 与 Oculus Rift 统一的视口
我已经设置了一个窗口以水平分布在 2 个显示器上。我有 2 个视口。第一个是标准相机。我已将其设置为窗口宽度的一半,使其为 1920x1080(填充第一台显示器)。我遇到的问题是我想让 Oculus 视口占用第二个显示器)。但是,我找不到阻止 oculus 视口占用整个窗口的设置。
有人可以帮忙吗?
用于澄清的图像
它目前的样子:
我希望它看起来像什么:
我猜它在脚本中的某个地方,但我看不到视口的绘制位置。
任何帮助,将不胜感激。
c# - 停止和恢复 Oculus 移动
我正在尝试编辑默认的 oculus 相机脚本,以在一段时间内停止响应跟踪传感器,然后从相机停止跟随跟踪传感器时所指向的位置恢复正常移动。
我能够阻止相机响应跟踪传感器,但现在当它恢复工作时,它会“捕捉”到如果传感器未停用,相机将处于的位置。但是,我希望它只是“无缝”恢复跟踪。所以我想我还必须在那段时间停止一些变量的更新。
到目前为止,这是我的代码,它位于函数 SetCameraOrientation 的 OVRCamera 脚本中:
这是我的新变量的变量声明:
如果有人可以帮助我,我将不胜感激。
谢谢。
javascript - ThreeJS: Using a Sprite with the OculusRiftEffect
I'm developing for the OculusRift using the OculusRiftEffect from https://github.com/mrdoob/three.js/blob/master/examples/js/effects/OculusRiftEffect.js and am using Sprites. The problem is the sprites don't appear in the correct position in each eye as in the screenshot. You can see the house sprite is in different positions in each eye and causes a 'double vision' effect in the oculus. While playing around with the code (have a demo plunker here) you can notice that near the edges of the screen the positioning is more accurate but I need it nearer the center of the screen where the positioning is off. I assume this has something to do with the shading/rendering in OculusRiftEffect but don't know enough about it to break it down, any direction would be appreciated, thanks!
Sample code:
opengl - 使用 GLM 和 Oculus Rift SDK 反向旋转头部
我有 90% 的情况是获得工作方向。
我只是想解决最后一点,我希望有人能指出我正在犯但没有看到的任何简单错误。
我的代码有效,除非当一个人向左看时,相机实际上向右旋转。反之亦然,向右看,相机向左旋转。
知道我在这里做错了什么吗?
我像这样从 Oculus Rift 检索方向:
以下是我计算 LookAt 的方法:
unity3d - 用于 Oculus Rift 的 Unity 中的 Javascript
我只是想知道,我可以使用 Javascript 在 Unity 中对项目和虚拟现实世界进行编程,以便将其实现到 Oculus Rift 中吗?我需要为一个研究项目做这件事。我会尝试 C++,但我更擅长 Javascript。
command-line - NirCMD run multiple commands from a context menu
I would like to run a few NirCmds when running an application such that it will change the primary display to the extended monitor, run the app and then switch back when finished. Ideally I would like to create this as a context menu option. Since this is using multiple commands I thought of using the script functionality from nircmd such as:
with the script containing the lines I needed:
However I am not sure how to pass the process name from the context menu into the script or if this is even possible. Does anyone know how to do this or am I approaching this the wrong way?
I have the process location from the context menu as %1, so the issue is really just passing this into the script. Something like: