com.metaio.sdk.jni
Class IRadar

java.lang.Object
  extended by com.metaio.sdk.jni.IRadar

public class IRadar
extends Object

Interface for the radar.


Constructor Summary
IRadar(long cPtr, boolean cMemoryOwn)
           
 
Method Summary
 boolean add(IGeometry geometry)
           
 void delete()
           
 float getBorder()
          width of the border See: setBorder
static long getCPtr(IRadar obj)
           
 Vector3d getObjectScale(IGeometry geometry)
           
 Vector3d getObjectsScale()
          a vector containing relative scale of the object.
 float getObjectsSize()
          size of the radar objects See: setSize
 int getRelativeToScreen()
          One or combination of screen anchors.
 Vector3d getScale()
          The scaling vector (x,y,z).
 float getSize()
          size of the radar See: setSize
 Vector3d getTranslation()
          A 3D vector containing the translation in millimeters.
 float getTransparency()
          transparency The transparency value, where 0 corresponds to a non- transparent radar, 1 to a fully transparent radar.
 boolean isPickingEnabled()
          true, if enabled, false otherwise See: setPickingEnabled
 boolean isVisible()
          True if the radar is set visible, false otherwise.
 boolean remove(IGeometry geometry)
           
 void removeAll()
           
 boolean setBackgroundTexture(String texturePath)
          Supported formats are PNG and JPG.
 boolean setBackgroundTexture(String textureName, ImageStruct image)
           
 boolean setBackgroundTexture(String textureName, ImageStruct image, boolean updateable)
           
 void setBorder(float border)
           
 void setObjectScale(IGeometry geometry, float scale)
           
 void setObjectScale(IGeometry geometry, Vector3d scale)
           
 boolean setObjectsDefaultTexture(String texturePath)
          The new texture is applied to all radar objects in case of success.Supported formats are PNG and JPG.
 boolean setObjectsDefaultTexture(String textureName, ImageStruct image)
           
 boolean setObjectsDefaultTexture(String textureName, ImageStruct image, boolean updateable)
           
 void setObjectsScale(float scale)
           
 void setObjectsScale(Vector3d scale)
           
 void setObjectsSize(float size)
           
 boolean setObjectTexture(IGeometry geometry, String texturePath)
          The new texture is applied to all radar objects in case of success.Supported formats are PNG and JPG.
 boolean setObjectTexture(IGeometry geometry, String textureName, ImageStruct image)
           
 boolean setObjectTexture(IGeometry geometry, String textureName, ImageStruct image, boolean updateable)
           
 void setPickingEnabled(boolean enabled)
           
 void setRelativeToScreen(int anchor)
           
 void setRelativeToScreen(int anchor, int flags)
           
 void setScale(float scale)
           
 void setScale(Vector3d scale)
           
 void setSize(float size)
           
 void setTranslation(Vector3d translation)
           
 void setTranslation(Vector3d translation, boolean concat)
           
 void setTransparency(float transparency)
           
 void setVisible(boolean visible)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IRadar

public IRadar(long cPtr,
              boolean cMemoryOwn)
Method Detail

getCPtr

public static long getCPtr(IRadar obj)

delete

public void delete()

add

public boolean add(IGeometry geometry)
Parameters:
geometry - Pointer to the geometry to add true if the geometry has been added, else false

remove

public boolean remove(IGeometry geometry)
Parameters:
geometry - Pointer to the geometry to remove true if the geometry has been removed, else false

removeAll

public void removeAll()

setBackgroundTexture

public boolean setBackgroundTexture(String texturePath)
Supported formats are PNG and JPG.

Parameters:
texturePath - Path to the texture image file. true on success

setBackgroundTexture

public boolean setBackgroundTexture(String textureName,
                                    ImageStruct image,
                                    boolean updateable)
Parameters:
textureName - A name that should be assigned to the texture (for reuse).
image - The actual image.
updateable - Flag to signal, that this image will be frequently updated. true on success

setBackgroundTexture

public boolean setBackgroundTexture(String textureName,
                                    ImageStruct image)
Parameters:
textureName - A name that should be assigned to the texture (for reuse).
image - The actual image.
updateable - Flag to signal, that this image will be frequently updated. true on success

setObjectsDefaultTexture

public boolean setObjectsDefaultTexture(String texturePath)
The new texture is applied to all radar objects in case of success.Supported formats are PNG and JPG.

Parameters:
texturePath - Path to the texture image file. true on success

setObjectsDefaultTexture

public boolean setObjectsDefaultTexture(String textureName,
                                        ImageStruct image,
                                        boolean updateable)
Parameters:
textureName - A name that should be assigned to the texture (for reuse).
image - The actual image.
updateable - Flag to signal, that this image will be frequently updated. true on success

setObjectsDefaultTexture

public boolean setObjectsDefaultTexture(String textureName,
                                        ImageStruct image)
Parameters:
textureName - A name that should be assigned to the texture (for reuse).
image - The actual image.
updateable - Flag to signal, that this image will be frequently updated. true on success

