00001 /*================================================================================= 00002 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), *** 00003 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. *** 00004 *** *** 00005 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS *** 00006 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR *** 00007 *** WRITTEN AUTHORIZATION OF FEI S.A.S. *** 00008 *** *** 00009 *** RESTRICTED RIGHTS LEGEND *** 00010 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS *** 00011 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN *** 00012 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT *** 00013 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN *** 00014 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. *** 00015 *** *** 00016 *** COPYRIGHT (C) 1996-2021 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 =================================================================================*/ 00020 00021 #pragma once 00022 00023 #include <Inventor/SbPImpl.h> 00024 #include <Inventor/nodes/SoNode.h> 00025 #include <Inventor/fields/SoSFNode.h> 00026 #include <Inventor/fields/SoSFFloat.h> 00027 #include <Inventor/fields/SoSFColor.h> 00028 #include <Inventor/fields/SoSFVec2f.h> 00029 #include <Inventor/fields/SoSFEnum.h> 00030 #include <Inventor/fields/SoSFBool.h> 00031 #include <Inventor/fields/SoSFFilePathString.h> 00032 00033 SO_PIMPL_PUBLIC_DECLARATION( SoViewingCube ) 00034 00035 00194 class SoViewingCube : public SoNode 00195 { 00196 SO_NODE_HEADER( SoViewingCube ); 00197 SO_PIMPL_PUBLIC_HEADER( SoViewingCube ) 00198 00199 public: 00203 enum PositionInViewport 00204 { 00206 TOP_RIGHT, 00208 TOP_LEFT, 00210 BOTTOM_RIGHT, 00212 BOTTOM_LEFT, 00213 }; 00214 00218 enum EdgeStyle 00219 { 00223 FLAT, 00227 ROUND, 00231 CORNER, 00232 }; 00233 00269 SoSFNode sceneCamera; 00270 00275 SoSFVec2f size; 00276 00283 SoSFEnum position; 00284 00296 SoSFEnum edgeStyle; 00297 00307 SoSFColor selectionColor; 00308 00309 00314 SoSFColor faceColor; 00315 00316 00321 SoSFColor edgeColor; 00322 00323 00328 SoSFColor cornerColor; 00329 00338 SoSFFilePathString facePosX; 00339 00344 SoSFFilePathString faceNegX; 00345 00350 SoSFFilePathString facePosY; 00351 00356 SoSFFilePathString faceNegY; 00357 00362 SoSFFilePathString facePosZ; 00363 00368 SoSFFilePathString faceNegZ; 00369 00407 SoSFFloat edgeSize; 00408 00414 SoSFFloat animationDuration; 00415 00423 SoSFEnum upAxis; 00424 00431 SoSFFloat opacityMin; 00432 00439 SoSFFloat opacityMax; 00440 00451 SoSFNode compass; 00452 00453 SoViewingCube(); 00454 00456 virtual SbBool affectsState() const; 00457 00458 private: 00459 // Implement actions 00460 virtual void GLRender( SoGLRenderAction* action ); 00461 virtual void handleEvent( SoHandleEventAction* ha ); 00462 00463 private: 00464 static void initClass(); 00465 static void exitClass(); 00466 virtual void fieldHasChanged(SoField* field); 00467 00468 virtual SoChildList* getChildren() const; 00469 00470 private: 00471 virtual ~SoViewingCube(); 00472 00473 private: 00474 00478 enum EasingType 00479 { 00480 /* bezier cubic curve from points (0, 0), (0.47, 0), (0.745, 0.715), (1, 1) */ 00481 EaseInSine, 00482 /* bezier cubic curve from points (0, 0), (0.39, 0.575), (0.565, 1), (1, 1) */ 00483 EaseOutSine, 00484 /* bezier cubic curve from points (0, 0), (0.445, 0.05), (0.55, 0.95), (1, 1) */ 00485 EaseInOutSine, 00486 /* bezier cubic curve from points (0, 0), (0.55, 0.085), (0.68, 0.53), (1, 1) */ 00487 EaseInQuad, 00488 /* bezier cubic curve from points (0, 0), (0.25, 0.46), (0.45, 0.94), (1, 1) */ 00489 EaseOutQuad, 00490 /* bezier cubic curve from points (0, 0), (0.455, 0.03), (0.515, 0.955), (1, 1) */ 00491 EaseInOutQuad, 00492 /* bezier cubic curve from points (0, 0), (0.55, 0.055), (0.675, 0.19), (1, 1) */ 00493 EaseInCubic, 00494 /* bezier cubic curve from points (0, 0), (0.645, 0.045, 0.355, 1), (1, 1) */ 00495 EaseOutCubic, 00496 /* bezier cubic curve from points (0, 0), (0.645, 0.045, 0.355, 1), (1, 1) */ 00497 EaseInOutCubic, 00498 /* bezier cubic curve from points (0, 0), (0.895, 0.03), (0.685, 0.22), (1, 1) */ 00499 EaseInQuart, 00500 /* bezier cubic curve from points (0, 0), (0.165, 0.84), (0.44, 1), (1, 1) */ 00501 EaseOutQuart, 00502 /* bezier cubic curve from points (0, 0), (0.77, 0), (0.175, 1), (1, 1) */ 00503 EaseInOutQuart, 00504 /* bezier cubic curve from points (0, 0), (0.755, 0.05), (0.855, 0.06), (1, 1) */ 00505 EaseInQuint, 00506 /* bezier cubic curve from points (0, 0), (0.23, 1), (0.32, 1), (1, 1) */ 00507 EaseOutQuint, 00508 /* bezier cubic curve from points (0, 0), (0.86, 0), (0.07, 1), (1, 1) */ 00509 EaseInOutQuint, 00510 /* bezier cubic curve from points (0, 0), (0.95, 0.05), (0.795, 0.035), (1, 1) */ 00511 EaseInExpo, 00512 /* bezier cubic curve from points (0, 0), (0.19, 1), (0.22, 1), (1, 1) */ 00513 EaseOutExpo, 00514 /* bezier cubic curve from points (0, 0), (1, 0), (0, 1), (1, 1) */ 00515 EaseInOutExpo, 00516 /* bezier cubic curve from points (0, 0), (0.6, 0.04), (0.98, 0.335), (1, 1) */ 00517 EaseInCirc, 00518 /* bezier cubic curve from points (0, 0), (0.075, 0.82), (0.165, 1), (1, 1) */ 00519 EaseOutCirc, 00520 /* bezier cubic curve from points (0, 0), (0.785, 0.135), (0.15, 0.8), (1, 1) */ 00521 EaseInOutCirc, 00522 /* bezier cubic curve from points (0, 0), (0.6, -0.28), (0.735, 0.045), (1, 1) */ 00523 EaseInBack, 00524 /* bezier cubic curve from points (0, 0), (0.175, 0.885), (0.32, 1.275), (1, 1) */ 00525 EaseOutBack, 00526 /* bezier cubic curve from points (0, 0), (0.68, -0.55), (0.265, 1.55), (1, 1) */ 00527 EaseInOutBack, 00528 /* curve of elastic progression */ 00529 EaseInElastic, 00530 /* curve of elastic regression */ 00531 EaseOutElastic, 00532 /* curve of elastic progression then regression */ 00533 EaseInOutElastic, 00534 /* curve of bounce progression */ 00535 EaseInBounce, 00536 /* curve of bounce regression */ 00537 EaseOutBounce, 00538 /* curve of bounce progression then regression */ 00539 EaseInOutBounce 00540 }; 00541 00546 SoSFEnum easingType; 00547 00552 SoSFBool oneShotActive; 00553 00562 SoSFFloat opacityDistanceMin; 00563 00572 SoSFFloat opacityDistanceMax; 00573 }; 00574