From eb4b3404aa00220d659e532151dab13d642c17a3 Mon Sep 17 00:00:00 2001 From: Svxy Date: Wed, 31 May 2023 17:31:32 -0400 Subject: Released --- tools/trackeditor/code/nodes/walllocator.h | 69 ++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 tools/trackeditor/code/nodes/walllocator.h (limited to 'tools/trackeditor/code/nodes/walllocator.h') diff --git a/tools/trackeditor/code/nodes/walllocator.h b/tools/trackeditor/code/nodes/walllocator.h new file mode 100644 index 0000000..31d114c --- /dev/null +++ b/tools/trackeditor/code/nodes/walllocator.h @@ -0,0 +1,69 @@ +#include "precompiled/PCH.h" + +#ifndef WALL_LOCATOR +#define WALL_LOCATOR + + +#include "main/constants.h" + +class tlDataChunk; + +class WallLocatorNode : public MPxLocatorNode +{ +public: + WallLocatorNode(); + ~WallLocatorNode(); + + static void* creator(); + + virtual void draw( M3dView& view, + const MDagPath& path, + M3dView::DisplayStyle displayStyle, + M3dView::DisplayStatus displayStatus + ); + static MStatus initialize(); + virtual MStatus legalConnection ( const MPlug & plug, const MPlug & otherPlug, bool asSrc, bool& result ) const; + virtual void postConstructor(); + + //This is how you export one of these. + static tlDataChunk* Export( MObject& wallLocatorNode, tlHistory& history ); + static bool CalculateNormal( MObject& thisNode, MPoint& nextNodeWP, MVector* normal ); + + static MTypeId id; + static const char* stringId; + + //Custom to this object. + static const char* LEFTRIGHT_NAME_SHORT; + static const char* LEFTRIGHT_NAME_LONG; + static MObject mLeftRight; + + enum + { + LEFT, + RIGHT, + NONE + }; + + static const char* PREVNODE_NAME_SHORT; + static const char* PREVNODE_NAME_LONG; + static MObject mPrevNode; + + static const char* NEXTNODE_NAME_SHORT; + static const char* NEXTNODE_NAME_LONG; + static MObject mNextNode; + + static const char* ID_NAME_SHORT; + static const char* ID_NAME_LONG; + static MObject mCallbackId; + +private: + + static void NodeAboutToDeleteCallback( MDGModifier& modifier, void* data ); + bool CalculateNormal( MPoint& nextNodeWP, MVector* normal ); + + static const int ACTIVE_COLOUR; + static const int INACTIVE_COLOUR; + static const float SCALE; +}; + +#endif \ No newline at end of file -- cgit v1.2.3