00001 00002 // 00003 // This class is part of the Open Inventor Medical 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 INVENTORMEDICAL_API PlaneBoxIntersection : public SoLineSet 00077 { 00078 00079 SO_NODE_HEADER(PlaneBoxIntersection); 00080 00081 public: 00082 00084 SoSFBox3f box; 00085 00088 SoSFPlane plane; 00089 00091 static void initClass(); 00093 static void exitClass(); 00094 00096 PlaneBoxIntersection(); 00097 00098 private: 00099 00100 // Destructor 00101 virtual ~PlaneBoxIntersection(); 00102 00103 // These sensors ensure that the geometry is updated when the fields change 00104 SoFieldSensor *m_boxFieldSensor; 00105 SoFieldSensor *m_planeFieldSensor; 00106 00107 static void fieldSensorCB(void *, SoSensor *); 00108 00109 PlaneBoxIntersectionImpl* m_impl; 00110 00111 }; 00112 00113 #endif //PlaneBoxIntersection