diff options
Diffstat (limited to 'source/blender/blenkernel/BKE_ccg.h')
-rw-r--r-- | source/blender/blenkernel/BKE_ccg.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/blenkernel/BKE_ccg.h b/source/blender/blenkernel/BKE_ccg.h index 079994450d5..6d39d42bde5 100644 --- a/source/blender/blenkernel/BKE_ccg.h +++ b/source/blender/blenkernel/BKE_ccg.h @@ -38,19 +38,19 @@ struct CCGSubSurf; /* Each CCGElem is CCGSubSurf's representation of a subdivided - vertex. All CCGElems in a particular CCGSubSurf have the same - layout, but the layout can vary from one CCGSubSurf to another. For - this reason, CCGElem is presented as an opaque pointer, and - elements should always be accompanied by a CCGKey, which provides - the necessary offsets to access components of a CCGElem. -*/ + * vertex. All CCGElems in a particular CCGSubSurf have the same + * layout, but the layout can vary from one CCGSubSurf to another. For + * this reason, CCGElem is presented as an opaque pointer, and + * elements should always be accompanied by a CCGKey, which provides + * the necessary offsets to access components of a CCGElem. + */ typedef struct CCGElem CCGElem; typedef struct CCGKey { int level; /* number of bytes in each element (one float per layer, plus - three floats for normals if enabled) */ + * three floats for normals if enabled) */ int elem_size; /* number of elements along each side of grid */ @@ -61,11 +61,11 @@ typedef struct CCGKey { int grid_bytes; /* currently always the last three floats, unless normals are - disabled */ + * disabled */ int normal_offset; /* offset in bytes of mask value; only valid if 'has_mask' is - true */ + * true */ int mask_offset; int num_layers; @@ -104,24 +104,24 @@ BLI_INLINE CCGElem *CCG_elem_next(const CCGKey *key, CCGElem *elem); BLI_INLINE float *CCG_elem_co(const CCGKey *UNUSED(key), CCGElem *elem) { - return (float*)elem; + return (float *)elem; } BLI_INLINE float *CCG_elem_no(const CCGKey *key, CCGElem *elem) { BLI_assert(key->has_normals); - return (float*)((char*)elem + key->normal_offset); + return (float *)((char *)elem + key->normal_offset); } BLI_INLINE float *CCG_elem_mask(const CCGKey *key, CCGElem *elem) { BLI_assert(key->has_mask); - return (float*)((char*)elem + (key->mask_offset)); + return (float *)((char *)elem + (key->mask_offset)); } BLI_INLINE CCGElem *CCG_elem_offset(const CCGKey *key, CCGElem *elem, int offset) { - return (CCGElem*)(((char*)elem) + key->elem_size * offset); + return (CCGElem *)(((char *)elem) + key->elem_size * offset); } BLI_INLINE CCGElem *CCG_grid_elem(const CCGKey *key, CCGElem *elem, int x, int y) |