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

Public Member Functions

 VgPointConstRefPtr ()
 
 VgPointConstRefPtr (VgPoint pPointer)
 
 VgPointConstRefPtr (VgPointConstRefPtr pConstRefPtr)
 
VgPointConstRefPtr set (VgPoint pPointer)
 
VgPoint __ref__ ()
 
VgPoint __deref__ ()
 
VgPoint get ()
 
boolean isValid ()
 
VgIGeometryType getType ()
 
VgAltitudeMode getAltitudeMode ()
 
VgAnchorMode getAnchorPosition ()
 
float getGeometryConstantSizeDistance ()
 
boolean isForceFrontFaceEnabled ()
 
VgOrientationConstraints getOrientationConstraints ()
 
long getNbMarkers ()
 
VgSizePolicy getSizePolicy ()
 
void getBoundingRect (float[] pRectangleWidth, float[] pRectangleHeight)
 
VgVisibilityRamp getVisibilityRamp ()
 
String getID ()
 
boolean getNotifyPOISelectedOnClick ()
 
VgPosition getLocalPosition ()
 
VgAnimationConstRefPtr getAnimation (String pName)
 
void getAnimationNames (VgStringList pNameList)
 
VgValue getAnimationChannelValue (String pChannelName)
 
VgPosition getPosition ()
 
VgOrientation getOrientation ()
 
float getScale ()
 
int getZIndex ()
 
boolean isDrawnOnTop ()
 
boolean isVisible ()
 
void ref ()
 
int unref ()
 
int getNbReferences ()
 

Static Public Member Functions

static VgPointConstRefPtr 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

VgPointConstRefPtr.VgPointConstRefPtr ( )
VgPointConstRefPtr.VgPointConstRefPtr ( VgPoint  pPointer)
VgPointConstRefPtr.VgPointConstRefPtr ( VgPointConstRefPtr  pConstRefPtr)

Member Function Documentation

VgPoint VgPointConstRefPtr.__deref__ ( )
VgPoint VgPointConstRefPtr.__ref__ ( )
VgPoint VgPointConstRefPtr.get ( )
VgAltitudeMode VgPointConstRefPtr.getAltitudeMode ( )
Version
2.0.9263
Returns
Altitude mode.

References VgAltitudeMode.swigToEnum().

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

References VgAnchorMode.swigToEnum().

VgAnimationConstRefPtr VgPointConstRefPtr.getAnimation ( String  pName)
VgValue VgPointConstRefPtr.getAnimationChannelValue ( String  pChannelName)
void VgPointConstRefPtr.getAnimationNames ( VgStringList  pNameList)
void VgPointConstRefPtr.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 VgPointConstRefPtr.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 VgPointConstRefPtr.getID ( )
VgPosition VgPointConstRefPtr.getLocalPosition ( )
long VgPointConstRefPtr.getNbMarkers ( )
Version
2.0.9263
Returns
Number of markers attached to this point.
int VgPointConstRefPtr.getNbReferences ( )
boolean VgPointConstRefPtr.getNotifyPOISelectedOnClick ( )
static VgPointConstRefPtr VgPointConstRefPtr.getNull ( )
static
VgOrientation VgPointConstRefPtr.getOrientation ( )
VgOrientationConstraints VgPointConstRefPtr.getOrientationConstraints ( )
Version
2.0.9263
Returns
Orientation constraints.
VgPosition VgPointConstRefPtr.getPosition ( )
float VgPointConstRefPtr.getScale ( )
VgSizePolicy VgPointConstRefPtr.getSizePolicy ( )

Returns the current size policy of the VgPoint .

Version
2.1.0
Returns
Current size policy of the VgPoint.

References VgSizePolicy.swigToEnum().

VgIGeometryType VgPointConstRefPtr.getType ( )
Returns
The geometry type.

References VgIGeometryType.swigToEnum().

VgVisibilityRamp VgPointConstRefPtr.getVisibilityRamp ( )
int VgPointConstRefPtr.getZIndex ( )
boolean VgPointConstRefPtr.isDrawnOnTop ( )
boolean VgPointConstRefPtr.isForceFrontFaceEnabled ( )
Version
2.0.9263
Returns
True if the front face behavior is forced.
boolean VgPointConstRefPtr.isValid ( )
boolean VgPointConstRefPtr.isVisible ( )
void VgPointConstRefPtr.ref ( )
VgPointConstRefPtr VgPointConstRefPtr.set ( VgPoint  pPointer)
int VgPointConstRefPtr.unref ( )

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