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