public abstract class ARObject
extends java.lang.Object
ARController.
This class serves as a generalization (or abstract base) for more specified object types (such as
ARIconObject), bundling their common properties.
| Modifier and Type | Class and Description |
|---|---|
static class |
ARObject.IconType
Icon types used by ARObject
|
| Modifier and Type | Field and Description |
|---|---|
protected com.nokia.maps.ARObjectImpl |
m_basePimpl |
| Modifier | Constructor and Description |
|---|---|
protected |
ARObject(com.nokia.maps.ARObjectImpl impl)
Internal Constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
android.graphics.RectF |
getBoundingBox()
Get bounding box limiting where the
ARObject can travel on screen. |
GeoCoordinate |
getCoordinate()
Gets the current
GeoCoordinate for the ARObject. |
Image |
getIcon(ARObject.IconType type)
Gets the icon image for the
ARObject |
android.graphics.PointF |
getIconAnchor(ARObject.IconType type)
Get down icon's anchor point represented as halfs of width and height of the icon.
|
float |
getIconSizeScale(ARObject.IconType type)
Gets icon's size scaling factor
|
float |
getMaxViewAngle()
Get item's max view angle when the item is on the right or left from line of sight.
|
float |
getOpacity()
Get item's opacity.
|
ARController.ProjectionType |
getProjectionType()
Get Camera view
ARController.ProjectionType |
long |
getUid()
Get unique identifier.
|
int |
hashCode() |
boolean |
isInfoExtended()
Checks if info portion of the
ARObject is extended |
void |
setBoundingBox(android.graphics.RectF box)
Set bounding box to limit travel on the screen.
|
void |
setCoordinate(GeoCoordinate coordinate)
Sets a
GeoCoordinate for the ARObject. |
void |
setIcon(ARObject.IconType type,
android.graphics.Bitmap icon)
Sets an icon image for the
ARObject. |
void |
setIcon(ARObject.IconType type,
Image icon)
Sets an icon image for the
ARObject. |
void |
setIcon(ARObject.IconType type,
android.view.View icon)
Sets an icon image for the
ARObject. |
void |
setIconAnchor(ARObject.IconType type,
android.graphics.PointF anchor)
Set icon's anchor point represented as halfs of width and height of the icon.
|
void |
setIconSizeScale(ARObject.IconType type,
float scale)
Sets icon's size scaling factor
|
void |
setIconTexture(ARObject.IconType type,
int texture,
int width,
int height)
Sets an OpenGL texture name for the specified icon in the
ARObject. |
void |
setInfoMaxHeight(int height)
Sets maximum height for the
ARObject's info portion of the icon |
void |
setInfoMaxWidth(int width)
Sets maximum width for the
ARObject's info portion of the icon |
void |
setMaxViewAngle(float angleDeg)
Set item max view angle when the item is on the right or left from line of sight.
|
void |
setOpacity(float value)
Set item's opacity.
|
void |
setProjectionType(ARController.ProjectionType type)
Set Camera view
ARController.ProjectionType |
protected ARObject(com.nokia.maps.ARObjectImpl impl)
impl - The impl object to be constructed of.public long getUid()
ARObject
and application specific objects (Example: items "radar" implementation)public void setCoordinate(GeoCoordinate coordinate)
GeoCoordinate for the ARObject.coordinate - Desired GeoCoordinate for ARObjectpublic GeoCoordinate getCoordinate()
GeoCoordinate for the ARObject.GeoCoordinatepublic void setIconTexture(ARObject.IconType type, int texture, int width, int height)
ARObject. Previously set
image (using ARObject.setIcon(ARObject.IconType, Image) for example) is not disposed and can be used
when texture is cleaned. Texture can be cleaned by passing -1 for texture parameter (i.e.
setIconTexture(IconType.FRONT, -1, 0, 0)).type - An ARObject.IconTypetexture - An OpenGL texture name corresponding to the icon type specified.width - An OpenGL texture widthheight - An OpenGL texture heightpublic void setIcon(ARObject.IconType type, Image icon)
ARObject.type - An ARObject.IconType.icon - An Image representing the icon type.public void setIcon(ARObject.IconType type, android.view.View icon)
ARObject.type - An ARObject.IconType.icon - An View representing the icon type.public void setIcon(ARObject.IconType type, android.graphics.Bitmap icon)
ARObject.type - An ARObject.IconType.icon - An Bitmap representing the icon type.public Image getIcon(ARObject.IconType type)
ARObjecttype - An ARObject.IconType.Image representing the front iconpublic void setIconAnchor(ARObject.IconType type, android.graphics.PointF anchor)
type - An ARObject.IconType.anchor - X and Y offset coefficients represented as halfs of the icon width and height.
Range is 0 to 2.0f.
0 --- 1 --- 2 | | | 1 --- x --- x | | | 2 --- x --- xpublic android.graphics.PointF getIconAnchor(ARObject.IconType type)
type - An ARObject.IconType.public void setInfoMaxWidth(int width)
ARObject's info portion of the iconwidth - A maximum width of the ARObject info portion on the screenpublic void setInfoMaxHeight(int height)
ARObject's info portion of the iconheight - A maximum height of the ARObject info portion on the screenpublic boolean isInfoExtended()
ARObject is extendedpublic void setIconSizeScale(ARObject.IconType type, float scale)
type - ARObject.IconTypescale - A size scaling factorpublic float getIconSizeScale(ARObject.IconType type)
type - ARObject.IconTypepublic void setBoundingBox(android.graphics.RectF box)
box - RectF Item's bounding box. If null, bounding box is set to {0, 0, 1, 1}.public android.graphics.RectF getBoundingBox()
ARObject can travel on screen.android.graphics.RectF representing the bounding box.public void setMaxViewAngle(float angleDeg)
angleDeg - The view angle of the item. The range is: -angleDeg to +angleDeg.public float getMaxViewAngle()
angleDeg to +angleDeg.public void setProjectionType(ARController.ProjectionType type)
ARController.ProjectionTypetype - A value of ProjectionType.public ARController.ProjectionType getProjectionType()
ARController.ProjectionTypeProjectionTypepublic void setOpacity(float value)
value - A value of the opacity.public float getOpacity()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object