18 #include "precompiled.h"
50 bounds +=
CVector3D(-width/2.f, 0, -depth/2.f);
51 bounds +=
CVector3D( width/2.f, height, depth/2.f);
60 LOGWARNING(L
"[ModelAbstract] TODO: Cylinder selection boxes are not yet implemented. Use BOX or BOUNDS selection shapes instead.");
67 debug_warn(
"[ModelAbstract] Unrecognized selection shape type");
85 if (objBounds[1].
Y > 0.f)
86 objBounds[0].Y = std::max(0.f, objBounds[0].
Y);
The selection shape is determined by a cylinder of custom, user-specified size.
void Transform(const CMatrix3D &m, CBoundingBoxAligned &result) const
Transforms these bounds according to the specified transformation matrix m, and writes the axis-align...
float m_Size0
Box width if BOX, or radius if CYLINDER.
float m_Height
Box height if BOX, cylinder height if CYLINDER.
float m_Size1
Box depth if BOX, or radius if CYLINDER.
virtual const CBoundingBoxOriented & GetSelectionBox()
Returns the world-space selection box of this model.
CustomSelectionShape * m_CustomSelectionShape
Pointer to a descriptor for a custom-defined selection box shape.
virtual const CBoundingBoxAligned GetObjectSelectionBoundsRec()
Returns the (object-space) bounds that should be used to construct a selection box for this model and...
CBoundingBoxOriented m_SelectionBox
Selection box for this model.
const CMatrix3D & GetTransform() const
#define debug_warn(expr)
display the error dialog with the given text.
bool m_SelectionBoxValid
Is the current selection box valid?
EType m_Type
Type of shape.
The selection shape is determined by an oriented box of custom, user-specified size.