yyc12345
4bfc4782b5
- refactor VxVector-like struct. split their declaration and implementatio because their implementation is too long. and occupy too much space in header. - refactor VxVector struct generator. use jinja2 template engine, rather ran hand-written format string to make it is easy to read (although it still tough when first reading). - add unary operator overloading for VxVector-like struct. - add some VxMatrix functions which are essential to CKCamera. - rename VxMatrix::ResetToIdentity to VxMatrix::SetIdentity to make it same as original Virtools SDK. - the spaceship overloading with auto return value still may have bugs. please watch it carefully. |
||
---|---|---|
.. | ||
.gitignore | ||
README.md | ||
VxTypes.cpp.jinja | ||
VxTypes.hpp.jinja | ||
VxTypes.shared.jinja | ||
VxVectorGen.py |
Vector Generator
Vector types (LibCmo::Vector3 and etc) and Vector-like types (LibCmo::Color and etc) nearly have similar declaration except slight differences (basically is the count of factors). Manually writing these declarations is boring and easy to cause potential invisible bugs. So we use a Python script to generate these declarations batchly to prevent any defects indroduced above.