Developer Documentation
PluginFunctions Namespace Reference

Classes

class  BaseObjectIterator
 Core Data Iterator used to iterate over all objects (Including groups) More...
 
class  ObjectIterator
 Core Data Iterator. More...
 
class  ObjectRange
 Range adapter for ObjectIterator. More...
 
class  ObjectReferenceIterator
 Helper class that wraps an ObjectIterator to return a reference instead of a pointer. More...
 
class  ObjectReferenceRange
 Range adapter for ObjectIterator. More...
 

Functions

int viewerId ()
 Return unique viewer id. More...
 
void get_all_objects (std::vector< BaseObjectData *> &_objects)
 
BaseObject *& objectRoot ()
 Get the root of the object structure.
 
QString getOpenFileName (const QString &configProperty, QWidget *parent, const QString &caption, const QString &defaultDir, const QString &filter, QString *selectedFilter, QFileDialog::Options options)
 
QString getSaveFileName (const QString &configProperty, QWidget *parent, const QString &caption, const QString &defaultDir, const QString &filter, QString *selectedFilter, QFileDialog::Options options, const QString &defaultSuffix)
 
void invalidatePickCaches ()
 
void setPluginCommandLineOptions (const QVector< QPair< QString, QString > > &_pluginCommandLineOptions)
 
bool getObject (int _identifier, BSplineCurveObject *&_object)
 
BSplineCurvesplineCurve (BaseObjectData *_object)
 Get a Bspline curve from an object. More...
 
BSplineCurveObjectbsplineCurveObject (BaseObjectData *_object)
 Cast an BaseObject to a BSplineCurveObject if possible. More...
 
bool getObject (int _identifier, BSplineSurfaceObject *&_object)
 
BSplineSurfacesplineSurface (BaseObjectData *_object)
 Get a Bspline Surface from an object. More...
 
BSplineSurfaceObjectbsplineSurfaceObject (BaseObjectData *_object)
 Cast an BaseObject to a BSplineSurfaceObject if possible. More...
 
bool getSourceCameras (std::vector< CameraNode * > &_cameras)
 Get a pointer to every Camera which is marked as a source. More...
 
bool getTargetCameras (std::vector< CameraNode * > &_cameras)
 Get a pointer to every Camera which is marked as a target. More...
 
bool getObject (int _identifier, CameraObject *&_object)
 
CameraObjectcameraObject (int _objectId)
 Get a CameraObject from an object id if possible. More...
 
CameraNodecameraNode (BaseObjectData *_object)
 Get a CameraNode from an object. More...
 
CameraObjectcameraObject (BaseObjectData *_object)
 Cast an BaseObject to a CameraObject if possible. More...
 
bool getObject (int _identifier, CoordsysObject *&_object)
 
CoordsysNodecoordsysNode (BaseObjectData *_object)
 Get a CoordsysNode from an object. More...
 
CoordsysObjectcoordsysObject (BaseObjectData *_object)
 Cast an BaseObject to a CoordsysObject if possible. More...
 
CoordsysObjectcoordsysObject (int _objectId)
 Get a CoordsysObject with its identifier. More...
 
bool getObject (int _identifier, LightObject *&_object)
 
LightNodelightNode (BaseObjectData *_object)
 Get a LightNode from an object. More...
 
LightObjectlightObject (BaseObjectData *_object)
 Cast an BaseObject to a LightObject if possible. More...
 
LightSourcelightSource (BaseObjectData *_object)
 Get the lightSource in this Object. More...
 
DLLEXPORT LightSourcelightSource (LightObject *_object)
 Get the lightSource in this Object. More...
 
bool getSourceMeshes (std::vector< HexahedralMesh * > &_meshes)
 Get a pointer to every HexahedralMesh which is marked as a source. More...
 
bool getTargetMeshes (std::vector< HexahedralMesh * > &_meshes)
 Get a pointer to every HexahedralMesh which is marked as a target. More...
 
bool getObject (int _identifier, HexahedralMeshObject *&_object)
 
HexahedralMeshhexahedralMesh (BaseObjectData *_object)
 Get an HexahedralMesh from an object. More...
 
HexahedralMeshhexahedralMesh (int _identifier)
 Get a HexahedralMesh from an object id. More...
 
HexahedralMeshObjecthexahedralMeshObject (BaseObjectData *_object)
 Cast an BaseObject to an HexahedralMeshObject if possible. More...
 
HexahedralMeshObjecthexahedralMeshObject (int _identifier)
 Cast an int to an HexahedralMeshObject if possible. More...
 
bool getObject (int _identifier, PolyhedralMeshObject *&_object)
 
PolyhedralMeshpolyhedralMesh (BaseObjectData *_object)
 Get an PolyhedralMesh from an object. More...
 
PolyhedralMeshpolyhedralMesh (int _identifier)
 Get a PolyhedralMesh from an object id. More...
 
PolyhedralMeshObjectpolyhedralMeshObject (BaseObjectData *_object)
 Cast an BaseObject to an PolyhedralMeshObject if possible. More...
 
PolyhedralMeshObjectpolyhedralMeshObject (int _identifier)
 Cast an int to an PolyhedralMeshObject if possible. More...
 
bool getObject (int _identifier, TetrahedralMeshObject *&_object)
 
TetrahedralMeshtetrahedralMesh (BaseObjectData *_object)
 Get an TetrahedralMesh from an object. More...
 
TetrahedralMeshtetrahedralMesh (int _identifier)
 Get a TetrahedralMesh from an object id. More...
 
TetrahedralMeshObjecttetrahedralMeshObject (BaseObjectData *_object)
 Cast an BaseObject to an TetrahedralMeshObject if possible. More...
 
TetrahedralMeshObjecttetrahedralMeshObject (int _identifier)
 Cast an int to an TetrahedralMeshObject if possible. More...
 
bool getObject (int _identifier, PlaneObject *&_object)
 
PlaneNodeplaneNode (BaseObjectData *_object)
 Get a PlaneNode from an object. More...
 
Planeplane (BaseObjectData *_object)
 Get a Plane from an object. More...
 
PlaneObjectplaneObject (BaseObjectData *_object)
 Cast an BaseObject to a PlaneObject if possible. More...
 
PlaneObjectplaneObject (int _objectId)
 Get a PlaneObject from an object id if possible. More...
 
bool getSourcePolylines (std::vector< PolyLine * > &_polylines)
 Get a pointer to every Polyline which is marked as a source. More...
 
bool getTargetPolylines (std::vector< PolyLine * > &_polylines)
 Get a pointer to every Polyline which is marked as a target. More...
 
bool getObject (int _identifier, PolyLineObject *&_object)
 
PolyLinepolyLine (BaseObjectData *_object)
 Get a poly Line from an object. More...
 
PolyLineObjectpolyLineObject (BaseObjectData *_object)
 Cast an BaseObject to a PolyLineObject if possible. More...
 
PolyLineObjectpolyLineObject (int _objectId)
 Get an PolyLineObject from the given id If possible. More...
 
bool getSourcePolylineCollections (std::vector< PolyLineCollection * > &_polylines)
 Get a pointer to every Polyline Collection which is marked as a source. More...
 
bool getTargetPolylines (std::vector< PolyLineCollection *> &_polylines)
 
bool getObject (int _identifier, PolyLineCollectionObject *&_object)
 
PolyLineCollectionpolyLineCollection (BaseObjectData *_object)
 Get a polyLine Collection from an object. More...
 
PolyLineCollectionObjectpolyLineCollectionObject (BaseObjectData *_object)
 Cast an BaseObject to a Polyline Collection Object if possible. More...
 
PolyLineCollectionObjectpolyLineCollectionObject (int _objectId)
 Get an Polyline Collection Object from the given id If possible. More...
 
OBJECTTYPEDLLEXPORT bool getTargetPolylineCollections (std::vector< PolyLineCollection *> &_polylines)
 Get a pointer to every Polyline Collection which is marked as a target. More...
 
bool getObject (int _identifier, QtWidgetObject *&_object)
 
QtWidgetNodeqtWidgetNode (BaseObjectData *_object)
 Get a QtWidgetNode from an object. More...
 
QtWidgetObjectqtWidgetObject (BaseObjectData *_object)
 Cast an BaseObject to a QtWidgetObject if possible. More...
 
bool getObject (int _identifier, SkeletonObject *&_object)
 
Skeletonskeleton (BaseObjectData *_object)
 Get a skeleton from an object. More...
 
Skeletonskeleton (int _identifier)
 Get a skeleton from an id. More...
 
SkeletonObjectskeletonObject (BaseObjectData *_object)
 Cast an BaseObject to a SkeletonObject if possible. More...
 
SkeletonObjectskeletonObject (int _identifier)
 Get SkeletonObject with its id if possible. More...
 
bool getObject (int _identifier, SphereObject *&_object)
 
SphereObjectsphereObject (int _objectId)
 Get a SphereObject from id if possible. More...
 
SphereNodesphereNode (BaseObjectData *_object)
 Get a SphereNode from an object. More...
 
SphereObjectsphereObject (BaseObjectData *_object)
 Cast an BaseObject to a SphereObject if possible. More...
 
bool getObject (int _identifier, SplatCloudObject *&_object)
 
ShaderNodesplatShaderNode (BaseObjectData *_object)
 Get a ShaderNode from an object. More...
 
SplatCloudNodesplatCloudNode (BaseObjectData *_object)
 Get a SplatCloudNode from an object. More...
 
SplatCloudsplatCloud (BaseObjectData *_object)
 Get a SplatCloud from an object. More...
 
SplatCloudsplatCloud (int _objectId)
 Get a SplatCloud by its id. More...
 
SplatCloudObjectsplatCloudObject (BaseObjectData *_object)
 Cast an SplatCloudObject to a SplatCloudObject if possible. More...
 
SplatCloudObjectsplatCloudObject (int _objectId)
 Get an SplatCloudObject by its id. More...
 
Do never use!!
void setDataRoot (BaseObject *_root)
 
Examiner handling
int viewers ()
 Get the number of viewers.
 
void disableExaminerLightHandling ()
 Disable the core light handling. More...
 
bool examinerLightHandling ()
 returns if internal light handling is active. More...
 
void setActiveExaminer (const unsigned int _id)
 Set the active id of the examiner which got the last mouse events.
 
unsigned int activeExaminer ()
 Get the id of the examiner which got the last mouse events.
 
QString getEncodedExaminerView ()
 Get the encoded view for the active examiner.
 
QString getEncodedExaminerView (int _viewerId)
 Get the encoded view for the given.
 
void setEncodedExaminerView (QString _view)
 Set the encoded view for the active examiner.
 
void setEncodedExaminerView (int _viewerId, QString _view)
 Set the encoded view for the given.
 
QPoint mapToGlobal (const QPoint _point)
 Map coordinates of GL Widget to global coordinates. More...
 
QPoint mapToLocal (const QPoint _point)
 Map global coordinates to GL Widget local coordinates. More...
 
bool scenegraphPick (ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, size_t &_nodeIdx, size_t &_targetIdx, ACG::Vec3d *_hitPointPtr)
 Execute picking operation on scenegraph. More...
 
bool scenegraphPick (const unsigned int _examiner,ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, size_t &_nodeIdx, size_t &_targetIdx, ACG::Vec3d *_hitPointPtr)
 Execute picking operation on scenegraph. More...
 
bool scenegraphPick (const unsigned int _examiner,ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, BaseObjectData *&_object, size_t &_targetIdx, const bool _refine,ACG::Vec3d *_hitPointPtr)
 Execute picking operation on scenegraph and return object. More...
 
