Developer Documentation
|
Public Slots | |
Scripting Functions | |
QString | version () |
Signals | |
void | updateView () |
void | updatedObject (int, const UpdateType &) |
void | setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions) |
void | addEmptyObject (DataType _type, int &_id) |
void | copyObject (int _oldId, int &_newId) |
void | deleteObject (int _id) |
void | addToolbar (QToolBar *_toolbar) |
void | getToolBar (QString _name, QToolBar *&_toolbar) |
void | defineViewMode (QString _mode, QStringList _usedWidgets) |
void | registerKey (int _key, Qt::KeyboardModifiers _modifiers, QString _description, bool _multiUse=false) |
void | addPickMode (const std::string &_mode) |
void | scriptInfo (QString _functionName) |
void | log (Logtype _type, QString _message) |
void | log (QString _message) |
![]() | |
virtual void | updateView () |
Update current view in Main Application. More... | |
virtual void | setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions) |
Set a description for a public slot. More... | |
virtual void | setRenderer (unsigned int _viewer, QString _rendererName) |
Set a renderer for the given viewer. More... | |
![]() | |
virtual void | registerKey (int _key, Qt::KeyboardModifiers _modifiers, QString _description, bool _multiUse=false) |
Register a key-combination for your plugin. More... | |
![]() | |
virtual void | addPickMode (const std::string &_mode) |
Add a new picking mode to the examiner. More... | |
![]() | |
virtual void | log (Logtype _type, QString _message)=0 |
virtual void | log (QString _message)=0 |
![]() | |
virtual void | addToolbar (QToolBar *_toolbar) |
Adds a Toolbar to the main widget. More... | |
![]() | |
virtual void | scriptInfo (QString _functionWithParameters) |
Emit this signal if a scriptable function is executed. More... | |
virtual void | getScriptingEngine (QScriptEngine *&_engine) |
virtual void | executeFileScript (QString _filename) |
virtual void | getAvailableFunctions (QStringList &_functions) |
![]() | |
virtual void | save (int _id, QString _filename) |
Save object to a file. More... | |
virtual void | load (QString _filename, DataType _type, int &_id) |
Load object from file with a specific DataType. More... | |
Public Member Functions | |
PlanePlugin () | |
Constructor. More... | |
void | exit () |
QString | name () |
Return a name for the plugin. More... | |
QString | description () |
Return a description of what the plugin is doing. More... | |
Template Functions | |
template<class MeshT > | |
std::vector< ACG::Vec3d > | getIntersectionPoints (MeshT *_mesh, uint _fh, ACG::Vec3d _planeNormal, ACG::Vec3d _planePoint, bool &_closed) |
get the points from the intersection between mesh and plane More... | |
template<class MeshT > | |
MeshT::EdgeHandle | getCuttedEdge (MeshT &_mesh, ACG::Vec3d &_planeNormal, ACG::Vec3d &_planePoint) |
get an edge of the mesh that is cut by the plane More... | |
Private Slots | |
void | initializePlugin () |
Initialize the plugin. More... | |
void | pluginsInitialized () |
Second initialization phase. More... | |
void | slotPickModeChanged (const std::string &_mode) |
the pickMode changed More... | |
void | slotMouseEvent (QMouseEvent *_event) |
a mouse event occured More... | |
void | slotKeyEvent (QKeyEvent *_event) |
a key event occured More... | |
void | slotKeyReleaseEvent (QKeyEvent *_event) |
a keyRelease event occured More... | |
bool | getIntersectionParams (BaseObjectData &_obj, ACG::Vec3d &_center, double &_radius) |
![]() | |
virtual void | exit () |
virtual QString | version () |
Return a version string for your plugin. More... | |
![]() | |
virtual void | slotKeyEvent (QKeyEvent *_event) |
Key Event from Main App. More... | |
Private Member Functions | |
void | setDescriptions () |
set scripting slot descriptions More... | |
![]() | |
virtual void | noguiSupported () |
virtual | ~BaseInterface () |
Destructor. More... | |
virtual void | blockScenegraphUpdates (bool _block) |
Tell the core to prevent scenegraph updates. More... | |
virtual void | updatedObject (int _objectId) |
An object has been changed or added by this plugin. More... | |
virtual void | updatedObject (int _identifier, const UpdateType &_type) |
An object has been changed or added by this plugin. More... | |
virtual void | nodeVisibilityChanged (int _identifier) |
A scenegraph node has been shown or hidden. More... | |
virtual void | getCurrentRenderer (unsigned int _viewer, QString &_rendererName) |
Get the current renderer for the given viewer. More... | |
![]() | |
virtual | ~MouseInterface () |
Destructor. More... | |
![]() | |
virtual void | slotKeyReleaseEvent (QKeyEvent *_event) |
Key Release Event from Main App. More... | |
virtual | ~KeyInterface () |
Destructor. More... | |
![]() | |
virtual void | addHiddenPickMode (const std::string &_mode) |
Add a new picking mode to the examiner which will be invisible. More... | |
virtual void | setPickModeCursor (const std::string &_mode, QCursor _cursor) |
Set the cursor of the given PickMode. More... | |
virtual void | setPickModeMouseTracking (const std::string &_mode, bool _mouseTracking) |
Set mouse tracking for the given PickMode. More... | |
virtual void | setPickModeToolbar (const std::string &_mode, QToolBar *_toolbar) |
Set the additional toolbar of the given PickMode. More... | |
virtual void | removePickModeToolbar (const std::string &_mode) |
Removes the additional toolbar of the given PickMode. More... | |
virtual | ~PickingInterface () |
Destructor. More... | |
![]() | |
virtual | ~LoggingInterface () |
Destructor. More... | |
![]() | |
virtual | ~ToolbarInterface () |
Destructor. More... | |
virtual void | removeToolbar (QToolBar *_toolbar) |
Remove a Toolbar from the main widget. More... | |
virtual void | getToolBar (QString _name, QToolBar *&_toolbar) |
Get a pointer to a Toolbar of the given name or 0 if it does not exist. More... | |
![]() | |
virtual | ~ScriptInterface () |
Destructor. More... | |
virtual void | showScriptInEditor (QString _filename) |
virtual void | executeScript (QString _script) |
virtual void | getDescription (QString _function, QString &_description, QStringList &_parameters, QStringList &_descriptions) |
![]() | |
virtual | ~LoadSaveInterface () |
Destructor. More... | |
virtual void | addEmptyObject (DataType _type, int &_id) |
virtual void | copyObject (int _oldId, int &_newId) |
virtual void | emptyObjectAdded (int _id) |
DEPRECATED HERE (Moved to Type Interface)! Emit this signal if an empty object has been created. More... | |
virtual void | deleteObject (int _id) |
Delete an object This signal can be called from any thread. . More... | |
virtual void | deleteAllObjects () |
Delete all Objects. More... | |
virtual void | getAllFileFilters (QStringList &_filters) |
Get all file filters that are registered. More... | |
GUI Related | |
QtPlaneSelect * | createPlane_ |
additional information More... | |
QAction * | planeNodeAction_ |
additional information More... | |
bool | dragging_ = false |
additional information More... | |
bool | ortho_ = false |
additional information More... | |
int | pickedCorner_ |
additional information More... | |
ACG::Vec3d | wMouseDownPosition_ {.0} |
additional information More... | |
ACG::Vec3d | wCurrMousePos_ {.0} |
additional information More... | |
ACG::Vec3d | viewCoord_ {.0} |
additional information More... | |
ACG::Vec3d | viewDirection_ {.0} |
additional information More... | |
PlaneObject * | curPlane_ = nullptr |
additional information More... | |
Plane | origPlane_ |
additional information More... | |
int | lastObjId_ = -1 |
additional information More... | |
void | slotCreatePlaneNode () |
Plane Node Button. More... | |
void | slotCreatePlaneTriggered () |
Create a plane node when position/normal have been drawn. More... | |
Definition at line 60 of file PlanePlugin.hh.
PlanePlugin::PlanePlugin | ( | ) |
Constructor.
Definition at line 59 of file PlanePlugin.cc.
|
inline |
Definition at line 135 of file PlanePlugin.hh.
|
inlinevirtual |
Return a description of what the plugin is doing.
This function has to return a basic description of the plugin
Implements BaseInterface.
Definition at line 140 of file PlanePlugin.hh.
|
inlinevirtual |
This function is called when the application exits or when your plugin is about to be unloaded. Here you can clean up your plugin, delete local variables...
Reimplemented from BaseInterface.
Definition at line 137 of file PlanePlugin.hh.
MeshT::EdgeHandle PlanePlugin::getCuttedEdge | ( | MeshT & | _mesh, |
ACG::Vec3d & | _planeNormal, | ||
ACG::Vec3d & | _planePoint | ||
) |
get an edge of the mesh that is cut by the plane
_mesh | the mesh |
_planeNormal | normal of the cut plane |
_planePoint | point on the cut plane |
Definition at line 191 of file PlanePluginT_impl.hh.
|
privateslot |
Definition at line 485 of file PlanePlugin.cc.
std::vector< ACG::Vec3d > PlanePlugin::getIntersectionPoints | ( | MeshT * | _mesh, |
uint | _fh, | ||
ACG::Vec3d | _planeNormal, | ||
ACG::Vec3d | _planePoint, | ||
bool & | _closed | ||
) |
get the points from the intersection between mesh and plane
_mesh | the mesh |
_fh | a starting face that is intersected |
_planeNormal | normal of the cut plane |
_planePoint | point on the cut plane |
_closed | TODO find out what its good for |
Definition at line 67 of file PlanePluginT_impl.hh.
|
privateslot |
Initialize the plugin.
Definition at line 73 of file PlanePlugin.cc.
|
inlinevirtual |
Return a name for the plugin.
This Function has to return the name of the plugin.
Implements BaseInterface.
Definition at line 139 of file PlanePlugin.hh.
|
privateslot |
Second initialization phase.
Definition at line 86 of file PlanePlugin.cc.
|
private |
set scripting slot descriptions
Definition at line 44 of file PlanePluginScripting.cc.
|
privateslot |
Plane Node Button.
Definition at line 427 of file PlanePlugin.cc.
|
privateslot |
Create a plane node when position/normal have been drawn.
Definition at line 434 of file PlanePlugin.cc.
|
privateslot |
a key event occured
_event | the event that occured |
enable moving plane orthogonally
Definition at line 135 of file PlanePlugin.cc.
|
privateslot |
a keyRelease event occured
_event | the event that occured |
disable moving plane orthogonally
Definition at line 148 of file PlanePlugin.cc.
|
privateslot |
a mouse event occured
_event | the event that occured |
only works in constrained cases
modification of triangleIntersection
we don't really care about legal barycentric coordinates, however if you really want to know if you are inside the defining triangle, there you go
obtain the ray for intersecting with the quad/plane
compute intersection
matrix to transform points from image plane to curPlane_
get the world position of the projected cursor by intersecting plane equation with ray
view coords in worldspace, with flipped y-axis
init to -PI in order to verify if the values have been set or not
we can assume that most of the time, there wont be an intersection. but as we only check one half of the triangle, the other will always be outside
we dont really care about the result here
this is wrong. it has to be the exakt corner location, otherwise the scaling will be off
relative to plane
update vector in worldspace
We are actually dragging a corner
scale by half updates length
turns out this is just fine
we are just dragging the plane along (also happens when scaling, dont worry)
if we move along normal direction updates are calculated in screen space. makes it easier to position the plane precisely in close range
same as above, however we move according to the actual click position not the next corner
overwrite plane
signal for updates
Definition at line 166 of file PlanePlugin.cc.
|
privateslot |
the pickMode changed
_mode | the new pickMode |
Definition at line 123 of file PlanePlugin.cc.
|
inlineslot |
Definition at line 206 of file PlanePlugin.hh.
|
private |
additional information
Definition at line 175 of file PlanePlugin.hh.
|
private |
additional information
Definition at line 193 of file PlanePlugin.hh.
|
private |
additional information
Definition at line 181 of file PlanePlugin.hh.
|
private |
additional information
Definition at line 197 of file PlanePlugin.hh.
|
private |
additional information
Definition at line 195 of file PlanePlugin.hh.
|
private |
additional information
Definition at line 182 of file PlanePlugin.hh.
|
private |
additional information
Definition at line 185 of file PlanePlugin.hh.
|
private |
additional information
Definition at line 177 of file PlanePlugin.hh.
|
private |
additional information
Definition at line 190 of file PlanePlugin.hh.
|
private |
additional information
Definition at line 191 of file PlanePlugin.hh.
|
private |
additional information
Definition at line 189 of file PlanePlugin.hh.
|
private |
additional information
Definition at line 188 of file PlanePlugin.hh.