39#ifndef INCLUDED_GLS_MOVING_EYE_H
40#define INCLUDED_GLS_MOVING_EYE_H
46# define va_list std::va_list
53#if( defined( GLSGEN_EXPORT_GLSMOVINGEYE ) || defined( GLSGEN_IMPORT_GLSMOVINGEYE ) || defined( GLS_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \
54 && defined( _MSC_VER )
55# if defined( GLSGEN_EXPORT_GLSMOVINGEYE ) || defined( GLS_EXPORT_GENERATED )
56# define GLSGEN_GLSMOVINGEYE_EXPORT __declspec( dllexport )
58# define GLSGEN_GLSMOVINGEYE_EXPORT __declspec( dllimport )
61# 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." )
431 float MoveTime(
float distance,
float desiredTime )
const;
443 friend class GlsMovingEyeEditor;
454 case GlsMovingEye::CONSTANT:
455 outstr <<
"CONSTANT";
457 case GlsMovingEye::SINUSOIDAL:
458 outstr <<
"SINUSOIDAL";
461 outstr <<
"BAD_MOVEMENT";
475 if( str ==
"CONSTANT" )
477 m = GlsMovingEye::CONSTANT;
479 else if( str ==
"SINUSOIDAL" )
481 m = GlsMovingEye::SINUSOIDAL;
494 case GlsMovingEye::DIRECT:
497 case GlsMovingEye::ARC:
501 outstr <<
"BAD_ROUTE";
515 if( str ==
"DIRECT" )
517 r = GlsMovingEye::DIRECT;
519 else if( str ==
"ARC" )
521 r = GlsMovingEye::ARC;
Definition: dynamic_array.h:79
Definition: gls_eyepoint.h:116
FovConstraintType
The FovConstraintType enum. Defines view constraint behavior.
Definition: gls_eyepoint.h:125
Definition: gls_glo_file.h:1241
Definition: gls_moving_eye.h:88
double _simTime
Latest known simulation time.
Definition: gls_moving_eye.h:384
Movement_t Movement() const
Definition: gls_moving_eye.h:200
bool _disableMoveHistory
If true, move history will not be saved.
Definition: gls_moving_eye.h:359
Movement_t _movement
Type of movement algorithm to use when moving to another eyepoint.
Definition: gls_moving_eye.h:370
Route_t Route() const
Definition: gls_moving_eye.h:264
void SetValue(int spec, va_list &args) DISTI_METHOD_OVERRIDE
void Route(Route_t routeType)
InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=0) DISTI_METHOD_OVERRIDE
void CopyProperties(DisplayObject *src) DISTI_METHOD_OVERRIDE
float MaxSpeed() const
Definition: gls_moving_eye.h:193
void Movement(Movement_t movementType)
GlsMovingEye(const GlsMovingEye &that, const bool generateNames)
std::queue< MoveParms_t > _moveQ
Definition: gls_moving_eye.h:374
Vector DirectionToObj(const std::string &qualifiedObjName) const
bool _initialized
Flag to keep track of when the object gets initialized.
Definition: gls_moving_eye.h:340
void SetAvailableAttributes(unsigned int value) DISTI_METHOD_OVERRIDE
float _maxSpeed
Definition: gls_moving_eye.h:367
void GetCppInterfaceDescriptionFree(InterfaceListType *array) DISTI_METHOD_OVERRIDE
std::vector< MoveParms_t > _moveHistory
Stores a history of visited eyepoints for moving back and forth.
Definition: gls_moving_eye.h:357
void MoveToEyeAdd(Group *eyeGroup, float moveTime=2.0f)
float MoveTime(float distance, float desiredTime) const
void MaxSpeed(float speed)
bool AtStartOfHistory() const
Definition: gls_moving_eye.h:132
Movement_t
This specifies the type of route taken from one eyepoint to another.
Definition: gls_moving_eye.h:100
void ExtractEyepoints(Group *group, std::vector< GlsEyePoint * > &eyes)
void EmitEvent(bool emitEvent)
void LookAtObject(const std::string &name)
static DisplayObject * CreateInstance()
void Draw() DISTI_METHOD_OVERRIDE
bool _emitEvent
Whether or not to emit an event when the move has completed.
Definition: gls_moving_eye.h:329
void DisableMoveHistory(bool his)
double _startTime
Simulation time that a move starts.
Definition: gls_moving_eye.h:387
Route_t _route
Type of route to take when moving to another eyepoint.
Definition: gls_moving_eye.h:377
float _bufferAngle
Definition: gls_moving_eye.h:397
bool AtEndOfHistory() const
Definition: gls_moving_eye.h:138
Vector _lookAtCalculatedUpVector
The last up vector calculated by the lookAt algorithm.
Definition: gls_moving_eye.h:354
EyeState_t _start
Definition: gls_moving_eye.h:381
std::size_t _historyPos
Current position into the history list.
Definition: gls_moving_eye.h:337
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:347
Vector _upVector
Definition: gls_moving_eye.h:391
void GenerateInstanceName() DISTI_METHOD_OVERRIDE
Route_t
This specifies the type of route taken from one eyepoint to another.
Definition: gls_moving_eye.h:107
Vector _lookAtReferenceUpVector
Definition: gls_moving_eye.h:351
bool DisableMoveHistory() const
Definition: gls_moving_eye.h:167
void MoveToEyeAdd(GlsEyePoint *eye, float moveTime=2.0f)
void Calculate(double time) DISTI_METHOD_OVERRIDE
static const char * MOVE_COMPLETE_EVENT_NAME
Name of the event emitted when a move is completed.
Definition: gls_moving_eye.h:112
DisplayObject * CloneObject(bool generateNames=false) DISTI_METHOD_OVERRIDE
void MoveRelative(const Vector &moveAmount, const Vector &rotation)
const std::string & LookAtObject() const
Definition: gls_moving_eye.h:186
void MoveToEye(Group *eyeGroup, float moveTime=2.0f)
float RouteDistance(std::vector< GlsEyePoint * > &eyes) const
void StartMoving(const MoveParms_t &moveParms)
bool _firstSegment
Definition: gls_moving_eye.h:334
bool EmitEvent() const
Definition: gls_moving_eye.h:160
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:245
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:487
#define DISTI_METHOD_OVERRIDE
Macro to wrap the override keyword, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:221
The disti::GlsEyePoint class. Implements eyepoints.
#define GLSGEN_GLSMOVINGEYE_EXPORT
Provides support for creating DLLs.
Definition: gls_moving_eye.h:61
Definition: bmpimage.h:46
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:282
double FOV
Field of view of eyepoint in Degrees, if fovIsHorizontal is true, this is horizontal.
Definition: gls_moving_eye.h:285
Vector location
Location of the eyepoint in logical units.
Definition: gls_moving_eye.h:283
double farClip
Distance from eyepoint to near clipping plane.
Definition: gls_moving_eye.h:290
FovConstraintType verticalConstraint
The type of constraint in the vertical direction.
Definition: gls_moving_eye.h:293
bool fovIsHorizontal
True if field of view measurement is along horizonal axis, else along vertical axis.
Definition: gls_moving_eye.h:287
bool orthographic
True if orthographic projection, else perspective projection.
Definition: gls_moving_eye.h:284
double orthoSize
Size of ortho projection in logical units, if fovIsHorizontal is true, this is horizontal.
Definition: gls_moving_eye.h:288
Vector Direction()
Definition: gls_moving_eye.h:307
EyeState_t(GlsMovingEye *movingEye, GlsEyePoint *targetEye)
double nearClip
Distance from eyepoint to far clipping plane.
Definition: gls_moving_eye.h:291
Vector viewVectors[3]
3 vectors used to set the orientation of the eyepoint.
Definition: gls_moving_eye.h:294
FovConstraintType horizontalConstraint
The type of constraint in the horizontal direction.
Definition: gls_moving_eye.h:292
double otherOrthoSize
Size of ortho projection for the other direction, based on fovIsHorizontal.
Definition: gls_moving_eye.h:289
double otherFOV
Field of view for the other direction, based on fovIsHorizontal.
Definition: gls_moving_eye.h:286
Type to store eyepoint movement parameters.
Definition: gls_moving_eye.h:315
std::string qualifiedEyeName
The name of the eyepoint object to move to.
Definition: gls_moving_eye.h:318
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:317
bool addToHistory
If true, will be added to eyepoint movement history.
Definition: gls_moving_eye.h:316