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;
368 bool fovIsHorizontal;
370 double otherOrthoSize;
373 FovConstraintType horizontalConstraint;
374 FovConstraintType verticalConstraint;
389 return viewVectors[ 2 ];
398 std::string qualifiedEyeName;
438 bool _disableMoveHistory;
519 float MoveTime(
float distance,
float desiredTime )
const;
527 float RouteDistance( std::vector<GlsEyePoint*>& eyes )
const;
546 case GlsMovingEye::CONSTANT:
547 outstr <<
"CONSTANT";
549 case GlsMovingEye::SINUSOIDAL:
550 outstr <<
"SINUSOIDAL";
553 outstr <<
"BAD_MOVEMENT";
564 if( str ==
"CONSTANT" )
566 m = GlsMovingEye::CONSTANT;
568 else if( str ==
"SINUSOIDAL" )
570 m = GlsMovingEye::SINUSOIDAL;
580 case GlsMovingEye::DIRECT:
583 case GlsMovingEye::ARC:
587 outstr <<
"BAD_ROUTE";
598 if( str ==
"DIRECT" )
600 r = GlsMovingEye::DIRECT;
602 else if( str ==
"ARC" )
604 r = GlsMovingEye::ARC;
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)
bool AtEndOfHistory() const
Definition: gls_moving_eye.h:142
Route_t Route() const
Definition: gls_moving_eye.h:341
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array)
float _bufferAngle
Definition: gls_moving_eye.h:476
Definition: dynamic_array.h:66
Movement_t Movement() const
Definition: gls_moving_eye.h:257
void StartMoving(const MoveParms_t &moveParms)
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:433
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=0)
virtual void CopyProperties(DisplayObject *src)
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:413
#define GLSGEN_GLSMOVINGEYE_EXPORT
Provides support for creating DLLs.
Definition: gls_moving_eye.h:62
virtual void SetAvailableAttributes(unsigned int value)
void MoveToEyeAdd(GlsEyePoint *eye, float moveTime=2.0f)
Definition: gls_glo_file.h:982
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:470
Type to store eyepoint state information.
Definition: gls_moving_eye.h:362
float RouteDistance(std::vector< GlsEyePoint * > &eyes) const
virtual void SetValue(int spec, va_list &args)
The disti::GlsEyePoint class. Implements eyepoints.
Route_t _route
Type of route to take when moving to another eyepoint.
Definition: gls_moving_eye.h:456
double _simTime
Latest known simulation time.
Definition: gls_moving_eye.h:463
Definition: gls_eyepoint.h:115
float _maxSpeed
Definition: gls_moving_eye.h:446
virtual void GenerateInstanceName()
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:453
virtual DisplayObject * CloneObject(bool generateNames=false)
double _startTime
Simulation time that a move starts.
Definition: gls_moving_eye.h:466
std::vector< MoveParms_t > _moveHistory
Stores a history of visited eyepoints for moving back and forth.
Definition: gls_moving_eye.h:436
float MaxSpeed() const
Definition: gls_moving_eye.h:243
bool _emitEvent
Whether or not to emit an event when the move has completed.
Definition: gls_moving_eye.h:408
Vector _lookAtReferenceUpVector
Definition: gls_moving_eye.h:430
std::string _lookAtObject
Definition: gls_moving_eye.h:426
const std::string & LookAtObject() const
Definition: gls_moving_eye.h:229
Movement_t _movement
Type of movement algorithm to use when moving to another eyepoint.
Definition: gls_moving_eye.h:449
float MoveTime(float distance, float desiredTime) const
std::size_t _historyPos
Current position into the history list.
Definition: gls_moving_eye.h:416
virtual void Calculate(double time)
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:538
bool _initialized
Flag to keep track of when the object gets initialized.
Definition: gls_moving_eye.h:419
Definition: bmpimage.h:46
Type to store eyepoint movement parameters.
Definition: gls_moving_eye.h:394
EyeState_t _start
Definition: gls_moving_eye.h:460