Skip to content
Snippets Groups Projects
Commit 9c58d7e3 authored by sdegrande's avatar sdegrande
Browse files

[OpenXR] Correctly initialize all elements of arrays.

parent 75087974
No related branches found
No related tags found
No related merge requests found
......@@ -31,10 +31,10 @@ private:
bool useHandJointsMotionRange { false };
bool useSimultaneousHandsAndControllersTracking { false };
OpenXRHand* oxrHands[OxrHand::COUNT] { nullptr };
bool holdControllers[OxrHand::COUNT] { true };
OpenXRHand* oxrHands[OxrHand::COUNT] { nullptr, nullptr };
bool holdControllers[OxrHand::COUNT] { true, true };
XrHandTrackerEXT handTrackers[OxrHand::COUNT] { XR_NULL_HANDLE };
XrHandTrackerEXT handTrackers[OxrHand::COUNT] { XR_NULL_HANDLE, XR_NULL_HANDLE };
XrHandJointLocationEXT handJointLocations[OxrHand::COUNT][XR_HAND_JOINT_COUNT_EXT] {};
XrHandJointVelocityEXT handJointVelocities[OxrHand::COUNT][XR_HAND_JOINT_COUNT_EXT] {};
......@@ -58,7 +58,7 @@ public:
private:
static std::map<std::string, uint32_t> xrJoints;
Model3D* handModel { nullptr };
std::vector<SkeletonBone*> jointBindings { nullptr };
std::vector<SkeletonBone*> jointBindings {};
private:
void importJointBindings(const std::string& modelName);
......
......@@ -24,7 +24,7 @@ struct OxrController
{
bool primaryIsLeft { true };
OxrPose pose[OxrHand::COUNT] {};
bool controllerHeld[OxrHand::COUNT] { true };
bool controllerHeld[OxrHand::COUNT] { true, true };
OxrDigital interactionButton {};
OxrDigital secondInteractionButton {};
OxrDigital interactionAnalogActive {};
......
......@@ -181,8 +181,8 @@ struct OxrConnection
// Interaction
std::vector<std::pair<XrPath, std::string>> controllerProfiles {};
std::array<int32_t, OxrHand::COUNT> currentControllerProfile { -1 };
std::array<XrPath, OxrHand::COUNT> handPaths { XR_NULL_PATH };
std::array<int32_t, OxrHand::COUNT> currentControllerProfile { -1, 1 };
std::array<XrPath, OxrHand::COUNT> handPaths { XR_NULL_PATH, XR_NULL_PATH };
};
class OxrActionAdapter;
......@@ -277,7 +277,7 @@ struct OxrActionSet
OxrDominantSetting dominantSetting { SINGLE };
std::string manifestName {};
XrActionSet handle { XR_NULL_PATH };
std::array<XrSpace, OxrHand::COUNT> handPoseSpaces { XR_NULL_HANDLE };
std::array<XrSpace, OxrHand::COUNT> handPoseSpaces { XR_NULL_HANDLE, XR_NULL_PATH };
std::unordered_map<std::string, OxrAction*> actions {};
// actionAdapters[interaction_profile][hand_idx] -> vector of (actionName, OxrActionAdapter*)
std::map<std::string, std::array<std::vector<std::pair<std::string, OxrActionAdapter*>>, OxrHand::COUNT>>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment