00001 00002 // 00003 // This class is part of the Open Inventor Medical Edition utility library. 00004 // 00005 // The medical utility classes are provided as a prebuilt library named 00006 // "fei.inventor.Medical", that can be used directly in an Open Inventor 00007 // application. The classes in the prebuilt library are documented and 00008 // supported by FEI. These classes are also provided as source code. 00009 // 00010 // Please see $OIVHOME/include/Medical/InventorMedical.h for the full text. 00011 // 00014 // 00015 // PlaneBoxIntersection 00016 // 00017 // Original: Mike Heck, FEI 00018 // Based on Pyramid shape node example from OIV ToolMaker 00019 // Modified: Mike Heck, March 2014 00020 // Fixed incorrect rendering when box edge lies in the plane. 00021 // 00023 00024 #ifndef _PLANE_BOX_INTERSECTION_H_ 00025 #define _PLANE_BOX_INTERSECTION_H_ 00026 00027 #include <Inventor/SbLinear.h> 00028 #include <Inventor/fields/SoSFBox3f.h> 00029 #include <Inventor/fields/SoSFPlane.h> 00030 #include <Inventor/nodes/SoLineSet.h> 00031 00032 class SoFieldSensor; 00033 class PlaneBoxIntersectionImpl; 00034 00076 class PlaneBoxIntersection : public SoLineSet { 00077 00078 SO_NODE_HEADER(PlaneBoxIntersection); 00079 00080 public: 00081 00083 SoSFBox3f box; 00084 00087 SoSFPlane plane; 00088 00090 static void initClass(); 00092 static void exitClass(); 00093 00095 PlaneBoxIntersection(); 00096 00097 private: 00098 00099 // Destructor 00100 virtual ~PlaneBoxIntersection(); 00101 00102 // These sensors ensure that the geometry is updated when the fields change 00103 SoFieldSensor *m_boxFieldSensor; 00104 SoFieldSensor *m_planeFieldSensor; 00105 00106 static void fieldSensorCB(void *, SoSensor *); 00107 00108 PlaneBoxIntersectionImpl* m_impl; 00109 00110 }; 00111 00112 #endif //PlaneBoxIntersection