setObjectTexture

public boolean setObjectTexture(IGeometry geometry,
                                String texturePath)
The new texture is applied to all radar objects in case of success.Supported formats are PNG and JPG.

Parameters:
geometry - Geometry for which corresponding object's texture is set
texturePath - Path to the texture image file. true on success

setObjectTexture

public boolean setObjectTexture(IGeometry geometry,
                                String textureName,
                                ImageStruct image,
                                boolean updateable)
Parameters:
geometry - Geometry for which corresponding object's texture is set
textureName - A name that should be assigned to the texture (for reuse).
image - The actual image.
updateable - Flag to signal, that this image will be frequently updated. It should always be true on Android. true on success

setObjectTexture

public boolean setObjectTexture(IGeometry geometry,
                                String textureName,
                                ImageStruct image)
Parameters:
geometry - Geometry for which corresponding object's texture is set
textureName - A name that should be assigned to the texture (for reuse).
image - The actual image.
updateable - Flag to signal, that this image will be frequently updated. It should always be true on Android. true on success

setObjectsSize

public void setObjectsSize(float size)
Parameters:
size - new size See: getObjectSize

getObjectsSize

public float getObjectsSize()
size of the radar objects See: setSize


getObjectsScale

public Vector3d getObjectsScale()
a vector containing relative scale of the object. See: setObjectsScale


setObjectsScale

public void setObjectsScale(Vector3d scale)
Parameters:
scale - a vector containing relative scale See: getObjectsScale

setObjectsScale

public void setObjectsScale(float scale)
Parameters:
scale - relative scale See: getObjectsScale

getObjectScale

public Vector3d getObjectScale(IGeometry geometry)
Parameters:
geometry - Geometry for which the corresponding object scale is returned a vector containing relative scale of the object, if geometry is not found, the scale will be invalid, i.e. (-1,-1,-1). See: setObjectScale

setObjectScale

public void setObjectScale(IGeometry geometry,
                           Vector3d scale)
Parameters:
geometry - Geometry that has been added to the radar
scale - a vector containing relative scale See: getObjectScale

setObjectScale

public void setObjectScale(IGeometry geometry,
                           float scale)
Parameters:
geometry - Geometry that has been added to the radar
scale - relative scale See: getObjectScale

getSize

public float getSize()
size of the radar See: setSize


setSize

public void setSize(float size)
Parameters:
size - new size See: getSize

setBorder

public void setBorder(float border)
Parameters:
border - width of the border See: getBorder

getBorder

public float getBorder()
width of the border See: setBorder


setRelativeToScreen

public void setRelativeToScreen(int anchor,
                                int flags)
Parameters:
anchor - one of the screen anchor points
flags - additional flags to ignore some geometric transforms, default is IGeometry::FLAG_MATCH_DISPLAY See: IGeometry::setRelativeToScreen

setRelativeToScreen

public void setRelativeToScreen(int anchor)
Parameters:
anchor - one of the screen anchor points
flags - additional flags to ignore some geometric transforms, default is IGeometry::FLAG_MATCH_DISPLAY See: IGeometry::setRelativeToScreen

getRelativeToScreen

public int getRelativeToScreen()
One or combination of screen anchors. See: setRelativeToScreen


setTranslation

public void setTranslation(Vector3d translation,
                           boolean concat)
Parameters:
translation - The 3D translation vector in millimeters.
concat - If true, the new translation is added to the existing one, otherwise it is overwritten. See: getTranslation

setTranslation

public void setTranslation(Vector3d translation)
Parameters:
translation - The 3D translation vector in millimeters.
concat - If true, the new translation is added to the existing one, otherwise it is overwritten. See: getTranslation

getTranslation

public Vector3d getTranslation()
A 3D vector containing the translation in millimeters. See: setTranslation


setScale

public void setScale(Vector3d scale)
Parameters:
scale - Scaling vector (x,y,z). See: getScale

setScale

public void setScale(float scale)
Parameters:
scale - scale factor for all dimensions See: getScale

getScale

public Vector3d getScale()
The scaling vector (x,y,z). See: setScale


isVisible

public boolean isVisible()
True if the radar is set visible, false otherwise. See: setVisible


setVisible

public void setVisible(boolean visible)
Parameters:
visible - True if the radar should be visible, false if it should be hidden. See: isVisible

setTransparency

public void setTransparency(float transparency)
Parameters:
transparency - The transparency value, where 0 corresponds to a non-transparent radar, 1 to a fully transparent radar. See: getTransparency setVisible and getIsVisible

getTransparency

public float getTransparency()
transparency The transparency value, where 0 corresponds to a non- transparent radar, 1 to a fully transparent radar. See: setTransparency


setPickingEnabled

public void setPickingEnabled(boolean enabled)
Parameters:
enabled - true to enable picking of the radar, false to disable it. See: isPickingEnabled

isPickingEnabled

public boolean isPickingEnabled()
true, if enabled, false otherwise See: setPickingEnabled