VisioMove SDK (Android)  2.1.22
 All Classes Functions Variables Pages
VgPointRefPtr Class Reference

Public Member Functions

 VgPointRefPtr ()
 
 VgPointRefPtr (VgPoint pPointer)
 
 VgPointRefPtr (VgPointRefPtr pRefPtr)
 
VgPointRefPtr set (VgPoint pPointer)
 
VgPoint __ref__ ()
 
VgPoint __deref__ ()
 
VgPoint get ()
 
boolean isValid ()
 
VgIGeometryType getType ()
 
VgAltitudeMode getAltitudeMode ()
 
void setAltitudeMode (VgAltitudeMode pAltitudeMode)
 
VgAnchorMode getAnchorPosition ()
 
void setAnchorPosition (VgAnchorMode pAnchorMode)
 
float getGeometryConstantSizeDistance ()
 
void setGeometryConstantSizeDistance (float pDistanceInMeters)
 
boolean isForceFrontFaceEnabled ()
 
void setForceFrontFace (boolean pEnable)
 
VgOrientationConstraints getOrientationConstraints ()
 
void setOrientationConstraints (VgOrientationConstraints pConstraints)
 
long getNbMarkers ()
 
VgMarkerRefPtr editMarker (long pIndex)
 
boolean insertMarker (VgMarkerDescriptor pMarkerDescriptor, int pMarkerPosition)
 
boolean removeMarker (int pMarkerPosition)
 
VgPoint asPoint ()
 
VgLine asLine ()
 
boolean setSizePolicy (VgSizePolicy pSizePolicy)
 
VgSizePolicy getSizePolicy ()
 
void getBoundingRect (float[] pRectangleWidth, float[] pRectangleHeight)
 
void setBoundingRect (float pRectangleWidth, float pRectangleHeight)
 
VgLayerRefPtr getLayer ()
 
void setLayer (VgLayerRefPtr pLayer, boolean pHaveGeographicCoherence)
 
void setLayer (VgLayerRefPtr pLayer)
 
void addListener (VgIGeometryCallbackRefPtr pCallback)
 
void removeListener (VgIGeometryCallbackRefPtr pCallback)
 
VgVisibilityRamp getVisibilityRamp ()
 
void setVisibilityRamp (VgVisibilityRamp pRamp)
 
String getID ()
 
boolean getNotifyPOISelectedOnClick ()
 
void setNotifyPOISelectedOnClick (boolean pValue)
 
boolean getBoundingPositions (VgPositionVector pResult)
 
VgPosition getLocalPosition ()
 
void setLocalPosition (VgPosition pPosition)
 
VgIGeometry asGeometry ()
 
void setAnimation (String pAnimationName, VgAnimationRefPtr pAnimation)
 
void setAnimation (VgAnimationRefPtr pAnimation)
 
void setLocalAnimation (VgAnimationRefPtr pAnimation)
 
VgAnimationConstRefPtr getAnimation (String pName)
 
VgAnimationRefPtr editAnimation (String pName)
 
void getAnimationNames (VgStringList pNameList)
 
VgValue getAnimationChannelValue (String pChannelName)
 
VgPosition getPosition ()
 
void setPosition (VgPosition pPosition, boolean pHaveGeographicCoherence)
 
void setPosition (VgPosition pPosition)
 
VgOrientation getOrientation ()
 
void setOrientation (VgOrientation pOrientation)
 
float getScale ()
 
void setScale (float pScale)
 
int getZIndex ()
 
void setZIndex (int pZIndex)
 
boolean isDrawnOnTop ()
 
void setDrawOnTop (boolean pEnable)
 
void setVisible (boolean pIsVisible)
 
boolean isVisible ()
 
void ref ()
 
int unref ()
 
int getNbReferences ()
 

Static Public Member Functions

static VgPointRefPtr getNull ()
 

Detailed Description

The VgPoint object can be associated with a layer within the 3D view. When the associated layer is visible, so to will the VgPoint . The VgPoint is located at a specified geographical position and is represented as a textured square.

