Dynamic rectangle. More...
#include <playrho/d2/part/Compositor.hpp>
Public Member Functions | |
DynamicRectangle (Length width, Length height, const Length2 &offset=Length2{}) | |
Initializing constructor. | |
DistanceProxy | GetChild (ChildCounter index) const |
Gets the "child" shape for the given shape configuration. | |
ChildCounter | GetChildCount () const noexcept |
Gets the child count. More... | |
Length2 | GetDimensions () const noexcept |
Gets the dimensions of this rectangle. More... | |
MassData | GetMassData (NonNegative< AreaDensity > density) const noexcept |
Gets the mass data for the geometry. | |
const std::array< UnitVec, 4u > & | GetNormals () const noexcept |
Gets this rectangle's normals. More... | |
Length2 | GetOffset () const noexcept |
Gets the x and y offset of this rectangle. More... | |
constexpr NonNegative< Length > | GetVertexRadius () const noexcept |
Gets the vertex radius. | |
const std::array< Length2, 4u > & | GetVertices () const noexcept |
Gets this rectangle's vertices. More... | |
void | Scale (const Vec2 &value) |
Scales the vertices of this geometry. | |
void | SetDimensions (const Length2 &val) |
Sets the dimensions of this rectangle. More... | |
void | SetOffset (const Length2 &val) |
Sets the x and y offset of this rectangle. More... | |
void | SetVertexRadius (ChildCounter, NonNegative< Length > value) |
Sets the vertex radius for the specified child to the given value. More... | |
void | Translate (const Length2 &value) |
Translates the vertices of this geometry. | |
Dynamic rectangle.
Provides a rectangular runtime-time configurable class implementation of the geometry policy of the Compositor
host class template. Unlike the StaticRectangle
, this class can have width, height, vertex-radius, and offset set at runtime.
|
inlinenoexcept |
Gets the child count.
|
inlinenoexcept |
Gets the dimensions of this rectangle.
Referenced by playrho::d2::part::DynamicRectangle< W, H, V >::Scale(), and playrho::d2::part::DynamicRectangle< W, H, V >::SetOffset().
|
inlinenoexcept |
Gets this rectangle's normals.
Referenced by playrho::d2::part::DynamicRectangle< W, H, V >::GetChild().
|
inlinenoexcept |
Gets the x and y offset of this rectangle.
Referenced by playrho::d2::part::DynamicRectangle< W, H, V >::SetDimensions(), and playrho::d2::part::DynamicRectangle< W, H, V >::Translate().
|
inlinenoexcept |
Gets this rectangle's vertices.
Referenced by playrho::d2::part::DynamicRectangle< W, H, V >::GetChild(), and playrho::d2::part::DynamicRectangle< W, H, V >::GetMassData().
|
inline |
Sets the dimensions of this rectangle.
Referenced by playrho::d2::part::DynamicRectangle< W, H, V >::Scale().
|
inline |
Sets the x and y offset of this rectangle.
Referenced by playrho::d2::part::DynamicRectangle< W, H, V >::Translate().
|
inline |
Sets the vertex radius for the specified child to the given value.