summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Client/Code/Core/Utility/StudioObjectTypes.h
blob: 79eafc1927e6f213111ca4b615bfb09b7bbfc157 (plain)
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
/****************************************************************************
**
** Copyright (C) 2002 NVIDIA Corporation.
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt 3D Studio.
**
** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef INCLUDED_STUDIO_OBJECTTYPES_H
#define INCLUDED_STUDIO_OBJECTTYPES_H

#include "Qt3DSString.h"
//
//	*******************************************************************
//	IMPORTANT:	These object types (EStudioObjectType) line up with the
//				icons used for the timeline for each object type
//	*******************************************************************
//

enum EStudioObjectType {
    OBJTYPE_UNKNOWN            = 0x00000000,
    OBJTYPE_SCENE              = 0x00000001,
    OBJTYPE_LAYER              = 0x00000002,
    OBJTYPE_BEHAVIOR           = 0x00000004,
    OBJTYPE_MATERIAL           = 0x00000008,
    OBJTYPE_CAMERA             = 0x00000010,
    OBJTYPE_LIGHT              = 0x00000020,
    OBJTYPE_MODEL              = 0x00000040,
    OBJTYPE_GROUP              = 0x00000080,
    OBJTYPE_IMAGE              = 0x00000100,
    OBJTYPE_TEXT               = 0x00000200,
    OBJTYPE_COMPONENT          = 0x00000400,
    OBJTYPE_SLIDE              = 0x00000800,
    OBJTYPE_EFFECT             = 0x00001000,
    OBJTYPE_RENDERPLUGIN       = 0x00002000,
    OBJTYPE_CUSTOMMATERIAL     = 0x00004000,
    OBJTYPE_REFERENCEDMATERIAL = 0x00008000,
    OBJTYPE_GUIDE              = 0x00010000,
    OBJTYPE_ALIAS              = 0x00020000,
    OBJTYPE_PATH               = 0x00040000,
    OBJTYPE_PATHANCHORPOINT    = 0x00080000,
    OBJTYPE_SUBPATH            = 0x00100000,
    OBJTYPE_SOUND              = 0x00200000,
    OBJTYPE_LIGHTMAPS          = 0x00400000,
    OBJTYPE_DATAINPUT          = 0x00800000,
    OBJTYPE_PRESENTATION       = 0x01000000,
    OBJTYPE_PROJECT            = 0x02000000,
    OBJTYPE_QML_STREAM         = 0x04000000,
    OBJTYPE_MATERIALDATA       = 0x08000000,

    // filters
    OBJTYPE_IS_VARIANT = OBJTYPE_LAYER | OBJTYPE_TEXT | OBJTYPE_MODEL | OBJTYPE_GROUP
                         | OBJTYPE_COMPONENT,
    OBJTYPE_IS_MATERIAL = OBJTYPE_MATERIAL | OBJTYPE_CUSTOMMATERIAL | OBJTYPE_REFERENCEDMATERIAL,
    OBJTYPE_IS_CONTAINER = ~(OBJTYPE_ALIAS | OBJTYPE_IS_MATERIAL | OBJTYPE_IMAGE | OBJTYPE_TEXT
                             | OBJTYPE_BEHAVIOR | OBJTYPE_EFFECT),
    OBJTYPE_IS_SINGULAR = OBJTYPE_SCENE | OBJTYPE_LAYER | OBJTYPE_BEHAVIOR | OBJTYPE_EFFECT
                          | OBJTYPE_IS_MATERIAL, // Singular: cannot be multiselected
    OBJTYPE_IS_UNGROUPABLE = OBJTYPE_IS_SINGULAR | OBJTYPE_IMAGE
};

typedef enum {
    PRIMITIVETYPE_UNKNOWN = 0,
    PRIMITIVETYPE_RECT,
    PRIMITIVETYPE_SPHERE,
    PRIMITIVETYPE_CONE,
    PRIMITIVETYPE_CYLINDER,
    PRIMITIVETYPE_BOX,

} EPrimitiveType;

typedef enum {
    PRIMITIVEMODE_UNKNOWN = 0,
    PRIMITIVEMODE_SINGLESIDED = 1,
    PRIMITIVEMODE_DOUBLESIDED = 2,
    PRIMITIVEMODE_SEPARATE_MATERIALS = 4,

} EPrimitiveMode;

/**
Text box type.
 */
enum ETextTextType {
    ETextTextTypeLine, ///<Line
    ETextTextTypeParagraph, ///<Paragraph

    ETextTextType_Last
};

/**
Treatment of text by the rendering engine
 */
enum ETextRenderStyle {
    ETextRenderStyleFlat, ///<The text will always face the camera and not scale
    ETextRenderStyleDepth, ///<The text will always face the camera, but grow larger or smaller
                           ///based on distance
    ETextRenderStyleFullPerspective, ///<The text is treated as full 3D

    ETextRenderStyle_Last
};

/**
Horizontal Alignment
 */
enum ETextHorzAlign {
    ETextHorzAlignLeft, ///<Left
    ETextHorzAlignCenter, ///<Center
    ETextHorzAlignRight, ///<Right

    ETextHorzAlign_Last
};

/**
Vertical Alignment
 */
enum ETextVertAlign {
    ETextVertAlignTop, ///<Top
    ETextVertAlignMiddle, ///<Middle
    ETextVertAlignBottom, ///<Bottom

    ETextVertAlign_Last
};

class CStudioObjectTypes
{
public:
    static bool AcceptableParent(EStudioObjectType inChild, EStudioObjectType inParent);

    static const QString &GetNormalIconName(EStudioObjectType inType);
    static const QString &GetDisabledIconName(EStudioObjectType inType);
    static const QString &GetHighlightIconName(EStudioObjectType inType);

};

#endif // INCLUDED_STUDIO_OBJECTTYPES_H