VisioMove SDK (iOS)  2.1.22
Vg3DModule::VgPoint Class Reference
Inheritance diagram for Vg3DModule::VgPoint:
Inheritance graph

Public Types

typedef VgPointDescriptor Descriptor
 

Public Member Functions

Vg3DModule::VgIGeometryType getType () const
 
VgEngine::VgAltitudeMode getAltitudeMode () const
 
void setAltitudeMode (const VgEngine::VgAltitudeMode &pAltitudeMode)
 
VgEngine::VgAnchorMode getAnchorPosition () const
 
void setAnchorPosition (const VgEngine::VgAnchorMode &pAnchorMode)
 
float getGeometryConstantSizeDistance () const
 
void setGeometryConstantSizeDistance (float pDistanceInMeters)
 
bool isForceFrontFaceEnabled () const
 
void setForceFrontFace (bool pEnable)
 
VgEngine::VgOrientationConstraints getOrientationConstraints () const
 
void setOrientationConstraints (const VgEngine::VgOrientationConstraints &pConstraints)
 
unsigned int getNbMarkers () const
 
VgEngine::VgRefPtr< VgMarkereditMarker (unsigned int pIndex)
 
bool insertMarker (const Vg3DModule::VgMarkerDescriptor *pMarkerDescriptor, int pMarkerPosition)
 
bool removeMarker (int pMarkerPosition)
 
Vg3DModule::VgPointasPoint ()
 
Vg3DModule::VgLineasLine ()
 
bool setSizePolicy (VgEngine::VgSizePolicy pSizePolicy)
 
VgEngine::VgSizePolicy getSizePolicy () const
 
void getBoundingRect (float &pRectangleWidth, float &pRectangleHeight) const
 
void setBoundingRect (float pRectangleWidth, float pRectangleHeight)
 
- Public Member Functions inherited from Vg3DModule::VgIGeometry
 VgIGeometry ()
 
virtual ~VgIGeometry ()
 
virtual VgEngine::VgRefPtr< VgEngine::VgLayergetLayer ()
 
virtual void setLayer (VgEngine::VgRefPtr< VgEngine::VgLayer > pLayer, bool pHaveGeographicCoherence=true)
 
virtual void addListener (VgEngine::VgRefPtr< Vg3DModule::VgIGeometryCallback > pCallback)
 
virtual void removeListener (VgEngine::VgRefPtr< Vg3DModule::VgIGeometryCallback > pCallback)
 
virtual const VgEngine::VgVisibilityRamp getVisibilityRamp () const
 
virtual void setVisibilityRamp (const VgEngine::VgVisibilityRamp &pRamp)
 
virtual const std::string & getID () const
 
virtual bool getNotifyPOISelectedOnClick () const
 
virtual void setNotifyPOISelectedOnClick (bool pValue)
 
virtual bool getBoundingPositions (std::vector< VgEngine::VgPosition > &pResult)
 
virtual VgEngine::VgPosition getLocalPosition () const
 
virtual void setLocalPosition (VgEngine::VgPosition const &pPosition)
 
Vg3DModule::VgIGeometryasGeometry ()
 
- Public Member Functions inherited from VgEngine::VgSpatial
void setAnimation (const std::string &pAnimationName, VgEngine::VgRefPtr< VgEngine::VgAnimation > &pAnimation)
 
void setAnimation (VgEngine::VgRefPtr< VgEngine::VgAnimation > pAnimation)
 
void setLocalAnimation (VgEngine::VgRefPtr< VgEngine::VgAnimation > pAnimation)
 
VgConstRefPtr< VgAnimationgetAnimation (const std::string &pName) const
 
VgRefPtr< VgAnimationeditAnimation (const std::string &pName)
 
void getAnimationNames (std::list< std::string > &pNameList) const
 
VgValue getAnimationChannelValue (const std::string &pChannelName) const
 
VgEngine::VgPosition getPosition () const
 
virtual void setPosition (const VgEngine::VgPosition &pPosition, bool pHaveGeographicCoherence=true)
 
VgEngine::VgOrientation getOrientation () const
 
void setOrientation (const VgEngine::VgOrientation &pOrientation)
 
float getScale () const
 
void setScale (float pScale)
 
int getZIndex () const
 
void setZIndex (int pZIndex)
 
bool isDrawnOnTop () const
 
void setDrawOnTop (bool pEnable)
 
virtual void setVisible (bool pIsVisible)
 
virtual bool isVisible () const
 
- Public Member Functions inherited from VgEngine::VgReferenced
 VgReferenced ()
 
 VgReferenced (const VgReferenced &pThis)
 
virtual ~VgReferenced ()
 
VgReferencedoperator= (const VgReferenced &pThis)
 
void ref () const
 
int unref () const
 
int getNbReferences () const
 

Protected Member Functions

 VgPoint ()
 
virtual ~VgPoint ()
 
- Protected Member Functions inherited from VgEngine::VgSpatial
 VgSpatial ()
 
virtual ~VgSpatial ()
 

Friends

