ovphysx coding and doc style#
Load this when writing C++, Python, CMake, or docs/ Markdown under ovphysx/.
ovruntime/ uses the same C++ rules.
Source files#
C API uses the
ovphysx_prefix. Preferred declarations are inovphysx.h; deprecated families are inovphysx_legacy.h(ovphysx.hstill includes it).Python API is the
PhysXclass inovphysx.api.Source files (
.cpp,.h,.py,.cmake,.sh,.bat, etc.) must be ASCII-only in code and comments. Use--or-, not em dashes or other Unicode punctuation. Markdown underdocs/is exempt.
Avoid auto for type deduction#
New code under ovphysx/ (including ovruntime/) should use explicit types
instead of auto in variable declarations. A reviewer looking at a line should
be able to tell what type is being constructed without jumping to the function
declaration.
Allowed exceptions – use auto when:
The right-hand side is a lambda (you cannot spell the closure type).
STL iterators in for-loops or as the result of
find/lower_bound.Template-only constructs with no spelled type:
decltypechains, parameter packs, fold expressions.Structured bindings (
auto& [k, v] : map).
Disallowed – write the type out, including range-based for loops when the
element type is a single typed item. Spell DescPtr<T>; do not hide pointer vs
value behind auto.