|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metaio.sdk.jni.IGeometry
public class IGeometry
General interface for a geometry that can be loaded within the system.
Field Summary | |
---|---|
static int |
ANCHOR_BC
|
static int |
ANCHOR_BL
|
static int |
ANCHOR_BOTTOM
|
static int |
ANCHOR_BR
|
static int |
ANCHOR_CC
|
static int |
ANCHOR_CENTER_H
|
static int |
ANCHOR_CENTER_V
|
static int |
ANCHOR_CL
|
static int |
ANCHOR_CR
|
static int |
ANCHOR_LEFT
|
static int |
ANCHOR_NONE
|
static int |
ANCHOR_RIGHT
|
static int |
ANCHOR_TC
|
static int |
ANCHOR_TL
|
static int |
ANCHOR_TOP
|
static int |
ANCHOR_TR
|
static int |
FLAG_AUTOSCALE
|
static int |
FLAG_IGNORE_ANIMATIONS
|
static int |
FLAG_IGNORE_ROTATION
|
static int |
FLAG_MATCH_DISPLAY
|
static int |
FLAG_NONE
|
Constructor Summary | |
---|---|
IGeometry(long cPtr,
boolean cMemoryOwn)
|
Method Summary | |
---|---|
void |
delete()
|
boolean |
equals(Object obj)
|
StringVector |
getAnimationNames()
all animation names. |
BoundingBox |
getBoundingBox()
|
BoundingBox |
getBoundingBox(boolean inObjectCoordinates)
|
int |
getCoordinateSystemID()
The (one based) index of the coordinate system. |
static long |
getCPtr(IGeometry obj)
|
boolean |
getIsRendered()
It only works when target is being tracked.True if the geometry is being rendered, false otherwise. |
String |
getName()
Name of the geometry See: setName |
boolean |
getRadarVisibility()
true, if it should be displayed on the radar, false otherwise See: setRadarVisibility to set the visiblity on radar |
int |
getRelativeToScreen()
One or combination of screen anchors. |
int |
getRenderOrder()
the level See: setRenderOrder |
Rotation |
getRotation()
The current rotation as Rotation object. |
Vector3d |
getScale()
The scaling vector (x,y,z). |
Vector3d |
getTranslation()
A 3D vector containing the translation in millimeters. |
LLACoordinate |
getTranslationLLA()
The LLA (latitude, longitude, altitude) coordinate of the geometry. |
Vector3d |
getTranslationLLACartesian()
It returns absolute translation of the geometry relative to current LLA coordinates provided by the sensors' component.A 3D vector containing the translation in millimeters See: setTranslation and getTranslation setTranslationLLA and getTranslationLLA |
float |
getTransparency()
transparency The transparency value, where 0 corresponds to a non- transparent model, 1 to a fully transparent model. |
EGEOMETRY_TYPE |
getType()
EGEOMETRY_TYPE value See: EGEOMETRY_TYPE |
int |
hashCode()
|
boolean |
isOccluded()
boolean If true geometry is occluded, otherwise false See: isVisible |
boolean |
isPickingEnabled()
true, if enabled, false otherwise See: setPickingEnabled |
boolean |
isVisible()
True if the geometry is set visible, false otherwise. |
void |
pauseAnimation()
|
void |
pauseMovieTexture()
Call startMovieTexture to resume again. |
void |
removeMovieTexture()
See: setMovieTexture |
void |
setAnimationSpeed(float fps)
|
void |
setCoordinateSystemID(int coordinateSystemID)
|
void |
setLLALimitsEnabled(boolean enabled)
If disabled, the geometry will ignore the near and far LLA limit and always render the object the the real location. |
void |
setMovieTexture(String filename)
If the movie texture is transparent, the left side should have colored part, and right side should have alpha transparency (red channel). |
void |
setMovieTexture(String filename,
boolean transparent)
If the movie texture is transparent, the left side should have colored part, and right side should have alpha transparency (red channel). |
void |
setName(String name)
|
void |
setOcclusionMode(boolean occlude)
|
void |
setPickingEnabled(boolean enabled)
|
void |
setRadarVisibility(boolean visible)
|
void |
setRelativeToScreen(int anchor)
|
void |
setRelativeToScreen(int anchor,
int flags)
|
void |
setRenderAsXray(boolean xray)
This method shall be used if a model should be drawn on top of all others and therefore ignore the z-buffer. |
void |
setRenderOrder(int level)
This method should be used for compositing, e.g. if a geometry should be drawn before or after other geometries. |
void |
setRenderOrder(int level,
boolean disableDepth)
This method should be used for compositing, e.g. if a geometry should be drawn before or after other geometries. |
void |
setRenderOrder(int level,
boolean disableDepth,
boolean clearDepth)
This method should be used for compositing, e.g. if a geometry should be drawn before or after other geometries. |
void |
setRotation(Rotation rotation)
|
void |
setRotation(Rotation rotation,
boolean concat)
|
void |
setScale(float scale)
|
void |
setScale(float scale,
boolean concat)
|
void |
setScale(Vector3d scale)
|
void |
setScale(Vector3d scale,
boolean concat)
|
boolean |
setTexture(String texturePath)
Supported formats are PNG and JPG. |
boolean |
setTexture(String textureName,
ImageStruct image)
|
boolean |
setTexture(String textureName,
ImageStruct image,
boolean updateable)
|
void |
setTranslation(Vector3d translation)
|
void |
setTranslation(Vector3d translation,
boolean concat)
|
void |
setTranslationLLA(LLACoordinate llaCoorindate)
The system will then adjust its Cartesian offset in the renderer accordingly. |
void |
setTransparency(float transparency)
|
void |
setVisible(boolean visible)
|
void |
startAnimation()
|
void |
startAnimation(String animationName)
|
void |
startAnimation(String animationName,
boolean loop)
|
void |
startMovieTexture()
If the movie texture was stopped, it will start from begining. |
void |
startMovieTexture(boolean loop)
If the movie texture was stopped, it will start from begining. |
void |
stopAnimation()
See: startAnimation |
void |
stopMovieTexture()
See: startMovieTexture pauseMovieTexture |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ANCHOR_NONE
public static final int ANCHOR_LEFT
public static final int ANCHOR_RIGHT
public static final int ANCHOR_BOTTOM
public static final int ANCHOR_TOP
public static final int ANCHOR_CENTER_H
public static final int ANCHOR_CENTER_V
public static final int ANCHOR_TL
public static final int ANCHOR_TC
public static final int ANCHOR_TR
public static final int ANCHOR_CL
public static final int ANCHOR_CC
public static final int ANCHOR_CR
public static final int ANCHOR_BL
public static final int ANCHOR_BC
public static final int ANCHOR_BR
public static final int FLAG_NONE
public static final int FLAG_IGNORE_ROTATION
public static final int FLAG_IGNORE_ANIMATIONS
public static final int FLAG_MATCH_DISPLAY
public static final int FLAG_AUTOSCALE
Constructor Detail |
---|
public IGeometry(long cPtr, boolean cMemoryOwn)
Method Detail |
---|
public static long getCPtr(IGeometry obj)
public void delete()
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void setRelativeToScreen(int anchor, int flags)
anchor
- one or combination of screen anchors (use ANCHOR_NONE to stop
rendering geometry as relative to screen)flags
- additional flags to ignore some geometric transforms. Can be
combination of FLAG_IGNORE_ROTATION, FLAG_IGNORE_ANIMATIONS,
FLAG_MATCH_DISPLAY or FLAG_AUTOSCALE. Default is FLAG_NONE.
See: ANCHOR_NONE ANCHOR_LEFT, ANCHOR_RIGHT, ANCHOR_BOTTOM, ANCHOR_TOP, ANCHOR_CENTER_H, ANCHOR_CENTER_V ANCHOR_TL, ANCHOR_TC, ANCHOR_TR, ANCHOR_CL, ANCHOR_CC, ANCHOR_CR, ANCHOR_BL, ANCHOR_BC, ANCHOR_BR FLAG_NONE FLAG_IGNORE_ROTATION, FLAG_IGNORE_ANIMATIONS FLAG_MATCH_DISPLAY, FLAG_AUTOSCALE getRelativeToScreenpublic void setRelativeToScreen(int anchor)
anchor
- one or combination of screen anchors (use ANCHOR_NONE to stop
rendering geometry as relative to screen)flags
- additional flags to ignore some geometric transforms. Can be
combination of FLAG_IGNORE_ROTATION, FLAG_IGNORE_ANIMATIONS,
FLAG_MATCH_DISPLAY or FLAG_AUTOSCALE. Default is FLAG_NONE.
See: ANCHOR_NONE ANCHOR_LEFT, ANCHOR_RIGHT, ANCHOR_BOTTOM, ANCHOR_TOP, ANCHOR_CENTER_H, ANCHOR_CENTER_V ANCHOR_TL, ANCHOR_TC, ANCHOR_TR, ANCHOR_CL, ANCHOR_CC, ANCHOR_CR, ANCHOR_BL, ANCHOR_BC, ANCHOR_BR FLAG_NONE FLAG_IGNORE_ROTATION, FLAG_IGNORE_ANIMATIONS FLAG_MATCH_DISPLAY, FLAG_AUTOSCALE getRelativeToScreenpublic int getRelativeToScreen()
public void setTranslation(Vector3d translation, boolean concat)
translation
- The 3D translation vector in millimeters.concat
- If true, the new translation is added to the existing one, otherwise
it is overwritten.
See: getTranslationpublic void setTranslation(Vector3d translation)
translation
- The 3D translation vector in millimeters.concat
- If true, the new translation is added to the existing one, otherwise
it is overwritten.
See: getTranslationpublic Vector3d getTranslation()
public void setTranslationLLA(LLACoordinate llaCoorindate)
llaCoorindate
- The LLA (latitude, longitude, altitude) to set as translation.
See: setTranslation and getTranslation getTranslationLLA getTranslationLLACartesianpublic LLACoordinate getTranslationLLA()
public Vector3d getTranslationLLACartesian()
public void setScale(Vector3d scale, boolean concat)
scale
- Scaling vector (x,y,z).concat
- If true, the new scale is multiplied with existing scale.
See: getScalepublic void setScale(Vector3d scale)
scale
- Scaling vector (x,y,z).concat
- If true, the new scale is multiplied with existing scale.
See: getScalepublic void setScale(float scale, boolean concat)
scale
- scale factor for all dimensionsconcat
- If true, the new scale is multiplied with existing scale.
See: getScalepublic void setScale(float scale)
scale
- scale factor for all dimensionsconcat
- If true, the new scale is multiplied with existing scale.
See: getScalepublic Vector3d getScale()
public void setRotation(Rotation rotation, boolean concat)
rotation
- The rotation object specifying the rotation.concat
- If true, the new rotation is concatenated with an existing rotation.
See: getRotationpublic void setRotation(Rotation rotation)
rotation
- The rotation object specifying the rotation.concat
- If true, the new rotation is concatenated with an existing rotation.
See: getRotationpublic Rotation getRotation()
public boolean getIsRendered()
public boolean isVisible()
public void setVisible(boolean visible)
visible
- True if the geometry should be visible, false if it should be hidden.
See: isVisible setOcclusionMode setTransparency setRenderAsXray setPickingEnabledpublic void setRenderAsXray(boolean xray)
xray
- If true, the geometry will be rendered with the x-ray effect,
otherwise it will be displayed normally.
See: setVisible and isVisible setOcclusionMode setTransparency setPickingEnabledpublic void setRenderOrder(int level, boolean disableDepth, boolean clearDepth)
level
- render order, the higher value means front, default is 0disableDepth
- true to disable depth test, false to enable (default)clearDepth
- true to clear depth before rendering, false to disable this (default)
See: getRenderOrderpublic void setRenderOrder(int level, boolean disableDepth)
level
- render order, the higher value means front, default is 0disableDepth
- true to disable depth test, false to enable (default)clearDepth
- true to clear depth before rendering, false to disable this (default)
See: getRenderOrderpublic void setRenderOrder(int level)
level
- render order, the higher value means front, default is 0disableDepth
- true to disable depth test, false to enable (default)clearDepth
- true to clear depth before rendering, false to disable this (default)
See: getRenderOrderpublic int getRenderOrder()
public void setOcclusionMode(boolean occlude)
occlude
- If true, the geometry is not displayed but only used to occlude other
geometrys, otherwise it will be displayed normally.
See: setVisible and isVisible setTransparency setRenderAsXray setPickingEnabledpublic boolean isOccluded()
public void setTransparency(float transparency)
transparency
- The transparency value, where 0 corresponds to a non-transparent
model, 1 to a fully transparent model.
See: getTransparency setVisible and isVisible setOcclusionMode setRenderAsXray setPickingEnabledpublic float getTransparency()
public void startAnimation(String animationName, boolean loop)
animationName
- Identifier of the animation.loop
- If true, the animation is looped, otherwise it is only played once.
See: setAnimationSpeedpublic void startAnimation(String animationName)
animationName
- Identifier of the animation.loop
- If true, the animation is looped, otherwise it is only played once.
See: setAnimationSpeedpublic void startAnimation()
animationName
- Identifier of the animation.loop
- If true, the animation is looped, otherwise it is only played once.
See: setAnimationSpeedpublic void stopAnimation()
public void setAnimationSpeed(float fps)
fps
- Desired animation speed in frames per second.public void pauseAnimation()
public StringVector getAnimationNames()
public BoundingBox getBoundingBox(boolean inObjectCoordinates)
inObjectCoordinates
- If true (default behaviour) the bounding box will be returned in the
coordinate system of the object, if false it will be returned in the
camera coordinate system
The bounding box of the geometry.public BoundingBox getBoundingBox()
inObjectCoordinates
- If true (default behaviour) the bounding box will be returned in the
coordinate system of the object, if false it will be returned in the
camera coordinate system
The bounding box of the geometry.public void setCoordinateSystemID(int coordinateSystemID)
coordinateSystemID
- The (one based) index of the coordinate system.
See: getCoordinateSystemIDpublic int getCoordinateSystemID()
public void setName(String name)
name
- Name of the geometry
See: getNamepublic String getName()
public EGEOMETRY_TYPE getType()
public void setLLALimitsEnabled(boolean enabled)
enabled
- True to enable, false to disable.
See: IMetaioSDK::setLLAObjectRenderingLimitspublic void setPickingEnabled(boolean enabled)
enabled
- True to enable picking of this geometry, false to disable it.
See: isPickingEnabled setVisible and isVisible setOcclusionMode setTransparency setPickingEnabled setRenderAsXraypublic boolean isPickingEnabled()
public boolean setTexture(String texturePath)
texturePath
- Path to the texture image file.
true on successpublic boolean setTexture(String textureName, ImageStruct image, boolean updateable)
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 successpublic boolean setTexture(String textureName, ImageStruct image)
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 successpublic void setMovieTexture(String filename, boolean transparent)
filename
- Filename of the movie.transparent
- If true, the movie file will be rendererd as transparent texture.
See: removeMovieTexturepublic void setMovieTexture(String filename)
filename
- Filename of the movie.transparent
- If true, the movie file will be rendererd as transparent texture.
See: removeMovieTexturepublic void removeMovieTexture()
public void stopMovieTexture()
public void startMovieTexture(boolean loop)
loop
- If true, the movie will play in a loop, otherwise it is played only
once.
See: pauseMovieTexture stopMovieTexturepublic void startMovieTexture()
loop
- If true, the movie will play in a loop, otherwise it is played only
once.
See: pauseMovieTexture stopMovieTexturepublic void pauseMovieTexture()
public boolean getRadarVisibility()
public void setRadarVisibility(boolean visible)
visible
- if false, the geometry is never displayed on the radar, else it may be
displayed depending on its visibility.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |