FlowEngine 9.000
Photogrammetry Software Development Kit
Loading...
Searching...
No Matches
CommonDef.h
Go to the documentation of this file.
1/*
2 *
3 * C@@o ____ _____ __ _
4 * oC8@@@@@@@o |___ \| __ \ / _| |
5 * o@@@@@@@@@@@@O __) | | | | |_| | _____ __
6 * O@O 8@@@@@@@@@O |__ <| | | | _| |/ _ \ \ /\ / /
7 * o@@@@@@@O OOOOOCo ___) | |__| | | | | (_) \ V V /
8 * C@@@@@@@@@@@@Oo |____/|_____/|_| |_|\___/ \_/\_/
9 * o8@@@@@@@@@@@@@@@@8OOCCCC
10 * oO@@@@@@@@@@@@@@@@@@@o 3Dflow s.r.l. - www.3dflow.net
11 * oO8@@@@@@@@@@@@o Copyright 2022
12 * oO88@@@@@@@@8OCo All Rights Reserved
13 * O@@@@@@@@@@@@@@@@@@@@@@@@@8OCCoooooooCCo
14 * @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O
15 * @@@Oo oO8@@@@@@@@@@@@@@@@8
16 *
17 */
18
19#ifndef FLOWENGINECOMMONDEF_H
20#define FLOWENGINECOMMONDEF_H
21
22#pragma once
23
24#if defined( WIN32 )
25#define FLE_DLL __declspec( dllexport )
26#elif defined( __LINUX__ )
27#define FLE_DLL __attribute__( ( visibility( "default" ) ) )
28#else
29#error "FlowEngine not supported on this platform!"
30#endif
31
32#define FLOWENGINE_FACTORY extern "C" FLE_DLL
33
34#include <cstddef>
35#include <cstdint>
36#include <cstring>
37#include <string>
38#include <vector>
39#include <cassert>
40#include <cmath>
41
42#pragma pack( push, 8 )
43
44namespace FlowEngine
45{
47 enum class Result : std::size_t
48 {
50 Success = 0,
51
54
57
60
63
66
70
73
76
79
85
88
91
100 };
101
103 using Index = std::ptrdiff_t;
104
106 using Size = std::size_t;
107
109 using ColorComponent = std::uint8_t;
110
112 using ColorComponent32 = float;
113
115 using ReconstructionID = unsigned int;
116
117 template< typename T >
118 struct Buffer;
119
120 template< typename T >
121 struct ConstBuffer;
122
125 template< typename T >
126 struct Buffer
127 {
129 T *data = nullptr;
130
133
135 Buffer() = default;
136
138 Buffer( T *d, Size s )
139 : data( d )
140 , count( s )
141 { }
142
144 template< std::size_t N >
145 Buffer( T( &fixedSizeArray )[ N ] )
146 : data( fixedSizeArray )
147 , count( N )
148 { }
149
151 Buffer( std::vector< T > &v )
152 : data( v.empty() ? nullptr : v.data() )
153 , count( v.empty() ? 0 : v.size() )
154 { }
155
157 Buffer( std::vector< T > &&v ) = delete;
158
160 explicit operator bool() const
161 {
162 return data != nullptr && count != 0;
163 }
164
166 T *begin()
167 {
168 assert( data );
169 return data;
170 }
171
173 T *end()
174 {
175 assert( data );
176 return data + count;
177 }
178
180 T &operator []( std::size_t index )
181 {
182 assert( data );
183 assert( index < count );
184 return data[ index ];
185 }
186
188 const T &operator []( std::size_t index ) const
189 {
190 assert( data );
191 assert( index < count );
192 return data[ index ];
193 }
194 };
195
198 template< typename T >
200 {
202 const T *data = nullptr;
203
206
208 ConstBuffer() = default;
209
211 ConstBuffer( const T *d, Size s )
212 : data( d )
213 , count( s )
214 { }
215
217 template< std::size_t N >
218 ConstBuffer( const T( &fixedSizeArray )[ N ] )
219 : data( fixedSizeArray )
220 , count( N )
221 { }
222
224 ConstBuffer( const std::vector< T > &v )
225 : data( v.empty() ? nullptr : v.data() )
226 , count( v.empty() ? 0 : v.size() )
227 { }
228
230 ConstBuffer( std::vector< T > &&v ) = delete;
231
233 explicit operator bool() const
234 {
235 return data != nullptr;
236 }
237
239 const T *begin() const
240 {
241 assert( data );
242 return data;
243 }
244
246 const T *end() const
247 {
248 assert( data );
249 return data + count;
250 }
251
253 const T &operator []( std::size_t index ) const
254 {
255 assert( data );
256 assert( index < count );
257 return data[ index ];
258 }
259 };
260
262 template< >
263 struct Buffer< char >
264 {
266 char *data = nullptr;
267
270
272 Buffer() = default;
273
275 Buffer( std::string &str )
276 : data( &str[ 0 ] )
277 , count( str.size() )
278 { }
279
282 : data( data )
283 , count( count )
284 { }
285
287 Buffer( std::vector< char > &v )
288 : data( v.empty() ? nullptr : v.data() )
289 , count( v.empty() ? 0 : v.size() )
290 { }
291
293 Buffer( std::string &&str ) = delete;
294
296 explicit operator bool() const
297 {
298 return data != nullptr && count != 0;
299 }
300 };
301
303 template< >
304 struct ConstBuffer< char >
305 {
307 const char *data = nullptr;
308
311
313 ConstBuffer() = default;
314
316 ConstBuffer( const std::string &str )
317 : data( str.data() )
318 , count( str.size() )
319 { }
320
322 ConstBuffer( std::string &&str ) = delete;
323
325 ConstBuffer( const char *str )
326 : data( str )
327 , count( std::strlen( str ) )
328 { }
329
331 ConstBuffer( const char *data, Size count )
332 : data( data )
333 , count( count )
334 { }
335
337 ConstBuffer( const std::vector< char > &v )
338 : data( v.empty() ? nullptr : v.data() )
339 , count( v.empty() ? 0 : v.size() )
340 { }
341
343 explicit operator bool() const
344 {
345 return data != nullptr && count != 0;
346 }
347 };
348
350 template< >
351 struct Buffer< void >
352 {
354 void *data = nullptr;
355
358
360 Buffer() = default;
361
363 Buffer( void *d, Size s )
364 : data( d )
365 , count( s )
366 { }
367
369 template< typename T >
370 Buffer( const Buffer< T > &other )
371 : data( static_cast< void * >( other.data ) )
372 , count( other.count * sizeof( T ) )
373 {
374
375 }
376
378 explicit operator bool() const
379 {
380 return data != nullptr && count != 0;
381 }
382 };
383
385 template< >
386 struct ConstBuffer< void >
387 {
389 const void *data = nullptr;
390
393
395 ConstBuffer() = default;
396
398 ConstBuffer( const void *d, Size s )
399 : data( d )
400 , count( s )
401 { }
402
404 template< typename T >
405 ConstBuffer( const Buffer< T > &other )
406 : data( static_cast< const void * >( other.data ) )
407 , count( other.count * sizeof( T ) )
408 { }
409
411 template< typename T >
413 : data( static_cast< const void * >( other.data ) )
414 , count( other.count * sizeof( T ) )
415 { }
416
418 explicit operator bool() const
419 {
420 return data != nullptr && count != 0;
421 }
422 };
423
428
430 struct Version final
431 {
433 int major = 0;
434
436 int minor = 0;
437
439 inline bool isSameAs( const Version &other ) const
440 {
441 return major == other.major && minor == other.minor;
442 }
443
445 inline bool isOlderThan( const Version &other ) const
446 {
447 if ( major < other.major )
448 return true;
449
450 if ( major > other.major )
451 return false;
452
453 return minor < other.minor;
454 }
455 };
456
458 struct Point3
459 {
461 double x = 0;
462
464 double y = 0;
465
467 double z = 0;
468 };
469
471 struct Point2
472 {
474 double x = 0;
475
477 double y = 0;
478 };
479
481 struct Normal
482 {
484 float x = 0;
485
487 float y = 0;
488
490 float z = 0;
491 };
492
494 struct Color
495 {
498
501
504 };
505
508 {
511
514
517 };
518
521
525 struct Triangle
526 {
529
532
535 };
536
540 {
542 float u = 0;
543
545 float v = 0;
546 };
547
551 {
554
556 double angle = 0;
557 };
558
562 struct Image
563 {
565 int width = 0;
566
568 int height = 0;
569
572
574 Color32 &operator ()( int x, int y ) { return data[ y * width + x ]; }
575
577 const Color32 &operator ()( int x, int y ) const { return data[ y * width + x ]; }
578 };
579
581 enum class StandardAxis
582 {
584 X,
585
587 Y,
588
590 Z,
591 };
592
594 template< typename T, typename S >
595 struct Pair
596 {
599 };
600
602 struct DateTime
603 {
605 int year = 0;
606
608 int month = 0;
609
611 int day = 0;
612
614 int hour = 0;
615
617 int minute = 0;
618
620 int second = 0;
621 };
622
624 struct Vector3
625 {
626 double data[ 3 ] = { };
627
628 Vector3() = default;
629
630 Vector3( double x, double y, double z )
631 {
632 data[ 0 ] = x;
633 data[ 1 ] = y;
634 data[ 2 ] = z;
635 }
636
637 double x() const { return data[ 0 ]; }
638 double y() const { return data[ 1 ]; }
639 double z() const { return data[ 2 ]; }
640
641 double &x() { return data[ 0 ]; }
642 double &y() { return data[ 1 ]; }
643 double &z() { return data[ 2 ]; }
644
646 double &operator ()( int index ) { return data[ index ]; }
647
649 const double &operator ()( int index ) const { return data[ index ]; }
650
652 double length() const
653 {
654 return std::sqrt( x() * x() + y() * y() + z() * z() );
655 }
656
659 {
660 double len = length();
661
662 if ( len == 0 )
663 return { 0, 0, 0 };
664
665 return { x() / len, y() / len, z() / len };
666 }
667
669 double dot( const Vector3 &other ) const
670 {
671 return x() * other.x() + y() * other.y() + z() * other.z();
672 }
673
675 Vector3 cross( const Vector3 &other ) const
676 {
677 return
678 {
679 y() * other.z() - z() * other.y(),
680 z() * other.x() - x() * other.z(),
681 x() * other.y() - y() * other.x(),
682 };
683 }
684
685 friend Vector3 operator *( double scalar, const Vector3 &v )
686 {
687 return { v.x() * scalar, v.y() * scalar, v.z() * scalar };
688 }
689
690 friend Vector3 operator *( const Vector3 &v, double scalar )
691 {
692 return scalar * v;
693 }
694
695 friend Vector3 operator -( const Vector3 &lhs, const Vector3 &rhs )
696 {
697 return { lhs.x() - rhs.x(), lhs.y() - rhs.y(), lhs.z() - rhs.z() };
698 }
699
700 friend Vector3 operator +( const Vector3 &lhs, const Vector3 &rhs )
701 {
702 return { lhs.x() + rhs.x(), lhs.y() + rhs.y(), lhs.z() + rhs.z() };
703 }
704 };
705
708 {
709 double data[ 9 ] = { };
710
711 Matrix3x3() = default;
712
713 Matrix3x3( const double ( &inMatrix )[ 9 ] )
714 {
715 std::memcpy( data, inMatrix, sizeof( data ) );
716 }
717
718 Matrix3x3( const std::initializer_list< double > &list )
719 {
720 assert( list.size() == 9 );
721 std::copy( list.begin(), list.end(), data );
722 }
723
725 double &operator ()( int row, int col ) { return data[ row * 3 + col ]; }
726
728 const double &operator ()( int row, int col ) const { return data[ row * 3 + col ]; }
729
730 friend Vector3 operator *( const Matrix3x3 &R, const FlowEngine::Vector3 &v )
731 {
732 return
733 {
734 R( 0, 0 ) * v.x() + R( 0, 1 ) * v.y() + R( 0, 2 ) * v.z(),
735 R( 1, 0 ) * v.x() + R( 1, 1 ) * v.y() + R( 1, 2 ) * v.z(),
736 R( 2, 0 ) * v.x() + R( 2, 1 ) * v.y() + R( 2, 2 ) * v.z(),
737 };
738 }
739 };
740
743 {
744 int bus = -1;
745 int idx = -1;
746
748 operator bool() const
749 {
750 return bus >= 0 && idx >= 0;
751 }
752 };
753
756 {
757 Invalid = 0,
758 CUDA = 1,
759 OpenCL = 2,
760 };
761
764 {
767 int idx = -1;
768 int bus = -1;
769 char name[ 512 ] = { };
770 long long physicalMemoryMB = 0;
771 bool isIntegrated = false;
772 };
773
775 {
779 };
780
782 {
788 };
789
791}
792
793#pragma pack( pop )
794
795static_assert( sizeof( FlowEngine::Point3 ) == 3 * sizeof( double ), "Point3 layout mismatch" );
796static_assert( sizeof( FlowEngine::Point2 ) == 2 * sizeof( double ), "Point2 layout mismatch" );
797static_assert( sizeof( FlowEngine::Normal ) == 3 * sizeof( float ), "Normal layout mismatch" );
798static_assert( sizeof( FlowEngine::Color ) == 3 * sizeof( FlowEngine::ColorComponent ), "Color layout mismatch" );
799static_assert( sizeof( FlowEngine::PointColor32 ) == 3 * sizeof( float ), "PointColor32 layout mismatch" );
800static_assert( sizeof( FlowEngine::Triangle ) == 3 * sizeof( FlowEngine::Index ), "Triangle layout mismatch" );
801static_assert( sizeof( FlowEngine::TexCoords ) == 2 * sizeof( float ), "TexCoords layout mismatch" );
802static_assert( sizeof( FlowEngine::Vector3 ) == 3 * sizeof( double ), "Vector3 layout mismatch" );
803static_assert( sizeof( FlowEngine::Matrix3x3 ) == 9 * sizeof( double ), "Matrix3x3 layout mismatch" );
804
805static_assert( std::is_trivially_copyable< FlowEngine::Point3 >::value, "Point3 must be trivially copyable" );
806static_assert( std::is_trivially_copyable< FlowEngine::Normal >::value, "Normal must be trivially copyable" );
807static_assert( std::is_trivially_copyable< FlowEngine::Color >::value, "Color must be trivially copyable" );
808static_assert( std::is_trivially_copyable< FlowEngine::Triangle >::value, "Triangle must be trivially copyable" );
809static_assert( std::is_trivially_copyable< FlowEngine::TexCoords >::value, "TexCoords must be trivially copyable" );
810static_assert( std::is_trivially_copyable< FlowEngine::Vector3 >::value, "Vector3 must be trivially copyable" );
811static_assert( std::is_trivially_copyable< FlowEngine::Matrix3x3 >::value, "Matrix3x3 must be trivially copyable" );
812
813#endif
Definition: BoundingBoxInterface.cpp:26
int PointClassification
Definition: CommonDef.h:790
std::ptrdiff_t Index
Index type.
Definition: CommonDef.h:103
float ColorComponent32
Color component (32 bits) type.
Definition: CommonDef.h:112
PointClassificationAttributes
Definition: CommonDef.h:775
@ PointClassificationFlag_IsGround
Definition: CommonDef.h:778
PointClassificationCategory
Definition: CommonDef.h:782
@ PointClassificationCategory_Unknown
Definition: CommonDef.h:783
@ PointClassificationCategory_Trees
Definition: CommonDef.h:786
@ PointClassificationCategory_Buildings
Definition: CommonDef.h:785
@ PointClassificationCategory_Custom
Definition: CommonDef.h:787
@ PointClassificationCategory_Roads
Definition: CommonDef.h:784
std::uint8_t ColorComponent
Color component (8 bits) type.
Definition: CommonDef.h:109
StandardAxis
enumerates the standard axes
Definition: CommonDef.h:582
GraphicsDevicePlatform
The platform of a GPU device.
Definition: CommonDef.h:756
std::size_t Size
Size type.
Definition: CommonDef.h:106
unsigned int ReconstructionID
Unique identification number in a group of cameras.
Definition: CommonDef.h:115
Result
Enumerates possible results generated by FlowEngine.
Definition: CommonDef.h:48
@ 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:264
Buffer(char *data, Size count)
Construction from an arbitrary buffer and size.
Definition: CommonDef.h:281
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:287
Buffer(std::string &str)
Implicit conversion from a std::string.
Definition: CommonDef.h:275
Buffer()=default
Represents an empty C string literal.
Buffer()=default
Represents an empty buffer.
Buffer(void *d, Size s)
Construct from a raw pointer and byte count.
Definition: CommonDef.h:363
Buffer(const Buffer< T > &other)
Construction from a buffer of any type.
Definition: CommonDef.h:370
Holds a (mutable) non_owning pointer and a size Used to marshal memory buffers as arguments in a safe...
Definition: CommonDef.h:127
T * end()
Iteration support.
Definition: CommonDef.h:173
Buffer()=default
Represents an empty buffer.
T * begin()
Iteration support.
Definition: CommonDef.h:166
T * data
Pointer to the (mutable) data.
Definition: CommonDef.h:129
T & operator[](std::size_t index)
Indexed access.
Definition: CommonDef.h:180
Buffer(std::vector< T > &v)
Implicit conversion from a std::vector.
Definition: CommonDef.h:151
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:138
Buffer(T(&fixedSizeArray)[N])
Implicit conversion from a fixed-size array.
Definition: CommonDef.h:145
Size count
Number of elements the pointer points to.
Definition: CommonDef.h:132
a packed RGB color
Definition: CommonDef.h:495
ColorComponent r
red component
Definition: CommonDef.h:497
ColorComponent g
green component
Definition: CommonDef.h:500
ColorComponent b
blue component
Definition: CommonDef.h:503
Specialization for a const buffer characters.
Definition: CommonDef.h:305
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:337
ConstBuffer(const char *str)
Implicit conversion from a C string literal.
Definition: CommonDef.h:325
ConstBuffer(const std::string &str)
Implicit conversion from a std::string.
Definition: CommonDef.h:316
ConstBuffer()=default
Creates an empty string buffer.
ConstBuffer(const char *data, Size count)
Construction from an arbitrary buffer and size.
Definition: CommonDef.h:331
ConstBuffer(const ConstBuffer< T > &other)
Construction from a const buffer of any type.
Definition: CommonDef.h:412
ConstBuffer()=default
Creates an empty buffer.
ConstBuffer(const void *d, Size s)
Construct from a raw pointer and byte count.
Definition: CommonDef.h:398
ConstBuffer(const Buffer< T > &other)
Construction from a buffer of any type.
Definition: CommonDef.h:405
Holds a (non mutable) non_owning pointer and a count Used to marshal memory buffers as arguments in a...
Definition: CommonDef.h:200
ConstBuffer(const std::vector< T > &v)
Implicit conversion from a std::vector.
Definition: CommonDef.h:224
Size count
Number of elements the pointer points to.
Definition: CommonDef.h:205
const T & operator[](std::size_t index) const
Indexed access.
Definition: CommonDef.h:253
const T * end() const
Iteration support.
Definition: CommonDef.h:246
const T * begin() const
Iteration support.
Definition: CommonDef.h:239
ConstBuffer()=default
Creates an empty buffer.
const T * data
Pointer to the (immutable) data.
Definition: CommonDef.h:202
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:211
ConstBuffer(const T(&fixedSizeArray)[N])
Implicit conversion from a fixed-size array.
Definition: CommonDef.h:218
Represents a moment in time.
Definition: CommonDef.h:603
int second
the second in the range (0-59)
Definition: CommonDef.h:620
int year
the year (e.g. 2019)
Definition: CommonDef.h:605
int hour
the hour in the range (0-23)
Definition: CommonDef.h:614
int day
the day in the range 1-31
Definition: CommonDef.h:611
int month
the month in the range 1-12
Definition: CommonDef.h:608
int minute
the minute in the range (0-59)
Definition: CommonDef.h:617
Represents a logical graphics device.
Definition: CommonDef.h:743
int idx
Definition: CommonDef.h:745
int bus
Definition: CommonDef.h:744
Basic information about a GPU device.
Definition: CommonDef.h:764
char name[512]
Definition: CommonDef.h:769
GraphicsDevicePlatform platform
Definition: CommonDef.h:766
int bus
Definition: CommonDef.h:768
bool isIntegrated
Definition: CommonDef.h:771
long long physicalMemoryMB
Definition: CommonDef.h:770
int idx
Definition: CommonDef.h:767
GraphicsDeviceID id
Definition: CommonDef.h:765
a 2D image Holds information about a raw image Data is not owned
Definition: CommonDef.h:563
Buffer< Color32 > data
the image color data stored as 3 floating-point values
Definition: CommonDef.h:571
int width
the image width in pixels
Definition: CommonDef.h:565
Color32 & operator()(int x, int y)
Definition: CommonDef.h:574
int height
the image height in pixels
Definition: CommonDef.h:568
a 3x3 matrix
Definition: CommonDef.h:708
Matrix3x3(const std::initializer_list< double > &list)
Definition: CommonDef.h:718
friend Vector3 operator*(const Matrix3x3 &R, const FlowEngine::Vector3 &v)
Definition: CommonDef.h:730
Matrix3x3(const double(&inMatrix)[9])
Definition: CommonDef.h:713
double & operator()(int row, int col)
Definition: CommonDef.h:725
double data[9]
Definition: CommonDef.h:709
a normal
Definition: CommonDef.h:482
float y
y component
Definition: CommonDef.h:487
float x
x component
Definition: CommonDef.h:484
float z
z component
Definition: CommonDef.h:490
Bound 2 values together.
Definition: CommonDef.h:596
S second
Definition: CommonDef.h:598
T first
Definition: CommonDef.h:597
a 2 dimensional point
Definition: CommonDef.h:472
double y
y coordinate
Definition: CommonDef.h:477
double x
x coordinate
Definition: CommonDef.h:474
a three dimensional point
Definition: CommonDef.h:459
double z
z coordinate
Definition: CommonDef.h:467
double y
y coordinate
Definition: CommonDef.h:464
double x
x coordinate
Definition: CommonDef.h:461
a floating-point color
Definition: CommonDef.h:508
ColorComponent32 b
blue component
Definition: CommonDef.h:516
ColorComponent32 r
red component
Definition: CommonDef.h:510
ColorComponent32 g
green component
Definition: CommonDef.h:513
a Quaternion Holds an axis and an angle
Definition: CommonDef.h:551
double angle
the angle
Definition: CommonDef.h:556
Point3 axis
the axis
Definition: CommonDef.h:553
a texture coordinate Holds a couple of floats representing texture coordinates
Definition: CommonDef.h:540
float v
the v component
Definition: CommonDef.h:545
float u
the u component
Definition: CommonDef.h:542
a triangle. Holds 3 indexes to points. Triangles are specified in counter-clockwise order
Definition: CommonDef.h:526
Index idx1
the second index
Definition: CommonDef.h:531
Index idx0
the first index
Definition: CommonDef.h:528
Index idx2
the third index
Definition: CommonDef.h:534
a 3d vector
Definition: CommonDef.h:625
double dot(const Vector3 &other) const
Definition: CommonDef.h:669
double z() const
Definition: CommonDef.h:639
double & x()
Definition: CommonDef.h:641
friend Vector3 operator*(double scalar, const Vector3 &v)
Definition: CommonDef.h:685
Vector3(double x, double y, double z)
Definition: CommonDef.h:630
double & operator()(int index)
Definition: CommonDef.h:646
double & y()
Definition: CommonDef.h:642
friend Vector3 operator+(const Vector3 &lhs, const Vector3 &rhs)
Definition: CommonDef.h:700
double length() const
Definition: CommonDef.h:652
Vector3 normalized() const
Definition: CommonDef.h:658
Vector3 cross(const Vector3 &other) const
Definition: CommonDef.h:675
double data[3]
Definition: CommonDef.h:626
double y() const
Definition: CommonDef.h:638
double x() const
Definition: CommonDef.h:637
friend Vector3 operator-(const Vector3 &lhs, const Vector3 &rhs)
Definition: CommonDef.h:695
double & z()
Definition: CommonDef.h:643
Represents a version in the major.minor categories format.
Definition: CommonDef.h:431
int major
the major category of this version
Definition: CommonDef.h:433
bool isOlderThan(const Version &other) const
Definition: CommonDef.h:445
int minor
the minor category of this version
Definition: CommonDef.h:436
bool isSameAs(const Version &other) const
Definition: CommonDef.h:439