40 #ifndef _GLSMOVINGEYE_H
41 #define _GLSMOVINGEYE_H
49 #if (defined(GLSGEN_EXPORT_GLSMOVINGEYE) || \
50 defined(GLSGEN_IMPORT_GLSMOVINGEYE) || \
51 defined(GLS_EXPORT_GENERATED) || \
52 defined(GLS_IMPORT_GENERATED)) \
54 # if defined(GLSGEN_EXPORT_GLSMOVINGEYE) || defined(GLS_EXPORT_GENERATED)
55 # define GLSGEN_GLSMOVINGEYE_EXPORT __declspec(dllexport)
57 # define GLSGEN_GLSMOVINGEYE_EXPORT __declspec(dllimport)
60 # define GLSGEN_GLSMOVINGEYE_EXPORT
64 #define LIB_BASE_NAME "gls_moving_eye"
74 GLS_MOVINGEYE_EMIT_EVENT = GLS_EYEPOINT_VIEW_VECTORS + 1,
75 GLS_MOVINGEYE_LOOK_AT_OBJECT,
76 GLS_MOVINGEYE_MAX_SPEED,
77 GLS_MOVINGEYE_MOVEMENT,
79 GLS_MOVINGEYE_DISABLE_HISTORY
110 static const char* MOVE_COMPLETE_EVENT_NAME;
366 bool fovIsHorizontal;
368 double otherOrthoSize;
371 FovConstraintType horizontalConstraint;
372 FovConstraintType verticalConstraint;
387 return viewVectors[2];
397 std::string qualifiedEyeName;
437 bool _disableMoveHistory;
518 float MoveTime(
float distance,
float desiredTime)
const;
547 case GlsMovingEye::CONSTANT:
548 outstr <<
"CONSTANT";
550 case GlsMovingEye::SINUSOIDAL:
551 outstr <<
"SINUSOIDAL";
554 outstr <<
"BAD_MOVEMENT";
566 if (str ==
"CONSTANT")
568 m = GlsMovingEye::CONSTANT;
570 else if (str ==
"SINUSOIDAL")
572 m = GlsMovingEye::SINUSOIDAL;
583 case GlsMovingEye::DIRECT:
586 case GlsMovingEye::ARC:
590 outstr <<
"BAD_ROUTE";
604 r = GlsMovingEye::DIRECT;
606 else if (str ==
"ARC")
608 r = GlsMovingEye::ARC;
unsigned _historyPos
Current position into the history list.
Definition: gls_moving_eye.h:415
Vector DirectionToObj(const std::string &qualifiedObjName) const
void MoveToEye(GlsEyePoint *eye, float moveTime=2.0f)
bool AtEndOfHistory() const
Definition: gls_moving_eye.h:139
Route_t Route() const
Definition: gls_moving_eye.h:338
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array)
float _bufferAngle
Definition: gls_moving_eye.h:475
Definition: dynamic_array.h:63
Movement_t Movement() const
Definition: gls_moving_eye.h:254
void StartMoving(const MoveParms_t &moveParms)
bool AtStartOfHistory() const
Definition: gls_moving_eye.h:130
Vector _lookAtCalculatedUpVector
The last up vector calculated by the lookAt algorithm.
Definition: gls_moving_eye.h:432
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:96
void ExtractEyepoints(Group *group, std::vector< GlsEyePoint * > &eyes)
bool _firstSegment
Definition: gls_moving_eye.h:412
#define GLSGEN_GLSMOVINGEYE_EXPORT
Provides support for creating DLLs.
Definition: gls_moving_eye.h:60
virtual void SetAvailableAttributes(unsigned int value)
void MoveToEyeAdd(GlsEyePoint *eye, float moveTime=2.0f)
bool DisableMoveHistory() const
Definition: gls_moving_eye.h:195
bool EmitEvent() const
Definition: gls_moving_eye.h:182
Vector _upVector
Definition: gls_moving_eye.h:469
Type to store eyepoint state information.
Definition: gls_moving_eye.h:360
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:455
double _simTime
Latest known simulation time.
Definition: gls_moving_eye.h:462
Definition: gls_eyepoint.h:115
float _maxSpeed
Definition: gls_moving_eye.h:445
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:103
std::queue< MoveParms_t > _moveQ
Definition: gls_moving_eye.h:452
virtual DisplayObject * CloneObject(bool generateNames=false)
double _startTime
Simulation time that a move starts.
Definition: gls_moving_eye.h:465
std::vector< MoveParms_t > _moveHistory
Stores a history of visited eyepoints for moving back and forth.
Definition: gls_moving_eye.h:435
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:407
Vector _lookAtReferenceUpVector
Definition: gls_moving_eye.h:429
std::string _lookAtObject
Definition: gls_moving_eye.h:425
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:448
float MoveTime(float distance, float desiredTime) const
virtual void Calculate(double time)
static DisplayObject * CreateInstance()
Definition: gls_moving_eye.h:86
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:418
Definition: bmpimage.h:46
Type to store eyepoint movement parameters.
Definition: gls_moving_eye.h:393
EyeState_t _start
Definition: gls_moving_eye.h:459