To use a VgPoint , one must first create it (using VgEngine::VgInstanceFactory::instantiate ) and then associate it with a layer (using setLayer).

Note
One should not have any references to VgPoint when the viewer instance is destroyed, otherwise it will crash if your reference is deallocated after the viewer.
...
VgApplication::VgIApplication* mVgApplication;
Vg3DModule::VgPointDescriptor lPointDesc;
...
// Instantiate the VgPoint object.
VgEngine::VgRefPtr< Vg3DModule::VgPoint > lPoint = mVgApplication->editEngine()->editInstanceFactory()->instantiate(lPointDesc);
const VgEngine::VgLayerManager::LayerList& lLayers = mVgApplication->editEngine()->editLayerManager()->getLayers();
// Choose the first layer.
VgEngine::VgRefPtr< VgEngine::VgLayer > lLayer = lLayers.at(0);
// Note: The Point will only be seen if the associated layer is visible. See VgEngine::VgVgLayer for more information.
lPoint->setLayer(lLayer);
// To hide the point. Pass true to show it again. By default, a point is visible.
lPoint->setVisible(false);
// To query its visibility
bool lIsVisible = lPoint->isVisible();
// To remove the Point from the layer.
lPoint->setLayer(NULL);
// If the point is no longer required, then we can release it's memory.
// But since it is reference counted we don't delete, we null-out the VgRefPtr.
lPoint = NULL;

Subclassing

It's possible to subclass VgPoint in order to add custom data. This is demonstrated by the following code snippet:

// Custom VgPoint class to encapsulate some additional information (just a simple string mName in this case)
class MyPoint : public Vg3DModule::VgPoint
{
public:
MyPoint(VgEngine::VgRefPtr< Vg3DModule::VgPoint >& pPoint, const std::string& pName)
: mPoint(pPoint)
, mName(pName)
{}
virtual ~MyPoint()
{
mPoint = NULL;
}
virtual Vg3DModule::VgIGeometryType getType () const
{
return mPoint->getType();
}
virtual const Vg3DModule::VgPointDescriptor& getDescriptor () const
{
return mPoint->getDescriptor();
}
VgEngine::VgRefPtr< Vg3DModule::VgPoint > getPoint () const
{
return mPoint;
}
const std::string& getName () const
{
return mName;
}
private:
VgEngine::VgRefPtr< Vg3DModule::VgPoint > mPoint;
// MyPoint specific information below
const std::string mName;
};

Once the Point is created, it can be wrapped by MyPoint and associated with a layer.

...
VgApplication::VgIApplication* mVgApplication;
Vg3DModule::VgPointDescriptor lPointDesc;
...
VgEngine::VgRefPtr< Vg3DModule::VgPoint > lPoint = mApplication->editEngine()->editInstanceFactory()->instantiate(lPointDescr);
MyPoint* lMyPoint = new MyPoint(lPoint.get());
lMyPoint->getPoint()->setLayer(lLayerName);
Version
2.0

Constructor & Destructor Documentation

VgPointRefPtr.VgPointRefPtr ( )
VgPointRefPtr.VgPointRefPtr ( VgPoint  pPointer)
VgPointRefPtr.VgPointRefPtr ( VgPointRefPtr  pRefPtr)

Member Function Documentation

VgPoint VgPointRefPtr.__deref__ ( )
VgPoint VgPointRefPtr.__ref__ ( )
void VgPointRefPtr.addListener ( VgIGeometryCallbackRefPtr  pCallback)
VgIGeometry VgPointRefPtr.asGeometry ( )
VgLine VgPointRefPtr.asLine ( )

Casts this instance into a VgLine .

Version
2.0.9590
Returns
A valid pointer if this instance as the correct type, NULL otherwise.
VgPoint VgPointRefPtr.asPoint ( )

Casts this instance into a VgPoint .