bool scenegraphPick (ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, BaseObjectData *&_object, size_t &_targetIdx, const bool _refine, ACG::Vec3d *_hitPointPtr)
 Execute picking operation on scenegraph and return object. More...
 
bool scenegraphRegionPick (ACG::SceneGraph::PickTarget _pickTarget, const QRegion &_region, QList< QPair< size_t, size_t > > &_list, QVector< float > *_depths, QVector< ACG::Vec3d > *_points)
 
bool scenegraphRegionPick (const unsigned int _examiner, ACG::SceneGraph::PickTarget _pickTarget, const QRegion &_region, QList< QPair< size_t, size_t > > &_list, QVector< float > *_depths, QVector< ACG::Vec3d > *_points)
 
void traverse (ACG::SceneGraph::MouseEventAction &_action)
 
const std::string pickMode ()
 Get the current Picking mode.
 
void pickMode (const std::string &_mode)
 Set the current Picking mode for all examiner widgets.
 
Viewer::ActionMode actionMode ()
 Get the current Action mode.
 
void actionMode (Viewer::ActionMode _mode)
 Set the current Action Mode (PickMode,ExamineMode,...)
 
void shareGLWidget (OFGLWidget *_widget)
 Sets the main QGLWidget for gl data sharing.
 
OFGLWidget * shareGLWidget ()
 Returns the main QGLWidget for gl data sharing.
 
void getCurrentViewImage (QImage &_image)
 Returns a QImage of the current View.
 
void setSceneCenter (const ACG::Vec3d &_center, int _viewer)
 
void setViewObjectMarker (ViewObjectMarker *_marker)
 
void setDefaultViewObjectMarker (ViewObjectMarker *_marker)
 
ViewObjectMarkerdefaultViewObjectMarker ()
 Get the default ViewObjectMarker.
 
ACG::SceneGraph::BaseNodegetSceneGraphRootNode ()
 get scenegraph root node More...
 
ACG::SceneGraph::BaseNodegetRootNode ()
 Get the root node for data objects. More...
 
void addGlobalStatusNode (ACG::SceneGraph::BaseNode *_node)
 Adds a global status node. More...
 
void addGlobalNode (ACG::SceneGraph::BaseNode *_node)
 Add a global node. More...
 
void addObjectRenderingNode (ACG::SceneGraph::BaseNode *_node)
 Add scenegraph node modifing object rendering. More...
 
QStringList collectObjectComments (bool visibleOnly, bool targetedOnly)
 
QStringList collectObjectMaterials (bool visibleOnly, bool targetedOnly)
 
DLLEXPORT void allowRotation (bool _mode)
 
Setup Functions
void setViewers (const std::vector< glViewer *> &_viewerWidgets)
 Set the internal Viewer pointer ( DO NOT USE!! )
 
void setViewerProperties (const std::vector< Viewer::ViewerProperties *> &_viewerProperties)
 Set the internal viewerProperties pointer ( DO NOT USE!! )
 
glViewerviewer (int _viewerId)
 Get a Viewer.
 
void setDataSeparatorNodes (SeparatorNode *_dataRootNode)
 Set the internal data root node pointers ( DO NOT USE!! )
 
void setSceneGraphRootNode (SeparatorNode *_root_node)
 
void setSceneGraphRootNodeGlobal (SeparatorNode *_root_node)
 
Active Objects
bool getPickedObject (const size_t _node_idx, BaseObjectData *&_object)
 Get the picked mesh. More...
 
bool getSourceMeshes (std::vector< PolyMesh * > &_meshes)
 Get a pointer to every Poly Mesh which is marked as a source mesh. More...
 
bool getTargetMeshes (std::vector< PolyMesh * > &_meshes)
 Get a pointer to every Poly Mesh which is marked as a target mesh. More...
 
bool getSourceMeshes (std::vector< TriMesh * > &_meshes)
 Get a pointer to every Triangle Mesh which is marked as a source mesh. More...
 
bool getTargetMeshes (std::vector< TriMesh * > &_meshes)
 Get a pointer to every Triangle Mesh which is marked as a target mesh. More...
 
Identifier handling
bool getSourceIdentifiers (std::vector< int > &_identifiers)
 Get the identifiers of all objects marked as a source object. More...
 
bool getTargetIdentifiers (std::vector< int > &_identifiers)
 Get the identifiers of all objects marked as a target object. More...
 
bool getObject (const int _identifier, BaseObject *&_object)
 Get the object which has the given identifier. More...
 
bool getObject (const int _identifier, BaseObjectData *&_object)
 
int getObjectId (const QString &_name)
 
bool objectExists (const int _identifier)
 Check if an object with this identifier exists. More...
 
bool getAllMeshes (std::vector< int > &_identifiers)
 Get identifiers of all meshes. More...
 
bool getAllObjectIdentifiers (std::vector< int > &_identifiers)
 Get identifiers of all objects. More...
 
int objectCount ()
 Get the number of available objects.
 
int targetCount ()
 Get the number of target objects.
 
int sourceCount ()
 Get the number of source objects.
 
int visibleCount ()
 Get the number of visible objects.
 
bool getObject (int _identifier, PolyMeshObject *&_object)
 
bool getMesh (int _identifier, PolyMesh *&_mesh)
 Get the Poly Mesh which has the given identifier. More...
 
bool getObject (int _identifier, TriMeshObject *&_object)
 
bool getMesh (int _identifier, TriMesh *&_mesh)
 Get the Triangle Mesh which has the given identifier. More...
 
View settings
void setBackColor (OpenMesh::Vec4f _color)
 Set the background color of the examiner widget. More...
 
void setFixedView (int _mode, int _viewer=ACTIVE_VIEWER)
 Set a fixed View for a viewer. More...
 
void setDrawMode (const ACG::SceneGraph::DrawModes::DrawMode &_mode, int _viewer=ALL_VIEWERS)
 Set the draw Mode of a Viewer.
. More...
 
ACG::SceneGraph::DrawModes::DrawMode drawMode (int _viewer=ACTIVE_VIEWER)
 Get the current draw Mode of a Viewer. More...
 
void viewingRay (int _x, int _y, ACG::Vec3d &_outOrigin, ACG::Vec3d &_outDirection)
 Retrieve a viewing ray from the active examiner that can be used for raycasting. More...
 
void viewingRay (int _x, int _y, ACG::Vec3d &_outOrigin, ACG::Vec3d &_outDirection, int _viewerIndex)
 Retrieve a viewing ray from the specified examiner that can be used for raycasting. More...
 
void perspectiveProjection (int _viewer=ALL_VIEWERS)
 Switch to perspective Projection. More...
 
void orthographicProjection (int _viewer=ALL_VIEWERS)
 Switch to orthographic Projection. More...
 
void setFOVY (double _fovy)
 Set field of view angle. More...
 
void allowRotation (bool _mode, int _viewer)
 
bool allowRotation (int _viewer)
 
void setMainGLContext ()
 Set current GL Context to main context.
 
void viewingDirection (const ACG::Vec3d &_dir, const ACG::Vec3d &_up, int _viewer=ACTIVE_VIEWER)
 Set the viewing direction. More...
 
void lookAt (const ACG::Vec3d &_eye, const ACG::Vec3d &_center, const ACG::Vec3d &_up, int _viewer=ACTIVE_VIEWER)
 Set the look at transformation directly. More...
 
const ACG::Vec3d trackBallCenter (int _viewer)
 Get the trackball Center. More...
 
void setTrackBallCenter (const ACG::Vec3d &_center, int _viewer)
 Set the trackball Center. More...
 
void setScenePos (const ACG::Vec3d &_center, const double _radius, int _viewer=ALL_VIEWERS)
 Set the Scene position. More...
 
void setScenePos (const ACG::Vec3d &_center, int _viewer=ALL_VIEWERS)
 Set the scene position. More...
 
const ACG::Vec3d sceneCenter (int _viewer=ALL_VIEWERS)
 Get the current scene center. More...
 
double sceneRadius ()
 Returns the current scene radius from the active examiner widget. More...
 
double sceneRadius (int _viewer)
 Returns the current scene radius from a given examiner viewer. More...
 
void setSceneRadius (double _radius, int _viewer)
 Set the background color of the examiner widget. More...
 
void translate (const ACG::Vec3d &_vector, int _viewer=ALL_VIEWERS)
 Translate viewer pos by given vector. More...
 
void rotate (const ACG::Vec3d &_axis, const double _angle, const ACG::Vec3d &_center, int _viewer=ALL_VIEWERS)
 Rotate Scene around axis. More...
 
void viewHome (int _viewer=ALL_VIEWERS)
 Go to home position. More...
 
void viewAll (int _viewer=ALL_VIEWERS)
 View the whole scene. More...
 
ACG::Vec3d viewingDirection (int _viewer=ACTIVE_VIEWER)
 Get the current viewing Direction. More...
 
bool isProjectionOrthographic (int _viewer=ACTIVE_VIEWER)
 Check if the projection is orthographic. More...
 
ACG::Vec3d eyePos (int _viewer=ACTIVE_VIEWER)
 Get the current viewer position. More...
 
ACG::Vec3d upVector (int _viewer=ACTIVE_VIEWER)
 Get the current up vector. More...
 
DLLEXPORT double fovy (int _viewer)
 Get field of view angle.
 
Viewer Status and properties
Viewer::ViewerPropertiesviewerProperties (int _id=ACTIVE_VIEWER)
 Get the viewer properties Use this functions to get basic viewer properties such as backgroundcolor or rendering options. More...
 
Animations
void flyTo (const ACG::Vec3d &_position, const ACG::Vec3d &_center, double _time)
 Fly to point and viewing direction (animated). More...
 
void flyTo (const ACG::Vec3d &_center, bool _move_back, double _time)
 Fly to point and keep viewing direction (animated). More...
 
Snapshots
void viewerSnapshot (int _viewer, QImage &_image, int _width, int _height, bool _alpha, bool _hideCoordsys, int _samples)
 Take a snapshot of a viewer. More...
 
Getting data from objects and casting between them
BaseObjectDatabaseObjectData (BaseObject *_object)
 Cast an BaseObject to a BaseObjectData if possible. More...
 
PolyMeshpolyMesh (BaseObjectData *_object)
 Get a poly mesh from an object. More...
 
PolyMeshpolyMesh (int _identifier)
 Get a poly mesh from an object id. More...
 
PolyMeshObjectpolyMeshObject (BaseObjectData *_object)
 Cast an BaseObject to a PolyMeshObject if possible. More...
 
PolyMeshObjectpolyMeshObject (int _objectId)
 Get an PolyMeshObject from the given id If possible. More...
 
TriMeshtriMesh (BaseObjectData *_object)
 Get a triangle mesh from an object. More...
 
TriMeshtriMesh (int _identifier)
 Get a triangle mesh from an object id. More...
 
TriMeshObjecttriMeshObject (BaseObjectData *_object)
 Cast an BaseObject to a TriMeshObject if possible. More...
 
TriMeshObjecttriMeshObject (int _objectId)
 Get an TriMeshObject from the given id If possible. More...
 
Internal Counters
void increaseObjectCount ()
 Decrease the number of current Object.
 
void decreaseObjectCount ()
 Increase the number of current Object.
 
void increaseTargetCount ()
 Decrease the number of current Object.
 
void decreaseTargetCount ()
 Increase the number of current Object.
 
Internal object handle container
void addObjectToMap (int _objectId, BaseObject *_object)
 Add object to internal object map.
 
void removeObjectFromMap (int _objectId)
 Remove object from internal object map.
 
