PICO Unity XR SDK
PXR_OverLay Class Reference

Public Types

enum  OverlayShape { Quad = 1 , Cylinder = 2 , Equirect = 3 , Cubemap = 5 }
 
enum  OverlayType { Overlay = 0 , Underlay = 1 }
 
enum  TextureType { ExternalSurface , DynamicTexture , StaticTexture }
 
enum  LayerLayout { Stereo = 0 , DoubleWide = 1 , Array = 2 , Mono = 3 }
 
enum  Surface3DType { Single = 0 , LeftRight , TopBottom }
 
enum  TextureRect { MonoScopic , StereoScopic , Custom }
 
enum  DestinationRect { Default , Custom }
 

Public Member Functions

delegate void ExternalAndroidSurfaceObjectCreated ()
 
int CompareTo (PXR_OverLay other)
 
void DestroyLayer ()
 
void RefreshCamera (Camera leftCamera, Camera rightCamera)
 
void CreateExternalSurface (PXR_OverLay overlayInstance)
 
void UpdateCoords ()
 
bool CreateTexture ()
 
bool CopyRT ()
 
void SetTexture (Texture texture, bool dynamic)
 
void SetLayerColorScaleAndOffset (Vector4 scale, Vector4 offset)
 
Vector4 GetLayerColorScale ()
 
Vector4 GetLayerColorOffset ()
 
PxrRecti getPxrRectiLeft (bool left)
 

Public Attributes

int overlayIndex
 
int layerDepth
 
int imageIndex = 0
 
OverlayType overlayType = OverlayType.Overlay
 
OverlayShape overlayShape = OverlayShape.Quad
 
TextureType textureType = TextureType.ExternalSurface
 
Transform overlayTransform
 
Camera xrRig
 
Texture[] layerTextures = new Texture[2] { null, null }
 
bool isDynamic = false
 
int[] overlayTextureIds = new int[2]
 
Matrix4x4[] mvMatrixs = new Matrix4x4[2]
 
Vector3[] modelScales = new Vector3[2]
 
Quaternion[] modelRotations = new Quaternion[2]
 
Vector3[] modelTranslations = new Vector3[2]
 
Quaternion[] cameraRotations = new Quaternion[2]
 
Vector3[] cameraTranslations = new Vector3[2]
 
Camera[] overlayEyeCamera = new Camera[2]
 
bool overrideColorScaleAndOffset = false
 
Vector4 colorScale = Vector4.one
 
Vector4 colorOffset = Vector4.zero
 
bool isExternalAndroidSurface = false
 
bool isExternalAndroidSurfaceDRM = false
 
Surface3DType externalAndroidSurface3DType = Surface3DType.Single
 
IntPtr externalAndroidSurfaceObject = IntPtr.Zero
 
ExternalAndroidSurfaceObjectCreated externalAndroidSurfaceObjectCreated = null
 
float radius = 0
 
bool useImageRect = false
 
TextureRect textureRect = TextureRect.StereoScopic
 
DestinationRect destinationRect = DestinationRect.Default
 
Rect srcRectLeft = new Rect(0, 0, 1, 1)
 
Rect srcRectRight = new Rect(0, 0, 1, 1)
 
Rect dstRectLeft = new Rect(0, 0, 1, 1)
 
Rect dstRectRight = new Rect(0, 0, 1, 1)
 
PxrRecti imageRectLeft
 
PxrRecti imageRectRight
 
bool useLayerBlend = false
 
PxrBlendFactor srcColor = PxrBlendFactor.PxrBlendFactorOne
 
PxrBlendFactor dstColor = PxrBlendFactor.PxrBlendFactorOne
 
PxrBlendFactor srcAlpha = PxrBlendFactor.PxrBlendFactorOne
 
PxrBlendFactor dstAlpha = PxrBlendFactor.PxrBlendFactorOne
 

Static Public Attributes

static List< PXR_OverLayInstances = new List<PXR_OverLay>()
 

Protected Member Functions

void Awake ()