Version
2.0.9590
Returns
A valid pointer if this instance as the correct type, NULL otherwise.
VgAnimationRefPtr VgPointRefPtr.editAnimation ( String  pName)
VgMarkerRefPtr VgPointRefPtr.editMarker ( long  pIndex)
Parameters
pIndexIndex of marker to edit.
Version
2.0.9263
Returns
The marker attached to this point at the specified index. NULL if there is no marker at this index.
VgPoint VgPointRefPtr.get ( )
VgAltitudeMode VgPointRefPtr.getAltitudeMode ( )
Version
2.0.9263
Returns
Altitude mode.

References VgAltitudeMode.swigToEnum().

VgAnchorMode VgPointRefPtr.getAnchorPosition ( )
Version
2.0.9263
Returns
the anchor position.

References VgAnchorMode.swigToEnum().

VgAnimationConstRefPtr VgPointRefPtr.getAnimation ( String  pName)
VgValue VgPointRefPtr.getAnimationChannelValue ( String  pChannelName)
void VgPointRefPtr.getAnimationNames ( VgStringList  pNameList)
boolean VgPointRefPtr.getBoundingPositions ( VgPositionVector  pResult)
void VgPointRefPtr.getBoundingRect ( float[]  pRectangleWidth,
float[]  pRectangleHeight 
)

Returns the current BoundingRect of the VgPoint . values of -1.0 means undefined.

Parameters
pRectangleWidth
pRectangleHeight
Version
2.1.0
float VgPointRefPtr.getGeometryConstantSizeDistance ( )
Version
2.0.9263
Returns
the distance at which the VgPoint does not become bigger as you approach it. When the camera is within this distance of the VgPoint, the visible size of the VgPoint on the screen will be the same as what it looked like when it was mGeometryConstantSizeDistance meters away. If set to 0.0, the size of the POI will be determined by mScale, regardless of it's distance from the camera. The default value of this property is 700.0.
String VgPointRefPtr.getID ( )
VgLayerRefPtr VgPointRefPtr.getLayer ( )
VgPosition VgPointRefPtr.getLocalPosition ( )
long VgPointRefPtr.getNbMarkers ( )
Version
2.0.9263
Returns
Number of markers attached to this point.
int VgPointRefPtr.getNbReferences ( )
boolean VgPointRefPtr.getNotifyPOISelectedOnClick ( )
static VgPointRefPtr VgPointRefPtr.getNull ( )
static
VgOrientation VgPointRefPtr.getOrientation ( )
VgOrientationConstraints VgPointRefPtr.getOrientationConstraints ( )
Version
2.0.9263
Returns
Orientation constraints.
VgPosition VgPointRefPtr.getPosition ( )
float VgPointRefPtr.getScale ( )
VgSizePolicy VgPointRefPtr.getSizePolicy ( )

Returns the current size policy of the VgPoint .

Version
2.1.0
Returns
Current size policy of the VgPoint.

References VgSizePolicy.swigToEnum().

VgIGeometryType VgPointRefPtr.getType ( )
Returns
The geometry type.

References VgIGeometryType.swigToEnum().

VgVisibilityRamp VgPointRefPtr.getVisibilityRamp ( )
int VgPointRefPtr.getZIndex ( )
boolean VgPointRefPtr.insertMarker ( VgMarkerDescriptor  pMarkerDescriptor,
int  pMarkerPosition 
)

Create and insert a new marker.

Parameters
pMarkerDescriptorDescriptor of new marker to create and insert
pMarkerPositionPosition to insert the marker. Value of -1 means add at end. 0 means beginning. The markers shift on insertion.
Version
2.1.0
Returns
true if the marker was added, otherwise false.
boolean VgPointRefPtr.isDrawnOnTop ( )
boolean VgPointRefPtr.isForceFrontFaceEnabled ( )
Version
2.0.9263
Returns
True if the front face behavior is forced.
boolean VgPointRefPtr.isValid ( )
boolean VgPointRefPtr.isVisible ( )
void VgPointRefPtr.ref ( )
void VgPointRefPtr.removeListener ( VgIGeometryCallbackRefPtr  pCallback)
boolean VgPointRefPtr.removeMarker ( int  pMarkerPosition)

Remove the marker at a given index. You cannot remove the last marker.

