19#ifndef FLOWENGINECOMMONDEF_H
20#define FLOWENGINECOMMONDEF_H
25#define FLE_DLL __declspec( dllexport )
26#elif defined( __LINUX__ )
27#define FLE_DLL __attribute__( ( visibility( "default" ) ) )
29#error "FlowEngine not supported on this platform!"
32#define FLOWENGINE_FACTORY extern "C" FLE_DLL
116 template<
typename T >
135 template< std::
size_t N >
137 :
data( fixedSizeArray )
143 :
data( v.empty() ? nullptr : v.
data() )
144 ,
count( v.empty() ? 0 : v.size() )
151 explicit operator bool()
const
174 assert( index <
count );
175 return data[ index ];
182 assert( index <
count );
183 return data[ index ];
189 template<
typename T >
208 template< std::
size_t N >
210 :
data( fixedSizeArray )
216 :
data( v.empty() ? nullptr : v.
data() )
217 ,
count( v.empty() ? 0 : v.size() )
224 explicit operator bool()
const
226 return data !=
nullptr;
247 assert( index <
count );
248 return data[ index ];
268 ,
count( str.size() )
279 :
data( v.empty() ? nullptr : v.
data() )
280 ,
count( v.empty() ? 0 : v.size() )
287 explicit operator bool()
const
309 ,
count( str.size() )
318 ,
count( std::strlen( str ) )
329 :
data( v.empty() ? nullptr : v.
data() )
330 ,
count( v.empty() ? 0 : v.size() )
334 explicit operator bool()
const
504 template<
typename T,
typename S >
Definition: BoundingBoxInterface.cpp:26
std::ptrdiff_t Index
Index type.
Definition: CommonDef.h:100
float ColorComponent32
Color component (32 bits) type.
Definition: CommonDef.h:109
std::uint8_t ColorComponent
Color component (8 bits) type.
Definition: CommonDef.h:106
StandardAxis
enumerates the standard axes
Definition: CommonDef.h:492
std::size_t Size
Size type.
Definition: CommonDef.h:103
unsigned int ReconstructionID
Unique identification number in a group of cameras.
Definition: CommonDef.h:112
Result
Enumerates possible results generated by FlowEngine.
Definition: CommonDef.h:45
@ UnsupportedVersion
The version of the loading 3DK is not supported or did not match the minimum requirements.
@ InvalidArgument
One or more supplied arguments are invalid.
@ FileNotFound
File not found.
@ PreconditionNotMet
One or more preconditions were not met.
@ Success
Everything went ok.
@ OutOfMemoryError
An out of RAM memory error has been received.
@ NewVersionAvailable
A New SDK version is available to download.
@ BufferTooSmall
The provided buffer is too small to complete the operation.
@ GenericError
Something went wrong. Usually the log contains more detailed information.
@ FeatureNotAvailable
This feature is not available in this version of FlowEngine.
@ ProcessNotRunning
An abort or pause signal has been emitted, but no process is running.
Specialization for a Buffer of characters.
Definition: CommonDef.h:255
Buffer(char *data, Size count)
Construction from an arbitrary buffer and size.
Definition: CommonDef.h:272
Buffer(std::string &&str)=delete
Prohibit conversion from a temporary string.
Buffer(std::vector< char > &v)
Implicit conversion from a std::vector.
Definition: CommonDef.h:278
Buffer(std::string &str)
Implicit conversion from a std::string.
Definition: CommonDef.h:266
Buffer()=default
Represents an empty C string literal.
Holds a (mutable) non_owning pointer and a size Used to marshal memory buffers as arguments in a safe...
Definition: CommonDef.h:118
T * end()
Iteration support.
Definition: CommonDef.h:164
Buffer()=default
Represents an empty buffer.
T * begin()
Iteration support.
Definition: CommonDef.h:157
T * data
Pointer to the (mutable) data.
Definition: CommonDef.h:120
T & operator[](std::size_t index)
Indexed access.
Definition: CommonDef.h:171
Buffer(std::vector< T > &v)
Implicit conversion from a std::vector.
Definition: CommonDef.h:142
Buffer(std::vector< T > &&v)=delete
Prohibits implicit conversion from a temporary std::vector.
Buffer(T *d, Size s)
Construct a buffer from a (mutable) pointer and a size.
Definition: CommonDef.h:129
Buffer(T(&fixedSizeArray)[N])
Implicit conversion from a fixed-size array.
Definition: CommonDef.h:136
Size count
Number of elements the pointer points to.
Definition: CommonDef.h:123
a packed RGB color
Definition: CommonDef.h:411
ColorComponent r
red component
Definition: CommonDef.h:413
ColorComponent g
green component
Definition: CommonDef.h:416
ColorComponent b
blue component
Definition: CommonDef.h:419
Specialization for a const buffer characters.
Definition: CommonDef.h:296
ConstBuffer(std::string &&str)=delete
Prohibits conversion from a temporary std::string.
ConstBuffer(const std::vector< char > &v)
Implicit conversion from a std::vector.
Definition: CommonDef.h:328
ConstBuffer(const char *str)
Implicit conversion from a C string literal.
Definition: CommonDef.h:316
ConstBuffer(const std::string &str)
Implicit conversion from a std::string.
Definition: CommonDef.h:307
ConstBuffer()=default
Creates an empty string buffer.
ConstBuffer(const char *data, Size count)
Construction from an arbitrary buffer and size.
Definition: CommonDef.h:322
Holds a (non mutable) non_owning pointer and a count Used to marshal memory buffers as arguments in a...
Definition: CommonDef.h:191
ConstBuffer(const std::vector< T > &v)
Implicit conversion from a std::vector.
Definition: CommonDef.h:215
Size count
Number of elements the pointer points to.
Definition: CommonDef.h:196
const T & operator[](std::size_t index) const
Indexed access.
Definition: CommonDef.h:244
const T * end() const
Iteration support.
Definition: CommonDef.h:237
const T * begin() const
Iteration support.
Definition: CommonDef.h:230
ConstBuffer()=default
Creates an empty buffer.
const T * data
Pointer to the (immutable) data.
Definition: CommonDef.h:193
ConstBuffer(std::vector< T > &&v)=delete
Prohibits implicit conversion from a temporary std::vector.
ConstBuffer(const T *d, Size s)
Creates a const buffer with a const pointer and a size.
Definition: CommonDef.h:202
ConstBuffer(const T(&fixedSizeArray)[N])
Implicit conversion from a fixed-size array.
Definition: CommonDef.h:209
Represents a moment in time.
Definition: CommonDef.h:513
int second
the second in the range (0-59)
Definition: CommonDef.h:530
int year
the year (e.g. 2019)
Definition: CommonDef.h:515
int hour
the hour in the range (0-23)
Definition: CommonDef.h:524
int day
the day in the range 1-31
Definition: CommonDef.h:521
int month
the month in the range 1-12
Definition: CommonDef.h:518
int minute
the minute in the range (0-59)
Definition: CommonDef.h:527
a Quaternion Holds information about a raw image Data is not owned
Definition: CommonDef.h:479
Buffer< Color32 > data
the image color data stored as 3 floating-point values
Definition: CommonDef.h:487
int width
the image width in pixels
Definition: CommonDef.h:481
int height
the image height in pixels
Definition: CommonDef.h:484
a normal
Definition: CommonDef.h:398
float y
y component
Definition: CommonDef.h:403
float x
x component
Definition: CommonDef.h:400
float z
z component
Definition: CommonDef.h:406
Bound 2 values together.
Definition: CommonDef.h:506
S second
Definition: CommonDef.h:508
T first
Definition: CommonDef.h:507
a 2 dimensional point
Definition: CommonDef.h:388
double y
y coordinate
Definition: CommonDef.h:393
double x
x coordinate
Definition: CommonDef.h:390
a three dimensional point
Definition: CommonDef.h:375
double z
z coordinate
Definition: CommonDef.h:383
double y
y coordinate
Definition: CommonDef.h:380
double x
x coordinate
Definition: CommonDef.h:377
a floating-point color
Definition: CommonDef.h:424
ColorComponent32 b
blue component
Definition: CommonDef.h:432
ColorComponent32 r
red component
Definition: CommonDef.h:426
ColorComponent32 g
green component
Definition: CommonDef.h:429
a Quaternion Holds an axis and an angle
Definition: CommonDef.h:467
double angle
the angle
Definition: CommonDef.h:472
Point3 axis
the axis
Definition: CommonDef.h:469
a texture coordinate Holds a couple of floats representing texture coordinates
Definition: CommonDef.h:456
float v
the v component
Definition: CommonDef.h:461
float u
the u component
Definition: CommonDef.h:458
a triangle. Holds 3 indexes to points. Triangles are specified in counter-clockwise order
Definition: CommonDef.h:442
Index idx1
the second index
Definition: CommonDef.h:447
Index idx0
the first index
Definition: CommonDef.h:444
Index idx2
the third index
Definition: CommonDef.h:450
Represents a version in the major.minor categories format.
Definition: CommonDef.h:347
int major
the major category of this version
Definition: CommonDef.h:349
bool isOlderThan(const Version &other) const
Definition: CommonDef.h:361
int minor
the minor category of this version
Definition: CommonDef.h:352
bool isSameAs(const Version &other) const
Definition: CommonDef.h:355