Add scenegraph widget generators
void addSceneGraphGenerator (ACG::QtWidgets::SceneGraphWidgetGenerator *_generator)
 Add a scenegraph generator ( the handled type will be extracted from the generator)
 
Internal container for scenegraph widget generators
QMap< std::string,ACG::QtWidgets::SceneGraphWidgetGenerator *> getSceneGraphGeneratorList ()
 
Internal container for plugin options set via command line arguments
const QVector< QPair< QString, QString > > & pluginCommandLineOptions ()
 Get command line plugin settings as key-value pairs.
 
DLLEXPORT void setPluginCommandLineOptions (QVector< QPair< QString, QString >> const &_pluginCommandLineOptions)
 

Variables

QMap< std::string,ACG::QtWidgets::SceneGraphWidgetGenerator *> sceneGraphGenerators_
 Map of scenegraph widget generators.
 
const int ALL_VIEWERS = -2
 
const int ACTIVE_VIEWER = -1
 
const int VIEW_FREE = 0
 
const int VIEW_TOP = 1
 
const int VIEW_BOTTOM = 2
 
const int VIEW_LEFT = 3
 
const int VIEW_RIGHT = 4
 
const int VIEW_FRONT = 5
 
const int VIEW_BACK = 6
 

Iterators

typedef QStringList IteratorRestriction
 Iterable object range. More...
 
const QStringList ALL_OBJECTS
 Iterable object range. More...
 
ObjectRange objects (IteratorRestriction _restriction=ALL_OBJECTS, DataType _dataType=DATA_ALL)
 Iterable object range. More...
 
ObjectReferenceRange objectReferences (IteratorRestriction _restriction=ALL_OBJECTS, DataType _dataType=DATA_ALL)
 Iterable object range. More...
 
const QStringList TARGET_OBJECTS ("target")
 Iterable object range. More...
 
const QStringList SOURCE_OBJECTS ("source")
 Iterable object range. More...
 
DLLEXPORT ObjectIterator objectsEnd ()
 Return Iterator to Object End.
 
DLLEXPORT BaseObjectIterator baseObjectsEnd ()
 Return Iterator to Object End.
 

Detailed Description

The Namespace PluginFunctions contains functions for all plugins. These functions should be used to get the objects to work on or to set modes in the examiner widget.

The Namespace PluginFunctions contains functions for all plugins.

Typedef Documentation

◆ IteratorRestriction

Iterable object range.

Creates an iterator range suitable for iterating over objects using a C++11 range-based for loop.

Note
Usage:
for (auto& object : PluginFunctions::objectReferences(..., ...)) {
...
}

Definition at line 428 of file PluginFunctions.hh.

Function Documentation

◆ addGlobalNode()

DLLEXPORT void PluginFunctions::addGlobalNode ( ACG::SceneGraph::BaseNode _node)

Add a global node.

The node will be added as a global node. Only the global status nodes will be above this node.

Definition at line 981 of file PluginFunctions.cc.

◆ addGlobalStatusNode()

DLLEXPORT void PluginFunctions::addGlobalStatusNode ( ACG::SceneGraph::BaseNode _node)

Adds a global status node.

The node will be added at the top of the scenegraph, before all other nodes except The scenegraphs real node. It will therefore influence all nodes in the scenegraph.

Definition at line 967 of file PluginFunctions.cc.

◆ addObjectRenderingNode()

DLLEXPORT void PluginFunctions::addObjectRenderingNode ( ACG::SceneGraph::BaseNode _node)

Add scenegraph node modifing object rendering.

This function adds nodes in front of the object root node. Therefore all objects renderings will be modified by the state changes in the added node. This might be usefull for adding for example a slicing node, which adds clipping planes such that the objects will be sliced.

Definition at line 987 of file PluginFunctions.cc.

◆ allowRotation() [1/3]

DLLEXPORT void PluginFunctions::allowRotation ( bool  _mode)

Lock scene rotation via mouse

Parameters
_modeallow or disallow rotation

◆ allowRotation() [2/3]

DLLEXPORT void PluginFunctions::allowRotation ( bool  _mode,
int  _viewer = ACTIVE_VIEWER 
)

Lock scene rotation via mouse

Parameters
_modeallow or disallow rotation
_viewerId of the viewer to use. ALL_VIEWERS will set all viewers (Default) ACTIVE_VIEWER active viewer 0..3 Choose viewer explicitly

Definition at line 655 of file PluginFunctions.cc.

◆ allowRotation() [3/3]

DLLEXPORT bool PluginFunctions::allowRotation ( int  _viewer = ACTIVE_VIEWER)

is scene rotation locked

Parameters
_viewerId of the viewer to use. ALL_VIEWERS will set all viewers (Default) ACTIVE_VIEWER active viewer 0..3 Choose viewer explicitly

Definition at line 674 of file PluginFunctions.cc.

◆ baseObjectData()

DLLEXPORT BaseObjectData * PluginFunctions::baseObjectData ( BaseObject _object)

Cast an BaseObject to a BaseObjectData if possible.

Parameters
_objectThe object should be of type BaseObject. If the content is a BaseObjectData, a a BaseObjectData is returned. Otherwise a NULL pointer is returned.

Definition at line 1088 of file PluginFunctions.cc.

◆ bsplineCurveObject()

OBJECTTYPEDLLEXPORT BSplineCurveObject * PluginFunctions::bsplineCurveObject ( BaseObjectData _object)

Cast an BaseObject to a BSplineCurveObject if possible.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a bspline curve, a a BSplineCurveObject is returned. Otherwise a NULL pointer is returned.

Definition at line 100 of file PluginFunctionsBSplineCurve.cc.

◆ bsplineSurfaceObject()

OBJECTTYPEDLLEXPORT BSplineSurfaceObject * PluginFunctions::bsplineSurfaceObject ( BaseObjectData _object)

Cast an BaseObject to a BSplineSurfaceObject if possible.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a bspline surface, a a BSplineSurfaceObject is returned. Otherwise a NULL pointer is returned.

Definition at line 102 of file PluginFunctionsBSplineSurface.cc.

◆ cameraNode()

OBJECTTYPEDLLEXPORT CameraNode * PluginFunctions::cameraNode ( BaseObjectData _object)

Get a CameraNode from an object.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a camera, a CameraNode will be returned. Otherwise a NULL pointer is returned.

Definition at line 147 of file PluginFunctionsCamera.cc.

◆ cameraObject() [1/2]

OBJECTTYPEDLLEXPORT CameraObject * PluginFunctions::cameraObject ( int  _objectId)

Get a CameraObject from an object id if possible.

Parameters
_objectIdIf the object is a camera, a CameraObject is returned. Otherwise a NULL pointer is returned.

Definition at line 129 of file PluginFunctionsCamera.cc.

◆ cameraObject() [2/2]

OBJECTTYPEDLLEXPORT CameraObject * PluginFunctions::cameraObject ( BaseObjectData _object)

Cast an BaseObject to a CameraObject if possible.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a camera, a a CameraObject is returned. Otherwise a NULL pointer is returned.

Definition at line 156 of file PluginFunctionsCamera.cc.

◆ collectObjectComments()

DLLEXPORT QStringList PluginFunctions::collectObjectComments ( bool  visibleOnly,
bool  targetedOnly 
)

Collect and return COMMENT properties of all meshes.

Definition at line 1215 of file PluginFunctions.cc.

◆ collectObjectMaterials()

DLLEXPORT QStringList PluginFunctions::collectObjectMaterials ( bool  visibleOnly,
bool  targetedOnly 
)

Collect and return serialized materials of all meshes.

Definition at line 1224 of file PluginFunctions.cc.

◆ coordsysNode()

OBJECTTYPEDLLEXPORT CoordsysNode * PluginFunctions::coordsysNode ( BaseObjectData _object)

Get a CoordsysNode from an object.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a coordsys, a CoordsysNode will be returned. Otherwise a NULL pointer is returned.

Definition at line 82 of file PluginFunctionsCoordsys.cc.

◆ coordsysObject() [1/2]

OBJECTTYPEDLLEXPORT CoordsysObject * PluginFunctions::coordsysObject ( BaseObjectData _object)

Cast an BaseObject to a CoordsysObject if possible.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a coordsys, a a CoordsysObject is returned. Otherwise a NULL pointer is returned.

Definition at line 92 of file PluginFunctionsCoordsys.cc.

◆ coordsysObject() [2/2]

OBJECTTYPEDLLEXPORT CoordsysObject * PluginFunctions::coordsysObject ( int  _objectId)

Get a CoordsysObject with its identifier.

Parameters
_objectIdThe object should be of type CoordsysObject. If the id belongs to a coordsys, a a CoordsysObject is returned. Otherwise a NULL pointer is returned.

Definition at line 98 of file PluginFunctionsCoordsys.cc.

◆ disableExaminerLightHandling()

DLLEXPORT void PluginFunctions::disableExaminerLightHandling ( )

Disable the core light handling.

Use this function to disable OpenFlippers Core light handling. Use this function only if the light is handled by your plugin Normally this function is called by the light plugin which fully takes control over the glLighting and adds its own light nodes.

Definition at line 150 of file PluginFunctions.cc.

◆ drawMode()

DLLEXPORT ACG::SceneGraph::DrawModes::DrawMode PluginFunctions::drawMode ( int  _viewer)

Get the current draw Mode of a Viewer.

Get the current draw Mode of the examiner widget.
The DrawModes are defined at ACG/Scenegraph/DrawModes.hh
They can be combined.

Parameters
_viewerId of the viewer to use. ACTIVE_VIEWER active viewer 0..3 Choose viewer explicitly

Definition at line 452 of file PluginFunctions.cc.

◆ examinerLightHandling()

DLLEXPORT bool PluginFunctions::examinerLightHandling ( )

returns if internal light handling is active.

Internal light handling could only be deactivated. From than on a plugin has to manage all light handling.

Definition at line 154 of file PluginFunctions.cc.

◆ eyePos()

DLLEXPORT ACG::Vec3d PluginFunctions::eyePos ( int  _viewer = ACTIVE_VIEWER)

Get the current viewer position.

Parameters
_viewerId of the viewer to use. ACTIVE_VIEWER active viewer 0..3 Choose viewer explicitly

Definition at line 900 of file PluginFunctions.cc.

◆ flyTo() [1/2]

DLLEXPORT void PluginFunctions::flyTo ( const ACG::Vec3d _position,
const ACG::Vec3d _center,
double  _time = 1000.0 
)

Fly to point and viewing direction (animated).

Fly to point and set new viewing direction (animated).

Parameters
_positionNew viewer position ( the new eye point of the viewer )
_centerThe new scene center ( the point we are looking at )
_timeAnimation time in ms

Definition at line 1054 of file PluginFunctions.cc.

◆ flyTo() [2/2]

DLLEXPORT void PluginFunctions::flyTo ( const ACG::Vec3d _center,
bool  _move_back = true,
double  _time = 1000.0 
)

Fly to point and keep viewing direction (animated).

Fly to point and keep viewing direction (animated).

Parameters
_centerThe new scene center ( the point we are looking at )
_move_backGet closer if _move_back=true, get more distant else.
_timeAnimation time in ms

Definition at line 1060 of file PluginFunctions.cc.

◆ get_all_objects()

void PluginFunctions::get_all_objects ( std::vector< BaseObjectData *> &  _objects)

Returns a vector containing all currently available objects

Parameters
_objectsvector of all objects

Definition at line 1041 of file PluginFunctions.cc.

◆ getAllMeshes()

DLLEXPORT bool PluginFunctions::getAllMeshes ( std::vector< int > &  _identifiers)

Get identifiers of all meshes.

Parameters
_identifiers( vector returning the identifiers )
Returns
false, if no mesh is found