Parameters
pMarkerPositionPosition of marker to remove. Value of -1 means remove from end.
Version
2.1.0
Returns
true if the marker was removed, otherwise false.
VgPointRefPtr VgPointRefPtr.set ( VgPoint  pPointer)
void VgPointRefPtr.setAltitudeMode ( VgAltitudeMode  pAltitudeMode)

Sets the altitude mode.

Parameters
pAltitudeMode
Version
2.0.9263
void VgPointRefPtr.setAnchorPosition ( VgAnchorMode  pAnchorMode)

Sets the anchor position.

Parameters
pAnchorMode
Version
2.0.9263
void VgPointRefPtr.setAnimation ( String  pAnimationName,
VgAnimationRefPtr  pAnimation 
)
void VgPointRefPtr.setAnimation ( VgAnimationRefPtr  pAnimation)
void VgPointRefPtr.setBoundingRect ( float  pRectangleWidth,
float  pRectangleHeight 
)

Sets the current BoundingRect of the VgPoint . values of -1.0 means undefined. Usually called before setSizePolicy(VgEnging::eVgSizePolicyFitBoundingRectangle)

Parameters
pRectangleWidth
pRectangleHeight
Version
2.1.0
void VgPointRefPtr.setDrawOnTop ( boolean  pEnable)
void VgPointRefPtr.setForceFrontFace ( boolean  pEnable)

Sets a flag to force the front face behavior. In cases where the camera can view the poi from behind, our engine will not display the label. For example this will happen if the VgPoint has a fixed orientation (it will not happen if it is always camera facing). Default value is false. Setting this to true will allow to view fixed VgPoints from behind.

Parameters
pEnable
Version
2.0.9263
void VgPointRefPtr.setGeometryConstantSizeDistance ( float  pDistanceInMeters)

Sets the distance at which the VgPoint does not become bigger as you approach it. When the camera is within this distance of the VgPoint , the visible size of the VgPoint on the screen will be the same as what it looked like when it was mGeometryConstantSizeDistance meters away. If set to 0.0, the size of the POI will be determined by mScale, regardless of it's distance from the camera. The default value of this property is 700.0.

Parameters
pDistanceInMeters
Version
2.0.9263
void VgPointRefPtr.setLayer ( VgLayerRefPtr  pLayer,
boolean  pHaveGeographicCoherence 
)
void VgPointRefPtr.setLayer ( VgLayerRefPtr  pLayer)
void VgPointRefPtr.setLocalAnimation ( VgAnimationRefPtr  pAnimation)
void VgPointRefPtr.setLocalPosition ( VgPosition  pPosition)
void VgPointRefPtr.setNotifyPOISelectedOnClick ( boolean  pValue)
void VgPointRefPtr.setOrientation ( VgOrientation  pOrientation)
void VgPointRefPtr.setOrientationConstraints ( VgOrientationConstraints  pConstraints)

Sets new orientation constraints.

Parameters
pConstraints
Version
2.0.9263
void VgPointRefPtr.setPosition ( VgPosition  pPosition,
boolean  pHaveGeographicCoherence 
)
void VgPointRefPtr.setPosition ( VgPosition  pPosition)
void VgPointRefPtr.setScale ( float  pScale)
boolean VgPointRefPtr.setSizePolicy ( VgSizePolicy  pSizePolicy)

Changes the size policy of the VgPoint .

Note
If setting VgEngine::eVgSizePolicyFitBoundingRectangle or VgEngine::eVgSizePolicyRectangleMultiline make sure the mRectangleWidth and mRectangleHeight have correct values.
Parameters
pSizePolicysize policy to use.
Version
2.1.0
Returns
false if the pSizePolicy is VgEngine::eVgSizePolicyFitBoundingRectangle and BoundingRect has not been initialized.
void VgPointRefPtr.setVisibilityRamp ( VgVisibilityRamp  pRamp)
void VgPointRefPtr.setVisible ( boolean  pIsVisible)
void VgPointRefPtr.setZIndex ( int  pZIndex)
int VgPointRefPtr.unref ( )

The documentation for this class was generated from the following file:
VisioMove 2.1.22, Visioglobe® 2016