refactor: refactor VxVector and its generator.
- 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.
This commit is contained in:
@ -157,7 +157,7 @@ namespace LibCmo::CK2::ObjImpls {
|
||||
|
||||
// read matrix
|
||||
// reset
|
||||
m_WorldMatrix.ResetToIdentity();
|
||||
m_WorldMatrix.SetIdentity();
|
||||
// force read as vector3
|
||||
chunk->ReadStruct(reinterpret_cast<VxMath::VxVector3*>(&m_WorldMatrix[0]));
|
||||
chunk->ReadStruct(reinterpret_cast<VxMath::VxVector3*>(&m_WorldMatrix[1]));
|
||||
|
Reference in New Issue
Block a user