Salome HOME
Added documentation code for goxygen
authorenk <enk@opencascade.com>
Fri, 1 Jul 2005 08:27:14 +0000 (08:27 +0000)
committerenk <enk@opencascade.com>
Fri, 1 Jul 2005 08:27:14 +0000 (08:27 +0000)
src/VTKViewer/VTKViewer_ConvexTool.cxx
src/VTKViewer/VTKViewer_ConvexTool.h

index 3e22b42a6963b773550ef109bb9d32405b311375..1c4a8a710bb95594d759932fbaaa1931458db599 100644 (file)
 #include <algorithm>
 #include <math.h>
 
-static float FACE_ANGLE_TOLERANCE=1.5;
-
 typedef std::set<vtkIdType> TUIDS; // unique ids 
 typedef std::map<vtkIdType,TUIDS> TPTOIDS; // id points -> unique ids
 
 namespace CONVEX_TOOL
 {
+
+static float FACE_ANGLE_TOLERANCE=1.5;
+
 #ifdef _DEBUG_
   static int MYDEBUG = 0;
 #else
   static int MYDEBUG = 0;
 #endif
 
+/*! \fn static void GetCenter(vtkUnstructuredGrid* theGrid,TCell theptIds,float *center)
+ * \brief Calculation of geometry center.
+ * \param theGrid - vtkUnstructuredGrid cell.
+ * \param theptIds - point ids.
+ * \retval center - output array[3] with coordinates of geometry center.
+ */
 static void GetCenter(vtkUnstructuredGrid* theGrid,TCell theptIds,float *center)
 {
   float *p;
@@ -56,6 +63,11 @@ static void GetCenter(vtkUnstructuredGrid* theGrid,TCell theptIds,float *center)
     }
 }
 
+/*! \fn static void ReverseIds(TCell &theIds)
+ * \brief Reverse ids.
+ * \param theIds - points ids.
+ * \retval theIds - example input:(1,2,3,4) -> output:(4,3,2,1)
+ */
 static void ReverseIds(TCell &theIds)
 {
   int i;
@@ -69,7 +81,12 @@ static void ReverseIds(TCell &theIds)
   }
 }
 
-// caclulation of connected faces (faceId -> (faceId1,faceId2, ...))
+/*! \fn void GetFriends(const TPTOIDS p2faces,const TCellArray f2points,TPTOIDS& face2face_output)
+ * \brief Caclulation of connected faces (faceId -> (faceId1,faceId2, ...))
+ * \param p2faces - point to faces ids map.
+ * \param f2points - faces to points ids map.
+ * \retval face2face_output - faces to faces ids map.
+ */
 void GetFriends(const TPTOIDS p2faces,const TCellArray f2points,TPTOIDS& face2face_output)
 {
   TCellArray::const_iterator f2pIter = f2points.begin();
@@ -118,9 +135,18 @@ void GetFriends(const TPTOIDS p2faces,const TCellArray f2points,TPTOIDS& face2fa
   }
 }
 
+/*! \fn bool IsConnectedFacesOnOnePlane( vtkUnstructuredGrid* theGrid,vtkIdType theFId1, vtkIdType theFId2,TUIDS FpIds1, TUIDS FpIds2 )
+ * \brief Check is connected faces on one plane.
+ * \param theGrid - vtkUnstructuredGrid
+ * \param theFId1 - id of first face
+ * \param theFId2 - id of second face
+ * \param FpIds1  - first face points ids.
+ * \param FpIds2  - second face points ids.
+ * \return TRUE if two faces on one plane, else FALSE.
+ */
 bool IsConnectedFacesOnOnePlane( vtkUnstructuredGrid* theGrid,
                                  vtkIdType theFId1, vtkIdType theFId2,
-                                                        TUIDS FpIds1, TUIDS FpIds2 )
+                                TUIDS FpIds1, TUIDS FpIds2 )
 {
   bool status = false;
   TUIDS common_ids;
@@ -220,6 +246,13 @@ bool IsConnectedFacesOnOnePlane( vtkUnstructuredGrid* theGrid,
   return status;
 }
 
+/*! \fn void GetAllFacesOnOnePlane( TPTOIDS theFaces, vtkIdType faceId,TUIDS &new_faces, TCell &new_faces_v2 )
+ * \brief Calculate faces which on one plane.
+ * \param theFaces - 
+ * \param faceId - 
+ * \param new_faces - 
+ * \param new_faces_v2 - 
+ */
 void GetAllFacesOnOnePlane( TPTOIDS theFaces, vtkIdType faceId, 
                             TUIDS &new_faces, TCell &new_faces_v2 )
 {
@@ -240,6 +273,12 @@ void GetAllFacesOnOnePlane( TPTOIDS theFaces, vtkIdType faceId,
   return;
 }
 
+/*! \fn void GetSumm(TCell v1,TCell v2,TCell &output)
+ * \brief Gluing two faces (gluing points ids)
+ * \param v1 - first face
+ * \param v2 - second face
+ * \param output - output face.
+ */
 void GetSumm(TCell v1,TCell v2,TCell &output)
 {
   output.clear();
index f305140b01173d93fc5ad54e63115b69c932e9f7..a49448bf4469677ab84ceecb5103d23f8d7b529e 100644 (file)
 #define _VTKViewer_ConvexTool_H
 
 #include <vtkUnstructuredGrid.h>
-
 #include <vector>
 #include <map>
 
 typedef std::vector<vtkIdType> TCell; // ptsIds
 typedef std::map<vtkIdType,TCell> TCellArray; // CellId, TCell
 
+/*! This package \namespace CONVEX_TOOL used for: 
+ *  calculation of VTK_POLYGON cell array from VTK_TRIANGLE (triangulation)
+ *  of VTK_CONVEX_POINT_SET cell type.
+ */
 namespace CONVEX_TOOL
 {
+  /*! \fn void CONVEX_TOOL::GetPolygonalFaces(vtkUnstructuredGrid* theCell,int cellId,TCellArray &outputCellArray)
+   *  \brief Main function.
+   *  \param theCell - vtkUnstructuredGrid cell pointer
+   *  \param cellId  - id of cell type VTK_CONVEX_POINT_SET
+   *  \retval outputCellArray - output array with new cells types VTK_POLYGON
+   */
   void GetPolygonalFaces(vtkUnstructuredGrid* theCell,int cellId,TCellArray &outputCellArray);
 }