Make draw plane selection for curves be unrelated to 3d Track (somewhat related to #2825).

* Makes more sense user wise and makes for better code.
* Helps refactor code to relate grids to curves so the curves can have access to the grid
   it is being drawn on.
* This will help fix #2825 by being able to project curve points onto the exact triangle geometry.
This commit is contained in:
Gaute Lindkvist
2018-04-30 09:22:59 +02:00
parent 7307b97466
commit 1f44ea1ea3
14 changed files with 153 additions and 216 deletions

View File

@@ -43,9 +43,11 @@ public:
enum DrawPlane
{
VERTICAL_ABOVE,
VERTICAL_BELOW,
VERTICAL_CENTER,
VERTICAL_BELOW,
HORIZONTAL_LEFT,
HORIZONTAL_RIGHT
HORIZONTAL_CENTER,
HORIZONTAL_RIGHT
};
typedef caf::AppEnum<DrawPlane> DrawPlaneEnum;
public:
@@ -56,7 +58,10 @@ public:
virtual QString name() const = 0;
virtual QString resultPropertyString() const = 0;
DrawPlane drawPlane() const;
double drawPlaneAngle() const;
cvf::Color3f color() const;
bool isShowingCurve() const;
@@ -79,7 +84,6 @@ protected:
virtual caf::PdmFieldHandle* objectToggleField() override;
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
void configurationUiOrdering(caf::PdmUiOrdering& uiOrdering);
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override;
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute);
virtual void initAfterRead();
private: