diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:17:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:21:24 +0300 |
commit | e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch) | |
tree | 8cf3453d12edb177a218ef8009357518ec6cab6a /intern/opensubdiv/opensubdiv_converter_capi.h | |
parent | b3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff) |
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'intern/opensubdiv/opensubdiv_converter_capi.h')
-rw-r--r-- | intern/opensubdiv/opensubdiv_converter_capi.h | 67 |
1 files changed, 30 insertions, 37 deletions
diff --git a/intern/opensubdiv/opensubdiv_converter_capi.h b/intern/opensubdiv/opensubdiv_converter_capi.h index 389e16e0f3f..2f3850665c2 100644 --- a/intern/opensubdiv/opensubdiv_converter_capi.h +++ b/intern/opensubdiv/opensubdiv_converter_capi.h @@ -28,13 +28,12 @@ extern "C" { #endif typedef struct OpenSubdiv_Converter { - OpenSubdiv_SchemeType (*getSchemeType)( - const struct OpenSubdiv_Converter* converter); + OpenSubdiv_SchemeType (*getSchemeType)(const struct OpenSubdiv_Converter *converter); OpenSubdiv_VtxBoundaryInterpolation (*getVtxBoundaryInterpolation)( - const struct OpenSubdiv_Converter* converter); + const struct OpenSubdiv_Converter *converter); OpenSubdiv_FVarLinearInterpolation (*getFVarLinearInterpolation)( - const struct OpenSubdiv_Converter* converter); + const struct OpenSubdiv_Converter *converter); // Denotes whether this converter specifies full topology, which includes // vertices, edges, faces, vertices+edges of a face and edges/faces of a @@ -45,26 +44,25 @@ typedef struct OpenSubdiv_Converter { // NOTE: Even if converter does not provide full topology, it still needs // to provide number of edges and vertices-of-edge. Those are used to assign // topology tags. - bool (*specifiesFullTopology)(const struct OpenSubdiv_Converter* converter); + bool (*specifiesFullTopology)(const struct OpenSubdiv_Converter *converter); ////////////////////////////////////////////////////////////////////////////// // Global geometry counters. // Number of faces/edges/vertices in the base mesh. - int (*getNumFaces)(const struct OpenSubdiv_Converter* converter); - int (*getNumEdges)(const struct OpenSubdiv_Converter* converter); - int (*getNumVertices)(const struct OpenSubdiv_Converter* converter); + int (*getNumFaces)(const struct OpenSubdiv_Converter *converter); + int (*getNumEdges)(const struct OpenSubdiv_Converter *converter); + int (*getNumVertices)(const struct OpenSubdiv_Converter *converter); ////////////////////////////////////////////////////////////////////////////// // Face relationships. // Number of vertices the face consists of. - int (*getNumFaceVertices)(const struct OpenSubdiv_Converter* converter, - const int face_index); + int (*getNumFaceVertices)(const struct OpenSubdiv_Converter *converter, const int face_index); // Array of vertex indices the face consists of. - void (*getFaceVertices)(const struct OpenSubdiv_Converter* converter, + void (*getFaceVertices)(const struct OpenSubdiv_Converter *converter, const int face_index, - int* face_vertices); + int *face_vertices); // Array of edge indices the face consists of. // Aligned with the vertex indices array, edge i connects face vertex i // with face index i+1. @@ -76,45 +74,41 @@ typedef struct OpenSubdiv_Converter { // Edge relationships. // Vertices the edge consists of. - void (*getEdgeVertices)(const struct OpenSubdiv_Converter* converter, + void (*getEdgeVertices)(const struct OpenSubdiv_Converter *converter, const int edge_index, int edge_vertices[2]); // Number of faces which are sharing the given edge. - int (*getNumEdgeFaces)(const struct OpenSubdiv_Converter* converter, - const int edge_index); + int (*getNumEdgeFaces)(const struct OpenSubdiv_Converter *converter, const int edge_index); // Array of face indices which are sharing the given edge. - void (*getEdgeFaces)(const struct OpenSubdiv_Converter* converter, + void (*getEdgeFaces)(const struct OpenSubdiv_Converter *converter, const int edge, - int* edge_faces); + int *edge_faces); // Edge sharpness (aka crease). - float (*getEdgeSharpness)(const struct OpenSubdiv_Converter* converter, - const int edge_index); + float (*getEdgeSharpness)(const struct OpenSubdiv_Converter *converter, const int edge_index); ////////////////////////////////////////////////////////////////////////////// // Vertex relationships. // Number of edges which are adjacent to the given vertex. - int (*getNumVertexEdges)(const struct OpenSubdiv_Converter* converter, - const int vertex_index); + int (*getNumVertexEdges)(const struct OpenSubdiv_Converter *converter, const int vertex_index); // Array fo edge indices which are adjacent to the given vertex. - void (*getVertexEdges)(const struct OpenSubdiv_Converter* converter, + void (*getVertexEdges)(const struct OpenSubdiv_Converter *converter, const int vertex_index, - int* vertex_edges); + int *vertex_edges); // Number of faces which are adjacent to the given vertex. - int (*getNumVertexFaces)(const struct OpenSubdiv_Converter* converter, - const int vertex_index); + int (*getNumVertexFaces)(const struct OpenSubdiv_Converter *converter, const int vertex_index); // Array fo face indices which are adjacent to the given vertex. - void (*getVertexFaces)(const struct OpenSubdiv_Converter* converter, + void (*getVertexFaces)(const struct OpenSubdiv_Converter *converter, const int vertex_index, - int* vertex_faces); + int *vertex_faces); // Check whether vertex is to be marked as an infinite sharp. // This is a way to make sharp vertices which are adjacent to a loose edges. - bool (*isInfiniteSharpVertex)(const struct OpenSubdiv_Converter* converter, + bool (*isInfiniteSharpVertex)(const struct OpenSubdiv_Converter *converter, const int vertex_index); // If vertex is not infinitely sharp, this is it's actual sharpness. - float (*getVertexSharpness)(const struct OpenSubdiv_Converter* converter, + float (*getVertexSharpness)(const struct OpenSubdiv_Converter *converter, const int vertex_index); ////////////////////////////////////////////////////////////////////////////// @@ -124,7 +118,7 @@ typedef struct OpenSubdiv_Converter { // UV coordinates. // Number of UV layers. - int (*getNumUVLayers)(const struct OpenSubdiv_Converter* converter); + int (*getNumUVLayers)(const struct OpenSubdiv_Converter *converter); // We need some corner connectivity information, which might not be trivial // to be gathered (might require multiple matching calculations per corver @@ -134,24 +128,23 @@ typedef struct OpenSubdiv_Converter { // complex complex-to-calculate information. // finish() is called after converter is done porting UV layer to OpenSubdiv, // allowing to free cached data. - void (*precalcUVLayer)(const struct OpenSubdiv_Converter* converter, - const int layer_index); - void (*finishUVLayer)(const struct OpenSubdiv_Converter* converter); + void (*precalcUVLayer)(const struct OpenSubdiv_Converter *converter, const int layer_index); + void (*finishUVLayer)(const struct OpenSubdiv_Converter *converter); // Get number of UV coordinates in the current layer (layer which was // specified in precalcUVLayer(). - int (*getNumUVCoordinates)(const struct OpenSubdiv_Converter* converter); + int (*getNumUVCoordinates)(const struct OpenSubdiv_Converter *converter); // For the given face index and its corner (known as loop in Blender) // get corrsponding UV coordinate index. - int (*getFaceCornerUVIndex)(const struct OpenSubdiv_Converter* converter, + int (*getFaceCornerUVIndex)(const struct OpenSubdiv_Converter *converter, const int face_index, const int corner_index); ////////////////////////////////////////////////////////////////////////////// // User data associated with this converter. - void (*freeUserData)(const struct OpenSubdiv_Converter* converter); - void* user_data; + void (*freeUserData)(const struct OpenSubdiv_Converter *converter); + void *user_data; } OpenSubdiv_Converter; #ifdef __cplusplus |