mirror of https://github.com/AxioDL/zeus.git
COBBox::FromAABox fix
This commit is contained in:
parent
855869b5b1
commit
a240b39a11
|
@ -35,8 +35,9 @@ public:
|
|||
CAABox calculateAABox(const CTransform& worldXf = CTransform()) const;
|
||||
|
||||
static COBBox FromAABox(const CAABox& box, const CTransform& xf) {
|
||||
const CVector3f extents = box.max - box.center();
|
||||
const CTransform newXf = CTransform::Translate(box.center()) * xf;
|
||||
CVector3f center = box.center();
|
||||
const CVector3f extents = box.max - center;
|
||||
const CTransform newXf = xf * CTransform::Translate(center);
|
||||
return COBBox(newXf, extents);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue