Style Guide¶
This document provides a guide to the style used in this project.
Code Formatting¶
We utilize ClangFormat to automate code formatting. Please format your code before pushing and/or creating a pull request.
Naming conventions¶
General¶
In general, we stick to the following naming conventions:
snake_casefor variables, functions, and filenamesPascalCasefor classes and structsALL_CAPSfor constants and enum membersm_prefix for class member variables (if the member is not public)member()to get a class member variable (if the member is not public)set_member()to set a class member variable (if the member is not public)
Specific¶
vertex positions:
verticesorpositionsvertex displacements:
displacementsvertex rest positions/material coordinates:
rest_positionsvertex velocities:
velocitiesmesh edge matrix:
edgesmesh face matrix:
faceselement vertices: we use a numeral suffix (e.g.,
e0ande1for the end-points of an edge)edge-edge pairings: suffix of
aandbcontinuous collision detection pairs: suffix of
_t0for starting values and_t1for end values
Documentation¶
We use Doxygen to generate documentation. Please document your code before pushing and/or creating a pull request.