Definition at line 353 of file PluginFunctions.cc.

◆ getAllObjectIdentifiers()

DLLEXPORT bool PluginFunctions::getAllObjectIdentifiers ( std::vector< int > &  _identifiers)

Get identifiers of all objects.

Parameters
_identifiers( vector returning the identifiers )
Returns
false, if no object is found

Definition at line 365 of file PluginFunctions.cc.

◆ getMesh() [1/2]

OBJECTTYPEDLLEXPORT bool PluginFunctions::getMesh ( int  _identifier,
PolyMesh *&  _mesh 
)

Get the Poly Mesh which has the given identifier.

Every loaded object has a unique identifier which is stored in the id field of the object container. Use this function to get the mesh which has this id. This can be used for a consistent mapping even if the data objects change during plugin operations (e.g. selection and main algorithm).
This function checks, if the object requested contains a mesh.

Parameters
_identifierObject id to search for
_meshreturns the mesh
Returns
Mesh found?

Definition at line 101 of file PluginFunctionsPolyMesh.cc.

◆ getMesh() [2/2]

OBJECTTYPEDLLEXPORT bool PluginFunctions::getMesh ( int  _identifier,
TriMesh *&  _mesh 
)

Get the Triangle Mesh which has the given identifier.

Every loaded object has a unique identifier which is stored in the id field of the object container. Use this function to get the mesh which has this id. This can be used for a consistent mapping even if the data objects change during plugin operations (e.g. selection and main algorithm).
This function checks, if the object requested contains a mesh.

Parameters
_identifierObject id to search for
_meshreturns the mesh
Returns
Mesh found?

Definition at line 104 of file PluginFunctionsTriangleMesh.cc.

◆ getObject() [1/19]

OBJECTTYPEDLLEXPORT bool PluginFunctions::getObject ( int  _identifier,
CoordsysObject *&  _object 
)

This functions returns the object with the given id if it is a CoordsysObject. See get_object( int _identifier , BaseObject*& _object ) for more details.

Definition at line 62 of file PluginFunctionsCoordsys.cc.

◆ getObject() [2/19]

OBJECTTYPEDLLEXPORT bool PluginFunctions::getObject ( int  _identifier,
PlaneObject *&  _object 
)

This functions returns the object with the given id if it is a PlaneObject. See get_object( int _identifier , BaseObject*& _object ) for more details.

Definition at line 62 of file PluginFunctionsPlane.cc.

◆ getObject() [3/19]

OBJECTTYPEDLLEXPORT bool PluginFunctions::getObject ( int  _identifier,
SkeletonObject *&  _object 
)

This functions returns the object with the given id if it is a SkeletonObject. See get_object( int _identifier , BaseObject*& _object ) for more details.

Definition at line 63 of file PluginFunctionsSkeleton.cc.

◆ getObject() [4/19]

OBJECTTYPEDLLEXPORT bool PluginFunctions::getObject ( int  _identifier,
LightObject *&  _object 
)

This functions returns the object with the given id if it is a LightObject. See get_object( int _identifier , BaseObject*& _object ) for more details.

Definition at line 64 of file PluginFunctionsLight.cc.

◆ getObject() [5/19]

OBJECTTYPEDLLEXPORT bool PluginFunctions::getObject ( int  _identifier,
SphereObject *&  _object 
)

This functions returns the object with the given id if it is a SphereObject. See get_object( int _identifier , BaseObject*& _object ) for more details.

Definition at line 64 of file PluginFunctionsSphere.cc.

◆ getObject() [6/19]

OBJECTTYPEDLLEXPORT bool PluginFunctions::getObject ( int  _identifier,
QtWidgetObject *&  _object 
)

This functions returns the object with the given id if it is a QtWidgetObject. See get_object( int _identifier , BaseObject*& _object ) for more details.

Definition at line 66 of file PluginFunctionsQtWidget.cc.

◆ getObject() [7/19]

OBJECTTYPEDLLEXPORT bool PluginFunctions::getObject ( int  _identifier,
BSplineCurveObject *&  _object 
)

This functions returns the object with the given id if it is a BSplineCurveObject. See get_object( int _identifier , BaseObject*& _object ) for more details.

Definition at line 69 of file PluginFunctionsBSplineCurve.cc.

◆ getObject() [8/19]

OBJECTTYPEDLLEXPORT bool PluginFunctions::getObject ( int  _identifier,
BSplineSurfaceObject *&  _object 
)

This functions returns the object with the given id if it is a BSplineSurfaceObject. See get_object( int _identifier , BaseObject*& _object ) for more details.

Definition at line 71 of file PluginFunctionsBSplineSurface.cc.

◆ getObject() [9/19]

OBJECTTYPEDLLEXPORT bool PluginFunctions::getObject ( int  _identifier,
SplatCloudObject *&  _object 
)

This functions returns the object with the given id if it is a SplatCloudObject. See get_object( int _identifier , BaseObject*& _object ) for more details.

Definition at line 74 of file PluginFunctionsSplatCloud.cc.

◆ getObject() [10/19]

OBJECTTYPEDLLEXPORT bool PluginFunctions::getObject ( int  _identifier,
TriMeshObject *&  _object 
)

This functions returns the object with the given id if it is a TriMeshObject. See get_object( int _identifier , BaseObject*& _object ) for more details.

Definition at line 85 of file PluginFunctionsTriangleMesh.cc.

◆ getObject() [11/19]

OBJECTTYPEDLLEXPORT bool PluginFunctions::getObject ( int  _identifier,
PolyMeshObject *&  _object 
)

This functions returns the object with the given id if it is a PolyMeshObject. See get_object( int _identifier , BaseObject*& _object ) for more details.

Definition at line 86 of file PluginFunctionsPolyMesh.cc.

◆ getObject() [12/19]

OBJECTTYPEDLLEXPORT bool PluginFunctions::getObject ( int  _identifier,
HexahedralMeshObject *&  _object 
)

This functions returns the object with the given id if it is an HexahedralMeshObject. See get_object( int _identifier , BaseObject*& _object ) for more details.

Definition at line 94 of file PluginFunctionsHexahedralMesh.cc.

◆ getObject() [13/19]

OBJECTTYPEDLLEXPORT bool PluginFunctions::getObject ( int  _identifier,
TetrahedralMeshObject *&  _object 
)

This functions returns the object with the given id if it is an TetrahedralMeshObject. See get_object( int _identifier , BaseObject*& _object ) for more details.

Definition at line 94 of file PluginFunctionsTetrahedralMesh.cc.

◆ getObject() [14/19]

OBJECTTYPEDLLEXPORT bool PluginFunctions::getObject ( int  _identifier,
PolyhedralMeshObject *&  _object 
)

This functions returns the object with the given id if it is an PolyhedralMeshObject. See get_object( int _identifier , BaseObject*& _object ) for more details.

Definition at line 95 of file PluginFunctionsPolyhedralMesh.cc.

◆ getObject() [15/19]

OBJECTTYPEDLLEXPORT bool PluginFunctions::getObject ( int  _identifier,
PolyLineObject *&  _object 
)

This functions returns the object with the given id if it is a PolyLineObject. See get_object( int _identifier , BaseObject*& _object ) for more details.

Definition at line 113 of file PluginFunctionsPolyLine.cc.

◆ getObject() [16/19]

OBJECTTYPEDLLEXPORT bool PluginFunctions::getObject ( int  _identifier,
CameraObject *&  _object 
)

This functions returns the object with the given id if it is a CameraObject. See get_object( int _identifier , BaseObject*& _object ) for more details.

Definition at line 113 of file PluginFunctionsCamera.cc.

◆ getObject() [17/19]

OBJECTTYPEDLLEXPORT bool PluginFunctions::getObject ( int  _identifier,
PolyLineCollectionObject *&  _object 
)

This functions returns the object with the given id if it is a Polyline Collection. See get_object( int _identifier , BaseObject*& _object ) for more details.

Definition at line 114 of file PluginFunctionsPolyLineCollection.cc.

◆ getObject() [18/19]

DLLEXPORT bool PluginFunctions::getObject ( const int  _identifier,
BaseObject *&  _object 
)

Get the object which has the given identifier.

Every loaded object has a unique identifier which is stored in the id field of the object container. Use this function to get the object which has this id. This can be used for a consistent mapping even if the data objects change during plugin operations (e.g. selection and main algorithm).
This function only returns visible objects.

Parameters
_identifierObject id to search for
_objectreturns the object
Returns
Object found?

Definition at line 298 of file PluginFunctions.cc.

◆ getObject() [19/19]

DLLEXPORT bool PluginFunctions::getObject ( const int  _identifier,
BaseObjectData *&  _object 
)

This functions returns the object with the given id regardless of the type of object. See getObject( const int _identifier , BaseObject*& _object ) for more details.

Definition at line 315 of file PluginFunctions.cc.

◆ getObjectId()

DLLEXPORT int PluginFunctions::getObjectId ( const QString &  _name)

This functions returns the object's id with the given name.

Definition at line 332 of file PluginFunctions.cc.

◆ getOpenFileName()

DLLEXPORT QString PluginFunctions::getOpenFileName ( const QString &  configProperty,
QWidget *  parent = nullptr,
const QString &  caption = QString(),
const QString &  defaultDir = QString(),
const QString &  filter = QString(),
QString *  selectedFilter = nullptr,
QFileDialog::Options  options = QFileDialog::Options() 
)

The same as QFileDialog::getOpenFileName, except the dialog remembers its last location within the file systems and opens at the same location the next time.

Parameters
configPropertyThe name of the property in which to store the last location. Should be of the form "Plugin-Foo/OpenBarFile".
defaultDirIf the property doesn't exist yet, defaultDir is used as the initial location.
parentParent qt widget
captionCaption of the dialog
defaultDirDefault directory when dialog is shown
filtername filters
selectedFiltercurrently selected filter
optionsfiledialog options

Definition at line 1170 of file PluginFunctions.cc.

◆ getPickedObject()

DLLEXPORT bool PluginFunctions::getPickedObject ( const size_t  _node_idx,
BaseObjectData *&  _object 
)

Get the picked mesh.

Parameters
_node_idxNode index returned by examiner picking
_objectreturns the object which contains the mesh
Returns
true if mesh was found, false if picked object is not a mesh or not found

Definition at line 263 of file PluginFunctions.cc.

◆ getRootNode()

DLLEXPORT ACG::SceneGraph::BaseNode * PluginFunctions::getRootNode ( )

Get the root node for data objects.

Get the root node for the objects. This node is a separator node. All nodes belonging to objects have to be placed below this node. Add a separatornode for each object below this node!

Definition at line 963 of file PluginFunctions.cc.

◆ getSaveFileName()

DLLEXPORT QString PluginFunctions::getSaveFileName ( const QString &  configProperty,
QWidget *  parent = nullptr,
const QString &  caption = QString(),
const QString &  defaultDir = QString(),
const QString &  filter = QString(),
QString *  selectedFilter = nullptr,
QFileDialog::Options  options = QFileDialog::Options(),
const QString &  defaultSuffix = QString() 
)

The same as QFileDialog::getSaveFileName, except the dialog remembers its last location within the file systems and opens at the same location the next time.

Parameters
configPropertyThe name of the property in which to store the last location. Should be of the form "Plugin-Foo/SaveBarFile".
defaultDirIf the property doesn't exist yet, defaultDir is used as the initial location.
parentParent qt widget
captionCaption of the dialog
defaultDirDefault directory when dialog is shown
filtername filters
selectedFiltercurrently selected filter
optionsfile dialog options
defaultSuffixOptional default suffix used in the dialog

