com.supermap.ar
Class ArObject
- java.lang.Object
-
- com.supermap.ar.ArObject
-
- Direct Known Subclasses:
- GeoObject
public class ArObject extends java.lang.ObjectArObject class This is the base class of AR objects. It includes methods of basic properties of AR objects.
-
-
Constructor Summary
Constructors Constructor and Description ArObject()Constructor for creating objectsArObject(long id)Creates AR objects which are with unique ID.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Point3DgetAngle()Gets the angles of axises x, y, and z.Point3DgetBottomLeft()Gets the bottom-left corner of ArObjectPoint3DgetBottomRight()Gets the bottom-right corner of ArObjectdoublegetDistanceFromUser()Gets the distance between ArObject and the user in meterlonggetId()Gets ArObject IDjava.lang.StringgetInfo()Gets object descriptionjava.lang.StringgetName()Gets the name of ArObjectPoint3DgetPosition()Gets the position of ArObjectPoint3DgetTopLeft()Gets the top-left corner of ArObjectPoint3DgetTopRight()Gets the top-right corner of ArObjectbooleanisVisible()Returns whether to display objectsvoidsetAngle(float x, float y, float z)Sets anglesvoidsetAngle(Point3D newAngle)Sets anglesvoidsetDistanceFromUser(double distance)Sets the distance between ArObject and the user in metervoidsetInfo(java.lang.String info)Sets object informationvoidsetName(java.lang.String name)Sets the name of ArObjectvoidsetPosition(float x, float y, float z)Sets the position of ArObjectvoidsetPosition(Point3D newPos)Sets the position of ArObjectvoidsetVisible(boolean visible)Sets the visibility of ArObject.
-
-
-
Constructor Detail
-
ArObject
public ArObject(long id)
Creates AR objects which are with unique ID.- Parameters:
id- ID
-
ArObject
public ArObject()
Constructor for creating objects
-
-
Method Detail
-
getId
public long getId()
Gets ArObject ID- Returns:
- Gets ArObject ID
-
setInfo
public void setInfo(java.lang.String info)
Sets object information- Parameters:
info- description
-
getInfo
public java.lang.String getInfo()
Gets object description- Returns:
- description
-
getAngle
public Point3D getAngle()
Gets the angles of axises x, y, and z.- Returns:
- returns the angles of axises x, y, and z.
-
setAngle
public void setAngle(float x, float y, float z)Sets angles- Parameters:
x- rotation of axis xy- rotation of axis yz- rotation of axis z
-
setAngle
public void setAngle(Point3D newAngle)
Sets angles- Parameters:
newAngle- includes raotation information on coordinates x, y, and z
-
getPosition
public Point3D getPosition()
Gets the position of ArObject- Returns:
- Return coordinates of 3D objects
-
setPosition
public void setPosition(Point3D newPos)
Sets the position of ArObject- Parameters:
newPos- 3D points
-
setPosition
public void setPosition(float x, float y, float z)Sets the position of ArObject- Parameters:
x- x coordinatey- y coordinatez- z coordinate
-
setVisible
public void setVisible(boolean visible)
Sets the visibility of ArObject. True is by default- Parameters:
visible- Whether to display objects. True means yes. False denotes no
-
isVisible
public boolean isVisible()
Returns whether to display objects- Returns:
- whether to display objects ArObject
-
setName
public void setName(java.lang.String name)
Sets the name of ArObject- Parameters:
name- Name
-
getName
public java.lang.String getName()
Gets the name of ArObject- Returns:
- Name
-
getDistanceFromUser
public double getDistanceFromUser()
Gets the distance between ArObject and the user in meter- Returns:
- distance
-
setDistanceFromUser
public void setDistanceFromUser(double distance)
Sets the distance between ArObject and the user in meter- Parameters:
distance- the distance
-
getTopLeft
public Point3D getTopLeft()
Gets the top-left corner of ArObject- Returns:
- the top-left corner of ArObject
-
getBottomLeft
public Point3D getBottomLeft()
Gets the bottom-left corner of ArObject- Returns:
- the bottom-left corner of ArObject
-
getBottomRight
public Point3D getBottomRight()
Gets the bottom-right corner of ArObject- Returns:
- the bottom-right corner of ArObject
-
getTopRight
public Point3D getTopRight()
Gets the top-right corner of ArObject- Returns:
- the top-right corner of ArObject
-
-