Fixed potential memory leak

Replaced GLRenderer::m_width and GLRenderer::m_height with width() and height() calls.

Moved more business logic out of GLRenderer into Canvas. GLRenderer::pick(const QRange&) now returns a set of LDObjects without modifying them. Replaced the GLRenderer::pick(int, int) overload with GLRenderer::pickOneObject.

Made GLRenderer's Model pointer const

Moved more editing-related methods to Canvas.

Removed the unneeded makeCurrent overload

Moved more methods only used by canvas code from GLRenderer to Canvas. Thin border pen is now a static constant.

Moved triangle count rendering to Canvas

Moved document editing methods from GLRenderer to Canvas

Created a new GLRenderer derivative class "Canvas" and made MainWindow use it

Cleaned up code in LDDocument and removed unnecessary flags and methods. Flags turned into bools.

Removed some unused code

Removed all overlay support. It's a messy pile of mess and I will reimplement it later as background images and it will be much better then.

GLRenderer no longer exposes the model pointer.

LDGLData merged into GLRenderer since it only deals with one document now. GLRenderer generalised from rendering documents to models.

Made a new renderer be created for each document, instead of reusing the same renderer for all documents.

Simplified GLRenderer::convert3dTo2d. The multiplication with the modelview matrix is not necessary, it's identity all the time... with that, I think the function makes much more sense now.

- Use a QGenericMatrix to store the matrix, instead of a C array

Changed from GLdouble to GLfloat. Apparently the performance difference is greater on the GPU..? It doesn't really matter but let's be consistent.

GLRenderer::clampAngle is no longer used as of the previous commit so we can do away with it.

Switched from euler angle rotation to matrix rotation. Gimbal lock is now broken.

Wrote documentation to the Model class.

The current document pointer may no longer be null.

minor amendment

Reworked and cleaned up the circle mode

Some code cleanup in abstract editing modes.

Removed some unnecessary #include-directives.

Removed the status bar, since it's not used for anything

Split object list representation into virtual methods

Removed LDDocument::getObjectCount (superceded by Model::size)

The "all objects have valid models" invariant seems to be holding up now. At least basic drawing works again.

Made all LDObject constructors protected. Emplacement is now the only way to create objects.

Removed the LDSpawn function and replaced its last use cases.

More rework on model stuff, removals of LDSpawn calls. Most importantly, the LDraw code parsing function was moved to Model.

Removed uses of LDSpawn in the algorithm toolset

Replaced uses of LDSpawn with the Model class in edit modes

Removed dead code that's standing in the way of refactoring

Removed the AddObjectDialog. Garbage code that absolutely needs to be reimplemented.

Made the quad→triangles use emplacement. However, now it crashes because of problems in the underlying system (the LDObject constructor shouldn't do anything in regard to the model!)

Major overhaul of object→document relationship: added the Model class which models the object buffer. Each object is to be included in a model (an invariant that currently does not hold). A document is a subclass of a model. The LDObject is also now agnostic about selection, and the selection is now a set. A lot of things are probably broken now but it's a major step forward.

Happy new year 2017!

Matrices are now input with 9 spinboxes instead of a MLCad-style line edit

Moved the identity matrix constant into Matrix's namespace

Removed the dangerous C-array constructor from the matrix - no need for it anyway since the matrix already is an array of doubles.

Reworked the Matrix interface so that less index math is involved

Fixed formatFileSize

Refactor roundToDecimals and formatFileSize

Actually, let's call it countof(). Makes more sense.

Replaced '.length()' with 'length()' where appropriate

Replaced uses of 'x.size()' with 'length(x)'

refactor: added the length() function that's like Python's len()

refactor

Display error string if unable to write a crash log.

Made DEFINE_FLAG_ACCESS_METHODS a function macro

Cleaned up crash catcher, fixed missing <math.h> include

Fixed additive range selection not working properly.

Cleanup in GL renderer...

Cleaned up PrimitiveScanner

Further cleanup

Refactor primitives

Refactor FileToolset

Moved the about dialog into the file toolset and removed the mail button (the forums are better for this anyway)

Removed the 'once' macro since it's not used

Removed the USE_QT5 macro now that we're Qt5 only.

Change "m_" prefix to "_" in members of PartDownloader

Changed QList to QVector in PartDownloader

Cleanup PartDownloader

Unabbreviate "transform" to "transformationMatrix"

Cleanup colors.cpp/.h

Refactor GuiUtilities

Some cleanup

Draw line lengths to 2 decimal points only.

Dropped Qt 4 support. We're Qt 5 only now.

Fixed compilation.

Added doxygen.ini

Moved matrix into new source/header pair in types/

Replaced the ugly for_enum macro with a generator class

Further improved enum handling

Enum stuff

- Refactoring...

Unabbreviated overlay member names

removed removeDuplicates in favor of QSet, and the unused ObjectList class

Fixed circle mode not building the circle anymore

Removed unneeded includes from main.cpp

Moved PreferredLicenseText into HierarchyElement and made the config pointer be passed to LDPaths. Now I can finally remove the Config global pointer.

Moved LDObject::moveObjects into MoveToolset

Rename Pi to lowercase pi

Renamed ldObjectMath.cpp/.h to mathfunctions.cpp/.h

Moved rotation point handling to ldObjectMath.cpp and encapsulated it into new class MathFunctions

Split grid stuff into a new class Grid in grid.cpp/grid.h

Use a better gcd algorithm, some style fixes

Replaced GetRecursiveFilenames with QDirIterator

Reformatted primitives.cpp

Split PrimitivePrompt into its new source files, renamed it to GeneratePrimitivePrompt

Transformed primitive management into a new class PrimitiveManager that is a member of MainWindow

Renamed ConfigurationValueBag to Configuration and added a pointer to it into HierarchyElement. This helps with the fight against global variables.

Fixed line length warnings

Added triangle count to viewport, added compile-time line length check

Happy new year 2016!

Cleanup miscallenous.cpp/.h

It worx again!

Rename LDSubfile to LDSubfileReference

A bit more cleanup. Finally removed the PROPERTY macro. (now let's see about making a new one sometime that isn't so terrible?)

Fix rectangle mode for real

Fixed circle, rectangle and line path modes not working anymore. Add blip coordinates to curve and line path modes. Circle mode for now only can show the coordinates of the initial blip

Branch close

Copyright header fix, some minor stuff

Subject Bézier curve fineness to the grid. By default, the coarse grid uses 8 segments, medium 16 and fine 32. Moved rasterization from demoting to inlining, it feels more sensible for it to be there.

Bézier curves now render in 3D

Bézier curves are now parsed correctly

Bézier curves may now be serialized down using the "Demote" function. I need to rename that now.

Added some pretty pics that I left out of the previous commit.

(0) -1000 -112 +112 tip

mercurial