OvrvisionGetAR() 공개 메소드

public OvrvisionGetAR ( System mdata, int datasize ) : int
mdata System
datasize int
리턴 int
예제 #1
0
    //Ovrvision AR Render to OversitionTracker Objects.
    private int OvrvisionARRender()
    {
        float[]  markerGet = new float[MARKERGET_MAXNUM10];
        GCHandle marker    = GCHandle.Alloc(markerGet, GCHandleType.Pinned);

        //Get marker data
        int ri = OvrPro.OvrvisionGetAR(marker.AddrOfPinnedObject(), MARKERGET_MAXNUM10);

        OvrvisionTracker[] otobjs = GameObject.FindObjectsOfType(typeof(OvrvisionTracker)) as OvrvisionTracker[];
        foreach (OvrvisionTracker otobj in otobjs)
        {
            otobj.UpdateTransformNone();
            for (int i = 0; i < ri; i++)
            {
                if (otobj.markerID == (int)markerGet[i * MARKERGET_ARG10])
                {
                    otobj.UpdateTransform(markerGet, i);
                    break;
                }
            }
        }

        marker.Free();

        return(ri);
    }