sim: Remove "continue physics" code
[blender.git] / source / blender / blenkernel / intern / booleanops_mesh.c
index 972793227a84a5af7f4387cf5fbe3d6fa372279e..f53a89fccfdd6ac04658b71126d23487d27f0e02 100644 (file)
 CSG_DestroyMeshDescriptor(
        CSG_MeshDescriptor *mesh
 ) {
-       // Call mesh descriptors destroy function....
+       /* Call mesh descriptors destroy function.... */
        mesh->m_destroy_func(mesh);
 }
-       
-// Destroy function for blender mesh internals.
+
+/* Destroy function for blender mesh internals. */
 
 static
        void
 CSG_DestroyBlenderMeshInternals(
        CSG_MeshDescriptor *mesh
 ) {
-       // Free face and vertex iterators.
-       FreeMeshDescriptors(&(mesh->m_face_iterator),&(mesh->m_vertex_iterator));               
+       /* Free face and vertex iterators. */
+       FreeMeshDescriptors(&(mesh->m_face_iterator), &(mesh->m_vertex_iterator));
 }
 
 
@@ -138,20 +138,20 @@ CSG_AddMeshToBlender(
        if (mesh == NULL) return 0;
        if (mesh->base == NULL) return 0;
 
-       invert_m4_m4(inv_mat,mesh->base->object->obmat);
+       invert_m4_m4(inv_mat, mesh->base->object->obmat);
 
-       // Create a new blender mesh object - using 'base' as 
-       // a template for the new object.
-       ob_new=  AddNewBlenderMesh(mesh->base);
+       /* Create a new blender mesh object - using 'base' as
+        * a template for the new object. */
+       ob_new =  AddNewBlenderMesh(mesh->base);
 
        me_new = ob_new->data;
 
-       // make sure the iterators are reset.
+       /* make sure the iterators are reset. */
        mesh->m_face_iterator.Reset(mesh->m_face_iterator.it);
        mesh->m_vertex_iterator.Reset(mesh->m_vertex_iterator.it);
 
-       // iterate through results of operation and insert into new object
-       // see subsurf.c 
+       /* iterate through results of operation and insert into new object
+        * see subsurf.c */
 
        ConvertCSGDescriptorsToMeshObject(
                ob_new,
@@ -180,7 +180,7 @@ CSG_PerformOp(
 
        if ((mesh1 == NULL) || (mesh2 == NULL) || (output == NULL)) {
                return 0;
-       }       
+       }
        if ((int_op_type < 1) || (int_op_type > 3)) return 0;
 
        switch (int_op_type) {
@@ -191,20 +191,20 @@ CSG_PerformOp(
                default : op_type = e_csg_intersection;
        }
        
-       output->m_descriptor = CSG_DescibeOperands(bool_op,mesh1->m_descriptor,mesh2->m_descriptor);
+       output->m_descriptor = CSG_DescibeOperands(bool_op, mesh1->m_descriptor, mesh2->m_descriptor);
        output->base = mesh1->base;
 
        if (output->m_descriptor.user_face_vertex_data_size) {
-               // Then use the only interp function supported 
-               success = 
+               /* Then use the only interp function supported */
+               success =
                CSG_PerformBooleanOperation(
                        bool_op,
                        op_type,
                        mesh1->m_face_iterator,
                        mesh1->m_vertex_iterator,
                        mesh2->m_face_iterator,
-                       mesh2->m_vertex_iterator,               
-                       InterpFaceVertexData    
+                       mesh2->m_vertex_iterator,
+                       InterpFaceVertexData
                );
        }
        else {
@@ -215,8 +215,8 @@ CSG_PerformOp(
                        mesh1->m_face_iterator,
                        mesh1->m_vertex_iterator,
                        mesh2->m_face_iterator,
-                       mesh2->m_vertex_iterator,               
-                       InterpNoUserData        
+                       mesh2->m_vertex_iterator,
+                       InterpNoUserData
                );
        }
 
@@ -225,11 +225,11 @@ CSG_PerformOp(
                bool_op = NULL;
                return 0;
        }
-               
-       // get the ouput mesh descriptors.
 
-       CSG_OutputFaceDescriptor(bool_op,&(output->m_face_iterator));
-       CSG_OutputVertexDescriptor(bool_op,&(output->m_vertex_iterator));
+       /* get the ouput mesh descriptors. */
+
+       CSG_OutputFaceDescriptor(bool_op, &(output->m_face_iterator));
+       CSG_OutputVertexDescriptor(bool_op, &(output->m_vertex_iterator));
        output->m_destroy_func = CSG_DestroyCSGMeshInternals;
 
        return 1;
@@ -242,20 +242,20 @@ NewBooleanMeshTest(
        int op_type
 ) {
 
-       CSG_MeshDescriptor m1,m2,output;
-       CSG_MeshDescriptor output2,output3;
+       CSG_MeshDescriptor m1, m2, output;
+       CSG_MeshDescriptor output2, output3;
        
-       if (!MakeCSGMeshFromBlenderBase(base,&m1)) {
+       if (!MakeCSGMeshFromBlenderBase(base, &m1)) {
                return 0;
        }
        
-       if (!MakeCSGMeshFromBlenderBase(base_select,&m2)) {
+       if (!MakeCSGMeshFromBlenderBase(base_select, &m2)) {
                return 0;
        }
        
-       CSG_PerformOp(&m1,&m2,1,&output);
-       CSG_PerformOp(&m1,&m2,2,&output2);
-       CSG_PerformOp(&m1,&m2,3,&output3);
+       CSG_PerformOp(&m1, &m2, 1, &output);
+       CSG_PerformOp(&m1, &m2, 2, &output2);
+       CSG_PerformOp(&m1, &m2, 3, &output3);
 
        if (!CSG_AddMeshToBlender(&output)) {
                return 0;