Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SoViewingCube.h
1/*=================================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2021 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19 =================================================================================*/
20
21#pragma once
22
23#include <Inventor/SbPImpl.h>
24#include <Inventor/nodes/SoNode.h>
25#include <Inventor/fields/SoSFNode.h>
26#include <Inventor/fields/SoSFFloat.h>
27#include <Inventor/fields/SoSFColor.h>
28#include <Inventor/fields/SoSFVec2f.h>
29#include <Inventor/fields/SoSFEnum.h>
30#include <Inventor/fields/SoSFBool.h>
31#include <Inventor/fields/SoSFFilePathString.h>
32
33SO_PIMPL_PUBLIC_DECLARATION( SoViewingCube )
34
35
194class SoViewingCube : public SoNode
195{
196 SO_NODE_HEADER( SoViewingCube );
197 SO_PIMPL_PUBLIC_HEADER( SoViewingCube )
198
199public:
214
233
270
276
284
297
308
309
315
316
322
323
329
339
345
351
357
363
369
408
415
424
432
440
452
454
456 virtual SbBool affectsState() const;
457
458private:
459 // Implement actions
460 virtual void GLRender( SoGLRenderAction* action );
461 virtual void handleEvent( SoHandleEventAction* ha );
462
463private:
464 static void initClass();
465 static void exitClass();
466 virtual void fieldHasChanged(SoField* field);
467
468 virtual SoChildList* getChildren() const;
469
470private:
471 virtual ~SoViewingCube();
472
473private:
474
478 enum EasingType
479 {
480 /* bezier cubic curve from points (0, 0), (0.47, 0), (0.745, 0.715), (1, 1) */
481 EaseInSine,
482 /* bezier cubic curve from points (0, 0), (0.39, 0.575), (0.565, 1), (1, 1) */
483 EaseOutSine,
484 /* bezier cubic curve from points (0, 0), (0.445, 0.05), (0.55, 0.95), (1, 1) */
485 EaseInOutSine,
486 /* bezier cubic curve from points (0, 0), (0.55, 0.085), (0.68, 0.53), (1, 1) */
487 EaseInQuad,
488 /* bezier cubic curve from points (0, 0), (0.25, 0.46), (0.45, 0.94), (1, 1) */
489 EaseOutQuad,
490 /* bezier cubic curve from points (0, 0), (0.455, 0.03), (0.515, 0.955), (1, 1) */
491 EaseInOutQuad,
492 /* bezier cubic curve from points (0, 0), (0.55, 0.055), (0.675, 0.19), (1, 1) */
493 EaseInCubic,
494 /* bezier cubic curve from points (0, 0), (0.645, 0.045, 0.355, 1), (1, 1) */
495 EaseOutCubic,
496 /* bezier cubic curve from points (0, 0), (0.645, 0.045, 0.355, 1), (1, 1) */
497 EaseInOutCubic,
498 /* bezier cubic curve from points (0, 0), (0.895, 0.03), (0.685, 0.22), (1, 1) */
499 EaseInQuart,
500 /* bezier cubic curve from points (0, 0), (0.165, 0.84), (0.44, 1), (1, 1) */
501 EaseOutQuart,
502 /* bezier cubic curve from points (0, 0), (0.77, 0), (0.175, 1), (1, 1) */
503 EaseInOutQuart,
504 /* bezier cubic curve from points (0, 0), (0.755, 0.05), (0.855, 0.06), (1, 1) */
505 EaseInQuint,
506 /* bezier cubic curve from points (0, 0), (0.23, 1), (0.32, 1), (1, 1) */
507 EaseOutQuint,
508 /* bezier cubic curve from points (0, 0), (0.86, 0), (0.07, 1), (1, 1) */
509 EaseInOutQuint,
510 /* bezier cubic curve from points (0, 0), (0.95, 0.05), (0.795, 0.035), (1, 1) */
511 EaseInExpo,
512 /* bezier cubic curve from points (0, 0), (0.19, 1), (0.22, 1), (1, 1) */
513 EaseOutExpo,
514 /* bezier cubic curve from points (0, 0), (1, 0), (0, 1), (1, 1) */
515 EaseInOutExpo,
516 /* bezier cubic curve from points (0, 0), (0.6, 0.04), (0.98, 0.335), (1, 1) */
517 EaseInCirc,
518 /* bezier cubic curve from points (0, 0), (0.075, 0.82), (0.165, 1), (1, 1) */
519 EaseOutCirc,
520 /* bezier cubic curve from points (0, 0), (0.785, 0.135), (0.15, 0.8), (1, 1) */
521 EaseInOutCirc,
522 /* bezier cubic curve from points (0, 0), (0.6, -0.28), (0.735, 0.045), (1, 1) */
523 EaseInBack,
524 /* bezier cubic curve from points (0, 0), (0.175, 0.885), (0.32, 1.275), (1, 1) */
525 EaseOutBack,
526 /* bezier cubic curve from points (0, 0), (0.68, -0.55), (0.265, 1.55), (1, 1) */
527 EaseInOutBack,
528 /* curve of elastic progression */
529 EaseInElastic,
530 /* curve of elastic regression */
531 EaseOutElastic,
532 /* curve of elastic progression then regression */
533 EaseInOutElastic,
534 /* curve of bounce progression */
535 EaseInBounce,
536 /* curve of bounce regression */
537 EaseOutBounce,
538 /* curve of bounce progression then regression */
539 EaseInOutBounce
540 };
541
546 SoSFEnum easingType;
547
552 SoSFBool oneShotActive;
553
562 SoSFFloat opacityDistanceMin;
563
572 SoSFFloat opacityDistanceMax;
573};
Base class for all fields.
Definition SoField.h:234
Renders a scene graph using Open Inventor's Render Engine.
Allows nodes in a graph to receive input events.
Abstract base class for all database nodes.
Definition SoNode.h:145
Field containing a single Boolean value.
Definition SoSFBool.h:79
Field containing an RGB color.
Definition SoSFColor.h:82
Field containing an enumerated value.
Definition SoSFEnum.h:89
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Field containing...
Field containing a floating-point value.
Definition SoSFFloat.h:78
Field containing a a node.
Definition SoSFNode.h:97
Field containing a two-dimensional vector.
Definition SoSFVec2f.h:78
Interactive cubic shape to control the orientation of a camera.
EdgeStyle
Different types of edges.
@ FLAT
Edges are flat (beveled).
@ ROUND
Edges have a rounded shape.
@ CORNER
Edges form a sharp corner.
SoSFNode compass
Defines an additional and optional scene graph to visualize a compass encapsulated in the viewing cub...
SoSFEnum upAxis
Up axis of the scene.
SoSFFilePathString facePosX
Texture to customize the face's appearance which has a "Right" label by default.
SoSFFilePathString faceNegY
Texture to customize the face's appearance which has a "Bottom" label by default.
SoSFFilePathString facePosZ
Texture to customize the face's appearance which has a "Front" label by default.
SoSFFloat opacityMin
Defines the viewing cube opacity when the cursor is far from it.
SoSFFilePathString facePosY
Texture to customize the face's appearance which has a "Top" label by default.
SoSFFloat animationDuration
Duration of camera movement to reach the desired position.
SoSFColor faceColor
Color used to render the faces of the cube.
SoSFEnum position
Position of the viewing cube in the scene camera viewport.
SoSFFloat opacityMax
Defines the viewing cube opacity when the cursor is close to it or over it.
SoSFColor selectionColor
Color used to highlight the part of the viewing cube that is under the cursor.
SoSFEnum edgeStyle
Style of edges and corners.
SoSFNode sceneCamera
Camera which is synchronized with this viewing cube.
SoSFFloat edgeSize
Size of the edges, relative to the size of the faces.
SoSFVec2f size
Size of the viewport, in pixels, in which the viewing cube is drawn.
SoSFColor edgeColor
Color used to render the edges of the cube.
virtual SbBool affectsState() const
This node does not affect the state.
PositionInViewport
Possible positions of the viewing cube in the scene camera viewport.
@ TOP_LEFT
The viewing cube is positioned at the top left corner.
@ TOP_RIGHT
The viewing cube is positioned at the top right corner.
@ BOTTOM_LEFT
The viewing cube is positioned at the bottom left corner.
@ BOTTOM_RIGHT
The viewing cube is positioned at the bottom right corner.
SoSFFilePathString faceNegX
Texture to customize the face's appearance which has a "Left" label by default.
SoSFFilePathString faceNegZ
Texture to customize the face's appearance which has a "Back" label by default.
SoSFColor cornerColor
Color used to render the corners of the cube.
int SbBool
Boolean type.
Definition SbBase.h:87