public static string getMetadataFile() { if (metadataFiles.GetSize() > 0) { return(metadataFiles.Dequeue()); } else { return(null); } }
public static string getGuidNameToCreateButton() { if (guidToCreateButtons.GetSize() > 0) { return(guidToCreateButtons.Dequeue()); } else { return(null); } }
public static ServerMessages.IPSFrameAnchorData DequeueIPSAnchorFrame() { if (ips_anchor_frames.GetSize() > 0) { return(ips_anchor_frames.Dequeue()); } else { return(null); } }
public static PCLMsg DequeuePCLFrame() { if (pcl_frames.GetSize() > 0) { return(pcl_frames.Dequeue()); } else { return(null); } }
public static ServerMessages.IPSFrameData DequeueIPSDronFrame() { //This function is to get a positioning frame to the class that positions the drone. A lot of classes position the drone (Mapping and recording), so it needs to be public //and static to keep receiving frames, as the drone can keep flying once mapping finishes if (ips_frames.GetSize() > 0) { return(ips_frames.Dequeue()); } else { return(null); } }
public void putTexture() { if (image_msg.GetSize() > 0) { byte[] array = image_msg.Dequeue(); //if (!tex.mainTexture) //{ // tex.mainTexture = new Texture2D(resX, resY); //} //if (!materialForTexture.mainTexture) //{ // materialForTexture.mainTexture = new Texture2D(resX, resY); //} //Texture2D texAux = (Texture2D)tex.mainTexture; Texture2D newtex = tex.sprite.texture; newtex.LoadImage(array); newtex.Apply(); //materialForTexture.mainTexture = newtex; } }
public void putTexture() { if (image_msg.GetSize() > 0) { byte[] array = image_msg.Dequeue(); //if (!tex.mainTexture) //{ // tex.mainTexture = new Texture2D(resX, resY); //} //if (!materialForTexture.mainTexture) //{ // materialForTexture.mainTexture = new Texture2D(resX, resY); //} //Texture2D texAux = (Texture2D)tex.mainTexture; //Texture2D newtex = fpvRender.sprite.texture; //From the byte array that the fpv message returns, we create a image using unity loadimage method and then we always have to apply the changes made to the sprite fpvRender.sprite.texture.LoadImage(array); fpvRender.sprite.texture.Apply(); //newtex.LoadImage(array); //newtex.Apply(); //materialForTexture.mainTexture = newtex; } }