public interface PFView
Modifier and Type | Method and Description |
---|---|
PFHotspot |
createHotspot(Bitmap image)
Create a hotspot object with an image
|
PFHotspot |
createHotspot(View image)
Create a hotspot object with a view
|
void |
displayAsset(PFAsset asset)
Set the PFAsset to be displayed on the view
|
float |
getHorizontalDegrees()
Get the horizontal rotation
|
float[] |
getOrientation()
Get orientation in yaw, pitch and roll
|
float |
getVerticalDegrees()
Get the horizontal rotation
|
View |
getView()
Get the View object to insert into your application
|
void |
handleOrientationChange()
Inform the view to adapt to orientation changes.
|
void |
injectImage(Bitmap image)
Inject a spherical image into the panoramic view
|
void |
injectImageFromResource(int resourceid)
Inject a spherical image into the panoramic view from resource id
|
void |
release()
Release the view
|
void |
removeHotspot(PFHotspot hotspot)
Remove a hotspot object
|
void |
setBlindSpotImage(Bitmap image)
Set a blindspot image to use with the display of the asset
|
void |
setBlindSpotPosition(int position)
Set a blindspot image position to use with the display of the asset
|
void |
setBlindSpotScale(float scale)
Set a blindspot image scale to use with the display of the asset
|
void |
setFieldOfView(float fov)
Set the view Field of View in degrees.
|
void |
setFormat(int format)
Set the format of the image
|
void |
setHitOnFocus(boolean focus)
Enable hitting of hotspots on focus (center)
|
void |
setMode(int mode,
float aspect)
Set display mode and optional aspect ratio of content
|
void |
setNavigationMode(PFNavigationMode mode)
Sets the navigation mode to use for navigating the panoramic view
|
void |
setViewRotation(float rotation)
Set the view rotation manually
|
void |
setViewRotationOffsetX(float rotation)
Set the view rotation manually on X
|
boolean |
supportsNavigationMode(PFNavigationMode mode)
Checks if a navigation mode is supported by the device
|
View getView()
void displayAsset(PFAsset asset)
asset
- The asset to be displayedboolean supportsNavigationMode(PFNavigationMode mode)
mode
- The navigation mode which can be either motion or touchvoid setNavigationMode(PFNavigationMode mode)
mode
- The navigation mode which can be either motion or touchvoid setViewRotation(float rotation)
rotation
- The rotation in degreesvoid setViewRotationOffsetX(float rotation)
rotation
- The rotation in degreesvoid setFieldOfView(float fov)
fov
- The field of view in degreesvoid handleOrientationChange()
void setBlindSpotImage(Bitmap image)
image
- A bitmap image representing the imagevoid setBlindSpotPosition(int position)
position
- The position for the blindspot image to appear. 0: none, 1: bottom, 2: top.void setBlindSpotScale(float scale)
scale
- The scale for the blindspot image to appear.PFHotspot createHotspot(Bitmap image)
image
- The image to visualize the hotspotPFHotspot createHotspot(View image)
view
- The view to visualize the hotspotvoid removeHotspot(PFHotspot hotspot)
hotspot
- The hotspot to be removedvoid release()
void injectImage(Bitmap image)
image
- A spherical bitmap imagevoid injectImageFromResource(int resourceid)
image
- A bitmap resource idvoid setMode(int mode, float aspect)
mode
- Select 0 for spherical, 1 for flat display, 2 for stereo side-by-sideaspect
- The aspect ratio of the content in flat view modevoid setFormat(int format)
format
- Select 0 for regular spherical panorama and 1 for top-down formatted spherical panoramafloat[] getOrientation()
float getHorizontalDegrees()
float getVerticalDegrees()
void setHitOnFocus(boolean focus)
focus
- Set true for hit on focus, false to interact only with touch.