Open xezon opened 10 months ago
Another in same function:
Matrix4 world_to_object;
Matrix4 object_to_world(*mesh_xform);
...
D3DXMatrixInverse(
reinterpret_cast<D3DXMATRIX *>(&world_to_object), &det, reinterpret_cast<D3DXMATRIX *>(&object_to_world));
Better:
Matrix4 world_to_object;
Matrix4 object_to_world(*mesh_xform);
...
world_to_object = object_to_world.Inverse();
Better be written as
Needs new functions in Vector4 class file:
Reason being:
reinterpret_cast
requires strong contract thatVector3
andVector4
are castable this way. OnlyVector4
provided functions should do that.