1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-02 12:33:52 +00:00

rm lovr.headset.getBoundsGeometry;

This commit is contained in:
bjorn 2018-01-06 15:49:19 -08:00
parent aef6345606
commit 11586e8248
6 changed files with 0 additions and 52 deletions

View file

@ -197,21 +197,6 @@ int l_lovrHeadsetGetBoundsDimensions(lua_State* L) {
return 2;
}
int l_lovrHeadsetGetBoundsGeometry(lua_State* L) {
float geometry[12];
lovrHeadsetGetBoundsGeometry(geometry);
lua_newtable(L);
for (int i = 0; i < 4; i++) {
lua_newtable(L);
for (int j = 0; j < 3; j++) {
lua_pushnumber(L, geometry[3 * i + j]);
lua_rawseti(L, -2, j + 1);
}
lua_rawseti(L, -2, i + 1);
}
return 1;
}
static void luax_getPose(lua_State* L, float* x, float* y, float* z, float* angle, float* ax, float* ay, float* az) {
if (lua_type(L, 1) == LUA_TSTRING) {
HeadsetEye eye = *(HeadsetEye*) luax_checkenum(L, 1, &HeadsetEyes, "eye");
@ -331,7 +316,6 @@ const luaL_Reg lovrHeadset[] = {
{ "getBoundsWidth", l_lovrHeadsetGetBoundsWidth },
{ "getBoundsDepth", l_lovrHeadsetGetBoundsDepth },
{ "getBoundsDimensions", l_lovrHeadsetGetBoundsDimensions },
{ "getBoundsGeometry", l_lovrHeadsetGetBoundsGeometry },
{ "getPose", l_lovrHeadsetGetPose },
{ "getPosition", l_lovrHeadsetGetPosition },
{ "getOrientation", l_lovrHeadsetGetOrientation },

View file

@ -248,10 +248,6 @@ static float fakeGetBoundsDepth() {
return 0.0f;
}
static void fakeGetBoundsGeometry(float* geometry) {
memset(geometry, 0, 12 * sizeof(float));
}
static void fakeGetPose(float* x, float* y, float* z, float* angle, float* ax, float* ay, float* az) {
*x = state.pos[0];
*y = state.pos[1];
@ -412,7 +408,6 @@ HeadsetInterface lovrHeadsetFakeDriver = {
fakeSetClipDistance,
fakeGetBoundsWidth,
fakeGetBoundsDepth,
fakeGetBoundsGeometry,
fakeGetPose,
fakeGetEyePose,
fakeGetVelocity,

View file

@ -106,16 +106,6 @@ float lovrHeadsetGetBoundsDepth() {
return headset ? headset->getBoundsDepth() : 0.f;
}
void lovrHeadsetGetBoundsGeometry(float* geometry) {
if (!headset) {
*geometry = 0.f;
return;
}
headset->getBoundsGeometry(geometry);
}
void lovrHeadsetGetPose(float* x, float* y, float* z, float* angle, float* ax, float* ay, float* az) {
if (!headset) {
*x = *y = *z = *angle = *ax = *ay = *az = 0.f;

View file

@ -80,7 +80,6 @@ typedef struct {
void (*setClipDistance)(float clipNear, float clipFar);
float (*getBoundsWidth)();
float (*getBoundsDepth)();
void (*getBoundsGeometry)(float* geometry);
void (*getPose)(float* x, float* y, float* z, float* angle, float* ax, float* ay, float* az);
void (*getEyePose)(HeadsetEye eye, float* x, float* y, float* z, float* angle, float* ax, float* ay, float* az);
void (*getVelocity)(float* x, float* y, float* z);
@ -117,7 +116,6 @@ void lovrHeadsetGetClipDistance(float* clipNear, float* clipFar);
void lovrHeadsetSetClipDistance(float clipNear, float clipFar);
float lovrHeadsetGetBoundsWidth();
float lovrHeadsetGetBoundsDepth();
void lovrHeadsetGetBoundsGeometry(float* geometry);
void lovrHeadsetGetPose(float* x, float* y, float* z, float* angle, float* ax, float* ay, float* az);
void lovrHeadsetGetEyePose(HeadsetEye eye, float* x, float* y, float* z, float* angle, float* ax, float* ay, float* az);
void lovrHeadsetGetVelocity(float* x, float* y, float* z);

View file

@ -354,20 +354,6 @@ static float openvrGetBoundsDepth() {
return depth;
}
static void openvrGetBoundsGeometry(float* geometry) {
if (!state.isInitialized) {
memset(geometry, 0, 12 * sizeof(float));
} else {
struct HmdQuad_t quad;
state.chaperone->GetPlayAreaRect(&quad);
for (int i = 0; i < 4; i++) {
geometry[3 * i + 0] = quad.vCorners[i].v[0];
geometry[3 * i + 1] = quad.vCorners[i].v[1];
geometry[3 * i + 2] = quad.vCorners[i].v[2];
}
}
}
static void openvrGetPose(float* x, float* y, float* z, float* angle, float* ax, float* ay, float* az) {
if (!state.isInitialized) {
*x = *y = *z = *angle = *ax = *ay = *az = 0.f;
@ -829,7 +815,6 @@ HeadsetInterface lovrHeadsetOpenVRDriver = {
openvrSetClipDistance,
openvrGetBoundsWidth,
openvrGetBoundsDepth,
openvrGetBoundsGeometry,
openvrGetPose,
openvrGetEyePose,
openvrGetVelocity,

View file

@ -113,10 +113,6 @@ static float webvrGetBoundsDepth() {
return emscripten_vr_get_bounds_depth();
}
static void webvrGetBoundsGeometry(float* geometry) {
memset(geometry, 0, 12 * sizeof(float));
}
static void webvrGetPose(float* x, float* y, float* z, float* angle, float* ax, float* ay, float* az) {
float v[3];
emscripten_vr_get_position(&v[0], &v[1], &v[2]);