40 #ifndef _GLSMOVINGEYE_H
41 #define _GLSMOVINGEYE_H
49 #if( defined( GLSGEN_EXPORT_GLSMOVINGEYE ) || defined( GLSGEN_IMPORT_GLSMOVINGEYE ) || defined( GLS_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \
50 && defined( _MSC_VER )
51 # if defined( GLSGEN_EXPORT_GLSMOVINGEYE ) || defined( GLS_EXPORT_GENERATED )
52 # define GLSGEN_GLSMOVINGEYE_EXPORT __declspec( dllexport )
54 # define GLSGEN_GLSMOVINGEYE_EXPORT __declspec( dllimport )
57 # define GLSGEN_GLSMOVINGEYE_EXPORT
61 #define LIB_BASE_NAME "gls_moving_eye"
70 GLS_MOVINGEYE_EMIT_EVENT = GLS_EYEPOINT_VIEW_VECTORS + 1,
71 GLS_MOVINGEYE_LOOK_AT_OBJECT,
72 GLS_MOVINGEYE_MAX_SPEED,
73 GLS_MOVINGEYE_MOVEMENT,
75 GLS_MOVINGEYE_DISABLE_HISTORY
106 static const char* MOVE_COMPLETE_EVENT_NAME;
361 bool fovIsHorizontal;
363 double otherOrthoSize;
366 FovConstraintType horizontalConstraint;
367 FovConstraintType verticalConstraint;
382 return viewVectors[ 2 ];
391 std::string qualifiedEyeName;
431 bool _disableMoveHistory;
512 float MoveTime(
float distance,
float desiredTime )
const;
520 float RouteDistance( std::vector<GlsEyePoint*>& eyes )
const;
539 case GlsMovingEye::CONSTANT:
540 outstr <<
"CONSTANT";
542 case GlsMovingEye::SINUSOIDAL:
543 outstr <<
"SINUSOIDAL";
546 outstr <<
"BAD_MOVEMENT";
557 if( str ==
"CONSTANT" )
559 m = GlsMovingEye::CONSTANT;
561 else if( str ==
"SINUSOIDAL" )
563 m = GlsMovingEye::SINUSOIDAL;
573 case GlsMovingEye::DIRECT:
576 case GlsMovingEye::ARC:
580 outstr <<
"BAD_ROUTE";
591 if( str ==
"DIRECT" )
593 r = GlsMovingEye::DIRECT;
595 else if( str ==
"ARC" )
597 r = GlsMovingEye::ARC;
unsigned _historyPos
Current position into the history list.
Definition: gls_moving_eye.h:409
Vector DirectionToObj(const std::string &qualifiedObjName) const
void MoveToEye(GlsEyePoint *eye, float moveTime=2.0f)
bool AtEndOfHistory() const
Definition: gls_moving_eye.h:135
Route_t Route() const
Definition: gls_moving_eye.h:334
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array)
float _bufferAngle
Definition: gls_moving_eye.h:469
Definition: dynamic_array.h:62
Movement_t Movement() const
Definition: gls_moving_eye.h:250
void StartMoving(const MoveParms_t &moveParms)
bool AtStartOfHistory() const
Definition: gls_moving_eye.h:126
Vector _lookAtCalculatedUpVector
The last up vector calculated by the lookAt algorithm.
Definition: gls_moving_eye.h:426
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:92
void ExtractEyepoints(Group *group, std::vector< GlsEyePoint * > &eyes)
bool _firstSegment
Definition: gls_moving_eye.h:406
#define GLSGEN_GLSMOVINGEYE_EXPORT
Provides support for creating DLLs.
Definition: gls_moving_eye.h:57
virtual void SetAvailableAttributes(unsigned int value)
void MoveToEyeAdd(GlsEyePoint *eye, float moveTime=2.0f)
Definition: gls_glo_file.h:835
bool DisableMoveHistory() const
Definition: gls_moving_eye.h:191
bool EmitEvent() const
Definition: gls_moving_eye.h:178
Vector _upVector
Definition: gls_moving_eye.h:463
Type to store eyepoint state information.
Definition: gls_moving_eye.h:355
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:449
double _simTime
Latest known simulation time.
Definition: gls_moving_eye.h:456
Definition: gls_eyepoint.h:115
float _maxSpeed
Definition: gls_moving_eye.h:439
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:99
std::queue< MoveParms_t > _moveQ
Definition: gls_moving_eye.h:446
virtual DisplayObject * CloneObject(bool generateNames=false)
double _startTime
Simulation time that a move starts.
Definition: gls_moving_eye.h:459
std::vector< MoveParms_t > _moveHistory
Stores a history of visited eyepoints for moving back and forth.
Definition: gls_moving_eye.h:429
float MaxSpeed() const
Definition: gls_moving_eye.h:236
bool _emitEvent
Whether or not to emit an event when the move has completed.
Definition: gls_moving_eye.h:401
Vector _lookAtReferenceUpVector
Definition: gls_moving_eye.h:423
std::string _lookAtObject
Definition: gls_moving_eye.h:419
const std::string & LookAtObject() const
Definition: gls_moving_eye.h:222
Movement_t _movement
Type of movement algorithm to use when moving to another eyepoint.
Definition: gls_moving_eye.h:442
float MoveTime(float distance, float desiredTime) const
virtual void Calculate(double time)
static DisplayObject * CreateInstance()
Definition: gls_moving_eye.h:82
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:531
bool _initialized
Flag to keep track of when the object gets initialized.
Definition: gls_moving_eye.h:412
Definition: bmpimage.h:46
Type to store eyepoint movement parameters.
Definition: gls_moving_eye.h:387
EyeState_t _start
Definition: gls_moving_eye.h:453