MCPcopy Create free account
hub / github.com/LibreVR/Revive / ovr_GetBoundaryGeometry

Function ovr_GetBoundaryGeometry

ReviveXR/REV_CAPI.cpp:693–715  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

691}
692
693OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetBoundaryGeometry(ovrSession session, ovrBoundaryType boundaryType, ovrVector3f* outFloorPoints, int* outFloorPointsCount)
694{
695 REV_TRACE(ovr_GetBoundaryGeometry);
696
697 if (!session)
698 return ovrError_InvalidSession;
699
700 if (outFloorPoints)
701 {
702 ovrVector3f bounds;
703 CHK_OVR(ovr_GetBoundaryDimensions(session, boundaryType, &bounds));
704 ovrVector3f floorPoints[] = {
705 { bounds.x / -2.0f, bounds.y, bounds.z / 2.0f},
706 { bounds.x / 2.0f, bounds.y, bounds.z / 2.0f},
707 { bounds.x / 2.0f, bounds.y, bounds.z / -2.0f},
708 { bounds.x / -2.0f, bounds.y, bounds.z / -2.0f}
709 };
710 memcpy(outFloorPoints, floorPoints, sizeof(floorPoints));
711 }
712 if (outFloorPointsCount)
713 *outFloorPointsCount = 4;
714 return ovrSuccess;
715}
716
717OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetBoundaryDimensions(ovrSession session, ovrBoundaryType boundaryType, ovrVector3f* outDimensions)
718{

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected