コード例 #1
0
    private bool FetchNextPalmDetectionsPresence()
    {
        if (!palmDetectionsPresenceStreamPoller.Next(palmDetectionsPresencePacket))
        {
            Debug.LogWarning($"Failed to fetch next packet from {palmDetectionsPresenceStream}");
            return(false);
        }

        return(palmDetectionsPresencePacket.GetValue());
    }
コード例 #2
0
    private bool FetchNextMultiFaceLandmarksPresence()
    {
        if (!multiFacelandmarksPresenceStreamPoller.Next(multiFaceLandmarksPresencePacket)) // blocks
        {
            Debug.LogWarning($"Failed to fetch next packet from {multiFaceLandmarksPresenceStream}");
            return(false);
        }

        return(multiFaceLandmarksPresencePacket.GetValue());
    }
コード例 #3
0
    private bool FetchNextFaceDetectionsPresence()
    {
        if (!faceDetectionsPresenceStreamPoller.Next(faceDetectionsPresencePacket)) // blocks
        {
            Debug.LogWarning($"Failed to fetch next packet from {faceDetectionsPresenceStream}");
            return(false);
        }

        return(faceDetectionsPresencePacket.GetValue());
    }
コード例 #4
0
    private List <Landmark[]> FetchNextLandmarks()
    {
        if (!landmarkPresenceStreamPoller.Next(landmarkPresencePacket)) // blocks
        {
            return(new List <Landmark[]>());
        }

        bool isLandmarkPresent = landmarkPresencePacket.GetValue();

        if (!isLandmarkPresent)
        {
            return(new List <Landmark[]>());
        }

        if (!landmarkStreamPoller.Next(landmarkListPacket))
        {
            return(new List <Landmark[]>());
        }

        return(landmarkListPacket.GetValue());
    }