summaryrefslogtreecommitdiffstats
path: root/tools/trackeditor/code/nodes/walllocator.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tools/trackeditor/code/nodes/walllocator.h69
1 files changed, 69 insertions, 0 deletions
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