Definition at line 1183 of file PluginFunctions.cc.

◆ getSceneGraphRootNode()

DLLEXPORT ACG::SceneGraph::BaseNode * PluginFunctions::getSceneGraphRootNode ( )

get scenegraph root node

Get the real root node of the scenegraph.This node is the topmost node of the scenegraph. Normally you do not need to use this node. Except you are writing a renderer plugin. All objects should be added below the data root node which you can get with getRootNode().

Definition at line 959 of file PluginFunctions.cc.

◆ getSourceCameras()

OBJECTTYPEDLLEXPORT bool PluginFunctions::getSourceCameras ( std::vector< CameraNode * > &  _cameras)

Get a pointer to every Camera which is marked as a source.

Parameters
_cameras( vector returning the source cameras )
Returns
false, if no camera is selected as source

Definition at line 74 of file PluginFunctionsCamera.cc.

◆ getSourceIdentifiers()

DLLEXPORT bool PluginFunctions::getSourceIdentifiers ( std::vector< int > &  _identifiers)

Get the identifiers of all objects marked as a source object.

Parameters
_identifiers( vector returning the source object identifiers )
Returns
false, if no object is selected as source

Definition at line 274 of file PluginFunctions.cc.

◆ getSourceMeshes() [1/3]

OBJECTTYPEDLLEXPORT bool PluginFunctions::getSourceMeshes ( std::vector< HexahedralMesh * > &  _meshes)

Get a pointer to every HexahedralMesh which is marked as a source.

Get a pointer to every TetrahedralMesh which is marked as a source.

Get a pointer to every PolyhedralMesh which is marked as a source.

Parameters
_meshes( vector returning the source hexahedral meshes )
Returns
false, if no hexahedral mesh is selected as source
Parameters
_meshes( vector returning the source polyhedral meshes )
Returns
false, if no polyhedral mesh is selected as source

Definition at line 55 of file PluginFunctionsHexahedralMesh.cc.

◆ getSourceMeshes() [2/3]

OBJECTTYPEDLLEXPORT bool PluginFunctions::getSourceMeshes ( std::vector< TriMesh * > &  _meshes)

Get a pointer to every Triangle Mesh which is marked as a source mesh.

Parameters
_meshes( vector returning the source meshes )
Returns
false, if no mesh is selected as source

Definition at line 59 of file PluginFunctionsTriangleMesh.cc.

◆ getSourceMeshes() [3/3]

OBJECTTYPEDLLEXPORT bool PluginFunctions::getSourceMeshes ( std::vector< PolyMesh * > &  _meshes)

Get a pointer to every Poly Mesh which is marked as a source mesh.

Parameters
_meshes( vector returning the source meshes )
Returns
false, if no mesh is selected as source

Definition at line 61 of file PluginFunctionsPolyMesh.cc.

◆ getSourcePolylineCollections()

OBJECTTYPEDLLEXPORT bool PluginFunctions::getSourcePolylineCollections ( std::vector< PolyLineCollection * > &  _polylines)

Get a pointer to every Polyline Collection which is marked as a source.

Parameters
_polylines( vector returning the source Polyline Collections )
Returns
false, if no PolylineCollection is selected as source

Definition at line 75 of file PluginFunctionsPolyLineCollection.cc.

◆ getSourcePolylines()

OBJECTTYPEDLLEXPORT bool PluginFunctions::getSourcePolylines ( std::vector< PolyLine * > &  _polylines)

Get a pointer to every Polyline which is marked as a source.

Parameters
_polylines( vector returning the source polylines )
Returns
false, if no polyline is selected as source

Definition at line 74 of file PluginFunctionsPolyLine.cc.

◆ getTargetCameras()

OBJECTTYPEDLLEXPORT bool PluginFunctions::getTargetCameras ( std::vector< CameraNode * > &  _cameras)

Get a pointer to every Camera which is marked as a target.

Parameters
_cameras( vector returning the target cameras )
Returns
false, if no camera is selected as target

Definition at line 94 of file PluginFunctionsCamera.cc.

◆ getTargetIdentifiers()

DLLEXPORT bool PluginFunctions::getTargetIdentifiers ( std::vector< int > &  _identifiers)

Get the identifiers of all objects marked as a target object.

Parameters
_identifiers( vector returning the target object identifiers )
Returns
false, if no object is selected as target

Definition at line 284 of file PluginFunctions.cc.

◆ getTargetMeshes() [1/3]

OBJECTTYPEDLLEXPORT bool PluginFunctions::getTargetMeshes ( std::vector< TriMesh * > &  _meshes)

Get a pointer to every Triangle Mesh which is marked as a target mesh.

Parameters
_meshes( vector returning the target meshes )
Returns
false, if no mesh is selected as target

Definition at line 71 of file PluginFunctionsTriangleMesh.cc.

◆ getTargetMeshes() [2/3]

OBJECTTYPEDLLEXPORT bool PluginFunctions::getTargetMeshes ( std::vector< PolyMesh * > &  _meshes)

Get a pointer to every Poly Mesh which is marked as a target mesh.

Parameters
_meshes( vector returning the target meshes )
Returns
false, if no mesh is selected as target

Definition at line 73 of file PluginFunctionsPolyMesh.cc.

◆ getTargetMeshes() [3/3]

OBJECTTYPEDLLEXPORT bool PluginFunctions::getTargetMeshes ( std::vector< HexahedralMesh * > &  _meshes)

Get a pointer to every HexahedralMesh which is marked as a target.

Get a pointer to every TetrahedralMesh which is marked as a target.

Get a pointer to every PolyhedralMesh which is marked as a target.

Parameters
_meshes( vector returning the target hexahedral meshes )
Returns
false, if no hexahedral mesh is selected as target
Parameters
_meshes( vector returning the target polyhedral meshes )
Returns
false, if no polyhedral mesh is selected as target

Definition at line 75 of file PluginFunctionsHexahedralMesh.cc.

◆ getTargetPolylineCollections()

OBJECTTYPEDLLEXPORT bool PluginFunctions::getTargetPolylineCollections ( std::vector< PolyLineCollection *> &  _polylines)

Get a pointer to every Polyline Collection which is marked as a target.

Parameters
_polylines( vector returning the target Polyline Collections )
Returns
false, if no PolylineCollection is selected as target

◆ getTargetPolylines()

OBJECTTYPEDLLEXPORT bool PluginFunctions::getTargetPolylines ( std::vector< PolyLine * > &  _polylines)

Get a pointer to every Polyline which is marked as a target.

Parameters
_polylines( vector returning the target polylines )
Returns
false, if no polyline is selected as target

Definition at line 94 of file PluginFunctionsPolyLine.cc.

◆ hexahedralMesh() [1/2]

OBJECTTYPEDLLEXPORT HexahedralMesh * PluginFunctions::hexahedralMesh ( BaseObjectData _object)

Get an HexahedralMesh from an object.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a hexahedral mesh, a hexahedral mesh will be returned. Otherwise a NULL pointer is returned.

Definition at line 114 of file PluginFunctionsHexahedralMesh.cc.

◆ hexahedralMesh() [2/2]

OBJECTTYPEDLLEXPORT HexahedralMesh * PluginFunctions::hexahedralMesh ( int  _identifier)

Get a HexahedralMesh from an object id.

Parameters
_identifierIdentifier of the object. If its a HexahedralMesh mesh, the function will return the pointer to the mesh otherwise 0

Definition at line 123 of file PluginFunctionsHexahedralMesh.cc.

◆ hexahedralMeshObject() [1/2]

OBJECTTYPEDLLEXPORT HexahedralMeshObject * PluginFunctions::hexahedralMeshObject ( BaseObjectData _object)

Cast an BaseObject to an HexahedralMeshObject if possible.

Parameters
_objectThe object should be of type BaseDataObject. If the content is an HexahedralMesh, an HexahedralMeshObject is returned. Otherwise a NULL pointer is returned.

Definition at line 133 of file PluginFunctionsHexahedralMesh.cc.

◆ hexahedralMeshObject() [2/2]

OBJECTTYPEDLLEXPORT HexahedralMeshObject * PluginFunctions::hexahedralMeshObject ( int  _identifier)

Cast an int to an HexahedralMeshObject if possible.

Parameters
_identifier

Definition at line 140 of file PluginFunctionsHexahedralMesh.cc.

◆ isProjectionOrthographic()

DLLEXPORT bool PluginFunctions::isProjectionOrthographic ( int  _viewer = ACTIVE_VIEWER)

Check if the projection is orthographic.

Parameters
_viewerId of the viewer to use. ALL_VIEWERS will set all viewers (Default) ACTIVE_VIEWER active viewer 0..3 Choose viewer explicitly

Definition at line 888 of file PluginFunctions.cc.

◆ lightNode()

OBJECTTYPEDLLEXPORT LightNode * PluginFunctions::lightNode ( BaseObjectData _object)

Get a LightNode from an object.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a light, a LightNode will be returned. Otherwise a NULL pointer is returned.

Definition at line 84 of file PluginFunctionsLight.cc.

◆ lightObject()

OBJECTTYPEDLLEXPORT LightObject * PluginFunctions::lightObject ( BaseObjectData _object)

Cast an BaseObject to a LightObject if possible.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a light, a a LightObject is returned. Otherwise a NULL pointer is returned.

Definition at line 94 of file PluginFunctionsLight.cc.

◆ lightSource() [1/2]

OBJECTTYPEDLLEXPORT LightSource * PluginFunctions::lightSource ( BaseObjectData _object)

Get the lightSource in this Object.

Parameters
_objectTry to get a light source from an object. If this Object is not a light source, the function will return 0

Definition at line 100 of file PluginFunctionsLight.cc.

◆ lightSource() [2/2]

OBJECTTYPEDLLEXPORT LightSource * PluginFunctions::lightSource ( LightObject _object)

Get the lightSource in this Object.

Parameters
_objectTry to get a light source from an object. If this Object is not a light source or anything else goes wrong, the function will return 0

Definition at line 110 of file PluginFunctionsLight.cc.

◆ lookAt()

DLLEXPORT void PluginFunctions::lookAt ( const ACG::Vec3d _eye,
const ACG::Vec3d _center,
const ACG::Vec3d _up,
int  _viewer = ACTIVE_VIEWER 
)

Set the look at transformation directly.

Parameters
_eyeeye point
_centercenter point
_upup vector
_viewerId of the viewer to use. ALL_VIEWERS will set all viewers (Default) ACTIVE_VIEWER active viewer 0..3 Choose viewer explicitly

Definition at line 701 of file PluginFunctions.cc.

◆ mapToGlobal()

DLLEXPORT QPoint PluginFunctions::mapToGlobal ( const QPoint  _point)

Map coordinates of GL Widget to global coordinates.

Definition at line 425 of file PluginFunctions.cc.

◆ mapToLocal()

DLLEXPORT QPoint PluginFunctions::mapToLocal ( const QPoint  _point)

Map global coordinates to GL Widget local coordinates.

Definition at line 429 of file PluginFunctions.cc.

◆ objectExists()

DLLEXPORT bool PluginFunctions::objectExists ( const int  _identifier)

Check if an object with this identifier exists.

Searches through the Data containers and checks if the object with the given identifier exists

Parameters
_identifierObject id to search for

Definition at line 342 of file PluginFunctions.cc.

◆ objectReferences()

DLLEXPORT ObjectReferenceRange PluginFunctions::objectReferences ( IteratorRestriction  _restriction = ALL_OBJECTS,
DataType  _dataType = DATA_ALL 
)

Iterable object range.

Creates an iterator range suitable for iterating over objects using a C++11 range-based for loop.

