Basic object to be used with augmented reality. More...
Public Member Functions | |
BeyondarObject (long id) | |
Create an instance of a BeyondarObject with an unique ID. More... | |
BeyondarObject () | |
Create an instance of a BeyondarObject with an unique ID. More... | |
long | getId () |
Get the unique id of the BeyondarObject. | |
void | addPlugin (BeyondarObjectPlugin plugin) |
boolean | removePlugin (BeyondarObjectPlugin plugin) |
void | removeAllPlugins () |
BeyondarObjectPlugin | getFirstPlugin (Class<?extends BeyondarObjectPlugin > pluginClass) |
boolean | containsAnyPlugin (Class<?extends BeyondarObjectPlugin > pluginClass) |
boolean | containsPlugin (BeyondarObjectPlugin plugin) |
List< BeyondarObjectPlugin > | getAllPugins (Class<?extends BeyondarObjectPlugin > pluginClass) |
List< BeyondarObjectPlugin > | getAllPlugins (Class<?extends BeyondarObjectPlugin > pluginClass, List< BeyondarObjectPlugin > result) |
List< BeyondarObjectPlugin > | getAllPlugins () |
Get a List copy of the added plugins. More... | |
Point3 | getAngle () |
Get the used angle for rendering the BeyondarObject. More... | |
void | setAngle (float x, float y, float z) |
Set the used angle for rendering the BeyondarObject. More... | |
void | setAngle (Point3 newAngle) |
Set the used angle for rendering the BeyondarObject. More... | |
Point3 | getPosition () |
Get the position where the BeyondarObject is being rendered. More... | |
void | setPosition (Point3 newPos) |
Get the position where the BeyondarObject is being rendered. More... | |
void | setPosition (float x, float y, float z) |
Set the position where the BeyondarObject is being rendered. More... | |
Texture | getTexture () |
Get the Texture used to render the BeyondarObject. More... | |
void | setTexturePointer (int texturePointer) |
Set the texture pointer of the BeyondarObject. More... | |
void | setTexture (Texture texture) |
Set the Texture used to render the BeyondarObject. | |
Renderable | getOpenGLObject () |
Get Renderable that renders the BeyondarObject. More... | |
void | setRenderable (Renderable renderable) |
Set a custom Renderable for the BeyondarObject. More... | |
String | getImageUri () |
The the image uri used to represent the BeyondarObject. More... | |
void | faceToCamera (boolean faceToCamera) |
Define if the BeyondarObject should face the camera. More... | |
boolean | isFacingToCamera () |
Check if the BeyondarObject is facing the camera. More... | |
void | setVisible (boolean visible) |
Set the visibility of this object. More... | |
boolean | isVisible () |
Check the visibility of the BeyondarObject. More... | |
void | setName (String name) |
Set the name of the BeyondarObject. More... | |
String | getName () |
Get the name of the BeyondarObject. More... | |
void | setImageUri (String uri) |
Set the image uri. More... | |
void | setImageResource (int resId) |
Set an image resource for the BeyondarObject. More... | |
int | getWorldListType () |
Get the list type of the BeyondarObject. More... | |
double | getDistanceFromUser () |
Get the Distance from the user in meters. More... | |
void | setDistanceFromUser (double distance) |
Set how far is the object from the user (meters). More... | |
Point3 | getScreenPositionBottomLeft () |
Get the bottom left screen position of the BeyondarObject on the screen. More... | |
Point3 | getScreenPositionTopLeft () |
Get the top left screen position of the BeyondarObject on the screen. More... | |
Point3 | getScreenPositionTopRight () |
Get the top right screen position of the BeyondarObject on the screen. More... | |
Point3 | getScreenPositionBottomRight () |
Get the bottom right screen position of the BeyondarObject on the screen. More... | |
Point3 | getScreenPositionCenter () |
Get the center screen position of the BeyondarObject on the screen. More... | |
Point3 | getTopLeft () |
Get the top left of the BeyondarObject on the 3D world. More... | |
Point3 | getBottomLeft () |
Get the bottom left of the BeyondarObject on the 3D world. More... | |
Point3 | getBottomRight () |
Get the bottom right of the BeyondarObject on the 3D world. More... | |
Point3 | getTopRight () |
Get the top right of the BeyondarObject on the 3D world. More... | |
MeshCollider | getMeshCollider () |
Get the MeshCollider of the GeoObject. More... | |
Protected Member Functions | |
Renderable | createRenderable () |
Override this method to change the default Renderable. More... | |
Protected Attributes | |
List< BeyondarObjectPlugin > | plugins |
This fields contains all the loaded plugins. More... | |
Object | lockPlugins = new Object() |
Use this lock to access the plugins field. More... | |
Basic object to be used with augmented reality.
This class contains all the needed information to be used in the AR World.
com.beyondar.android.world.BeyondarObject.BeyondarObject | ( | long | id | ) |
Create an instance of a BeyondarObject with an unique ID.
id | Unique ID |
com.beyondar.android.world.BeyondarObject.BeyondarObject | ( | ) |
Create an instance of a BeyondarObject with an unique ID.
The hash of the object will be used as the BeyondarObject unique id.
|
protected |
Override this method to change the default Renderable.
void com.beyondar.android.world.BeyondarObject.faceToCamera | ( | boolean | faceToCamera | ) |
Define if the BeyondarObject should face the camera.
faceToCamera | true if it should face the camera, false otherwise. |
List<BeyondarObjectPlugin> com.beyondar.android.world.BeyondarObject.getAllPlugins | ( | ) |
Get a List copy of the added plugins.
Adding/removing plugins to this list will not affect the added plugins
Point3 com.beyondar.android.world.BeyondarObject.getAngle | ( | ) |
Get the used angle for rendering the BeyondarObject.
Point3 com.beyondar.android.world.BeyondarObject.getBottomLeft | ( | ) |
Get the bottom left of the BeyondarObject on the 3D world.
Point3 com.beyondar.android.world.BeyondarObject.getBottomRight | ( | ) |
Get the bottom right of the BeyondarObject on the 3D world.
double com.beyondar.android.world.BeyondarObject.getDistanceFromUser | ( | ) |
Get the Distance from the user in meters.
String com.beyondar.android.world.BeyondarObject.getImageUri | ( | ) |
The the image uri used to represent the BeyondarObject.
MeshCollider com.beyondar.android.world.BeyondarObject.getMeshCollider | ( | ) |
Get the MeshCollider of the GeoObject.
String com.beyondar.android.world.BeyondarObject.getName | ( | ) |
Get the name of the BeyondarObject.
Renderable com.beyondar.android.world.BeyondarObject.getOpenGLObject | ( | ) |
Get Renderable that renders the BeyondarObject.
Point3 com.beyondar.android.world.BeyondarObject.getPosition | ( | ) |
Get the position where the BeyondarObject is being rendered.
Point3 com.beyondar.android.world.BeyondarObject.getScreenPositionBottomLeft | ( | ) |
Get the bottom left screen position of the BeyondarObject on the screen.
use the Z axis to check if the object is in front (z<1) or behind (z>1) the screen.
Point3 com.beyondar.android.world.BeyondarObject.getScreenPositionBottomRight | ( | ) |
Get the bottom right screen position of the BeyondarObject on the screen.
use the Z axis to check if the object is in front (z<1) or behind (z>1) the screen.
Point3 com.beyondar.android.world.BeyondarObject.getScreenPositionCenter | ( | ) |
Get the center screen position of the BeyondarObject on the screen.
use the Z axis to check if the object is in front (z<1) or behind (z>1) the screen.
Point3 com.beyondar.android.world.BeyondarObject.getScreenPositionTopLeft | ( | ) |
Get the top left screen position of the BeyondarObject on the screen.
use the Z axis to check if the object is in front (z<1) or behind (z>1) the screen.
Point3 com.beyondar.android.world.BeyondarObject.getScreenPositionTopRight | ( | ) |
Get the top right screen position of the BeyondarObject on the screen.
use the Z axis to check if the object is in front (z<1) or behind (z>1) the screen.
Texture com.beyondar.android.world.BeyondarObject.getTexture | ( | ) |
Get the Texture used to render the BeyondarObject.
Point3 com.beyondar.android.world.BeyondarObject.getTopLeft | ( | ) |
Get the top left of the BeyondarObject on the 3D world.
Point3 com.beyondar.android.world.BeyondarObject.getTopRight | ( | ) |
Get the top right of the BeyondarObject on the 3D world.
int com.beyondar.android.world.BeyondarObject.getWorldListType | ( | ) |
Get the list type of the BeyondarObject.
boolean com.beyondar.android.world.BeyondarObject.isFacingToCamera | ( | ) |
Check if the BeyondarObject is facing the camera.
boolean com.beyondar.android.world.BeyondarObject.isVisible | ( | ) |
Check the visibility of the BeyondarObject.
void com.beyondar.android.world.BeyondarObject.setAngle | ( | float | x, |
float | y, | ||
float | z | ||
) |
Set the used angle for rendering the BeyondarObject.
x | The angle in degrees for x. |
y | The angle in degrees for y. |
z | The angle in degrees for z. |
void com.beyondar.android.world.BeyondarObject.setAngle | ( | Point3 | newAngle | ) |
Set the used angle for rendering the BeyondarObject.
newAngle | The angle in degrees. |
void com.beyondar.android.world.BeyondarObject.setDistanceFromUser | ( | double | distance | ) |
Set how far is the object from the user (meters).
This method is used by the ARRenderer to set this value.
distance | Distance in meters. |
void com.beyondar.android.world.BeyondarObject.setImageResource | ( | int | resId | ) |
Set an image resource for the BeyondarObject.
resId | The resource id. |
void com.beyondar.android.world.BeyondarObject.setImageUri | ( | String | uri | ) |
Set the image uri.
uri | The image uri that represents the BeyondarObject. |
void com.beyondar.android.world.BeyondarObject.setName | ( | String | name | ) |
Set the name of the BeyondarObject.
name | Name of the BeyondarObject. |
void com.beyondar.android.world.BeyondarObject.setPosition | ( | Point3 | newPos | ) |
Get the position where the BeyondarObject is being rendered.
newPos | New position. |
void com.beyondar.android.world.BeyondarObject.setPosition | ( | float | x, |
float | y, | ||
float | z | ||
) |
Set the position where the BeyondarObject is being rendered.
newPos | New position. |
void com.beyondar.android.world.BeyondarObject.setRenderable | ( | Renderable | renderable | ) |
Set a custom Renderable for the BeyondarObject.
renderable |
void com.beyondar.android.world.BeyondarObject.setTexturePointer | ( | int | texturePointer | ) |
Set the texture pointer of the BeyondarObject.
texturePointer | The new texture pointer. |
void com.beyondar.android.world.BeyondarObject.setVisible | ( | boolean | visible | ) |
Set the visibility of this object.
if it is false, the engine will not render it.
visible | True to set it visible, false to don't render it. |
|
protected |
Use this lock to access the plugins field.
|
protected |
This fields contains all the loaded plugins.