MeVisLabToolboxReference
MeVisLab/Standard/Sources/Inventor/SoCSO/CSOProcessor/CSOBulgeProcessor/CSOBulgeProcessor.h
Go to the documentation of this file.
00001 // **InsertLicense** code
00002 //----------------------------------------------------------------------------------
00004 
00009 //----------------------------------------------------------------------------------
00010 
00011 #ifndef __CSOBulgeProcessor_H
00012 #define __CSOBulgeProcessor_H
00013 
00014 
00015 #include "SoCSOSystem.h"
00016 #include "CSOProcessor/CSOProcessor.h"
00017 
00018 
00019 ML_START_NAMESPACE
00020 
00021 
00023 
00025 class SOCSO_EXPORT CSOBulgeProcessor : public CSOProcessor
00026 {  
00027 
00028 public:
00029 
00031   CSOBulgeProcessor();
00032 
00035   virtual bool process(CSOEvalEventView2DInfos view2DInfos, CSOEvalEventCSOInfos csoInfos);
00036  
00039   virtual bool needsMemoryImage();
00040 
00042   virtual bool isCurrentlyGenerating();
00044   virtual bool isCurrentlyEditing();
00046   virtual bool couldCloseCSO();
00047 
00049   virtual void resetInteractionState();
00050 
00052   virtual void triggerSetMouseCursor(SoView2D* view2d, bool shouldSetMouseCursor);
00053 
00054 protected:
00055 
00057   virtual ~CSOBulgeProcessor();
00058 
00060   virtual void activateAttachments();
00061 
00063   virtual void handleNotification(Field* field);
00064 
00065 private:
00066 
00067   /* FIELDS */
00068 
00070   IntField* _influenceRangeFld;
00072   BoolField* _restrictToCurvatureFld;
00074   FloatField* _angleLimitFld;
00076   BoolField* _adaptInfluenceWhileInteractingFld;
00078   BoolField* _adaptInfluenceByDistanceFld;
00079 
00080   /* MEMBER VARIABLES */
00081 
00083   CSOList* _csoList;
00084 
00086   Vector3 _currentHitPointWorld;
00088   Vector3 _startPointWorld;
00089 
00091   float _currentHitXPos;
00093   float _currentHitYPos;
00095   float _currentHitZPos;
00096 
00098   float _startHitXPos;
00100   float _startHitYPos;
00102   float _startHitZPos;
00103 
00105   int _timePoint;
00106 
00108   CSO* _currentlyActiveCSO;
00110   CSOSeedPoint* _currentlyActiveSeedPoint;
00112   CSOPathPoints* _currentlyActivePathPoints;
00113 
00115   bool _isMovingSeedPoint;
00116 
00117 
00118   /* METHODS */
00119 
00122   void _convertCurrentCSO();
00124   void _computeWeightsForCurrentCSO(View2DSliceList* slicelist);
00126   float _getScreenDistance(View2DSliceList* slicelist, const Vector3& worldPos1, const Vector3& worldPos2);
00129   void _getNormalAt(unsigned int pathIndex, unsigned int pointIndex, Vector3& normal);
00131   float _getDeformationValue(float factor);
00132 
00133   ML_MODULE_CLASS_HEADER(CSOBulgeProcessor);
00134 };
00135 
00137 
00138 
00139 ML_END_NAMESPACE
00140 
00141 
00142 #endif //__CSOBulgeProcessor_H
00143