Note
Usage:
for (auto& object : PluginFunctions::objectReferences(..., ...)) {
...
}

Definition at line 1256 of file PluginFunctions.cc.

◆ objects()

DLLEXPORT ObjectRange PluginFunctions::objects ( IteratorRestriction  _restriction = ALL_OBJECTS,
DataType  _dataType = DATA_ALL 
)

Iterable object range.

Creates an iterator range suitable for iterating over objects using a C++11 range-based for loop.

Note
Iterated elements are pointers to objects, not object references. Hence, the loop header should be declared as
for (auto* object : PluginFunctions::objects(..., ...)) {
...
}

Definition at line 1252 of file PluginFunctions.cc.

◆ orthographicProjection()

DLLEXPORT void PluginFunctions::orthographicProjection ( int  _viewer = ALL_VIEWERS)

Switch to orthographic Projection.

Parameters
_viewerId of the viewer to use. ACTIVE_VIEWER active viewer 0..3 Choose viewer explicitly

Definition at line 636 of file PluginFunctions.cc.

◆ perspectiveProjection()

DLLEXPORT void PluginFunctions::perspectiveProjection ( int  _viewer = ALL_VIEWERS)

Switch to perspective Projection.

Parameters
_viewerId of the viewer to use. ACTIVE_VIEWER active viewer 0..3 Choose viewer explicitly

Definition at line 624 of file PluginFunctions.cc.

◆ plane()

OBJECTTYPEDLLEXPORT ACG::Geometry::Plane * PluginFunctions::plane ( BaseObjectData _object)

Get a Plane from an object.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a plane, a Plane will be returned. Otherwise a NULL pointer is returned.

Definition at line 92 of file PluginFunctionsPlane.cc.

◆ planeNode()

OBJECTTYPEDLLEXPORT PlaneNode * PluginFunctions::planeNode ( BaseObjectData _object)

Get a PlaneNode from an object.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a plane, a PlaneNode will be returned. Otherwise a NULL pointer is returned.

Definition at line 82 of file PluginFunctionsPlane.cc.

◆ planeObject() [1/2]

OBJECTTYPEDLLEXPORT PlaneObject * PluginFunctions::planeObject ( BaseObjectData _object)

Cast an BaseObject to a PlaneObject if possible.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a plane, a a PlaneObject is returned. Otherwise a NULL pointer is returned.

Definition at line 100 of file PluginFunctionsPlane.cc.

◆ planeObject() [2/2]

OBJECTTYPEDLLEXPORT PlaneObject * PluginFunctions::planeObject ( int  _objectId)

Get a PlaneObject from an object id if possible.

Parameters
_objectIdIf the object is a plane, a PlaneObject is returned. Otherwise a NULL pointer is returned.

Definition at line 106 of file PluginFunctionsPlane.cc.

◆ polyhedralMesh() [1/2]

OBJECTTYPEDLLEXPORT PolyhedralMesh * PluginFunctions::polyhedralMesh ( BaseObjectData _object)

Get an PolyhedralMesh from an object.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a polyhedral mesh, a polyhedral mesh will be returned. Otherwise a NULL pointer is returned.

Definition at line 115 of file PluginFunctionsPolyhedralMesh.cc.

◆ polyhedralMesh() [2/2]

OBJECTTYPEDLLEXPORT PolyhedralMesh * PluginFunctions::polyhedralMesh ( int  _identifier)

Get a PolyhedralMesh from an object id.

Parameters
_identifierIdentifier of the object. If its a PolyhedralMesh mesh, the function will return the pointer to the mesh otherwise 0

Definition at line 124 of file PluginFunctionsPolyhedralMesh.cc.

◆ polyhedralMeshObject() [1/2]

OBJECTTYPEDLLEXPORT PolyhedralMeshObject * PluginFunctions::polyhedralMeshObject ( BaseObjectData _object)

Cast an BaseObject to an PolyhedralMeshObject if possible.

Parameters
_objectThe object should be of type BaseDataObject. If the content is an PolyhedralMesh, an PolyhedralMeshObject is returned. Otherwise a NULL pointer is returned.

Definition at line 134 of file PluginFunctionsPolyhedralMesh.cc.

◆ polyhedralMeshObject() [2/2]

OBJECTTYPEDLLEXPORT PolyhedralMeshObject * PluginFunctions::polyhedralMeshObject ( int  _identifier)

Cast an int to an PolyhedralMeshObject if possible.

Parameters
_identifier

Definition at line 141 of file PluginFunctionsPolyhedralMesh.cc.

◆ polyLine()

OBJECTTYPEDLLEXPORT PolyLine * PluginFunctions::polyLine ( BaseObjectData _object)

Get a poly Line from an object.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a poly Line, a poly line will be returned. Otherwise a NULL pointer is returned.

Definition at line 133 of file PluginFunctionsPolyLine.cc.

◆ polyLineCollection()

OBJECTTYPEDLLEXPORT PolyLineCollection * PluginFunctions::polyLineCollection ( BaseObjectData _object)

Get a polyLine Collection from an object.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a Polyline Collection, a Polyline Collection will be returned. Otherwise a NULL pointer is returned.

Definition at line 134 of file PluginFunctionsPolyLineCollection.cc.

◆ polyLineCollectionObject() [1/2]

OBJECTTYPEDLLEXPORT PolyLineCollectionObject * PluginFunctions::polyLineCollectionObject ( BaseObjectData _object)

Cast an BaseObject to a Polyline Collection Object if possible.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a Polyline Collection, a a Polyline Collection Object is returned. Otherwise a NULL pointer is returned.

Definition at line 143 of file PluginFunctionsPolyLineCollection.cc.

◆ polyLineCollectionObject() [2/2]

OBJECTTYPEDLLEXPORT PolyLineCollectionObject * PluginFunctions::polyLineCollectionObject ( int  _objectId)

Get an Polyline Collection Object from the given id If possible.

Parameters
_objectIdId of the requested Object. If the content is a Polyline Collection, a Polyline Collection Object is returned. Otherwise a NULL pointer is returned.

Definition at line 149 of file PluginFunctionsPolyLineCollection.cc.

◆ polyLineObject() [1/2]

OBJECTTYPEDLLEXPORT PolyLineObject * PluginFunctions::polyLineObject ( BaseObjectData _object)

Cast an BaseObject to a PolyLineObject if possible.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a polyLine, a a PolyLineObject is returned. Otherwise a NULL pointer is returned.

Definition at line 142 of file PluginFunctionsPolyLine.cc.

◆ polyLineObject() [2/2]

OBJECTTYPEDLLEXPORT PolyLineObject * PluginFunctions::polyLineObject ( int  _objectId)

Get an PolyLineObject from the given id If possible.

Parameters
_objectIdId of the requested Object. If the content is a volume, a a PolyLineObject is returned. Otherwise a NULL pointer is returned.

Definition at line 148 of file PluginFunctionsPolyLine.cc.

◆ polyMesh() [1/2]

OBJECTTYPEDLLEXPORT PolyMesh * PluginFunctions::polyMesh ( BaseObjectData _object)

Get a poly mesh from an object.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a poly Mesh, a poly mesh will be returned. Otherwise a NULL pointer is returned.

Definition at line 128 of file PluginFunctionsPolyMesh.cc.

◆ polyMesh() [2/2]

OBJECTTYPEDLLEXPORT PolyMesh * PluginFunctions::polyMesh ( int  _identifier)

Get a poly mesh from an object id.

Parameters
_identifierIdentifier of the object. If its a poly mesh, the function will return the pointer to the mesh otherwise 0

Definition at line 140 of file PluginFunctionsPolyMesh.cc.

◆ polyMeshObject() [1/2]

OBJECTTYPEDLLEXPORT PolyMeshObject * PluginFunctions::polyMeshObject ( BaseObjectData _object)

Cast an BaseObject to a PolyMeshObject if possible.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a poly Mesh, a a PolyMeshObject is returned. Otherwise a NULL pointer is returned.

Definition at line 149 of file PluginFunctionsPolyMesh.cc.

◆ polyMeshObject() [2/2]

OBJECTTYPEDLLEXPORT PolyMeshObject * PluginFunctions::polyMeshObject ( int  _objectId)

Get an PolyMeshObject from the given id If possible.

Parameters
_objectIdId of the requested Object. If the content is a volume, a a PolyMeshObject is returned. Otherwise a NULL pointer is returned.

Definition at line 159 of file PluginFunctionsPolyMesh.cc.

◆ qtWidgetNode()

OBJECTTYPEDLLEXPORT QtWidgetNode * PluginFunctions::qtWidgetNode ( BaseObjectData _object)

Get a QtWidgetNode from an object.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a QtWidget, a QtWidgetNode will be returned. Otherwise a NULL pointer is returned.

Definition at line 85 of file PluginFunctionsQtWidget.cc.

◆ qtWidgetObject()

OBJECTTYPEDLLEXPORT QtWidgetObject * PluginFunctions::qtWidgetObject ( BaseObjectData _object)

Cast an BaseObject to a QtWidgetObject if possible.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a QtWidget, a a QtWidgetObject is returned. Otherwise a NULL pointer is returned.

Definition at line 95 of file PluginFunctionsQtWidget.cc.

◆ rotate()

DLLEXPORT void PluginFunctions::rotate ( const ACG::Vec3d _axis,
const double  _angle,
const ACG::Vec3d _center,
int  _viewer = ALL_VIEWERS 
)

Rotate Scene around axis.

Rotates the current scene.

Parameters
_axisRotation axis
_angleRotation Angle
_centerRotation Center
_viewerId of the viewer to use. ALL_VIEWERS will set all viewers (Default) ACTIVE_VIEWER active viewer 0..3 Choose viewer explicitly

Definition at line 835 of file PluginFunctions.cc.

◆ sceneCenter()

DLLEXPORT const ACG::Vec3d PluginFunctions::sceneCenter ( int  _viewer = ALL_VIEWERS)

Get the current scene center.

Definition at line 780 of file PluginFunctions.cc.

◆ scenegraphPick() [1/4]

DLLEXPORT bool PluginFunctions::scenegraphPick ( ACG::SceneGraph::PickTarget  _pickTarget,
const QPoint &  _mousePos,
size_t &  _nodeIdx,
size_t &  _targetIdx,
ACG::Vec3d _hitPointPtr 
)

Execute picking operation on scenegraph.

This picking function will pick in the last active examiner context which is automatically set by the last mouse event from the core

Definition at line 480 of file PluginFunctions.cc.

◆ scenegraphPick() [2/4]

DLLEXPORT bool PluginFunctions::scenegraphPick ( const unsigned int  _examiner,
ACG::SceneGraph::PickTarget  _pickTarget,
const QPoint &  _mousePos,
size_t &  _nodeIdx,
size_t &  _targetIdx,
ACG::Vec3d _hitPointPtr 
)

Execute picking operation on scenegraph.

This picking function will pick in the specified examiner context

Definition at line 486 of file PluginFunctions.cc.

◆ scenegraphPick() [3/4]

DLLEXPORT bool PluginFunctions::scenegraphPick ( const unsigned int  _examiner,
ACG::SceneGraph::PickTarget  _pickTarget,
const QPoint &  _mousePos,
BaseObjectData *&  _object,
size_t &  _targetIdx,
const bool  _refine,
ACG::Vec3d _hitPointPtr 
)

Execute picking operation on scenegraph and return object.

This picking function will pick in the specified examiner context and will return a pointer to the picked object. Furthermore, the refine picking of the picked object will be called in order to achieve higher picking accuracy

Definition at line 497 of file PluginFunctions.cc.

