Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.
Options

How to get the current TimeStamp without using HolographicFramePrediction class

I know that we can get the current TimeStamp by HolographicFramePrediction class, like
prediction->Timestamp. Is there a way to get the TimeStamp without prediction class?

I'm trying to modify the Holographic DirectX template project to switch the App's FreamOfReference from "SpatialStationaryFrameOfReference" to "SpatialLocatorAttachedFrameOfReference". Everything is working as expected except the gesture handling, when uses makes an air tap, we want to reposition the cube right in from of user's eye.

What frustrates me is that we need to get the current TimeStamp to get the current coordinate system, see the code below, I use "?????" to indcate the TimeStamp I need to pass in the function GetStationaryCoordinateSystemAtTimestamp(), but do not know how to get the current TimeStamp.

void DXAppMain::OnSourcePressed(SpatialInteractionManager^ sender, SpatialInteractionSourceEventArgs^ args)
{
SpatialInteractionSourceState^ pointerState = args->State;
if (pointerState != nullptr)// Pressed gesture is detected, reposition hologram
{
SpatialCoordinateSystem^ curCoordinateSystem = m_referenceFrame->GetStationaryCoordinateSystemAtTimestamp(?????);
m_spinningCubeRenderer->PositionHologram(pointerState->TryGetPointerPose(curCoordinateSystem));
}
}

Any suggestions?

Answers

  • Options

    Is args->State->Timestamp what you are looking for?

    ===
    This post provided as-is with no warranties and confers no rights. Using information provided is done at own risk.

    (Daddy, what does 'now formatting drive C:' mean?)

  • Options

    Thanks, it looks like a solution, I'll give it a try later.

Sign In or Register to comment.