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

Base generic class of pano renderer More...

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

Public Member Functions

virtual bool CreateMesh ()
 Creates panorama mesh More...
 
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...
 

Public Attributes

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...
 

Protected Member Functions

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

Properties

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...
 

Detailed Description

Base generic class of pano renderer

Base class of pano renderer

Template Parameters
T
Type Constraints
T :PanoRenderer<T> 

Member Function Documentation

◆ CreateMesh()

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

Creates panorama mesh

Returns
True - success, false - otherwise

Reimplemented in InfinityCode.uPano.Renderers.Base.SingleTexturePanoRenderer< T >, and InfinityCode.uPano.Renderers.Base.CubePanoRenderer< T >.

◆ DestroyMesh()

Destroys panorama mesh

◆ GetPanTiltByScreenPosition() [1/2]

bool InfinityCode.uPano.Renderers.Base.PanoRenderer< T >.GetPanTiltByScreenPosition ( float  screenPosX,
float  screenPosY,
out float  pan,
out float  tilt 
)

Gets pan and tilt for the screen point

Parameters
screenPosXScreen point X
screenPosYScreen point Y
panPan
tiltTilt
Returns
True - success, false - otherwise

◆ GetPanTiltByScreenPosition() [2/2]

bool InfinityCode.uPano.Renderers.Base.PanoRenderer< T >.GetPanTiltByScreenPosition ( Vector2  screenPoint,
out float  pan,
out float  tilt 
)

Gets pan and tilt for the screen point

Parameters
screenPointScreen point
panPan
tiltTilt
Returns
True - success, false - otherwise

◆ GetPanTiltByWorldPosition()

virtual void InfinityCode.uPano.Renderers.Base.PanoRenderer< T >.GetPanTiltByWorldPosition ( Vector3  worldPosition,
out float  pan,
out float  tilt 
)
virtual

Gets pan and tilt for the world position

Parameters
worldPositionPosition in Unity World Space
panPan
tiltTilt

◆ GetPanTiltUnderCursor()

bool InfinityCode.uPano.Renderers.Base.PanoRenderer< T >.GetPanTiltUnderCursor ( out float  pan,
out float  tilt 
)

Gets pan and tilt under cursor

Parameters
panPan
tiltTilt
Returns
True - success, false - otherwise

◆ GetScreenPosition()

Vector3 InfinityCode.uPano.Renderers.Base.PanoRenderer< T >.GetScreenPosition ( float  pan,
float  tilt,
Camera  cam = null 
)

Gets the screen position for pan and tilt

Parameters
panPan
tiltTilt
camCamera
Returns
Position in Screen Space

◆ GetWorldPosition()

abstract Vector3 InfinityCode.uPano.Renderers.Base.PanoRenderer< T >.GetWorldPosition ( float  pan,
float  tilt 
)
pure virtual

Gets Unity World Position for pan and tilt

Parameters
panPan
tiltTilt
Returns
Position in Unity World Space

Implemented in InfinityCode.uPano.Renderers.Base.CubePanoRenderer< T >.

◆ UpdateMesh()

virtual void InfinityCode.uPano.Renderers.Base.PanoRenderer< T >.UpdateMesh ( )
virtual

Updates panorama mesh

◆ UpdateRotation()

virtual void InfinityCode.uPano.Renderers.Base.PanoRenderer< T >.UpdateRotation ( Camera  activeCamera,
float  pan,
float  tilt 
)
virtual

Updates the rotation

Parameters
activeCameraThe camera used to display the panorama
panPan
tiltTilt

◆ UpdateShader()

virtual void InfinityCode.uPano.Renderers.Base.PanoRenderer< T >.UpdateShader ( )
protectedvirtual

Updates material shader

Reimplemented in InfinityCode.uPano.Renderers.Base.SingleTexturePanoRenderer< T >.

Member Data Documentation

◆ compressTextures

bool InfinityCode.uPano.Renderers.Base.PanoRenderer< T >.compressTextures = true

Compress textures to DXT format to reduce memory usage.

◆ OnStart

Action that occurs when the pano renderer is started

◆ OnUpdate

Action that occurs when the mesh is updated

Property Documentation

◆ defaultMaterial

Material InfinityCode.uPano.Renderers.Base.PanoRenderer< T >.defaultMaterial
getset

The material that will be used to display the panorama

◆ defaultShader

virtual Shader InfinityCode.uPano.Renderers.Base.PanoRenderer< T >.defaultShader
get

Default shader of a pano renderer

◆ meshGameObject

GameObject InfinityCode.uPano.Renderers.Base.PanoRenderer< T >.meshGameObject
get

Reference to mesh GameObject

◆ pano

Reference to panorama

◆ shader

The shader that will be used to display the panorama. If the material is specified, the shader will be ignored