◆ scenegraphPick() [4/4]

DLLEXPORT bool PluginFunctions::scenegraphPick ( ACG::SceneGraph::PickTarget  _pickTarget,
const QPoint &  _mousePos,
BaseObjectData *&  _object,
size_t &  _targetIdx,
const bool  _refine,
ACG::Vec3d _hitPointPtr 
)

Execute picking operation on scenegraph and return object.

This picking function will pick in the examiner context of the last mouse event and will return a pointer to the picked object. Furthermore, the refine picking of the picked object will be called in order to achieve higher picking accuracy

Definition at line 533 of file PluginFunctions.cc.

◆ scenegraphRegionPick() [1/2]

DLLEXPORT bool PluginFunctions::scenegraphRegionPick ( ACG::SceneGraph::PickTarget  _pickTarget,
const QRegion &  _region,
QList< QPair< size_t, size_t > > &  _list,
QVector< float > *  _depths = 0,
QVector< ACG::Vec3d > *  _points = 0 
)

Execute picking operation on scenegraph This picking function will pick in the last active examiner context which is automatically Set by mouseevents from the core

Definition at line 547 of file PluginFunctions.cc.

◆ scenegraphRegionPick() [2/2]

DLLEXPORT bool PluginFunctions::scenegraphRegionPick ( const unsigned int  _examiner,
ACG::SceneGraph::PickTarget  _pickTarget,
const QRegion &  _region,
QList< QPair< size_t, size_t > > &  _list,
QVector< float > *  _depths = 0,
QVector< ACG::Vec3d > *  _points = 0 
)

Execute picking operation on scenegraph This picking function will pick in the specified examiner context

Definition at line 556 of file PluginFunctions.cc.

◆ sceneRadius() [1/2]

DLLEXPORT double PluginFunctions::sceneRadius ( )

Returns the current scene radius from the active examiner widget.

Returns the Radius of the scene

Definition at line 794 of file PluginFunctions.cc.

◆ sceneRadius() [2/2]

DLLEXPORT double PluginFunctions::sceneRadius ( int  _viewer)

Returns the current scene radius from a given examiner viewer.

Returns the Radius of the scene

Parameters
_viewerGive the viewer which should be asked for its current scene radius

Definition at line 798 of file PluginFunctions.cc.

◆ setBackColor()

DLLEXPORT void PluginFunctions::setBackColor ( OpenMesh::Vec4f  _color)

Set the background color of the examiner widget.

Definition at line 377 of file PluginFunctions.cc.

◆ setDataRoot()

DLLEXPORT void PluginFunctions::setDataRoot ( BaseObject _root)

Set the global DataContainer

Definition at line 142 of file PluginFunctions.cc.

◆ setDefaultViewObjectMarker()

DLLEXPORT void PluginFunctions::setDefaultViewObjectMarker ( ViewObjectMarker _marker)

Set the default ViewObjectMarker

Parameters
_markerObject marker

Definition at line 948 of file PluginFunctions.cc.

◆ setDrawMode()

DLLEXPORT void PluginFunctions::setDrawMode ( const ACG::SceneGraph::DrawModes::DrawMode _mode,
int  _viewer = ALL_VIEWERS 
)

Set the draw Mode of a Viewer.
.

The DrawModes are defined at ACG/Scenegraph/DrawModes.hh
They can be combined.

Parameters
_viewerId of the viewer to use. ACTIVE_VIEWER active viewer 0..3 Choose viewer explicitly
_modeNew drawmode of the given viewer

Definition at line 433 of file PluginFunctions.cc.

◆ setFixedView()

DLLEXPORT void PluginFunctions::setFixedView ( int  _mode,
int  _viewer = ACTIVE_VIEWER 
)

Set a fixed View for a viewer.

Parameters
_modeid for the mode
_viewerId of the viewer to use. ACTIVE_VIEWER active viewer 0..3 Choose viewer explicitly

Definition at line 382 of file PluginFunctions.cc.

◆ setFOVY()

DLLEXPORT void PluginFunctions::setFOVY ( double  _fovy)

Set field of view angle.

Parameters
_fovyField of view (in (1, 180) degrees)

Definition at line 648 of file PluginFunctions.cc.

◆ setPluginCommandLineOptions()

DLLEXPORT void PluginFunctions::setPluginCommandLineOptions ( QVector< QPair< QString, QString >> const &  _pluginCommandLineOptions)

Set the command line plugin settings ( DO NOT USE!! ) This method is usually only called by the command line parser

◆ setSceneCenter()

DLLEXPORT void PluginFunctions::setSceneCenter ( const ACG::Vec3d _center,
int  _viewer 
)

Set center of scene

Definition at line 764 of file PluginFunctions.cc.

◆ setSceneGraphRootNode()

DLLEXPORT void PluginFunctions::setSceneGraphRootNode ( SeparatorNode _root_node)

Set the internal scenegraph root node pointer. This is the topmost node of the whole scenegraph ( DO NOT USE!! )

Definition at line 255 of file PluginFunctions.cc.

◆ setSceneGraphRootNodeGlobal()

DLLEXPORT void PluginFunctions::setSceneGraphRootNodeGlobal ( SeparatorNode _root_node)

Set the internal scenegraph root node pointer for global nodes

This node is below the global status nodes and takes global nodes at one level. ( DO NOT USE!! )

Definition at line 259 of file PluginFunctions.cc.

◆ setScenePos() [1/2]

DLLEXPORT void PluginFunctions::setScenePos ( const ACG::Vec3d _center,
const double  _radius,
int  _viewer = ALL_VIEWERS 
)

Set the Scene position.

Parameters
_centerCenter of the current scene
_radiusRadius of the scene ( Use scene_radius to get the current radius )
_viewerId of the viewer to use. ALL_VIEWERS will set all viewers (Default) ACTIVE_VIEWER active viewer 0..3 Choose viewer explicitly

Definition at line 740 of file PluginFunctions.cc.

◆ setScenePos() [2/2]

DLLEXPORT void PluginFunctions::setScenePos ( const ACG::Vec3d _center,
int  _viewer = ALL_VIEWERS 
)

Set the scene position.

Same as setScenePos(const ACG::Vec3d& _center, double _radius) but reuses the current radius

Parameters
_viewerId of the viewer to use. ALL_VIEWERS will set all viewers (Default) ACTIVE_VIEWER active viewer 0..3 Choose viewer explicitly
_centerCenter of the current scene

Definition at line 752 of file PluginFunctions.cc.

◆ setSceneRadius()

DLLEXPORT void PluginFunctions::setSceneRadius ( double  _radius,
int  _viewer 
)

Set the background color of the examiner widget.

Definition at line 811 of file PluginFunctions.cc.

◆ setTrackBallCenter()

DLLEXPORT void PluginFunctions::setTrackBallCenter ( const ACG::Vec3d _center,
int  _viewer 
)

Set the trackball Center.

The scene is rotated around the trackball center when using the mouse

Parameters
_centerCenter of the trackball
_viewerId of the viewer to use. ALL_VIEWERS will set all viewers (Default) ACTIVE_VIEWER active viewer 0..3 Choose viewer explicitly

Definition at line 728 of file PluginFunctions.cc.

◆ setViewObjectMarker()

DLLEXPORT void PluginFunctions::setViewObjectMarker ( ViewObjectMarker _marker)

Set current ViewObjectMarker (will be reseted to default on pick mode change)

Parameters
_markerObject marker

Definition at line 942 of file PluginFunctions.cc.

◆ skeleton() [1/2]

OBJECTTYPEDLLEXPORT Skeleton * PluginFunctions::skeleton ( BaseObjectData _object)

Get a skeleton from an object.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a skeleton, a skeleton will be returned. Otherwise a NULL pointer is returned.

Definition at line 80 of file PluginFunctionsSkeleton.cc.

◆ skeleton() [2/2]

OBJECTTYPEDLLEXPORT Skeleton * PluginFunctions::skeleton ( int  _identifier)

Get a skeleton from an id.

Parameters
_identifierThe skeleton is returned if the object with id is a skeleton object, otherwise 0.

Definition at line 88 of file PluginFunctionsSkeleton.cc.

◆ skeletonObject() [1/2]

OBJECTTYPEDLLEXPORT SkeletonObject * PluginFunctions::skeletonObject ( BaseObjectData _object)

Cast an BaseObject to a SkeletonObject if possible.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a polyLine, a a SkeletonObject is returned. Otherwise a NULL pointer is returned.

Definition at line 99 of file PluginFunctionsSkeleton.cc.

◆ skeletonObject() [2/2]

OBJECTTYPEDLLEXPORT SkeletonObject * PluginFunctions::skeletonObject ( int  _identifier)

Get SkeletonObject with its id if possible.

Parameters
_identifierThe skeleton object if request was successfull or otherwise 0

Definition at line 106 of file PluginFunctionsSkeleton.cc.

◆ SOURCE_OBJECTS()

const QStringList PluginFunctions::SOURCE_OBJECTS ( "source"  )

Iterable object range.

Creates an iterator range suitable for iterating over objects using a C++11 range-based for loop.

Note
Usage:
for (auto& object : PluginFunctions::objectReferences(..., ...)) {
...
}

◆ sphereNode()

OBJECTTYPEDLLEXPORT SphereNode * PluginFunctions::sphereNode ( BaseObjectData _object)

Get a SphereNode from an object.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a sphere, a SphereNode will be returned. Otherwise a NULL pointer is returned.

Definition at line 99 of file PluginFunctionsSphere.cc.

◆ sphereObject() [1/2]

OBJECTTYPEDLLEXPORT SphereObject * PluginFunctions::sphereObject ( int  _objectId)

Get a SphereObject from id if possible.

Parameters
_objectIdIf the content is a sphere, a SphereObject is returned. Otherwise a NULL pointer is returned.

Definition at line 79 of file PluginFunctionsSphere.cc.

◆ sphereObject() [2/2]

OBJECTTYPEDLLEXPORT SphereObject * PluginFunctions::sphereObject ( BaseObjectData _object)

Cast an BaseObject to a SphereObject if possible.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a sphere, a a SphereObject is returned. Otherwise a NULL pointer is returned.

Definition at line 109 of file PluginFunctionsSphere.cc.

◆ splatCloud() [1/2]

OBJECTTYPEDLLEXPORT SplatCloud * PluginFunctions::splatCloud ( BaseObjectData _object)

Get a SplatCloud from an object.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a SplatCloud, a SplatCloud will be returned. Otherwise a NULL pointer is returned.

Definition at line 136 of file PluginFunctionsSplatCloud.cc.

◆ splatCloud() [2/2]

OBJECTTYPEDLLEXPORT SplatCloud * PluginFunctions::splatCloud ( int  _objectId)

Get a SplatCloud by its id.

Parameters
_objectId of the object. If the content is a SplatCloud, a SplatCloud will be returned. Otherwise a NULL pointer is returned.

Definition at line 156 of file PluginFunctionsSplatCloud.cc.

◆ splatCloudNode()

OBJECTTYPEDLLEXPORT SplatCloudNode * PluginFunctions::splatCloudNode ( BaseObjectData _object)

Get a SplatCloudNode from an object.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a SplatCloud, a SplatCloudNode will be returned. Otherwise a NULL pointer is returned.

Definition at line 116 of file PluginFunctionsSplatCloud.cc.

◆ splatCloudObject() [1/2]

OBJECTTYPEDLLEXPORT SplatCloudObject * PluginFunctions::splatCloudObject ( BaseObjectData _object)

Cast an SplatCloudObject to a SplatCloudObject if possible.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a SplatCloud, a SplatCloudObject is returned. Otherwise a NULL pointer is returned.

