uPano  v3.1
InfinityCode.uPano.Renderers.Base.SingleTexturePanoRenderer< T > Class Template Referenceabstract

Base class of pano renderers that have a single texture More...

Inheritance diagram for InfinityCode.uPano.Renderers.Base.SingleTexturePanoRenderer< T >:
InfinityCode.uPano.Renderers.Base.PanoRenderer< T > InfinityCode.uPano.Renderers.Base.ISingleTexturePanoRenderer

Public Member Functions

override bool CreateMesh ()
 Creates panorama mesh More...
 
void Download (string url)
 Download panorama by URL More...
 
void Download (string lowresURL, string url)
 First, download a low-resolution panorama, then a full panorama. More...
 
abstract bool GetPanTiltByUV (Vector2 uv, out float pan, out float tilt)
 Converts UV of the texture to pan and tilt More...
 
abstract Vector2 GetUV (float pan, float tilt)
 Converts pan and tilt to UV of the texture More...
 
- Public Member Functions inherited from InfinityCode.uPano.Renderers.Base.PanoRenderer< T >
void DestroyMesh ()
 Destroys panorama mesh More...
 
bool GetPanTiltByScreenPosition (float screenPosX, float screenPosY, out float pan, out float tilt)
 Gets pan and tilt for the screen point More...
 
bool GetPanTiltByScreenPosition (Vector2 screenPoint, out float pan, out float tilt)
 Gets pan and tilt for the screen point More...
 
virtual void GetPanTiltByWorldPosition (Vector3 worldPosition, out float pan, out float tilt)
 Gets pan and tilt for the world position More...
 
bool GetPanTiltUnderCursor (out float pan, out float tilt)
 Gets pan and tilt under cursor More...
 
Vector3 GetScreenPosition (float pan, float tilt, Camera cam=null)
 Gets the screen position for pan and tilt More...
 
abstract Vector3 GetWorldPosition (float pan, float tilt)
 Gets Unity World Position for pan and tilt More...
 
virtual void UpdateMesh ()
 Updates panorama mesh More...
 
virtual void UpdateRotation (Camera activeCamera, float pan, float tilt)
 Updates the rotation More...
 

Protected Member Functions

override void UpdateShader ()
 Updates material shader More...
 

Properties

Texture texture [get, set]
 The texture of the panorama More...
 
Material material [get, set]
 The material used to display the panorama More...
 
- Properties inherited from InfinityCode.uPano.Renderers.Base.PanoRenderer< T >
Material defaultMaterial [get, set]
 The material that will be used to display the panorama More...
 
virtual Shader defaultShader [get]
 Default shader of a pano renderer More...
 
Pano pano [get]
 Reference to panorama More...
 
GameObject meshGameObject [get]
 Reference to mesh GameObject More...
 
Shader shader [get, set]
 The shader that will be used to display the panorama. If the material is specified, the shader will be ignored More...
 
- Properties inherited from InfinityCode.uPano.Renderers.Base.ISingleTexturePanoRenderer
Texture texture [get, set]
 Gets and sets the texture of the panorama More...
 

Additional Inherited Members

- Public Attributes inherited from InfinityCode.uPano.Renderers.Base.PanoRenderer< T >
Action OnStart
 Action that occurs when the pano renderer is started More...
 
Action OnUpdate
 Action that occurs when the mesh is updated More...
 
bool compressTextures = true
 Compress textures to DXT format to reduce memory usage. More...
 

Detailed Description

Base class of pano renderers that have a single texture

Template Parameters
T
Type Constraints
T :SingleTexturePanoRenderer<T> 

Member Function Documentation

◆ CreateMesh()

override bool InfinityCode.uPano.Renderers.Base.SingleTexturePanoRenderer< T >.CreateMesh ( )
virtual

Creates panorama mesh

Returns
True - success, false - otherwise

Reimplemented from InfinityCode.uPano.Renderers.Base.PanoRenderer< T >.

◆ Download() [1/2]

void InfinityCode.uPano.Renderers.Base.SingleTexturePanoRenderer< T >.Download ( string  lowresURL,
string  url 
)

First, download a low-resolution panorama, then a full panorama.

Parameters
lowresURLURL of low-resolution panorama
urlURL of full-resolution panorama

Implements InfinityCode.uPano.Renderers.Base.ISingleTexturePanoRenderer.

◆ Download() [2/2]

Download panorama by URL

Parameters
urlURL of panorama

Implements InfinityCode.uPano.Renderers.Base.ISingleTexturePanoRenderer.

◆ GetPanTiltByUV()

abstract bool InfinityCode.uPano.Renderers.Base.SingleTexturePanoRenderer< T >.GetPanTiltByUV ( Vector2  uv,
out float  pan,
out float  tilt 
)
pure virtual

Converts UV of the texture to pan and tilt

Parameters
uvUV
panPan
tiltTilt
Returns
True - success, false - otherwise

Implements InfinityCode.uPano.Renderers.Base.ISingleTexturePanoRenderer.

Implemented in InfinityCode.uPano.Renderers.SphericalPanoRenderer, InfinityCode.uPano.Renderers.SingleTextureCubeFacesPanoRenderer, and InfinityCode.uPano.Renderers.CylindricalPanoRenderer.

◆ GetUV()

abstract Vector2 InfinityCode.uPano.Renderers.Base.SingleTexturePanoRenderer< T >.GetUV ( float  pan,
float  tilt 
)
pure virtual

Converts pan and tilt to UV of the texture

Parameters
panPan
tiltTilt
Returns
True - success, false - otherwise

Implements InfinityCode.uPano.Renderers.Base.ISingleTexturePanoRenderer.

Implemented in InfinityCode.uPano.Renderers.SphericalPanoRenderer, InfinityCode.uPano.Renderers.SingleTextureCubeFacesPanoRenderer, and InfinityCode.uPano.Renderers.CylindricalPanoRenderer.

◆ UpdateShader()

override void InfinityCode.uPano.Renderers.Base.SingleTexturePanoRenderer< T >.UpdateShader ( )
protectedvirtual

Updates material shader

Reimplemented from InfinityCode.uPano.Renderers.Base.PanoRenderer< T >.

Property Documentation

◆ material

The material used to display the panorama

◆ texture

The texture of the panorama