VisioDevKit  v2.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Friends Pages
Vg3DModule::VgPoint Class Reference

The VgPoint object can be associated with a layer within the 3D view. More...

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)
 Sets the altitude mode. More...
 
VgEngine::VgAnchorMode getAnchorPosition () const
 
void setAnchorPosition (const VgEngine::VgAnchorMode &pAnchorMode)
 Sets the anchor position. More...
 
float getGeometryConstantSizeDistance () const
 
void setGeometryConstantSizeDistance (float pDistanceInMeters)
 Sets the distance at which the VgPoint does not become bigger as you approach it. More...
 
float getGeometryConstantSizeMaxScale () const
 
void setGeometryConstantSizeMaxScale (float pMaxScale)
 Sets the scale of the VgPoint when viewed from a distance equal to mGeometryConstantSizeDistance. More...
 
bool isForceFrontFaceEnabled () const
 
void setForceFrontFace (bool pEnable)
 Sets a flag to force the front face behavior. More...
 
VgEngine::VgOrientationConstraints getOrientationConstraints () const
 
void setOrientationConstraints (const VgEngine::VgOrientationConstraints &pConstraints)
 Sets new orientation constraints. More...
 
unsigned int getNbMarkers () const
 
VgEngine::VgRefPtr< VgMarkereditMarker (unsigned int pIndex)
 
- Public Member Functions inherited from Vg3DModule::VgIGeometry
 VgIGeometry ()
 Constructor. More...
 
virtual ~VgIGeometry ()
 Destructor. More...
 
virtual void setLayer (VgEngine::VgRefPtr< VgEngine::VgLayer > pLayer, bool pHaveGeographicCoherence=true)
 Sets the associated layer. More...
 
virtual void addListener (VgEngine::VgRefPtr< Vg3DModule::VgIGeometryCallback > pCallback)
 Adds a listener to the geometry object. More...
 
virtual void removeListener (VgEngine::VgRefPtr< Vg3DModule::VgIGeometryCallback > pCallback)
 Removes a listener from the geometry object. More...
 
const VgEngine::VgVisibilityRamp getVisibilityRamp () const
 
void setVisibilityRamp (const VgEngine::VgVisibilityRamp &pRamp)
 Sets the visibility ramp. More...
 
- Public Member Functions inherited from VgEngine::VgSpatial
void setAnimation (const std::string &pAnimationName, VgEngine::VgRefPtr< VgEngine::VgAnimation > &pAnimation)
 Sets an animation on this spatial. More...
 
void setAnimation (VgEngine::VgRefPtr< VgEngine::VgAnimation > pAnimation)
 Sets an animation with an empty name on this spatial. More...
 
void setLocalAnimation (VgEngine::VgRefPtr< VgEngine::VgAnimation > pAnimation)
 Sets an animation on this spatial. More...
 
VgConstRefPtr< VgAnimationgetAnimation (const std::string &pName) const
 Gets an animation from the spatial's animation map. More...
 
VgRefPtr< VgAnimationeditAnimation (const std::string &pName)
 Edits an animation from the spatial's animation map. More...
 
void getAnimationNames (std::list< std::string > &pNameList) const
 Gets the list of the stored animation names. More...
 
VgEngine::VgPosition getPosition () const
 Gets spatial's position. More...
 
virtual void setPosition (const VgEngine::VgPosition &pPosition, bool pHaveGeographicCoherence=true)
 Sets the spatial position. More...
 
VgEngine::VgOrientation getOrientation () const
 Gets spatial's orientation. More...
 
void setOrientation (const VgEngine::VgOrientation &pOrientation)
 Sets the spatial orientation. More...
 
float getScale () const
 
void setScale (float pScale)
 Sets the spatial's scale. More...
 
int getZIndex () const
 
void setZIndex (int pZIndex)
 Sets the Z Index. More...
 
bool isDrawnOnTop () const
 
void setDrawOnTop (bool pEnable)
 Sets the drawOnTop flag. More...
 
- Public Member Functions inherited from VgEngine::VgReferenced
 VgReferenced ()
 Constructor. More...
 
 VgReferenced (const VgReferenced &pThis)
 Copy constructor. More...
 
virtual ~VgReferenced ()
 Destructor. More...
 
VgReferencedoperator= (const VgReferenced &pThis)
 Assignment operator. More...
 
void ref () const
 This method is used to add a reference to this object. More...
 
void unref () const
 This method is used to remove a reference to this object. More...
 
int getNbReferences () const
 Retrieves the number of references to this object. More...
 

Protected Member Functions

 VgPoint ()
 Constructor. More...
 
virtual ~VgPoint ()
 Destructor. More...
 
- Protected Member Functions inherited from VgEngine::VgSpatial
 VgSpatial ()
 Default constructor. More...
 
virtual ~VgSpatial ()
 Destructor. More...
 

Friends

class VgEngine::VgInstanceFactory
 
class VgEngine::VgObjectBridge
 

Additional Inherited Members

- Protected Attributes inherited from VgEngine::VgSpatial
Private * mPrivate
 Private. More...
 
- Protected Attributes inherited from VgEngine::VgReferenced
int mNbReferences
 The number of references to this object. More...
 

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 Vg3DModule::VgInstanceFactory::instantiate) and then associate it with a layer (using setLayer).

...
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 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

VgEngine::VgRefPtr< VgMarker > Vg3DModule::VgPoint::editMarker ( unsigned int  pIndex)
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
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
float Vg3DModule::VgPoint::getGeometryConstantSizeMaxScale ( ) const
Returns
the scale of the VgPoint when viewed from a distance equal to mGeometryConstantSizeDistance. The default value of this property is 1.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
Vg3DModule::VgIGeometryType Vg3DModule::VgPoint::getType ( ) const
virtual
Returns
The geometry type.

Reimplemented from Vg3DModule::VgIGeometry.

bool Vg3DModule::VgPoint::isForceFrontFaceEnabled ( ) const
Returns
True if the front face behavior is forced.
Version
2.0.9263
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::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::setGeometryConstantSizeMaxScale ( float  pMaxScale)

Sets the scale of the VgPoint when viewed from a distance equal to mGeometryConstantSizeDistance.

The default value of this property is 1.0.

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

Sets new orientation constraints.

Version
2.0.9263

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:
VisioDevKit 2.0, Visioglobe® 2013