cpp_robotics::Rect
長方形クラス(回転は考えない)
#include <shape.hpp>
Public Functions
| Name | |
|---|---|
| Rect() =default | |
| constexpr | Rect(const Vector2d & center, const Vector2d & size) | 
| void | set(const Vector2d & center_, const Vector2d & size_) | 
| constexpr bool | has_area() const | 
| constexpr double | area() const | 
| constexpr std::array< Vector2d, 4 > | vertex() const | 
| constexpr std::array< Line, 4 > | outline() const | 
| constexpr Quad | as_quad() const | 
| constexpr Quad | get_rotated(double angle) const | 
Public Attributes
| Name | |
|---|---|
| Vector2d | center | 
| Vector2d | size | 
Public Functions Documentation
function Rect
Rect() =default
function Rect
inline constexpr Rect(
    const Vector2d & center,
    const Vector2d & size
)
function set
inline void set(
    const Vector2d & center_,
    const Vector2d & size_
)
function has_area
inline constexpr bool has_area() const
function area
inline constexpr double area() const
function vertex
inline constexpr std::array< Vector2d, 4 > vertex() const
function outline
inline constexpr std::array< Line, 4 > outline() const
function as_quad
inline constexpr Quad as_quad() const
function get_rotated
inline constexpr Quad get_rotated(
    double angle
) const
Public Attributes Documentation
variable center
Vector2d center;
variable size
Vector2d size;
Updated on 2024-05-28 at 06:55:39 +0000