ClangFormat: apply to source, most of intern
[blender.git] / intern / opensubdiv / internal / opensubdiv_evaluator.cc
index 49b8626..2500691 100644 (file)
 
 namespace {
 
-void setCoarsePositions(OpenSubdiv_Evaluator* evaluator,
-                        const float* positions,
-                        const int start_vertex_index, const int num_vertices) {
-  evaluator->internal->eval_output->setCoarsePositions(positions,
-                                                       start_vertex_index,
-                                                       num_vertices);
+void setCoarsePositions(OpenSubdiv_Evaluator *evaluator,
+                        const float *positions,
+                        const int start_vertex_index,
+                        const int num_vertices)
+{
+  evaluator->internal->eval_output->setCoarsePositions(
+      positions, start_vertex_index, num_vertices);
 }
 
-void setVaryingData(OpenSubdiv_Evaluatorevaluator,
-                    const floatvarying_data,
-                    const int start_vertex_index, const int num_vertices) {
-  evaluator->internal->eval_output->setVaryingData(varying_data,
-                                                   start_vertex_index,
-                                                   num_vertices);
+void setVaryingData(OpenSubdiv_Evaluator *evaluator,
+                    const float *varying_data,
+                    const int start_vertex_index,
+                    const int num_vertices)
+{
+  evaluator->internal->eval_output->setVaryingData(varying_data, start_vertex_index, num_vertices);
 }
 
-void setFaceVaryingData(OpenSubdiv_Evaluatorevaluator,
+void setFaceVaryingData(OpenSubdiv_Evaluator *evaluator,
                         const int face_varying_channel,
-                        const floatface_varying_data,
-                        const int start_vertex_index, const int num_vertices) {
-  evaluator->internal->eval_output->setFaceVaryingData(face_varying_channel,
-                                                       face_varying_data,
-                                                       start_vertex_index,
-                                                       num_vertices);
+                        const float *face_varying_data,
+                        const int start_vertex_index,
+                        const int num_vertices)
+{
+  evaluator->internal->eval_output->setFaceVaryingData(
+      face_varying_channel, face_varying_data, start_vertex_index, num_vertices);
 }
 
-void setCoarsePositionsFromBuffer(OpenSubdiv_Evaluatorevaluator,
-                                  const voidbuffer,
+void setCoarsePositionsFromBuffer(OpenSubdiv_Evaluator *evaluator,
+                                  const void *buffer,
                                   const int start_offset,
                                   const int stride,
                                   const int start_vertex_index,
-                                  const int num_vertices) {
+                                  const int num_vertices)
+{
   evaluator->internal->eval_output->setCoarsePositionsFromBuffer(
-          buffer,
-          start_offset,
-          stride,
-          start_vertex_index,
-          num_vertices);
+      buffer, start_offset, stride, start_vertex_index, num_vertices);
 }
 
-void setVaryingDataFromBuffer(OpenSubdiv_Evaluatorevaluator,
-                              const voidbuffer,
+void setVaryingDataFromBuffer(OpenSubdiv_Evaluator *evaluator,
+                              const void *buffer,
                               const int start_offset,
                               const int stride,
                               const int start_vertex_index,
-                              const int num_vertices) {
+                              const int num_vertices)
+{
   evaluator->internal->eval_output->setVaryingDataFromBuffer(
-          buffer,
-          start_offset,
-          stride,
-          start_vertex_index,
-          num_vertices);
+      buffer, start_offset, stride, start_vertex_index, num_vertices);
 }
 
-void setFaceVaryingDataFromBuffer(OpenSubdiv_Evaluatorevaluator,
+void setFaceVaryingDataFromBuffer(OpenSubdiv_Evaluator *evaluator,
                                   const int face_varying_channel,
-                                  const voidbuffer,
+                                  const void *buffer,
                                   const int start_offset,
                                   const int stride,
                                   const int start_vertex_index,
-                                  const int num_vertices) {
+                                  const int num_vertices)
+{
   evaluator->internal->eval_output->setFaceVaryingDataFromBuffer(
-          face_varying_channel,
-          buffer,
-          start_offset,
-          stride,
-          start_vertex_index,
-          num_vertices);
+      face_varying_channel, buffer, start_offset, stride, start_vertex_index, num_vertices);
 }
 
-void refine(OpenSubdiv_Evaluator* evaluator) {
+void refine(OpenSubdiv_Evaluator *evaluator)
+{
   evaluator->internal->eval_output->refine();
 }
 
-void evaluateLimit(OpenSubdiv_Evaluatorevaluator,
+void evaluateLimit(OpenSubdiv_Evaluator *evaluator,
                    const int ptex_face_index,
-                   const float face_u, const float face_v,
-                   float P[3], float dPdu[3], float dPdv[3]) {
-  evaluator->internal->eval_output->evaluateLimit(ptex_face_index,
-                                                  face_u, face_v,
-                                                  P, dPdu, dPdv);
+                   const float face_u,
+                   const float face_v,
+                   float P[3],
+                   float dPdu[3],
+                   float dPdv[3])
+{
+  evaluator->internal->eval_output->evaluateLimit(ptex_face_index, face_u, face_v, P, dPdu, dPdv);
 }
 
-void evaluateVarying(OpenSubdiv_Evaluatorevaluator,
+void evaluateVarying(OpenSubdiv_Evaluator *evaluator,
                      const int ptex_face_index,
-                     float face_u, float face_v,
-                     float varying[3]) {
-  evaluator->internal->eval_output->evaluateVarying(ptex_face_index,
-                                                    face_u, face_v,
-                                                    varying);
+                     float face_u,
+                     float face_v,
+                     float varying[3])
+{
+  evaluator->internal->eval_output->evaluateVarying(ptex_face_index, face_u, face_v, varying);
 }
 
-void evaluateFaceVarying(OpenSubdiv_Evaluatorevaluator,
+void evaluateFaceVarying(OpenSubdiv_Evaluator *evaluator,
                          const int face_varying_channel,
                          const int ptex_face_index,
-                         float face_u, float face_v,
-                         float face_varying[2]) {
+                         float face_u,
+                         float face_v,
+                         float face_varying[2])
+{
   evaluator->internal->eval_output->evaluateFaceVarying(
       face_varying_channel, ptex_face_index, face_u, face_v, face_varying);
 }
 
-void assignFunctionPointers(OpenSubdiv_Evaluator* evaluator) {
+void assignFunctionPointers(OpenSubdiv_Evaluator *evaluator)
+{
   evaluator->setCoarsePositions = setCoarsePositions;
   evaluator->setVaryingData = setVaryingData;
   evaluator->setFaceVaryingData = setFaceVaryingData;
@@ -144,15 +141,17 @@ void assignFunctionPointers(OpenSubdiv_Evaluator* evaluator) {
 
 }  // namespace
 
-OpenSubdiv_Evaluator* openSubdiv_createEvaluatorFromTopologyRefiner(
-    OpenSubdiv_TopologyRefiner* topology_refiner) {
-  OpenSubdiv_Evaluator* evaluator = OBJECT_GUARDED_NEW(OpenSubdiv_Evaluator);
+OpenSubdiv_Evaluator *openSubdiv_createEvaluatorFromTopologyRefiner(
+    OpenSubdiv_TopologyRefiner *topology_refiner)
+{
+  OpenSubdiv_Evaluator *evaluator = OBJECT_GUARDED_NEW(OpenSubdiv_Evaluator);
   assignFunctionPointers(evaluator);
   evaluator->internal = openSubdiv_createEvaluatorInternal(topology_refiner);
   return evaluator;
 }
 
-void openSubdiv_deleteEvaluator(OpenSubdiv_Evaluator* evaluator) {
+void openSubdiv_deleteEvaluator(OpenSubdiv_Evaluator *evaluator)
+{
   openSubdiv_deleteEvaluatorInternal(evaluator->internal);
   OBJECT_GUARDED_DELETE(evaluator, OpenSubdiv_Evaluator);
 }