Profile editor for the meshRoad object

credit to Ryan Mounts (RDM)

found originally at http://www.garagegames.com/community/forums/viewthread/105391
This commit is contained in:
Lukas Aldershaab 2020-10-04 00:19:36 +02:00
parent 76c5e30869
commit 973fd44c6a
12 changed files with 2501 additions and 201 deletions

View file

@ -117,6 +117,7 @@ class GuiMeshRoadEditorCtrl : public EditTSCtrl
};
S32 _getNodeAtScreenPos( const MeshRoad *pRoad, const Point2I &posi );
S32 _getProfileNodeAtScreenPos( MeshRoadProfile *pProfile, const Point2I &posi);
void _drawSpline( MeshRoad *road, const ColorI &color );
void _drawControlNodes( MeshRoad *road, const ColorI &color );
@ -128,9 +129,14 @@ class GuiMeshRoadEditorCtrl : public EditTSCtrl
bool mSavedDrag;
bool mIsDirty;
bool mSavedProfileDrag;
bool mDeselectProfileNode;
SimSet *mRoadSet;
S32 mSelNode;
S32 mHoverNode;
S32 mProfileNode;
Vector<U32> mSelProfNodeList;
U32 mAddNodeIdx;
SimObjectPtr<MeshRoad> mSelRoad;
SimObjectPtr<MeshRoad> mHoverRoad;
@ -146,6 +152,7 @@ class GuiMeshRoadEditorCtrl : public EditTSCtrl
ColorI mHoverSplineColor;
ColorI mSelectedSplineColor;
ColorI mHoverNodeColor;
ColorI mProfileColor;
bool mHasCopied;
public:
@ -167,6 +174,8 @@ class GuiMeshRoadEditorUndoAction : public UndoAction
GuiMeshRoadEditorCtrl *mEditor;
Vector<MeshRoadNode> mNodes;
Vector<MeshRoadProfileNode> mProfileNodes;
Vector<U8> mProfileMtrls;
SimObjectId mObjId;
F32 mMetersPerSegment;