Fork me
BeyondAR
Augmented Reality Framework for Android
 All Classes Functions Variables
com.beyondar.android.world.World Class Reference

Container that holds all the BeyondarObject to be rendered in the augmented reality world. More...

Inheritance diagram for com.beyondar.android.world.World:
Collaboration diagram for com.beyondar.android.world.World:

Public Member Functions

 World (Context context)
 Create an instance of the augmented reality world. More...
 
void onResume ()
 Notify the world that the application has been resumed.
 
void onPause ()
 Notify the world that the application has been paused.
 
BitmapCache getBitmapCache ()
 Get the bitmap cache used to load all the images. More...
 
void addPlugin (WorldPlugin plugin)
 Add a WorldPlugin to the World. More...
 
boolean removePlugin (WorldPlugin plugin)
 Remove existing plugin. More...
 
void removeAllPlugins ()
 
WorldPlugin getFirstPlugin (Class<?extends WorldPlugin > pluginClass)
 
boolean containsAnyPlugin (Class<?extends WorldPlugin > pluginClass)
 
boolean containsPlugin (WorldPlugin plugin)
 
List< WorldPlugingetAllPugins (Class<?extends WorldPlugin > pluginClass)
 
List< WorldPlugingetAllPlugins (Class<?extends WorldPlugin > pluginClass, List< WorldPlugin > result)
 
List< WorldPlugingetAllPlugins ()
 
final synchronized void addBeyondarObject (BeyondarObject beyondarObject)
 Add a BeyondarObject to the default list in the world. More...
 
synchronized void addBeyondarObject (BeyondarObject beyondarObject, int worldListType)
 Add a BeyondarObject to the specified list in the world. More...
 
synchronized boolean remove (BeyondarObject beyondarObject)
 Remove a BeyondarObject form the World. More...
 
synchronized void forceProcessRemoveQueue ()
 Force the world to remove all the removed BeyondarObject.
 
synchronized void clearWorld ()
 Clean all the data stored in the world object.
 
double getLongitude ()
 Get the user's longitude. More...
 
double getAltitude ()
 Get the user's altitude. More...
 
double getLatitude ()
 Get the user's latitude. More...
 
void setGeoPosition (double latitude, double longitude, double altitude)
 Set user geo position. More...
 
final void setGeoPosition (double latitude, double longitude)
 Set user geo position. More...
 
void setLocation (Location location)
 Set user geo position using the Location object. More...
 
synchronized void setDefaultImage (int imageResId)
 Set the default image of the world. More...
 
synchronized void setDefaultImage (String uri)
 Set the default image of the world. More...
 
synchronized boolean setDefaultImage (String uri, int type)
 Set the default image for the specified list type. More...
 
synchronized boolean setDefaultBitmap (int imageResource, int type)
 Set the default image for the specified list type. More...
 
synchronized String getDefaultImage (int type)
 Get the default image URI of the specified list. More...
 
synchronized String getDefaultImage ()
 Get the default image URI of the world. More...
 
int checkIntersectionPlane (Plane plane, Point3 position, Vector3 direction, double[] lamda, Vector3 pNormal)
 
BeyondarObjectList getBeyondarObjectList (int type)
 Get the BeyondarObjectList for the specified type. More...
 
List< BeyondarObjectListgetBeyondarObjectLists ()
 Get the container that holds all the BeyondarObjectList in the World. More...
 
void getBeyondarObjectsCollideRay (Ray ray, ArrayList< BeyondarObject > beyondarObjectsOutput, float maxDistance)
 Get all the BeyondarObject that collide with the com.beyondar.android.util.math.geom.Ray. More...
 

Static Public Member Functions

static List< BeyondarObjectsortGeoObjectByDistanceFromCenter (List< BeyondarObject > vec)
 

Static Public Attributes

static final int LIST_TYPE_DEFAULT = 0
 Default list type.
 
static final String URI_PREFIX_DEFAULT_IMAGE = "com.beyondar_default_type"
 Image uri prefix for the default images.
 

Protected Member Functions

Context getContext ()
 

Protected Attributes

List< WorldPluginplugins
 
Object lockplugins = new Object()
 

Detailed Description

Container that holds all the BeyondarObject to be rendered in the augmented reality world.

Constructor & Destructor Documentation

com.beyondar.android.world.World.World ( Context  context)

Create an instance of the augmented reality world.

Parameters
context

Member Function Documentation

final synchronized void com.beyondar.android.world.World.addBeyondarObject ( BeyondarObject  beyondarObject)

Add a BeyondarObject to the default list in the world.

Parameters
beyondarObject
synchronized void com.beyondar.android.world.World.addBeyondarObject ( BeyondarObject  beyondarObject,
int  worldListType 
)

Add a BeyondarObject to the specified list in the world.

Parameters
beyondarObject

Here is the call graph for this function:

void com.beyondar.android.world.World.addPlugin ( WorldPlugin  plugin)

Add a WorldPlugin to the World.

If the plugin exist it will not be added again.

double com.beyondar.android.world.World.getAltitude ( )

Get the user's altitude.

Returns
BeyondarObjectList com.beyondar.android.world.World.getBeyondarObjectList ( int  type)

Get the BeyondarObjectList for the specified type.

Returns

Here is the call graph for this function:

Here is the caller graph for this function:

List<BeyondarObjectList> com.beyondar.android.world.World.getBeyondarObjectLists ( )

Get the container that holds all the BeyondarObjectList in the World.

Returns
The list of the lists
void com.beyondar.android.world.World.getBeyondarObjectsCollideRay ( Ray  ray,
ArrayList< BeyondarObject beyondarObjectsOutput,
float  maxDistance 
)

Get all the BeyondarObject that collide with the com.beyondar.android.util.math.geom.Ray.

Parameters
rayThe ray to use for the collision calculus
beyondarObjectsOutputThe ArrayList that will store the objects sorted by proximity. This list will be cleaned before.
maxDistanceMax distance to consider if a com.beyondar.android.world.BeyondarObject can collide (in meters).

Here is the call graph for this function:

BitmapCache com.beyondar.android.world.World.getBitmapCache ( )

Get the bitmap cache used to load all the images.

Returns
synchronized String com.beyondar.android.world.World.getDefaultImage ( int  type)

Get the default image URI of the specified list.

Parameters
typethe type of the list
Returns

Here is the call graph for this function:

synchronized String com.beyondar.android.world.World.getDefaultImage ( )

Get the default image URI of the world.

Returns
double com.beyondar.android.world.World.getLatitude ( )

Get the user's latitude.

Returns

Here is the caller graph for this function:

double com.beyondar.android.world.World.getLongitude ( )

Get the user's longitude.

Returns

Here is the caller graph for this function:

synchronized boolean com.beyondar.android.world.World.remove ( BeyondarObject  beyondarObject)

Remove a BeyondarObject form the World.

To do this, the function getWorldListType is used.

Parameters
beyondarObject
Returns
True if the object has been removed, false otherwise

Here is the call graph for this function:

boolean com.beyondar.android.world.World.removePlugin ( WorldPlugin  plugin)

Remove existing plugin.

Parameters
pluginplugin to be removed
Returns
True if the plugin has been removed, false otherwise
synchronized boolean com.beyondar.android.world.World.setDefaultBitmap ( int  imageResource,
int  type 
)

Set the default image for the specified list type.

This image is used when there are no images loaded for a BeyondarObject.

Parameters
imageResourceThe default image reference.
typeThe type of the list to set the image.
Returns
true if the image has been loaded properly, false otherwise.

Here is the call graph for this function:

synchronized void com.beyondar.android.world.World.setDefaultImage ( int  imageResId)

Set the default image of the world.

This default image is used when the BeyondarObject image is not available.

Parameters
imageResIdDefault image.

Here is the call graph for this function:

Here is the caller graph for this function:

synchronized void com.beyondar.android.world.World.setDefaultImage ( String  uri)

Set the default image of the world.

This default image is used when the BeyondarObject image is not available.

Parameters
uriDefault image.
synchronized boolean com.beyondar.android.world.World.setDefaultImage ( String  uri,
int  type 
)

Set the default image for the specified list type.

This image is used when there are not any image loaded for a BeyondarObject.

Parameters
uriThe default image
typeThe type of the list to set the bitmap
Returns
The URI of the image loaded or null if the image has not been loaded

Here is the call graph for this function:

void com.beyondar.android.world.World.setGeoPosition ( double  latitude,
double  longitude,
double  altitude 
)

Set user geo position.

Parameters
latitude
longitude
altitude

Here is the caller graph for this function:

final void com.beyondar.android.world.World.setGeoPosition ( double  latitude,
double  longitude 
)

Set user geo position.

Parameters
latitude
longitude

Here is the call graph for this function:

void com.beyondar.android.world.World.setLocation ( Location  location)

Set user geo position using the Location object.

The altitude is not used because it is a big source of issues, the accuracy is too bad.

Parameters
location

Here is the call graph for this function:


The documentation for this class was generated from the following file: