summaryrefslogtreecommitdiffstats
path: root/tools/worldbuilder/code/nodes/triggervolumenode.h
blob: b083af2625e173e9be588216af6f20a2ffe00216 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
//=============================================================================
// Copyright (C) 2002 Radical Entertainment Ltd.  All rights reserved.
//
// File:        triggervolumenode.h
//
// Description: Blahblahblah
//
// History:     23/05/2002 + Created -- Cary Brisebois
//
//=============================================================================

#ifndef TRIGGERVOLUMENODE_H
#define TRIGGERVOLUMENODE_H

//========================================
// Nested Includes
//========================================
#include "precompiled/PCH.h"
#include "main/toolhack.h"
#include <toollib.hpp>

//========================================
// Forward References
//========================================
class tlDataChunk;

//=============================================================================
//
// Synopsis:    Blahblahblah
//
//=============================================================================

class TriggerVolumeNode : public MPxLocatorNode
{
public:

    enum Type
    { 
        SPHERE,
        RECTANGLE
    };
    
    TriggerVolumeNode();
    virtual ~TriggerVolumeNode();

    static void*    creator();

    virtual void    draw( M3dView& view, 
                          const MDagPath& path, 
                          M3dView::DisplayStyle displayStyle, 
                          M3dView::DisplayStatus displayStatus 
                        );  
    static MStatus  initialize();    
    virtual void    postConstructor();

    //This is how you export one of these.
    static tlDataChunk* Export( MObject& triggerVolumeNode );
    static void GetScaleAndMatrix( MObject& triggerVolumeNode, tlMatrix& mat, tlPoint& point);

    static MTypeId      id;
    static const char*  stringId;

    static const char*  LOCATOR_NAME_SHORT;
    static const char*  LOCATOR_NAME_LONG;
    static MObject sLocator;

    static const char*  TYPE_NAME_SHORT;
    static const char*  TYPE_NAME_LONG;
    static MObject sType;

private:

    static const int ACTIVE_COLOUR;
    static const int INACTIVE_COLOUR;
    static const float SCALE;
    static const float LINE_WIDTH;

    Type mType;

    //Prevent wasteful constructor creation.
    TriggerVolumeNode( const TriggerVolumeNode& triggervolumenode );
    TriggerVolumeNode& operator=( const TriggerVolumeNode& triggervolumenode );
};


#endif //TRIGGERVOLUMENODE_H