Wed, 20 Mar 2013 03:22:21 +0200
Removed vectors. I realized that subfiles can actually perform their job just as well and that keeping them around would just imply extra work - for nothing.
gui.cpp | file | annotate | diff | comparison | revisions | |
gui.h | file | annotate | diff | comparison | revisions | |
icons/add-vector.png | file | annotate | diff | comparison | revisions | |
icons/vector.png | file | annotate | diff | comparison | revisions | |
ldtypes.cpp | file | annotate | diff | comparison | revisions | |
ldtypes.h | file | annotate | diff | comparison | revisions |
--- a/gui.cpp Wed Mar 20 02:44:21 2013 +0200 +++ b/gui.cpp Wed Mar 20 03:22:21 2013 +0200 @@ -98,9 +98,8 @@ MAKE_ACTION (newLine, "New Line", "add-line", "Creates a new line.") MAKE_ACTION (newTriangle, "New Triangle", "add-triangle", "Creates a new triangle.") MAKE_ACTION (newQuad, sNewQuadText, "add-quad", "Creates a new quadrilateral.") - MAKE_ACTION (newCondLine, sNewCdLineText, "add-condline", "Creates a new conditional line."); - MAKE_ACTION (newComment, "New Comment", "add-comment", "Creates a new comment."); - MAKE_ACTION (newVector, "New Vector", "add-vector", "Creates a new vector.") + MAKE_ACTION (newCondLine, sNewCdLineText, "add-condline", "Creates a new conditional line.") + MAKE_ACTION (newComment, "New Comment", "add-comment", "Creates a new comment.") MAKE_ACTION (newVertex, "New Vertex", "add-vertex", "Creates a new vertex.") MAKE_ACTION (settings, "Settings", "settings", "Edit the settings of " APPNAME_DISPLAY ".") @@ -122,7 +121,6 @@ // things not implemented yet QAction* qaDisabledActions[] = { qAct_newSubfile, - qAct_newVector, qAct_cut, qAct_copy, qAct_paste, @@ -158,7 +156,6 @@ qInsertMenu->addAction (qAct_newQuad); // New Quad qInsertMenu->addAction (qAct_newCondLine); // New Conditional Line qInsertMenu->addAction (qAct_newComment); // New Comment - qInsertMenu->addAction (qAct_newVector); // New Vector qInsertMenu->addAction (qAct_newVertex); // New Vertex qEditMenu = menuBar ()->addMenu (tr ("&Edit")); @@ -196,7 +193,6 @@ qInsertToolBar->addAction (qAct_newQuad); qInsertToolBar->addAction (qAct_newCondLine); qInsertToolBar->addAction (qAct_newComment); - qInsertToolBar->addAction (qAct_newVector); qInsertToolBar->addAction (qAct_newVertex); addToolBar (qInsertToolBar); @@ -325,10 +321,6 @@ } -void ForgeWindow::slot_newVector () { - -} - void ForgeWindow::slot_newVertex () { AddObjectDialog::staticDialog (OBJ_Vertex, this); } @@ -469,10 +461,6 @@ static_cast<LDGibberish*> (obj)->zContents.chars()); break; - case OBJ_Vector: - zText.format ("%s", static_cast<LDVector*> (obj)->vPos.getStringRep (true).chars()); - break; - case OBJ_Vertex: zText.format ("%s", static_cast<LDVertex*> (obj)->vPosition.getStringRep (true).chars()); break;
--- a/gui.h Wed Mar 20 02:44:21 2013 +0200 +++ b/gui.h Wed Mar 20 03:22:21 2013 +0200 @@ -58,7 +58,7 @@ QAction* qAct_new, *qAct_open, *qAct_save, *qAct_saveAs, *qAct_exit; QAction* qAct_cut, *qAct_copy, *qAct_paste; QAction* qAct_newSubfile, *qAct_newLine, *qAct_newTriangle, *qAct_newQuad; - QAction* qAct_newCondLine, *qAct_newComment, *qAct_newVector, *qAct_newVertex; + QAction* qAct_newCondLine, *qAct_newComment, *qAct_newVertex; QAction* qAct_splitQuads, *qAct_setContents, *qAct_inline; QAction* qAct_settings; QAction* qAct_help, *qAct_about, *qAct_aboutQt; @@ -91,7 +91,6 @@ void slot_newQuad (); void slot_newCondLine (); void slot_newComment (); - void slot_newVector (); void slot_newVertex (); void slot_inline ();
--- a/ldtypes.cpp Wed Mar 20 02:44:21 2013 +0200 +++ b/ldtypes.cpp Wed Mar 20 03:22:21 2013 +0200 @@ -31,7 +31,6 @@ "triangle", "quadrilateral", "condline", - "vector", "vertex", }; @@ -45,7 +44,6 @@ "triangle", "quad", "condline", - "vector", "vertex" }; @@ -100,10 +98,6 @@ commonInit (); } -LDVector::LDVector () { - commonInit (); -} - LDVertex::LDVertex () { commonInit (); } @@ -177,10 +171,6 @@ return zContents; } -str LDVector::getContents () { - return str::mkfmt ("0 !LDFORGE VECTOR"); // TODO -} - str LDVertex::getContents () { return str::mkfmt ("0 !LDFORGE VERTEX %d %s", dColor, vPosition.getStringRep (false).chars()); } @@ -253,5 +243,4 @@ LDQuad::~LDQuad () {} LDSubfile::~LDSubfile () {} LDTriangle::~LDTriangle () {} -LDVector::~LDVector () {} LDVertex::~LDVertex () {} \ No newline at end of file
--- a/ldtypes.h Wed Mar 20 02:44:21 2013 +0200 +++ b/ldtypes.h Wed Mar 20 03:22:21 2013 +0200 @@ -46,7 +46,6 @@ OBJ_Triangle, // Object represents a triangle (LDTriangle, code: 3) OBJ_Quad, // Object represents a quadrilateral (LDQuad, code: 4) OBJ_CondLine, // Object represents a conditional line (LDCondLine, code: 5) - OBJ_Vector, // Object is a vector, LDForge extension object (LDVector) OBJ_Vertex // Object is a vertex, LDForge extension object (LDVertex) }; @@ -213,28 +212,6 @@ }; // ============================================================================= -// LDVector -// -// The vector is a LDForge-specific extension. It is essentially a line with an -// alternative definition. Instead of being defined with two vertices, the vector -// is defined with a single vertex, a length and a bearing. This makes it useful -// for dealing with lines positioned on arbitrary angles without fear of precision -// loss of vertex coordinates. A vector can be transformed into a line and vice -// versa. Vectors are not a part of official LDraw standard and should be -// converted to lines for finished parts. -// -// TODO: should a conditional vector be considered? -// ============================================================================= -class LDVector : public LDObject { -public: - IMPLEMENT_LDTYPE (Vector) - - vertex vPos; - bearing gAngle3D; - unsigned long ulLength; -}; - -// ============================================================================= // LDVertex // // The vertex is another LDForce-specific extension. It represents a single