Commit 680e2a4b authored by Jan Möbius's avatar Jan Möbius
Browse files

Removed extra typedefs

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@13383 383ad7c9-94d9-4d36-a494-682f7c89f535
parent f008f01a
......@@ -166,21 +166,21 @@ void QtPlaneSelect::slotMouseEvent(QMouseEvent* event)
{
if( isDragging )
{
Vec3d source2D = glState.project( sourcePoint3D );
Vec3d target2D(event->pos().x(), height-event->pos().y()-1, 0);
ACG::Vec3d source2D = glState.project( sourcePoint3D );
ACG::Vec3d target2D(event->pos().x(), height-event->pos().y()-1, 0);
source2D[2] = 0;
Vec3d diff = source2D - target2D;
ACG::Vec3d diff = source2D - target2D;
//diff.normalize( ); <- this is bad
Vec3d ortho(-diff[1], diff[0], 0 );
ACG::Vec3d ortho(-diff[1], diff[0], 0 );
Vec3d left = glState.unproject( source2D+ortho*10+Vec3d(0,0,0) );
Vec3d right= glState.unproject( source2D-ortho*10+Vec3d(0,0,0) );
ACG::Vec3d left = glState.unproject( source2D+ortho*10+ACG::Vec3d(0,0,0) );
ACG::Vec3d right= glState.unproject( source2D-ortho*10+ACG::Vec3d(0,0,0) );
Vec3d leftvec = left-sourcePoint3D;
ACG::Vec3d leftvec = left-sourcePoint3D;
leftvec.normalize( );
Vec3d rightvec = right-sourcePoint3D;
ACG::Vec3d rightvec = right-sourcePoint3D;
rightvec.normalize( );
normal = cross( rightvec, leftvec );
......
......@@ -61,10 +61,6 @@ class DLLEXPORT QtPlaneSelect : public QObject
{
Q_OBJECT
typedef ACG::Vec2i Vec2i;
typedef ACG::Vec2f Vec2f;
typedef ACG::Vec3d Vec3d;
/*******************************************************************************
Initialization and deinitialization
*******************************************************************************/
......@@ -100,8 +96,8 @@ class DLLEXPORT QtPlaneSelect : public QObject
Public accessors.
*******************************************************************************/
public:
Vec3d getNormal( ) { return normal; }
Vec3d getSourcePoint( ) { return sourcePoint3D; }
ACG::Vec3d getNormal( ) { return normal; }
ACG::Vec3d getSourcePoint( ) { return sourcePoint3D; }
unsigned int getNode() { return nodeIdx_; };
unsigned int getTargetIndex() { return targetIdx_; };
......@@ -111,8 +107,8 @@ class DLLEXPORT QtPlaneSelect : public QObject
*******************************************************************************/
protected:
ACG::GLState& glState;
Vec3d sourcePoint3D;
Vec3d normal;
ACG::Vec3d sourcePoint3D;
ACG::Vec3d normal;
unsigned int nodeIdx_;
unsigned int targetIdx_;
bool isDragging;
......
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