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
67#define LIB_BASE_NAME "gls_moving_eye"
76 GLS_MOVINGEYE_EMIT_EVENT = GLS_EYEPOINT_VIEW_VECTORS + 1,
77 GLS_MOVINGEYE_LOOK_AT_OBJECT,
78 GLS_MOVINGEYE_MAX_SPEED,
79 GLS_MOVINGEYE_MOVEMENT,
81 GLS_MOVINGEYE_DISABLE_HISTORY
95 DISTI_DEPRECATED(
"This identifier is forbidden by the C++ standard. Use BaseClass instead." )
432 float MoveTime(
float distance,
float desiredTime )
const;
444 friend class GlsMovingEyeEditor;
455 case GlsMovingEye::CONSTANT:
456 outstr <<
"CONSTANT";
458 case GlsMovingEye::SINUSOIDAL:
459 outstr <<
"SINUSOIDAL";
462 outstr <<
"BAD_MOVEMENT";
476 if( str ==
"CONSTANT" )
478 m = GlsMovingEye::CONSTANT;
480 else if( str ==
"SINUSOIDAL" )
482 m = GlsMovingEye::SINUSOIDAL;
495 case GlsMovingEye::DIRECT:
498 case GlsMovingEye::ARC:
502 outstr <<
"BAD_ROUTE";
516 if( str ==
"DIRECT" )
518 r = GlsMovingEye::DIRECT;
520 else if( str ==
"ARC" )
522 r = GlsMovingEye::ARC;
Definition: dynamic_array.h:79
Definition: gls_eyepoint.h:117
FovConstraintType
The FovConstraintType enum. Defines view constraint behavior.
Definition: gls_eyepoint.h:126
Definition: gls_glo_file.h:1243
Definition: gls_moving_eye.h:89
double _simTime
Latest known simulation time.
Definition: gls_moving_eye.h:385
Movement_t Movement() const
Definition: gls_moving_eye.h:201
virtual void SetAvailableAttributes(unsigned int value) DISTI_METHOD_OVERRIDE
virtual void Draw() DISTI_METHOD_OVERRIDE
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array) DISTI_METHOD_OVERRIDE
bool _disableMoveHistory
If true, move history will not be saved.
Definition: gls_moving_eye.h:360
Movement_t _movement
Type of movement algorithm to use when moving to another eyepoint.
Definition: gls_moving_eye.h:371
Route_t Route() const
Definition: gls_moving_eye.h:265
void Route(Route_t routeType)
virtual DisplayObject * CloneObject(bool generateNames=false) DISTI_METHOD_OVERRIDE
float MaxSpeed() const
Definition: gls_moving_eye.h:194
void Movement(Movement_t movementType)
GlsMovingEye(const GlsMovingEye &that, const bool generateNames)
std::queue< MoveParms_t > _moveQ
Definition: gls_moving_eye.h:375
Vector DirectionToObj(const std::string &qualifiedObjName) const
bool _initialized
Flag to keep track of when the object gets initialized.
Definition: gls_moving_eye.h:341
float _maxSpeed
Definition: gls_moving_eye.h:368
std::vector< MoveParms_t > _moveHistory
Stores a history of visited eyepoints for moving back and forth.
Definition: gls_moving_eye.h:358
void MoveToEyeAdd(Group *eyeGroup, float moveTime=2.0f)
float MoveTime(float distance, float desiredTime) const
void MaxSpeed(float speed)
virtual void SetValue(int spec, va_list &args) DISTI_METHOD_OVERRIDE
bool AtStartOfHistory() const
Definition: gls_moving_eye.h:133
Movement_t
This specifies the type of route taken from one eyepoint to another.
Definition: gls_moving_eye.h:101
void ExtractEyepoints(Group *group, std::vector< GlsEyePoint * > &eyes)
void EmitEvent(bool emitEvent)
virtual void Calculate(double time) DISTI_METHOD_OVERRIDE
void LookAtObject(const std::string &name)
static DisplayObject * CreateInstance()
bool _emitEvent
Whether or not to emit an event when the move has completed.
Definition: gls_moving_eye.h:330
void DisableMoveHistory(bool his)
double _startTime
Simulation time that a move starts.
Definition: gls_moving_eye.h:388
Route_t _route
Type of route to take when moving to another eyepoint.
Definition: gls_moving_eye.h:378
float _bufferAngle
Definition: gls_moving_eye.h:398
bool AtEndOfHistory() const
Definition: gls_moving_eye.h:139
Vector _lookAtCalculatedUpVector
The last up vector calculated by the lookAt algorithm.
Definition: gls_moving_eye.h:355
EyeState_t _start
Definition: gls_moving_eye.h:382
std::size_t _historyPos
Current position into the history list.
Definition: gls_moving_eye.h:338
void MoveToLocation(const Vector &location, float moveTime=2.0f)
void MoveToEye(GlsEyePoint *eye, float moveTime=2.0f)
std::string _lookAtObject
Definition: gls_moving_eye.h:348
virtual void CopyProperties(DisplayObject *src) DISTI_METHOD_OVERRIDE
Vector _upVector
Definition: gls_moving_eye.h:392
Route_t
This specifies the type of route taken from one eyepoint to another.
Definition: gls_moving_eye.h:108
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=0) DISTI_METHOD_OVERRIDE
Vector _lookAtReferenceUpVector
Definition: gls_moving_eye.h:352
bool DisableMoveHistory() const
Definition: gls_moving_eye.h:168
void MoveToEyeAdd(GlsEyePoint *eye, float moveTime=2.0f)
static const char * MOVE_COMPLETE_EVENT_NAME
Name of the event emitted when a move is completed.
Definition: gls_moving_eye.h:113
void MoveRelative(const Vector &moveAmount, const Vector &rotation)
const std::string & LookAtObject() const
Definition: gls_moving_eye.h:187
void MoveToEye(Group *eyeGroup, float moveTime=2.0f)
virtual void GenerateInstanceName() DISTI_METHOD_OVERRIDE
float RouteDistance(std::vector< GlsEyePoint * > &eyes) const
void StartMoving(const MoveParms_t &moveParms)
bool _firstSegment
Definition: gls_moving_eye.h:335
bool EmitEvent() const
Definition: gls_moving_eye.h:161
Macros and helper code to determine what subset of C++11/14/17 is available.
#define DISTI_SPECIAL_MEM_FUN_DELETE
Macro to wrap function deletion, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:235
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:457
#define DISTI_METHOD_OVERRIDE
Macro to wrap the override keyword, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:214
The disti::GlsEyePoint class. Implements eyepoints.
#define GLSGEN_GLSMOVINGEYE_EXPORT
Provides support for creating DLLs.
Definition: gls_moving_eye.h:62
Force inclusion of the DirectShow library.
Definition: bmpimage.h:47
std::ostream & operator<<(std::ostream &outstr, const AttributeName &name)
std::istream & operator>>(std::istream &instr, GlsColor &color)
Type to store eyepoint state information.
Definition: gls_moving_eye.h:283
double FOV
Field of view of eyepoint in Degrees, if fovIsHorizontal is true, this is horizontal.
Definition: gls_moving_eye.h:286
Vector location
Location of the eyepoint in logical units.
Definition: gls_moving_eye.h:284
double farClip
Distance from eyepoint to near clipping plane.
Definition: gls_moving_eye.h:291
FovConstraintType verticalConstraint
The type of constraint in the vertical direction.
Definition: gls_moving_eye.h:294
bool fovIsHorizontal
True if field of view measurement is along horizonal axis, else along vertical axis.
Definition: gls_moving_eye.h:288
bool orthographic
True if orthographic projection, else perspective projection.
Definition: gls_moving_eye.h:285
double orthoSize
Size of ortho projection in logical units, if fovIsHorizontal is true, this is horizontal.
Definition: gls_moving_eye.h:289
Vector Direction()
Definition: gls_moving_eye.h:308
EyeState_t(GlsMovingEye *movingEye, GlsEyePoint *targetEye)
double nearClip
Distance from eyepoint to far clipping plane.
Definition: gls_moving_eye.h:292
Vector viewVectors[3]
3 vectors used to set the orientation of the eyepoint.
Definition: gls_moving_eye.h:295
FovConstraintType horizontalConstraint
The type of constraint in the horizontal direction.
Definition: gls_moving_eye.h:293
double otherOrthoSize
Size of ortho projection for the other direction, based on fovIsHorizontal.
Definition: gls_moving_eye.h:290
double otherFOV
Field of view for the other direction, based on fovIsHorizontal.
Definition: gls_moving_eye.h:287
Type to store eyepoint movement parameters.
Definition: gls_moving_eye.h:316
std::string qualifiedEyeName
The name of the eyepoint object to move to.
Definition: gls_moving_eye.h:319
MoveParms_t(bool storeHistory, double moveTime, GlsMovingEye *movingEye, GlsEyePoint *targetEye)
double time
The amount of time to move in seconds.
Definition: gls_moving_eye.h:318
bool addToHistory
If true, will be added to eyepoint movement history.
Definition: gls_moving_eye.h:317