Definition at line 168 of file PluginFunctionsSplatCloud.cc.

◆ splatCloudObject() [2/2]

OBJECTTYPEDLLEXPORT SplatCloudObject * PluginFunctions::splatCloudObject ( int  _objectId)

Get an SplatCloudObject by its id.

Parameters
_objectIdId of the object. If the object exists and is a SplatCloud, a SplatCloudObject is returned. Otherwise a NULL pointer is returned.

Definition at line 183 of file PluginFunctionsSplatCloud.cc.

◆ splatShaderNode()

OBJECTTYPEDLLEXPORT ShaderNode * PluginFunctions::splatShaderNode ( BaseObjectData _object)

Get a ShaderNode from an object.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a SplatCloud, a ShaderNode will be returned. Otherwise a NULL pointer is returned.

Definition at line 96 of file PluginFunctionsSplatCloud.cc.

◆ splineCurve()

OBJECTTYPEDLLEXPORT BSplineCurve * PluginFunctions::splineCurve ( BaseObjectData _object)

Get a Bspline curve from an object.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a BSpline , a spline will be returned. Otherwise a NULL pointer is returned.

Definition at line 89 of file PluginFunctionsBSplineCurve.cc.

◆ splineSurface()

OBJECTTYPEDLLEXPORT BSplineSurface * PluginFunctions::splineSurface ( BaseObjectData _object)

Get a Bspline Surface from an object.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a BSpline Surface , a spline surface will be returned. Otherwise a NULL pointer is returned.

Definition at line 91 of file PluginFunctionsBSplineSurface.cc.

◆ TARGET_OBJECTS()

const QStringList PluginFunctions::TARGET_OBJECTS ( "target"  )

Iterable object range.

Creates an iterator range suitable for iterating over objects using a C++11 range-based for loop.

Note
Usage:
for (auto& object : PluginFunctions::objectReferences(..., ...)) {
...
}

◆ tetrahedralMesh() [1/2]

OBJECTTYPEDLLEXPORT TetrahedralMesh * PluginFunctions::tetrahedralMesh ( BaseObjectData _object)

Get an TetrahedralMesh from an object.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a hexahedral mesh, a hexahedral mesh will be returned. Otherwise a NULL pointer is returned.

Definition at line 114 of file PluginFunctionsTetrahedralMesh.cc.

◆ tetrahedralMesh() [2/2]

OBJECTTYPEDLLEXPORT TetrahedralMesh * PluginFunctions::tetrahedralMesh ( int  _identifier)

Get a TetrahedralMesh from an object id.

Parameters
_identifierIdentifier of the object. If its a TetrahedralMesh mesh, the function will return the pointer to the mesh otherwise 0

Definition at line 123 of file PluginFunctionsTetrahedralMesh.cc.

◆ tetrahedralMeshObject() [1/2]

OBJECTTYPEDLLEXPORT TetrahedralMeshObject * PluginFunctions::tetrahedralMeshObject ( BaseObjectData _object)

Cast an BaseObject to an TetrahedralMeshObject if possible.

Parameters
_objectThe object should be of type BaseDataObject. If the content is an TetrahedralMesh, an TetrahedralMeshObject is returned. Otherwise a NULL pointer is returned.

Definition at line 133 of file PluginFunctionsTetrahedralMesh.cc.

◆ tetrahedralMeshObject() [2/2]

OBJECTTYPEDLLEXPORT TetrahedralMeshObject * PluginFunctions::tetrahedralMeshObject ( int  _identifier)

Cast an int to an TetrahedralMeshObject if possible.

Parameters
_identifier

Definition at line 140 of file PluginFunctionsTetrahedralMesh.cc.

◆ trackBallCenter()

DLLEXPORT const ACG::Vec3d PluginFunctions::trackBallCenter ( int  _viewer)

Get the trackball Center.

The scene is rotated around the trackball center when using the mouse

Parameters
_viewerId of the viewer to use. ALL_VIEWERS will set all viewers (Default) ACTIVE_VIEWER active viewer 0..3 Choose viewer explicitly

Definition at line 714 of file PluginFunctions.cc.

◆ translate()

DLLEXPORT void PluginFunctions::translate ( const ACG::Vec3d _vector,
int  _viewer = ALL_VIEWERS 
)

Translate viewer pos by given vector.

Translates the scene by a given vector. ( This is only a view transformation and does not effect the scene center. To really translate the scene, use setScenePos );

Parameters
_vectortranslation
_viewerId of the viewer to use. ALL_VIEWERS will set all viewers (Default) ACTIVE_VIEWER active viewer 0..3 Choose viewer explicitly

Definition at line 823 of file PluginFunctions.cc.

◆ traverse()

DLLEXPORT void PluginFunctions::traverse ( ACG::SceneGraph::MouseEventAction _action)

Execute Scenegraph traversal with action and use the last active examiner If you are reacting on a mouseEvent you should use this function as it will automatically set the right view

Definition at line 571 of file PluginFunctions.cc.

◆ triMesh() [1/2]

OBJECTTYPEDLLEXPORT TriMesh * PluginFunctions::triMesh ( BaseObjectData _object)

Get a triangle mesh from an object.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a triangle Mesh, a triangle mesh will be returned. Otherwise a NULL pointer is returned.

Definition at line 134 of file PluginFunctionsTriangleMesh.cc.

◆ triMesh() [2/2]

OBJECTTYPEDLLEXPORT TriMesh * PluginFunctions::triMesh ( int  _identifier)

Get a triangle mesh from an object id.

Parameters
_identifierIdentifier of the object. If its a triangle mesh, the function will return the pointer to the mesh otherwise 0

Definition at line 147 of file PluginFunctionsTriangleMesh.cc.

◆ triMeshObject() [1/2]

OBJECTTYPEDLLEXPORT TriMeshObject * PluginFunctions::triMeshObject ( BaseObjectData _object)

Cast an BaseObject to a TriMeshObject if possible.

Parameters
_objectThe object should be of type BaseDataObject. If the content is a triangle Mesh, a a TriMeshObject is returned. Otherwise a NULL pointer is returned.

Definition at line 156 of file PluginFunctionsTriangleMesh.cc.

◆ triMeshObject() [2/2]

OBJECTTYPEDLLEXPORT TriMeshObject * PluginFunctions::triMeshObject ( int  _objectId)

Get an TriMeshObject from the given id If possible.

Parameters
_objectIdId of the requested Object.
Returns
If the content is a volume, a pointer to the TriMeshObject is returned, otherwise a NULL pointer.

Definition at line 166 of file PluginFunctionsTriangleMesh.cc.

◆ upVector()

DLLEXPORT ACG::Vec3d PluginFunctions::upVector ( int  _viewer = ACTIVE_VIEWER)

Get the current up vector.

Parameters
_viewerId of the viewer to use. ACTIVE_VIEWER active viewer 0..3 Choose viewer explicitly

Definition at line 913 of file PluginFunctions.cc.

◆ viewAll()

DLLEXPORT void PluginFunctions::viewAll ( int  _viewer = ALL_VIEWERS)

View the whole scene.

Parameters
_viewerId of the viewer to use. ALL_VIEWERS will set all viewers (Default) ACTIVE_VIEWER active viewer 0..3 Choose viewer explicitly

Definition at line 863 of file PluginFunctions.cc.

◆ viewerId()

DLLEXPORT int PluginFunctions::viewerId ( )

Return unique viewer id.

This function returns a id which is unique to all running Openflippers on that machine. This id changes when you restart the viewer!

Definition at line 165 of file PluginFunctions.cc.

◆ viewerProperties()

DLLEXPORT Viewer::ViewerProperties & PluginFunctions::viewerProperties ( int  _id = ACTIVE_VIEWER)

Get the viewer properties Use this functions to get basic viewer properties such as backgroundcolor or rendering options.

Parameters
_idWhich viewer should be used? ACTIVE_VIEWER will get the properties of the active Viewer which is the default

Definition at line 611 of file PluginFunctions.cc.

◆ viewerSnapshot()

DLLEXPORT void PluginFunctions::viewerSnapshot ( int  _viewer,
QImage &  _image,
int  _width = 0,
int  _height = 0,
bool  _alpha = false,
bool  _hideCoordsys = false,
int  _samples = 1 
)

Take a snapshot of a viewer.

Take a snapshot of the current view

Parameters
_viewerViewer id
_imageAn image to store pixel data in
_widthImage width
_heightImage height
_alphaMake background transparent
_hideCoordsysHide coordsys node
_samplesNumber of samples (multisampling)

Definition at line 1069 of file PluginFunctions.cc.

◆ viewHome()

DLLEXPORT void PluginFunctions::viewHome ( int  _viewer = ALL_VIEWERS)

Go to home position.

Parameters
_viewerId of the viewer to use. ALL_VIEWERS will set all viewers (Default) ACTIVE_VIEWER active viewer 0..3 Choose viewer explicitly

Definition at line 851 of file PluginFunctions.cc.

◆ viewingDirection() [1/2]

DLLEXPORT void PluginFunctions::viewingDirection ( const ACG::Vec3d _dir,
const ACG::Vec3d _up,
int  _viewer = ACTIVE_VIEWER 
)

Set the viewing direction.

Parameters
_dirdirection
_upup vector
_viewerId of the viewer to use. ALL_VIEWERS will set all viewers (Default) ACTIVE_VIEWER active viewer 0..3 Choose viewer explicitly

Definition at line 689 of file PluginFunctions.cc.

◆ viewingDirection() [2/2]

DLLEXPORT ACG::Vec3d PluginFunctions::viewingDirection ( int  _viewer = ACTIVE_VIEWER)

Get the current viewing Direction.

Parameters
_viewerId of the viewer to use. ACTIVE_VIEWER active viewer 0..3 Choose viewer explicitly

Definition at line 875 of file PluginFunctions.cc.

◆ viewingRay() [1/2]

DLLEXPORT void PluginFunctions::viewingRay ( int  _x,
int  _y,
ACG::Vec3d _outOrigin,
ACG::Vec3d _outDirection 
)

Retrieve a viewing ray from the active examiner that can be used for raycasting.

Parameters
_xThe widgetspace x Coordinate
_yThe widgetspace y Coordinate
_outOriginA reference to the ACG::Vec3d that shall hold the origin of the viewing Ray in worldspace coordinates.
_outDirectionA reference to the ACG::Vec3d that shall hold the direction of the viewing Ray in worldspace (normalized)

Definition at line 466 of file PluginFunctions.cc.

◆ viewingRay() [2/2]

DLLEXPORT void PluginFunctions::viewingRay ( int  _x,
int  _y,
ACG::Vec3d _outOrigin,
ACG::Vec3d _outDirection,
int  _viewerIndex 
)

Retrieve a viewing ray from the specified examiner that can be used for raycasting.

Parameters
_xThe widgetspace x Coordinate
_yThe widgetspace y Coordinate
_outOriginA reference to the ACG::Vec3d that shall hold the origin of the viewing Ray in worldspace coordinates.
_outDirectionA reference to the ACG::Vec3d that shall hold the direction of the viewing Ray in worldspace (normalized)
_viewerIndexThe index to specify an examiner that shall be used

Definition at line 473 of file PluginFunctions.cc.

Variable Documentation

◆ ALL_OBJECTS

const QStringList PluginFunctions::ALL_OBJECTS

Iterable object range.

Creates an iterator range suitable for iterating over objects using a C++11 range-based for loop.

Note
Usage:
for (auto& object : PluginFunctions::objectReferences(..., ...)) {
...
}

Definition at line 430 of file PluginFunctions.hh.