PFView Class Reference

Inherits from UIView
Declared in PFView.h

Overview

An PFView is responsable for rendering the contents of PFAsset instances.

– setInterfaceOrientation:

Set the current user interface orientation in order to let the view track touch events properly

- (void)setInterfaceOrientation:(UIInterfaceOrientation)orientation

Parameters

orientation

The current or desired UIInterfaceOrientation

Discussion

Set the current user interface orientation in order to let the view track touch events properly

Declared In

PFView.h

– displayAsset:

Set the asset to be rendered upon this view. An asset can only be viewed on one PFView object at a time.

- (void)displayAsset:(PFAsset *)asset

Parameters

asset

The PFAsset to be rendered.

Discussion

Set the asset to be rendered upon this view. An asset can only be viewed on one PFView object at a time.

Declared In

PFView.h

– injectImage:

Injects a panoramic image into the view to be displayed. Resolution and format depend on the specific device.

- (void)injectImage:(UIImage *)image

Parameters

image

The UIImage to be injected.

Discussion

Injects a panoramic image into the view to be displayed. Resolution and format depend on the specific device.

Declared In

PFView.h

– run

Start rendering the view

- (void)run

Discussion

Start rendering the view

Declared In

PFView.h

– halt

Stop rendering the view

- (void)halt

Discussion

Stop rendering the view

Declared In

PFView.h

– clear

Clear the current video frame (if any) being displayed

- (void)clear

Discussion

Clear the current video frame (if any) being displayed

Declared In

PFView.h

– setNavigationMode:

Set view orientation input to motion or touch input.

- (void)setNavigationMode:(enum PFNAVIGATIONMODE)mode

Parameters

mode

Set the navigation mode to either PF_NAVIGATION_MOTION or PF_NAVIGATION_TOUCH.

Discussion

Set view orientation input to motion or touch input.

Declared In

PFView.h

– setBlindSpotImage:

Set the optional image for the blindspot. Pass nil or PF_BLINDSPOT_NONE for no blindspot.

- (void)setBlindSpotImage:(NSString *)resourceImageName

Parameters

resourceImageName

The name of the PNG image file as included in the project resources

Discussion

Set the optional image for the blindspot. Pass nil or PF_BLINDSPOT_NONE for no blindspot.

Declared In

PFView.h

– setBlindSpotLocation:

Set the location for the blindspot image.

- (void)setBlindSpotLocation:(enum PFBLINDSPOTLOCATION)location

Parameters

location

The location of the blindspot image.

Discussion

Set the location for the blindspot image.

Declared In

PFView.h

– setFieldOfView:

Set the field of view in degrees

- (void)setFieldOfView:(float)fov

Parameters

fov

Set the field of view for the 3D view. This defaults to 75.0

Discussion

Set the field of view in degrees

Declared In

PFView.h

– getRotationX

Returns the current relative rotation around the X-axis. This currently does not include PF_NAVIGATION_MOTION based navigation.

- (float)getRotationX

Return Value

The rotation in degrees

Discussion

Returns the current relative rotation around the X-axis. This currently does not include PF_NAVIGATION_MOTION based navigation.

Declared In

PFView.h

– getRotationY

Returns the current relative rotation around the Y-axis. This currently does not include PF_NAVIGATION_MOTION based navigation.

- (float)getRotationY

Return Value

The rotation in degrees

Discussion

Returns the current relative rotation around the Y-axis. This currently does not include PF_NAVIGATION_MOTION based navigation.

Declared In

PFView.h

– getRotationZ

Returns the current relative rotation around the Z-axis. This currently does not include PF_NAVIGATION_MOTION based navigation.

- (float)getRotationZ

Return Value

The rotation in degrees

Discussion

Returns the current relative rotation around the Z-axis. This currently does not include PF_NAVIGATION_MOTION based navigation.

Declared In

PFView.h

– setRotationX:

Set the current relative view rotation around the X-axis.

- (void)setRotationX:(float)rx

Parameters

rx

The rotation around the x-axis in degrees

Discussion

Set the current relative view rotation around the X-axis.

Declared In

PFView.h

– setRotationY:

Set the current relative view rotation around the Y-axis

- (void)setRotationY:(float)ry

Parameters

ry

The rotation around the y-axis in degrees

Discussion

Set the current relative view rotation around the Y-axis

Declared In

PFView.h

– setRotationZ:

Set the current relative view rotation around the Z-axis

- (void)setRotationZ:(float)rz

Parameters

rz

The rotation around the z-axis in degrees

Discussion

Set the current relative view rotation around the Z-axis

Declared In

PFView.h

– setViewMode:andAspect:

Set the current view mode

- (void)setViewMode:(int)mode andAspect:(float)aspect

Parameters

mode

The view mode. Options: 0 for spherical, 1 for flat, 2 for cylindrical, 3 for side-by-side VR (non-stereoscopic), 4 for top-down VR formatted content (stereoscopic).

aspect

The aspect ratio (for flat view).

Discussion

Set the current view mode

Declared In

PFView.h

– resetView

Reset the view direction (motion & touch) to default initial settings

- (void)resetView

Discussion

Reset the view direction (motion & touch) to default initial settings

Declared In

PFView.h

– createHotspot:

Create a hotspot in the scene using an UIImage

- (id)createHotspot:(UIImage *)image

Parameters

image

The UIImage supporting transparancy (PNG)

Discussion

Create a hotspot in the scene using an UIImage

Declared In

PFView.h

– createHotspotWithView:

Create a hotspot in the scene using an UIImage

- (id)createHotspotWithView:(UIView *)view

Parameters

view

The UIView to be used as hotspot image

Discussion

Create a hotspot in the scene using an UIImage

Declared In

PFView.h

– removeHotspot:

Remove a hotspot from the scene

- (void)removeHotspot:(id<PFHotspot>)hotspot

Parameters

hotspot

The hotspot to be removed

Discussion

Remove a hotspot from the scene

Declared In

PFView.h

– setAutoLevel:afterSeconds:

Autolevel the view to its logical horizon after a number of seconds. Defaults to autoleveling within 2.5 seconds after touch end.

- (void)setAutoLevel:(BOOL)autolevel afterSeconds:(float)seconds

Parameters

autolevel

Set to true (default) to auto-level the

seconds

The number of seconds after the last touch

Discussion

Autolevel the view to its logical horizon after a number of seconds. Defaults to autoleveling within 2.5 seconds after touch end.

Declared In

PFView.h

– setStereo:

Enable or disable stereo mode viewing

- (void)setStereo:(BOOL)bStereo

Parameters

bStereo

Flag to indicate splitscreen stereo view display

Discussion

Enable or disable stereo mode viewing

Declared In

PFView.h

– setHitOnFocus:

Enable hitting of hotspots on focus (center)

- (void)setHitOnFocus:(BOOL)bfocus

Parameters

bfocus

Set true for hit on focus, false to interact only with touch.

Discussion

Enable hitting of hotspots on focus (center)

Declared In

PFView.h