class VgEngine::VgInstanceFactory
 
class VgEngine::VgObjectBridge
 

Additional Inherited Members

- Protected Attributes inherited from VgEngine::VgSpatial
Private * mPrivate
 
- Protected Attributes inherited from VgEngine::VgReferenced
int mNbReferences
 

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;
...
// 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.
// 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;
}
{
return mPoint->getType();
}
virtual const Vg3DModule::VgPointDescriptor& getDescriptor () const
{
return mPoint->getDescriptor();
}
{
return mPoint;
}
const std::string& getName () const
{
return mName;
}
protected:
// 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;
...
VgEngine::VgRefPtr< Vg3DModule::VgPoint > lPoint = mApplication->editEngine()->editInstanceFactory()->instantiate(lPointDescr);
MyPoint* lMyPoint = new MyPoint(lPoint.get());
lMyPoint->getPoint()->setLayer(lLayerName);
Version
2.0

Member Typedef Documentation

Constructor & Destructor Documentation

Vg3DModule::VgPoint::VgPoint ( )
protected

Constructor.

virtual Vg3DModule::VgPoint::~VgPoint ( )
protectedvirtual

Destructor.

Member Function Documentation

Vg3DModule::VgLine* Vg3DModule::VgPoint::asLine ( )
virtual

Casts this instance into a VgLine.

Returns
A valid pointer if this instance as the correct type, NULL otherwise.
Version
2.0.9590

Reimplemented from Vg3DModule::VgIGeometry.

Vg3DModule::VgPoint* Vg3DModule::VgPoint::asPoint ( )
virtual

Casts this instance into a VgPoint.

Returns
A valid pointer if this instance as the correct type, NULL otherwise.
Version
2.0.9590

Reimplemented from Vg3DModule::VgIGeometry.

VgEngine::VgRefPtr< VgMarker > Vg3DModule::VgPoint::editMarker ( unsigned int  pIndex)
Parameters
pIndexIndex of marker to edit.
Returns
The marker attached to this point at the specified index. NULL if there is no marker at this index.
Version
2.0.9263
VgEngine::VgAltitudeMode Vg3DModule::VgPoint::getAltitudeMode ( ) const
Returns
Altitude mode.
Version
2.0.9263
VgEngine::VgAnchorMode Vg3DModule::VgPoint::getAnchorPosition ( ) const
Returns
the anchor position.
Version
2.0.9263
void Vg3DModule::VgPoint::getBoundingRect ( float &  pRectangleWidth,
float &  pRectangleHeight 
) const

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

Parameters
pRectangleWidth
pRectangleHeight
Version
2.1.0
float Vg3DModule::VgPoint::getGeometryConstantSizeDistance ( ) const
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.
Version
2.0.9263
unsigned int Vg3DModule::VgPoint::getNbMarkers ( ) const
Returns
Number of markers attached to this point.
Version
2.0.9263
VgEngine::VgOrientationConstraints Vg3DModule::VgPoint::getOrientationConstraints ( ) const
Returns
Orientation constraints.
Version
2.0.9263
VgEngine::VgSizePolicy Vg3DModule::VgPoint::getSizePolicy ( ) const

Returns the current size policy of the VgPoint.

Returns
Current size policy of the VgPoint.
Version
2.1.0
Vg3DModule::VgIGeometryType Vg3DModule::VgPoint::getType ( ) const
virtual
Returns
The geometry type.

Reimplemented from Vg3DModule::VgIGeometry.

bool Vg3DModule::VgPoint::insertMarker ( const Vg3DModule::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.
Returns
true if the marker was added, otherwise false.
Version
2.1.0
bool Vg3DModule::VgPoint::isForceFrontFaceEnabled ( ) const
Returns
True if the front face behavior is forced.
Version
2.0.9263
bool Vg3DModule::VgPoint::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.
Returns
true if the marker was removed, otherwise false.
Version
2.1.0
void Vg3DModule::VgPoint::setAltitudeMode ( const VgEngine::VgAltitudeMode pAltitudeMode)

Sets the altitude mode.

Version
2.0.9263
void Vg3DModule::VgPoint::setAnchorPosition ( const VgEngine::VgAnchorMode pAnchorMode)

Sets the anchor position.

Version
2.0.9263
void Vg3DModule::VgPoint::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 Vg3DModule::VgPoint::setForceFrontFace ( bool  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.

Version
2.0.9263
void Vg3DModule::VgPoint::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.

Version
2.0.9263
void Vg3DModule::VgPoint::setOrientationConstraints ( const VgEngine::VgOrientationConstraints pConstraints)

Sets new orientation constraints.

Version
2.0.9263
bool Vg3DModule::VgPoint::setSizePolicy ( VgEngine::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.
Returns
false if the pSizePolicy is VgEngine::eVgSizePolicyFitBoundingRectangle and BoundingRect has not been initialized.
Version
2.1.0

Friends And Related Function Documentation

friend class VgEngine::VgInstanceFactory
friend
friend class VgEngine::VgObjectBridge
friend

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