GL Studio C++ Runtime API
gls_moving_eye.h
Go to the documentation of this file.
1/*! \file
2 \brief The disti::GlsMovingEye class.
3
4 \par Copyright Information
5
6 Copyright (c) 2017 by The DiSTI Corporation.<br>
7 11301 Corporate Blvd; Suite 100<br>
8 Orlando, Florida 32817<br>
9 USA<br>
10 <br>
11 All rights reserved.<br>
12
13 This Software contains proprietary trade secrets of DiSTI and may not be
14reproduced, in whole or part, in any form, or by any means of electronic,
15mechanical, or otherwise, without the written permission of DiSTI. Said
16permission may be derived through the purchase of applicable DiSTI product
17licenses which detail the distribution rights of this content and any
18Derivative Works based on this or other copyrighted DiSTI Software.
19
20 NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
21AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
22PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
23AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
24IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
25PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
26
27 LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
28IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
29INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
30DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
31INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
32INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBILITY
33OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
34EXCEED FIVE DOLLARS (US$5.00).
35
36 The aforementioned terms and restrictions are governed by the laws of the
37State of Florida and the United States of America.
38
39*/
40#ifndef INCLUDED_GLS_MOVING_EYE_H
41#define INCLUDED_GLS_MOVING_EYE_H
42
43#include <cstddef>
44#include <queue>
45
46#ifdef __VXWORKS__
47# define va_list std::va_list
48#endif
49
51#include "gls_eyepoint.h"
52
53/// Provides support for creating DLLs.
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 )
58# else
59# define GLSGEN_GLSMOVINGEYE_EXPORT __declspec( dllimport )
60# endif
61#else
62# define GLSGEN_GLSMOVINGEYE_EXPORT
63#endif
64///////////////////////////////////////////////////////////////////////////////
65
66/// Automatically link the runtime library plugin (on Windows).
67#define LIB_BASE_NAME "gls_moving_eye"
68#include "gls_auto_lib.h"
69#undef LIB_BASE_NAME
70
71namespace disti
72{
73// SetValue enumerations
74enum
75{
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,
80 GLS_MOVINGEYE_ROUTE,
81 GLS_MOVINGEYE_DISABLE_HISTORY
82};
83
84//------------------------------------------------------------------------
85/**
86* Runtime implementation of a GlsMovingEye
87*/
89{
90private:
93
94public:
95 DISTI_DEPRECATED( "This identifier is forbidden by the C++ standard. Use BaseClass instead." )
96 typedef GlsEyePoint _BaseClass; ///< Deprecated typedef for the base class.
97 typedef GlsEyePoint BaseClass; ///< Typedef for the base class.
98
99 /// This specifies the type of route taken from one eyepoint to another.
101 {
102 CONSTANT = 0,
103 SINUSOIDAL = 1
104 };
105
106 /// This specifies the type of route taken from one eyepoint to another.
108 {
109 DIRECT = 0,
110 ARC = 1
111 };
112
113 static const char* MOVE_COMPLETE_EVENT_NAME; ///< Name of the event emitted when a move is completed
114
115 //------------------------------------------------------------------------
116 /**
117 * Create a new GlsMovingEye.
118 */
120
121 /// Copy constructor
122 /// \param that The object to copy from.
123 /// \param generateNames Whether or not to generate an instance name for this object.
124 GLSGEN_GLSMOVINGEYE_EXPORT GlsMovingEye( const GlsMovingEye& that, const bool generateNames );
125
126 //------------------------------------------------------------------------
127 /**
128 * GlsMovingEyeEditor destructor
129 */
131
132 /// \return True if the we're at the beginning of the history of movements.
133 bool AtStartOfHistory() const
134 {
135 return _historyPos == 0;
136 }
137
138 /// \return True if the we're at the end of the history of movements.
139 bool AtEndOfHistory() const
140 {
141 return _historyPos == _moveHistory.size() - 1;
142 }
143
144 //------------------------------------------------------------------------
145 /**
146 * Aborts any move currently in progress.
147 */
149
154
155 /// \return A pointer to a new GlsMovingEye object.
157
159
160 /// \return Whether or not an event is emitted upon completion of a commanded movement.
161 bool EmitEvent() const { return _emitEvent; }
162
163 /// Sets whether or not an event is emitted upon completion of a commanded movement.
164 /// \param emitEvent The new event emit state.
165 void EmitEvent( bool emitEvent );
166
167 /// \return Whether or not an the move history is disabled.
169
170 /// Sets whether or not the move history is disabled.
171 /// \param his The new move history state.
172 void DisableMoveHistory( bool his );
173
175
176#ifndef GLES
179#endif
180 //------------------------------------------------------------------------
181 /**
182 * \return The name of the object that the eyepoint should be always
183 * looking at.
184 * Lifetime is guaranteed to coincide with the GlsMovingEye's lifetime
185 * or until LookAtObject is changed.
186 */
187 const std::string& LookAtObject() const { return _lookAtObject; }
188
189 /// Sets the name of the object that the eyepoint should be always looking at.
190 /// \param name The name of the object in question.
191 void LookAtObject( const std::string& name );
192
193 /// \return The maximum speed in logical units/second which will be used to achive the transition between eyepoints.
194 float MaxSpeed() const { return _maxSpeed; }
195
196 /// Sets the maximum speed in logical units/second which will be used to achive the transition between eyepoints.
197 /// \param speed The new speed to set in logical units/second.
198 void MaxSpeed( float speed );
199
200 /// \return The type of movement algorithm to use when moving to another eyepoint.
201 Movement_t Movement() const { return _movement; }
202
203 /// Sets the type of movement algorithm to use when moving to another eyepoint.
204 /// \param movementType The new movement algorithm to use.
205 void Movement( Movement_t movementType );
206
207 //------------------------------------------------------------------------
208 /**
209 * Moves this eyepoint to the previously set eyepoint. If a move is
210 * already in progress, it will be immediately stopped, and this move
211 * will start.
212 */
214
215 //------------------------------------------------------------------------
216 /**
217 * Moves this eyepoint to the eyepoint which was last achieved from a
218 * MoveBack(). If a move is already in progress, it will be immediately
219 * stopped, and this move will start.
220 */
222
223 /// Causes this eye to move from its current state to the state specified
224 /// by the targetEye. It will take moveTime to get there. If a move is
225 /// already in progress, it will be immediately stopped, and this move
226 /// will start.
227 /// \param eye The eyepoint to move to.
228 /// \param moveTime The time to take in seconds.
229 GLSGEN_GLSMOVINGEYE_EXPORT void MoveToEye( GlsEyePoint* eye, float moveTime = 2.0f );
230
231 /// Causes the eye to move from its current state to each eyepoint in the
232 /// specified group ending with the last eye in the group. If a move is
233 /// already in progress, it will be immediately stopped, and this move
234 /// will start.
235 /// \param eyeGroup The group to search recursively for GlsEyepoint objects.
236 /// \param moveTime The time to take for each move in seconds.
237 GLSGEN_GLSMOVINGEYE_EXPORT void MoveToEye( Group* eyeGroup, float moveTime = 2.0f );
238
239 /// Causes the specified eye to be added to the end of the list of eyes
240 /// which should be moved through.
241 /// \param eye The eyepoint to add to the list.
242 /// \param moveTime The time to take in seconds.
243 GLSGEN_GLSMOVINGEYE_EXPORT void MoveToEyeAdd( GlsEyePoint* eye, float moveTime = 2.0f );
244
245 /// Causes the specified eyes to be added to the end of the list of eyes
246 /// which should be moved through.
247 /// \param eyeGroup The group to search recursively for GlsEyepoint objects.
248 /// \param moveTime The time to take for each move in seconds.
249 GLSGEN_GLSMOVINGEYE_EXPORT void MoveToEyeAdd( Group* eyeGroup, float moveTime = 2.0f );
250
251 /// Causes this eye to move to the specified location in the scene without
252 /// modifying the view direction or any other eye specific information.
253 /// \param location The location to move to.
254 /// \param moveTime The time to take in seconds.
255 GLSGEN_GLSMOVINGEYE_EXPORT void MoveToLocation( const Vector& location, float moveTime = 2.0f );
256
257 /// Moves the eyepoint in view-relative coordinates by the specified amount.
258 /// The units are in relative screen coordinates:
259 /// X and Y are pixels, Z is 0->1. See WindowToLogical() or LogicalToWindow().
260 /// \param moveAmount The amount to move on each axis.
261 /// \param rotation The amount to rotate on each axis in degrees.
262 GLSGEN_GLSMOVINGEYE_EXPORT void MoveRelative( const Vector& moveAmount, const Vector& rotation );
263
264 /// \return The type of route to use when moving to another eyepoint.
265 Route_t Route() const { return _route; }
266
267 /// Sets the type of route to use when moving to another eyepoint.
268 /// \param routeType The new route type to set.
269 void Route( Route_t routeType );
270
271 GLSGEN_GLSMOVINGEYE_EXPORT virtual void SetValue( int spec, va_list& args ) DISTI_METHOD_OVERRIDE;
272
273protected:
274#ifdef GLES
275 /** Set a single attribute from the GLO file.
276 * \param data The attribute to set and its associated data.
277 */
278 GLSGEN_GLSMOVINGEYE_EXPORT virtual void SetFromGloData( GlsGloFileAttribute& data ) DISTI_METHOD_OVERRIDE;
279#endif
280
281 /// Type to store eyepoint state information.
283 {
284 Vector location; ///< Location of the eyepoint in logical units.
285 bool orthographic; ///< True if orthographic projection, else perspective projection.
286 double FOV; ///< Field of view of eyepoint in Degrees, if fovIsHorizontal is true, this is horizontal.
287 double otherFOV; ///< Field of view for the other direction, based on fovIsHorizontal.
288 bool fovIsHorizontal; ///< True if field of view measurement is along horizonal axis, else along vertical axis.
289 double orthoSize; ///< Size of ortho projection in logical units, if fovIsHorizontal is true, this is horizontal.
290 double otherOrthoSize; ///< Size of ortho projection for the other direction, based on fovIsHorizontal.
291 double farClip; ///< Distance from eyepoint to near clipping plane.
292 double nearClip; ///< Distance from eyepoint to far clipping plane.
293 FovConstraintType horizontalConstraint; ///< The type of constraint in the horizontal direction.
294 FovConstraintType verticalConstraint; ///< The type of constraint in the vertical direction.
295 Vector viewVectors[ 3 ]; ///< 3 vectors used to set the orientation of the eyepoint.
296
297 /** Default constructor */
299
300 /** Initialize EyeState_t using targetEye parameters.
301 * \param movingEye The GlsMovingEye that the state information is for (needed for coordinate conversions)
302 * \param targetEye The GlsEyePoint to move to
303 */
304 EyeState_t( GlsMovingEye* movingEye, GlsEyePoint* targetEye );
305
306 /// Copied from GlsEyePoint::Direction()
307 /// \return The Z view vector for this state.
309 {
310 return viewVectors[ 2 ];
311 }
312 };
313
314 /// Type to store eyepoint movement parameters.
315 struct MoveParms_t : public EyeState_t
316 {
317 bool addToHistory; ///< If true, will be added to eyepoint movement history.
318 double time; ///< The amount of time to move in seconds.
319 std::string qualifiedEyeName; ///< The name of the eyepoint object to move to.
320
321 /// Constructor
322 /// \param storeHistory If true, will be added to eyepoint movement history.
323 /// \param moveTime The amount of time to move in seconds.
324 /// \param movingEye The eye to move.
325 /// \param targetEye The eye to move to.
326 MoveParms_t( bool storeHistory, double moveTime, GlsMovingEye* movingEye, GlsEyePoint* targetEye );
327 };
328
329 /// Whether or not to emit an event when the move has completed.
331
332 /// This is true when a move is occurring and the route segment being
333 /// moved along is the very first one in the queue. This is used during
334 /// sinusoidal movement to smoothly speed up when starting.
336
337 /// Current position into the history list
338 std::size_t _historyPos;
339
340 /// Flag to keep track of when the object gets initialized.
342
343 /// Automatically adjust the view direction to point at the specified
344 /// targetObject. This is inactivated when the string is blank.
345 /// While this is active, the move methods will not control the view
346 /// direction. They can still control the position and other eye
347 /// information.
348 std::string _lookAtObject;
349
350 /// The last up vector provided by the user or the move code.
351 /// Used by the 'look at' algorithm to orient the eyepoint
353
354 /// The last up vector calculated by the lookAt algorithm.
356
357 /// Stores a history of visited eyepoints for moving back and forth.
358 std::vector<MoveParms_t> _moveHistory;
359
360 bool _disableMoveHistory; ///< If true, move history will not be saved.
361
362 /// This specifies the maximum speed in logical units / second which will
363 /// be used to achive the transition. If the requested transition cannot
364 /// occur within the requested move time without exceeding the max speed,
365 /// the move time will be longer than requested. In other words, this
366 /// limit has priority over any requested moveTime. A MaxSpeed value of
367 /// < 0.0 means the speed limit is disabled.
369
370 /// Type of movement algorithm to use when moving to another eyepoint.
372
373 /// Contains movement parameters for each move that should be performed.
374 /// The last one contains the final eyepoint to stop at.
375 std::queue<MoveParms_t> _moveQ;
376
377 /// Type of route to take when moving to another eyepoint.
379
380 /// Stores this eyepoint's current state at the start of a move and is
381 /// used in calculating movement during each execution frame.
383
384 /// Latest known simulation time.
385 double _simTime;
386
387 /// Simulation time that a move starts.
389
390 /// This specifies the up direction and is used when interpolating
391 /// movement to keep the view oriented 'correctly'.
393
394 /// This specifies a buffer area around _upVector and -_upVector which
395 /// the moving eye will try to avoid. Setting this to non-zero avoids
396 /// flipping problems when orientation passes through _upVector or -_upVector
397 /// during moves.
399
400 /// Calculates the direction to the named object.
401 /// \param qualifiedObjName The name of the object in question.
402 /// \return A direction Vector pointing from this object to the target, 0,0,0 if not found.
403 Vector DirectionToObj( const std::string& qualifiedObjName ) const;
404
405 /// Extracts all eyepoint objects from the group hierarchy.
406 /// The group can contain other groups and object types.
407 /// \param group The group to search for eyepoints in recursively.
408 /// \param eyes The returned list of found eyepoints.
409 void ExtractEyepoints( Group* group, std::vector<GlsEyePoint*>& eyes );
410
411 //------------------------------------------------------------------------
412 /**
413 * Called when the destination eyepoint is reached to perform actions
414 * necessary to complete the movement.
415 */
416 //------------------------------------------------------------------------
418
419 //------------------------------------------------------------------------
420 /**
421 * Initializes the movement history with the initial state of the eyepoint.
422 */
423 //------------------------------------------------------------------------
425
426 /// Returns an adjusted move time based on the maximum speed setting. If the
427 /// speed of moving over distance in desiredTime is greater than the
428 /// maximum speed setting, the move time will be lengthened.
429 /// \param distance Distance in logical units that will be moved.
430 /// \param desiredTime Time in which we wish to cover the specified distance.
431 /// \return The adjusted move time in seconds.
432 float MoveTime( float distance, float desiredTime ) const;
433
434 /// Calculates the distance over the entire route if moving between all eyepoints in the list.
435 /// \param eyes The list of eyes to calculate the total route distance.
436 /// \return The total distance of the route in logical units.
437 float RouteDistance( std::vector<GlsEyePoint*>& eyes ) const;
438
439 /// Queues the move using the passed in movement parameters and sets up
440 /// the start time and starting state of the move.
441 /// \param moveParms The move parameters for this move.
442 void StartMoving( const MoveParms_t& moveParms );
443
444 friend class GlsMovingEyeEditor;
445};
446
447/// Stream out operator
448/// \param outstr The stream to write to.
449/// \param m The value to write to the stream.
450/// \return The stream in its current state.
451inline std::ostream& operator<<( std::ostream& outstr, GlsMovingEye::Movement_t m )
452{
453 switch( m )
454 {
455 case GlsMovingEye::CONSTANT:
456 outstr << "CONSTANT";
457 break;
458 case GlsMovingEye::SINUSOIDAL:
459 outstr << "SINUSOIDAL";
460 break;
461 default:
462 outstr << "BAD_MOVEMENT";
463 };
464
465 return outstr;
466}
467
468/// Stream in operator
469/// \param instr The stream to read from.
470/// \param m The returned value read from the stream.
471/// \return The stream in its current state.
472inline std::istream& operator>>( std::istream& instr, GlsMovingEye::Movement_t& m )
473{
474 std::string str;
475 instr >> str;
476 if( str == "CONSTANT" )
477 {
478 m = GlsMovingEye::CONSTANT;
479 }
480 else if( str == "SINUSOIDAL" )
481 {
482 m = GlsMovingEye::SINUSOIDAL;
483 }
484 return instr;
485}
486
487/// Stream out operator
488/// \param outstr The stream to write to.
489/// \param r The value to write to the stream.
490/// \return The stream in its current state.
491inline std::ostream& operator<<( std::ostream& outstr, GlsMovingEye::Route_t r )
492{
493 switch( r )
494 {
495 case GlsMovingEye::DIRECT:
496 outstr << "DIRECT";
497 break;
498 case GlsMovingEye::ARC:
499 outstr << "ARC";
500 break;
501 default:
502 outstr << "BAD_ROUTE";
503 };
504
505 return outstr;
506}
507
508/// Stream in operator
509/// \param instr The stream to read from.
510/// \param r The returned value read from the stream.
511/// \return The stream in its current state.
512inline std::istream& operator>>( std::istream& instr, GlsMovingEye::Route_t& r )
513{
514 std::string str;
515 instr >> str;
516 if( str == "DIRECT" )
517 {
518 r = GlsMovingEye::DIRECT;
519 }
520 else if( str == "ARC" )
521 {
522 r = GlsMovingEye::ARC;
523 }
524 return instr;
525}
526
527} // namespace disti
528#endif
Definition: display.h:96
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 ~GlsMovingEye()
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
Definition: group.h:53
Definition: vertex.h:85
The gls_auto_lib.
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