40 #ifndef INCLUDED_GLS_MOVING_EYE_H
41 #define INCLUDED_GLS_MOVING_EYE_H
47 # define va_list std::va_list
54 #if( defined( GLSGEN_EXPORT_GLSMOVINGEYE ) || defined( GLSGEN_IMPORT_GLSMOVINGEYE ) || defined( GLS_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \
55 && defined( _MSC_VER )
56 # if defined( GLSGEN_EXPORT_GLSMOVINGEYE ) || defined( GLS_EXPORT_GENERATED )
57 # define GLSGEN_GLSMOVINGEYE_EXPORT __declspec( dllexport )
59 # define GLSGEN_GLSMOVINGEYE_EXPORT __declspec( dllimport )
62 # define GLSGEN_GLSMOVINGEYE_EXPORT
66 #define LIB_BASE_NAME "gls_moving_eye"
75 GLS_MOVINGEYE_EMIT_EVENT = GLS_EYEPOINT_VIEW_VECTORS + 1,
76 GLS_MOVINGEYE_LOOK_AT_OBJECT,
77 GLS_MOVINGEYE_MAX_SPEED,
78 GLS_MOVINGEYE_MOVEMENT,
80 GLS_MOVINGEYE_DISABLE_HISTORY
94 DISTI_DEPRECATED(
"This identifier is forbidden by the C++ standard. Use BaseClass instead." )
113 static const char* MOVE_COMPLETE_EVENT_NAME;
163 CloneObject(
bool generateNames =
false ) DISTI_METHOD_OVERRIDE;
365 bool fovIsHorizontal;
367 double otherOrthoSize;
370 FovConstraintType horizontalConstraint;
371 FovConstraintType verticalConstraint;
386 return viewVectors[ 2 ];
395 std::string qualifiedEyeName;
435 bool _disableMoveHistory;
516 float MoveTime(
float distance,
float desiredTime )
const;
524 float RouteDistance( std::vector<GlsEyePoint*>& eyes )
const;
543 case GlsMovingEye::CONSTANT:
544 outstr <<
"CONSTANT";
546 case GlsMovingEye::SINUSOIDAL:
547 outstr <<
"SINUSOIDAL";
550 outstr <<
"BAD_MOVEMENT";
561 if( str ==
"CONSTANT" )
563 m = GlsMovingEye::CONSTANT;
565 else if( str ==
"SINUSOIDAL" )
567 m = GlsMovingEye::SINUSOIDAL;
577 case GlsMovingEye::DIRECT:
580 case GlsMovingEye::ARC:
584 outstr <<
"BAD_ROUTE";
595 if( str ==
"DIRECT" )
597 r = GlsMovingEye::DIRECT;
599 else if( str ==
"ARC" )
601 r = GlsMovingEye::ARC;
virtual void SetAvailableAttributes(unsigned int value) DISTI_METHOD_OVERRIDE
virtual void GenerateInstanceName() DISTI_METHOD_OVERRIDE
Vector DirectionToObj(const std::string &qualifiedObjName) const
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:436
void MoveToEye(GlsEyePoint *eye, float moveTime=2.0f)
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array) DISTI_METHOD_OVERRIDE
bool AtEndOfHistory() const
Definition: gls_moving_eye.h:142
Route_t Route() const
Definition: gls_moving_eye.h:338
float _bufferAngle
Definition: gls_moving_eye.h:473
Definition: dynamic_array.h:66
Movement_t Movement() const
Definition: gls_moving_eye.h:254
void StartMoving(const MoveParms_t &moveParms)
virtual void CopyProperties(DisplayObject *src) DISTI_METHOD_OVERRIDE
virtual void Calculate(double time) DISTI_METHOD_OVERRIDE
bool AtStartOfHistory() const
Definition: gls_moving_eye.h:133
Vector _lookAtCalculatedUpVector
The last up vector calculated by the lookAt algorithm.
Definition: gls_moving_eye.h:430
Movement_t
This specifies the type of route taken from one eyepoint to another.
Definition: gls_moving_eye.h:99
void ExtractEyepoints(Group *group, std::vector< GlsEyePoint * > &eyes)
bool _firstSegment
Definition: gls_moving_eye.h:410
#define GLSGEN_GLSMOVINGEYE_EXPORT
Provides support for creating DLLs.
Definition: gls_moving_eye.h:62
void MoveToEyeAdd(GlsEyePoint *eye, float moveTime=2.0f)
Definition: gls_glo_file.h:988
bool DisableMoveHistory() const
Definition: gls_moving_eye.h:198
std::ostream & operator<<(std::ostream &outstr, const AttributeName &name)
Defines the stream out operator.
bool EmitEvent() const
Definition: gls_moving_eye.h:185
Vector _upVector
Definition: gls_moving_eye.h:467
Type to store eyepoint state information.
Definition: gls_moving_eye.h:359
float RouteDistance(std::vector< GlsEyePoint * > &eyes) const
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=0) DISTI_METHOD_OVERRIDE
virtual void Draw() DISTI_METHOD_OVERRIDE
The disti::GlsEyePoint class. Implements eyepoints.
Route_t _route
Type of route to take when moving to another eyepoint.
Definition: gls_moving_eye.h:453
double _simTime
Latest known simulation time.
Definition: gls_moving_eye.h:460
virtual void SetValue(int spec, va_list &args) DISTI_METHOD_OVERRIDE
Definition: gls_eyepoint.h:115
float _maxSpeed
Definition: gls_moving_eye.h:443
void MoveToLocation(const Vector &location, float moveTime=2.0f)
void MoveRelative(const Vector &moveAmount, const Vector &rotation)
Route_t
This specifies the type of route taken from one eyepoint to another.
Definition: gls_moving_eye.h:106
std::queue< MoveParms_t > _moveQ
Definition: gls_moving_eye.h:450
double _startTime
Simulation time that a move starts.
Definition: gls_moving_eye.h:463
std::vector< MoveParms_t > _moveHistory
Stores a history of visited eyepoints for moving back and forth.
Definition: gls_moving_eye.h:433
float MaxSpeed() const
Definition: gls_moving_eye.h:240
bool _emitEvent
Whether or not to emit an event when the move has completed.
Definition: gls_moving_eye.h:405
Vector _lookAtReferenceUpVector
Definition: gls_moving_eye.h:427
virtual DisplayObject * CloneObject(bool generateNames=false) DISTI_METHOD_OVERRIDE
std::string _lookAtObject
Definition: gls_moving_eye.h:423
const std::string & LookAtObject() const
Definition: gls_moving_eye.h:226
Movement_t _movement
Type of movement algorithm to use when moving to another eyepoint.
Definition: gls_moving_eye.h:446
float MoveTime(float distance, float desiredTime) const
std::size_t _historyPos
Current position into the history list.
Definition: gls_moving_eye.h:413
static DisplayObject * CreateInstance()
Definition: gls_moving_eye.h:87
Macros and helper code to determine what subset of C++11/14/17 is available.
friend class GlsMovingEyeEditor
The editor class needs to access this class' privates. :)
Definition: gls_moving_eye.h:535
bool _initialized
Flag to keep track of when the object gets initialized.
Definition: gls_moving_eye.h:416
Definition: bmpimage.h:46
Type to store eyepoint movement parameters.
Definition: gls_moving_eye.h:391
EyeState_t _start
Definition: gls_moving_eye.h:457