Commit 687feafe authored by Martin Schultz's avatar Martin Schultz

moved the viewingRay function to a more appropriate header

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@20559 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 9bf56dfe
......@@ -459,14 +459,14 @@ ACG::SceneGraph::DrawModes::DrawMode drawMode( int _viewer ) {
}
//get a viewing ray for the active examiner x and y are in widgetspace
void getViewingRay(int _x, int _y,
void viewingRay(int _x, int _y,
ACG::Vec3d& _outOrigin, ACG::Vec3d& _outDirection)
{
getViewingRay(_x,_y,_outOrigin,_outDirection,activeExaminer_);
viewingRay(_x,_y,_outOrigin,_outDirection,activeExaminer_);
}
//get a viewing ray for the specified examiner x and y are in widgetspace
void getViewingRay(int _x, int _y,
void viewingRay(int _x, int _y,
ACG::Vec3d& _outOrigin, ACG::Vec3d& _outDirection, int _viewerIndex)
{
viewerProperties(_viewerIndex).glState().viewing_ray(_x,_y,_outOrigin,_outDirection);
......@@ -514,7 +514,7 @@ bool scenegraphPick( const unsigned int _examiner ,
ACG::Vec3d mousePoint3d;
ACG::Vec3d direction;
getViewingRay(x,y,mousePoint3d,direction);
viewingRay(x,y,mousePoint3d,direction);
*_hitPointPtr = _object->refinePick(_pickTarget,*_hitPointPtr, mousePoint3d , direction , _targetIdx );
......
......@@ -237,33 +237,6 @@ void setEncodedExaminerView(int _viewerId , QString _view );
DLLEXPORT
void setSceneCenter(const ACG::Vec3d& _center, int _viewer );
/** \brief Retrieve a viewing ray from the active examiner that can be used for raycasting.
*
* @param _x The widgetspace x Coordinate
* @param _y The widgetspace y Coordinate
* @param _outOrigin A reference to the ACG::Vec3d that shall hold the origin
* of the viewing Ray in worldspace coordinates.
* @param _outDirection A reference to the ACG::Vec3d that shall hold the direction
* of the viewing Ray in worldspace (normalized)
**/
DLLEXPORT
void getViewingRay(int _x, int _y,
ACG::Vec3d& _outOrigin, ACG::Vec3d& _outDirection);
/** \brief Retrieve a viewing ray from the specified examiner that can be used for raycasting.
*
* @param _x The widgetspace x Coordinate
* @param _y The widgetspace y Coordinate
* @param _outOrigin A reference to the ACG::Vec3d that shall hold the origin
* of the viewing Ray in worldspace coordinates.
* @param _outDirection A reference to the ACG::Vec3d that shall hold the direction
* of the viewing Ray in worldspace (normalized)
* @param _viewerIndex The index to specify an examiner that shall be used
**/
DLLEXPORT
void getViewingRay(int _x, int _y,
ACG::Vec3d& _outOrigin, ACG::Vec3d& _outDirection, int _viewerIndex);
/** \brief Execute picking operation on scenegraph
*
* This picking function will pick in the last active examiner context which is automatically
......@@ -279,7 +252,6 @@ bool scenegraphPick( ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mou
DLLEXPORT
bool scenegraphPick( const unsigned int _examiner ,ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, unsigned int &_nodeIdx, unsigned int &_targetIdx, ACG::Vec3d *_hitPointPtr );
/** \brief Execute picking operation on scenegraph and return object
*
* This picking function will pick in the specified examiner context and
......
......@@ -141,6 +141,33 @@ void setMainGLContext();
DLLEXPORT
void viewingDirection(const ACG::Vec3d &_dir, const ACG::Vec3d &_up , int _viewer = ACTIVE_VIEWER);
/** \brief Retrieve a viewing ray from the active examiner that can be used for raycasting.
*
* @param _x The widgetspace x Coordinate
* @param _y The widgetspace y Coordinate
* @param _outOrigin A reference to the ACG::Vec3d that shall hold the origin
* of the viewing Ray in worldspace coordinates.
* @param _outDirection A reference to the ACG::Vec3d that shall hold the direction
* of the viewing Ray in worldspace (normalized)
**/
DLLEXPORT
void viewingRay(int _x, int _y,
ACG::Vec3d& _outOrigin, ACG::Vec3d& _outDirection);
/** \brief Retrieve a viewing ray from the specified examiner that can be used for raycasting.
*
* @param _x The widgetspace x Coordinate
* @param _y The widgetspace y Coordinate
* @param _outOrigin A reference to the ACG::Vec3d that shall hold the origin
* of the viewing Ray in worldspace coordinates.
* @param _outDirection A reference to the ACG::Vec3d that shall hold the direction
* of the viewing Ray in worldspace (normalized)
* @param _viewerIndex The index to specify an examiner that shall be used
**/
DLLEXPORT
void viewingRay(int _x, int _y,
ACG::Vec3d& _outOrigin, ACG::Vec3d& _outDirection, int _viewerIndex);
/** \brief Set the look at transformation directly
* @param _eye eye point
* @param _center center point
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment