Coding conventions
- headers in include/core_api shall not include headers from other YafaRay include dirs.
- headers in include/core_api shall not use HAVE_* options (like '#if HAVE_EXR')
- plugins using headers other than core_api ones need to have all libs added to their build environment for all HAVE_* options they pull in (directly or indirectly!)
- interface functions shall not have arguments or return types which depend on configurable typedefines (such as CFLOAT, PLOAT and GFLOAT)
- use doxygen comments to document non-obvious types, classes, interfaces and functions and their usage.
Formatting
- use tabs, not spaces
- recommended tab width is 4
- 80 character terminals are from last century... everyone should be able to view at least 120 character long lines
Commenting the code
YafaRay uses doxygen to generate code documentation.
Reference: http://www.stack.nl/~dimitri/doxygen/docblocks.html
Brief description example ( to be used on class variables):
vector3d_t camX; //!< Camera x axis
Brief and long description example (to be used on class members):
/*! Shoot a new ray from the camera given image pixel coordinates px,py etc */
virtual ray_t shootRay(PFLOAT px, PFLOAT py, float u, float v, PFLOAT &wt) const = 0; //!< Shoot a new ray from the camera.