DatasmithTypes.h
1
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
2
3
#pragma once
4
5
#include "CoreTypes.h"
6
#include "Math/Quat.h"
7
#include "Math/Vector.h"
8
9
enum class
EDatasmithCurveInterpMode
10
{
11
Linear,
12
Constant,
13
Cubic
14
};
15
16
class
DATASMITHCORE_API
FDatasmithTextureSampler
17
{
18
public
:
19
FDatasmithTextureSampler
()
20
{
21
CoordinateIndex = 0;
22
ScaleX = 1.0f;
23
ScaleY = 1.0f;
24
OffsetX = 0.0f;
25
OffsetY = 0.0f;
26
Rotation = 0.0f;
27
bInvert =
false
;
28
Multiplier = 1.0f;
29
OutputChannel = 0;
30
bCroppedTexture =
false
;
31
MirrorX = 0;
32
MirrorY = 0;
33
}
34
35
FDatasmithTextureSampler
(
int
InCoordinateIndex,
float
InSx,
float
InSy,
float
InOx,
float
InOy,
float
InRotation,
float
InMultiplier,
bool
bInInvert,
int
InOutputChannel,
bool
InCroppedTexture,
int
InMirrorX,
int
InMirrorY)
36
{
37
CoordinateIndex = InCoordinateIndex;
38
ScaleX = InSx;
39
ScaleY = InSy;
40
OffsetX = InOx;
41
OffsetY = InOy;
42
Rotation = InRotation;
43
Multiplier = InMultiplier;
44
bInvert = bInInvert;
45
OutputChannel = InOutputChannel;
46
bCroppedTexture = InCroppedTexture;
47
MirrorX = InMirrorX;
48
MirrorY = InMirrorY;
49
}
50
51
// UV coordinate index
52
int
CoordinateIndex;
53
54
// UV horizontal scale
55
float
ScaleX;
56
// UV vertical scale
57
float
ScaleY;
58
59
// UV horizontal offset [0,1] range
60
float
OffsetX;
61
// UV vertical offset [0,1] range
62
float
OffsetY;
63
64
// UV rotation [0,1] range
65
float
Rotation;
66
67
// texture multiplier
68
float
Multiplier;
69
70
// force texture invert
71
bool
bInvert;
72
73
// color channel to be connected
74
int
OutputChannel;
75
76
// flag to enable UV cropping
77
bool
bCroppedTexture;
78
79
// UV Mirror 0 No mirror, X mirror tilling otherwise
80
int
MirrorX;
81
// UV Mirror 0 No mirror, X mirror tilling otherwise
82
int
MirrorY;
83
};
84
85
/**
86
* FDatasmithTransformFrameInfo holds the data for the transform values of a frame
87
* The transform values must be relative to the parent
88
* The rotation is represented as Euler angles in degrees
89
*/
90
struct
DATASMITHCORE_API
FDatasmithTransformFrameInfo
91
{
92
FDatasmithTransformFrameInfo
(int32 InFrameNumber,
const
FVector& InVec)
93
: FrameNumber(InFrameNumber)
94
, X(InVec.X)
95
, Y(InVec.Y)
96
, Z(InVec.Z)
97
{ }
98
99
FDatasmithTransformFrameInfo
(int32 InFrameNumber,
const
FQuat& InQuat)
100
: FrameNumber(InFrameNumber)
101
{
102
const
FVector EulerAngles = InQuat.Euler();
103
X = EulerAngles.X;
104
Y = EulerAngles.Y;
105
Z = EulerAngles.Z;
106
}
107
108
FDatasmithTransformFrameInfo
(int32 InFrameNumber,
float
InX,
float
InY,
float
InZ)
109
: FrameNumber(InFrameNumber)
110
, X(InX)
111
, Y(InY)
112
, Z(InZ)
113
{ }
114
115
bool
operator==(
const
FDatasmithTransformFrameInfo
& Other)
const
;
116
bool
IsValid()
const
;
117
118
int32 FrameNumber;
119
120
// For translation and scale, X, Y, Z are the transform values of the respective components
121
// For rotation, they represent rotation around the X, Y, Z axis (roll, pitch, yaw respectively) in degrees
122
float
X;
123
float
Y;
124
float
Z;
125
126
static
FDatasmithTransformFrameInfo
InvalidFrameInfo;
127
};
128
129
/**
130
* FDatasmithVisibilityFrameInfo holds the visibility value for a frame
131
*/
132
struct
DATASMITHCORE_API
FDatasmithVisibilityFrameInfo
133
{
134
FDatasmithVisibilityFrameInfo
(int32 InFrameNumber,
bool
bInVisible)
135
: FrameNumber(InFrameNumber)
136
, bVisible(bInVisible)
137
{ }
138
139
bool
operator==(
const
FDatasmithVisibilityFrameInfo
& Other)
const
;
140
bool
IsValid()
const
;
141
142
int32 FrameNumber;
143
bool
bVisible;
144
145
static
FDatasmithVisibilityFrameInfo
InvalidFrameInfo;
146
};
FDatasmithVisibilityFrameInfo
FDatasmithVisibilityFrameInfo holds the visibility value for a frame.
Definition:
DatasmithTypes.h:132
FDatasmithTransformFrameInfo
FDatasmithTransformFrameInfo holds the data for the transform values of a frame The transform values ...
Definition:
DatasmithTypes.h:90
FDatasmithTextureSampler
Definition:
DatasmithTypes.h:16
Developer
Datasmith
DatasmithCore
Public
DatasmithTypes.h