H3D API  2.4.1
NavigationInfo.h
Go to the documentation of this file.
1 // Copyright 2004-2019, SenseGraphics AB
3 //
4 // This file is part of H3D API.
5 //
6 // H3D API is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
10 //
11 // H3D API is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with H3D API; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 //
20 // A commercial license is also available. Please contact us at
21 // www.sensegraphics.com for more information.
22 //
23 //
27 //
29 #ifndef __NAVIGATIONINFO_H__
30 #define __NAVIGATIONINFO_H__
31 
32 #include <H3D/X3DViewpointNode.h>
33 #include <H3D/MFFloat.h>
34 #include <H3D/MFString.h>
35 
36 namespace H3D {
243  class H3DAPI_API NavigationInfo : public X3DBindableNode {
244  public:
245 
247  NavigationInfo( Inst< SFSetBind > _set_bind = 0,
248  Inst< SFNode > _metadata = 0,
249  Inst< SFTime > _bindTime = 0,
250  Inst< SFBool > _isBound = 0,
251  Inst< MFFloat > _avatarSize = 0,
252  Inst< SFBool > _headlight = 0,
253  Inst< SFFloat > _speed = 0,
254  Inst< SFTime > _transitionTime = 0,
255  Inst< MFString > _transitionType = 0,
256  Inst< MFString > _type = 0,
257  Inst< SFFloat > _visibilityLimit = 0,
258  Inst< SFBool > _transitionComplete = 0,
259  Inst< SFBool > _headlightShadows = 0,
260  Inst< SFFloat > _nearVisibilityLimit = 0 );
261 
263  static inline NavigationInfo *getActive() {
264  return static_cast< NavigationInfo * >( X3DBindableNode::getActive( "NavigationInfo" ) );
265  }
266 
267  inline void setNavType( string _type ) { nav_type = _type; }
268 
269  string getUsedNavType();
270 
271  inline void setTransitionComplete( bool value ) {
272  transitionComplete->setValue( value, id );
273  }
274 
281  H3DUniquePtr< MFFloat > avatarSize;
282 
289  H3DUniquePtr< SFBool > headlight;
290 
296  H3DUniquePtr< SFFloat > speed;
297 
304  H3DUniquePtr< SFTime > transitionTime;
305 
313  H3DUniquePtr< MFString > transitionType;
314 
321  H3DUniquePtr< MFString > type;
322 
331  H3DUniquePtr< SFFloat > visibilityLimit;
332 
343  H3DUniquePtr< SFFloat > nearVisibilityLimit;
344 
349  H3DUniquePtr< SFBool > transitionComplete;
350 
356  H3DUniquePtr< SFBool > headlightShadows;
357 
360 
361  protected:
362  string nav_type;
363  };
364 }
365 
366 #endif
Contains the MFFloat field class.
Contains the MFString field class.
Header file for X3DViewpointNode, X3D scene-graph node.
The NavigationInfo node contains information describing the physical characteristics of the viewer's ...
Definition: NavigationInfo.h:243
H3DUniquePtr< MFString > transitionType
The transitionType field specifies an ordered list of paradigms that determine the manner in which th...
Definition: NavigationInfo.h:313
H3DUniquePtr< SFBool > headlight
The headlight field specifies whether a headlight should be turned on.
Definition: NavigationInfo.h:289
static H3DNodeDatabase database
The H3DNodeDatabase for this node.
Definition: NavigationInfo.h:359
H3DUniquePtr< SFFloat > nearVisibilityLimit
Geometry closer than the nearVisibilityLimit may not be rendered.
Definition: NavigationInfo.h:343
H3DUniquePtr< SFBool > headlightShadows
Determines if the headlight should be used in shadow calculations or not.
Definition: NavigationInfo.h:356
H3DUniquePtr< SFBool > transitionComplete
When a transition completes, a transitionComplete event is signaled.
Definition: NavigationInfo.h:349
H3DUniquePtr< SFFloat > visibilityLimit
Geometry beyond the visibilityLimit may not be rendered.
Definition: NavigationInfo.h:331
H3DUniquePtr< MFFloat > avatarSize
The avatarSize field specifies the user's physical dimensions in the world for the purpose of collisi...
Definition: NavigationInfo.h:281
H3DUniquePtr< SFTime > transitionTime
The transitionTime field specifies the duration of any viewpoint transition.
Definition: NavigationInfo.h:304
H3DUniquePtr< MFString > type
The type field specifies an ordered list of navigation paradigms that specify a combination of naviga...
Definition: NavigationInfo.h:321
static NavigationInfo * getActive()
Convenience function to get the top of the NavigationInfo stack.
Definition: NavigationInfo.h:263
H3DUniquePtr< SFFloat > speed
The speed field specifies the rate at which the viewer travels through a scene in metres per second.
Definition: NavigationInfo.h:296
X3DBindableNode is the abstract base type for all bindable children nodes, including Background,...
Definition: X3DBindableNode.h:108
static X3DBindableNode * getActive(const string &bindable_stack_name)
Returns the active bindable instance, i.e.
Definition: X3DBindableNode.h:149
H3D API namespace.
Definition: Anchor.h:38
The H3DNodeDatabase contains a mapping between a name of a Node and the constructor for the Node with...
Definition: H3DNodeDatabase.h:194