OpenSiv3D  v0.6.5
C++20 framework for creative coding
s3d::Rect Struct Reference

長方形 (成分が int32 型) More...

#include <Rect.hpp>

Public Types

using position_type = Point
 
using size_type = Point
 
using value_type = size_type::value_type
 

Public Member Functions

SIV3D_NODISCARD_CXX20 Rect ()=default
 
constexpr SIV3D_NODISCARD_CXX20 Rect (value_type _size) noexcept
 長方形を作成します。 More...
 
SIV3D_CONCEPT_INTEGRAL constexpr SIV3D_NODISCARD_CXX20 Rect (Int _r) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (value_type _w, value_type _h) noexcept
 長方形を作成します。 More...
 
template<class W , class H , std::enable_if_t< std::conjunction_v< std::is_integral< W >, std::is_integral< H >>> * = nullptr>
constexpr SIV3D_NODISCARD_CXX20 Rect (W _w, H _h) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (size_type _size) noexcept
 長方形を作成します。 More...
 
constexpr SIV3D_NODISCARD_CXX20 Rect (value_type _x, value_type _y, value_type _size) noexcept
 長方形を作成します。 More...
 
template<class X , class Y , class S , std::enable_if_t< std::conjunction_v< std::is_integral< X >, std::is_integral< Y >, std::is_integral< S >>> * = nullptr>
constexpr SIV3D_NODISCARD_CXX20 Rect (X _x, Y _y, S _size) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (value_type _x, value_type _y, value_type _w, value_type _h) noexcept
 長方形を作成します。 More...
 
template<class X , class Y , class W , class H , std::enable_if_t< std::conjunction_v< std::is_integral< X >, std::is_integral< Y >, std::is_integral< W >, std::is_integral< H >>> * = nullptr>
constexpr SIV3D_NODISCARD_CXX20 Rect (X _x, Y _y, W _w, H _h) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (value_type _x, value_type _y, size_type _size) noexcept
 長方形を作成します。 More...
 
template<class X , class Y , std::enable_if_t< std::conjunction_v< std::is_integral< X >, std::is_integral< Y >>> * = nullptr>
constexpr SIV3D_NODISCARD_CXX20 Rect (X _x, Y _y, size_type _size) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (position_type _pos, value_type _size) noexcept
 長方形を作成します。 More...
 
SIV3D_CONCEPT_INTEGRAL constexpr SIV3D_NODISCARD_CXX20 Rect (position_type _pos, Int _size) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (position_type _pos, value_type _w, value_type _h) noexcept
 長方形を作成します。 More...
 
template<class W , class H , std::enable_if_t< std::conjunction_v< std::is_integral< W >, std::is_integral< H >>> * = nullptr>
constexpr SIV3D_NODISCARD_CXX20 Rect (position_type _pos, W _w, H _h) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (position_type _pos, size_type _size) noexcept
 長方形を作成します。 More...
 
constexpr SIV3D_NODISCARD_CXX20 Rect (Arg::center_< position_type > _center, value_type _size) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (Arg::center_< position_type > _center, value_type _w, value_type _h) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (Arg::center_< position_type > _center, size_type _size) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (Arg::topLeft_< position_type > topLeft, value_type _size) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (Arg::topLeft_< position_type > topLeft, value_type _w, value_type _h) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (Arg::topLeft_< position_type > topLeft, size_type _size) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (Arg::topCenter_< position_type > topCenter, value_type _size) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (Arg::topCenter_< position_type > topCenter, value_type _w, value_type _h) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (Arg::topCenter_< position_type > topCenter, size_type _size) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (Arg::topRight_< position_type > topRight, value_type _size) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (Arg::topRight_< position_type > topRight, value_type _w, value_type _h) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (Arg::topRight_< position_type > topRight, size_type _size) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (Arg::rightCenter_< position_type > rightCenter, value_type _size) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (Arg::rightCenter_< position_type > rightCenter, value_type _w, value_type _h) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (Arg::rightCenter_< position_type > rightCenter, size_type _size) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (Arg::bottomRight_< position_type > bottomRight, value_type _size) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (Arg::bottomRight_< position_type > bottomRight, value_type _w, value_type _h) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (Arg::bottomRight_< position_type > bottomRight, size_type _size) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (Arg::bottomCenter_< position_type > bottomCenter, value_type _size) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (Arg::bottomCenter_< position_type > bottomCenter, value_type _w, value_type _h) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (Arg::bottomCenter_< position_type > bottomCenter, size_type _size) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (Arg::bottomLeft_< position_type > bottomLeft, value_type _size) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (Arg::bottomLeft_< position_type > bottomLeft, value_type _w, value_type _h) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (Arg::bottomLeft_< position_type > bottomLeft, size_type _size) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (Arg::leftCenter_< position_type > leftCenter, value_type _size) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (Arg::leftCenter_< position_type > leftCenter, value_type _w, value_type _h) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Rect (Arg::leftCenter_< position_type > leftCenter, size_type _size) noexcept
 
constexpr RectsetPos (value_type _x, value_type _y) noexcept
 
constexpr RectsetPos (position_type _pos) noexcept
 
constexpr RectsetPos (Arg::center_< position_type > _center) noexcept
 
constexpr RectsetPos (Arg::topLeft_< position_type > topLeft) noexcept
 
constexpr RectsetPos (Arg::topCenter_< position_type > topCenter) noexcept
 
constexpr RectsetPos (Arg::topRight_< position_type > topRight) noexcept
 
constexpr RectsetPos (Arg::rightCenter_< position_type > rightCenter) noexcept
 
constexpr RectsetPos (Arg::bottomRight_< position_type > bottomRight) noexcept
 
constexpr RectsetPos (Arg::bottomCenter_< position_type > bottomCenter) noexcept
 
constexpr RectsetPos (Arg::bottomLeft_< position_type > bottomLeft) noexcept
 
constexpr RectsetPos (Arg::leftCenter_< position_type > leftCenter) noexcept
 
constexpr RectsetCenter (value_type _x, value_type _y) noexcept
 
constexpr RectsetCenter (position_type _pos) noexcept
 
constexpr RectsetSize (value_type _size) noexcept
 
constexpr RectsetSize (value_type _w, value_type _h) noexcept
 
constexpr RectsetSize (size_type _size) noexcept
 
constexpr Rectset (value_type _x, value_type _y, value_type _w, value_type _h) noexcept
 
constexpr Rectset (value_type _x, value_type _y, value_type _size) noexcept
 
constexpr Rectset (value_type _x, value_type _y, size_type _size) noexcept
 
constexpr Rectset (position_type _pos, value_type _size) noexcept
 
constexpr Rectset (position_type _pos, value_type _w, value_type _h) noexcept
 
constexpr Rectset (position_type _pos, size_type _size) noexcept
 
constexpr Rectset (const Rect &r) noexcept
 
constexpr Rectset (Arg::center_< position_type > _center, value_type _size) noexcept
 
constexpr Rectset (Arg::center_< position_type > _center, value_type _w, value_type _h) noexcept
 
constexpr Rectset (Arg::center_< position_type > _center, size_type _size) noexcept
 
constexpr Rectset (Arg::topLeft_< position_type > topLeft, value_type _size) noexcept
 
constexpr Rectset (Arg::topLeft_< position_type > topLeft, value_type _w, value_type _h) noexcept
 
constexpr Rectset (Arg::topLeft_< position_type > topLeft, size_type _size) noexcept
 
constexpr Rectset (Arg::topCenter_< position_type > topCenter, value_type _size) noexcept
 
constexpr Rectset (Arg::topCenter_< position_type > topCenter, value_type _w, value_type _h) noexcept
 
constexpr Rectset (Arg::topCenter_< position_type > topCenter, size_type _size) noexcept
 
constexpr Rectset (Arg::topRight_< position_type > topRight, value_type _size) noexcept
 
constexpr Rectset (Arg::topRight_< position_type > topRight, value_type _w, value_type _h) noexcept
 
constexpr Rectset (Arg::topRight_< position_type > topRight, size_type _size) noexcept
 
constexpr Rectset (Arg::rightCenter_< position_type > rightCenter, value_type _size) noexcept
 
constexpr Rectset (Arg::rightCenter_< position_type > rightCenter, value_type _w, value_type _h) noexcept
 
constexpr Rectset (Arg::rightCenter_< position_type > rightCenter, size_type _size) noexcept
 
constexpr Rectset (Arg::bottomRight_< position_type > bottomRight, value_type _size) noexcept
 
constexpr Rectset (Arg::bottomRight_< position_type > bottomRight, value_type _w, value_type _h) noexcept
 
constexpr Rectset (Arg::bottomRight_< position_type > bottomRight, size_type _size) noexcept
 
constexpr Rectset (Arg::bottomCenter_< position_type > bottomCenter, value_type _size) noexcept
 
constexpr Rectset (Arg::bottomCenter_< position_type > bottomCenter, value_type _w, value_type _h) noexcept
 
constexpr Rectset (Arg::bottomCenter_< position_type > bottomCenter, size_type _size) noexcept
 
constexpr Rectset (Arg::bottomLeft_< position_type > bottomLeft, value_type _size) noexcept
 
constexpr Rectset (Arg::bottomLeft_< position_type > bottomLeft, value_type _w, value_type _h) noexcept
 
constexpr Rectset (Arg::bottomLeft_< position_type > bottomLeft, size_type _size) noexcept
 
constexpr Rectset (Arg::leftCenter_< position_type > leftCenter, value_type _size) noexcept
 
constexpr Rectset (Arg::leftCenter_< position_type > leftCenter, value_type _w, value_type _h) noexcept
 
constexpr Rectset (Arg::leftCenter_< position_type > leftCenter, size_type _size) noexcept
 
constexpr Rect movedBy (value_type _x, value_type _y) const noexcept
 座標を移動した新しい長方形を返します。 More...
 
constexpr Rect movedBy (size_type v) const noexcept
 座標を移動した新しい長方形を返します。 More...
 
constexpr RectmoveBy (value_type _x, value_type _y) noexcept
 長方形を移動させます。 More...
 
constexpr RectmoveBy (size_type v) noexcept
 長方形を移動させます。 More...
 
constexpr Rect stretched (value_type xy) const noexcept
 
constexpr Rect stretched (value_type _x, value_type _y) const noexcept
 
constexpr Rect stretched (size_type xy) const noexcept
 
constexpr Rect stretched (value_type top, value_type right, value_type bottom, value_type left) const noexcept
 
constexpr RectF scaled (double s) const noexcept
 
constexpr RectF scaled (double sx, double sy) const noexcept
 
constexpr RectF scaled (Vec2 s) const noexcept
 
constexpr RectF scaledAt (Vec2 _pos, double s) const noexcept
 
constexpr RectF scaledAt (Vec2 _pos, double sx, double sy) const noexcept
 
constexpr RectF scaledAt (Vec2 _pos, Vec2 s) const noexcept
 
constexpr operator bool () const noexcept
 長方形が空でないかを返します。 More...
 
constexpr bool isEmpty () const noexcept
 長方形が空であるかを返します。 More...
 
constexpr bool hasArea () const noexcept
 長方形が大きさを持っているかを返します。 More...
 
constexpr value_type leftX () const noexcept
 長方形の左辺の X 座標を返します。 More...
 
constexpr value_type rightX () const noexcept
 長方形の右辺の X 座標を返します。 More...
 
constexpr value_type topY () const noexcept
 長方形の上辺の Y 座標を返します。 More...
 
constexpr value_type bottomY () const noexcept
 長方形の下辺の Y 座標を返します。 More...
 
constexpr double centerX () const noexcept
 長方形の中心の X 座標を返します。 More...
 
constexpr double centerY () const noexcept
 長方形の中心の Y 座標を返します。 More...
 
constexpr size_type tl () const noexcept
 長方形の左上の座標を返します。 More...
 
constexpr size_type tr () const noexcept
 長方形の右上の座標を返します。 More...
 
constexpr size_type br () const noexcept
 長方形の右下の座標を返します。 More...
 
constexpr size_type bl () const noexcept
 長方形の左下の座標を返します。 More...
 
constexpr Vec2 topCenter () const noexcept
 長方形の上辺の中心座標を返します。 More...
 
constexpr Vec2 rightCenter () const noexcept
 長方形の右辺の中心座標を返します。 More...
 
constexpr Vec2 bottomCenter () const noexcept
 長方形の下辺の中心座標を返します。 More...
 
constexpr Vec2 leftCenter () const noexcept
 長方形の左辺の中心座標を返します。 More...
 
constexpr Vec2 center () const noexcept
 長方形の中心座標を返します。 More...
 
constexpr Vec2 getRelativePoint (double relativeX, double relativeY) const noexcept
 長方形の左上を (0 ,0), 右下を (1, 1) としたときの (relativeX, relativeY) の座標を返します。 More...
 
constexpr Line top () const noexcept
 長方形の上辺を Line として返します。 More...
 
constexpr Line right () const noexcept
 長方形の右辺を Line として返します。 More...
 
constexpr Line bottom () const noexcept
 長方形の下辺を Line として返します。 More...
 
constexpr Line left () const noexcept
 長方形の左辺を Line として返します。 More...
 
constexpr position_type point (size_t index) const
 
constexpr Line side (size_t index) const
 
constexpr Triangle triangle (size_t index) const
 
constexpr value_type area () const noexcept
 長方形の面積を返します。 More...
 
constexpr value_type perimeter () const noexcept
 長方形の周の長さを返します。 More...
 
template<class Type = double>
constexpr Type horizontalAspectRatio () const noexcept
 
Quad rotated (double angle) const noexcept
 
Quad rotatedAt (double _x, double _y, double angle) const noexcept
 
Quad rotatedAt (Vec2 _pos, double angle) const noexcept
 
constexpr Quad shearedX (double vx) const noexcept
 
constexpr Quad shearedY (double vy) const noexcept
 
constexpr RoundRect rounded (double r) const noexcept
 
Polygon rounded (double tl, double tr, double br, double bl) const noexcept
 
constexpr Quad asQuad () const noexcept
 長方形を Quad として返します。 More...
 
LineString outline (CloseRing closeRing=CloseRing::No) const
 長方形の輪郭を LineString として返します。 More...
 
LineString outline (double distanceFromOrigin, double length) const
 長方形の輪郭の一部を LineString として返します。 More...
 
Polygon asPolygon () const
 長方形を Polygon として返します。 More...
 
constexpr RectF lerp (const Rect &other, double f) const noexcept
 
constexpr RectF lerp (const RectF &other, double f) const noexcept
 
constexpr Rect getOverlap (const Rect &other) const noexcept
 別の長方形と重なる領域を返します。重ならない場合は空の長方形を返します。 More...
 
constexpr RectF getOverlap (const RectF &other) const noexcept
 別の長方形と重なる領域を返します。重ならない場合は空の長方形を返します。 More...
 
size_t hash () const noexcept
 
template<class Shape2DType >
constexpr bool intersects (const Shape2DType &other) const
 
template<class Shape2DType >
Optional< Array< Vec2 > > intersectsAt (const Shape2DType &other) const
 
template<class Shape2DType >
bool contains (const Shape2DType &other) const
 
bool leftClicked () const noexcept
 長方形が現在のフレームで左クリックされ始めたかを返します。 More...
 
bool leftPressed () const noexcept
 長方形が左クリックされているかを返します。 More...
 
bool leftReleased () const noexcept
 現在のフレームで長方形への左クリックが離されたかを返します。 More...
 
bool rightClicked () const noexcept
 長方形が現在のフレームで右クリックされ始めたかを返します。 More...
 
bool rightPressed () const noexcept
 長方形が右クリックされているかを返します。 More...
 
bool rightReleased () const noexcept
 現在のフレームで長方形への右クリックが離されたかを返します。 More...
 
bool mouseOver () const noexcept
 長方形上にマウスカーソルがあるかを返します。 More...
 
const Rectpaint (Image &dst, const Color &color) const
 
const Rectoverwrite (Image &dst, const Color &color) const
 
const RectpaintFrame (Image &dst, int32 innerThickness, int32 outerThickness, const Color &color) const
 
const RectoverwriteFrame (Image &dst, int32 innerThickness, int32 outerThickness, const Color &color) const
 
const Rectdraw (const ColorF &color=Palette::White) const
 長方形を描画します。 More...
 
const Rectdraw (const ColorF(&colors)[4]) const
 長方形を描画します。 More...
 
const Rectdraw (Arg::top_< ColorF > topColor, Arg::bottom_< ColorF > bottomColor) const
 長方形を描画します。 More...
 
const Rectdraw (Arg::left_< ColorF > leftColor, Arg::right_< ColorF > rightColor) const
 長方形を描画します。 More...
 
const RectdrawFrame (double thickness=1.0, const ColorF &color=Palette::White) const
 長方形の枠を描画します。 More...
 
const RectdrawFrame (double thickness, const ColorF &innerColor, const ColorF &outerColor) const
 長方形の枠を描画します。 More...
 
const RectdrawFrame (double innerThickness, double outerThickness, const ColorF &color=Palette::White) const
 長方形の枠を描画します。 More...
 
const RectdrawFrame (double innerThickness, double outerThickness, const ColorF &innerColor, const ColorF &outerColor) const
 長方形の枠を描画します。 More...
 
const RectdrawShadow (const Vec2 &offset, double blurRadius, double spread=0.0, const ColorF &color=ColorF{ 0.0, 0.5 }) const
 長方形の影を描画します。 More...
 
TexturedQuad operator() (const Texture &texture) const
 
TexturedQuad operator() (const TextureRegion &textureRegion) const
 

Static Public Member Functions

static constexpr Rect Empty () noexcept
 空の長方形を返します。 More...
 
static constexpr Rect FromPoints (position_type a, position_type b) noexcept
 対角線上の 2 点の座標をもとに長方形を作成します。 More...
 

Public Attributes

union {
   position_type   pos
 長方形の左上の点の位置 More...
 
   struct {
      value_type   x
 長方形の左上の点の X 座標 More...
 
      value_type   y
 長方形の左上の点の Y 座標 More...
 
   } 
 
}; 
 
union {
   size_type   size
 長方形のサイズ More...
 
   struct {
      value_type   w
 長方形の幅 More...
 
      value_type   h
 長方形の高さ More...
 
   } 
 
}; 
 

Friends

constexpr friend bool operator== (const Rect &lhs, const Rect &rhs) noexcept
 
constexpr friend bool operator!= (const Rect &lhs, const Rect &rhs) noexcept
 
template<class CharType >
std::basic_ostream< CharType > & operator<< (std::basic_ostream< CharType > &output, const Rect &value)
 
template<class CharType >
std::basic_istream< CharType > & operator>> (std::basic_istream< CharType > &input, Rect &value)
 
void Formatter (FormatData &formatData, const Rect &value)
 

Detailed Description

長方形 (成分が int32 型)

Remarks

pos, tl() top() tr() +--------------—+ | | left() | | right() | | +--------------—+ bl() bottom() br()

Member Typedef Documentation

◆ position_type

◆ size_type

◆ value_type

Constructor & Destructor Documentation

◆ Rect() [1/44]

SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( )
default

◆ Rect() [2/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( value_type  _size)
explicitconstexprnoexcept

長方形を作成します。

Parameters
_size長方形の幅と高さ

◆ Rect() [3/44]

SIV3D_CONCEPT_INTEGRAL constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( Int  _r)
explicitconstexprnoexcept

◆ Rect() [4/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( value_type  _w,
value_type  _h 
)
constexprnoexcept

長方形を作成します。

Parameters
_w長方形の幅
_h長方形の高さ

◆ Rect() [5/44]

template<class W , class H , std::enable_if_t< std::conjunction_v< std::is_integral< W >, std::is_integral< H >>> * = nullptr>
constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( _w,
_h 
)
explicitconstexprnoexcept

◆ Rect() [6/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( size_type  _size)
explicitconstexprnoexcept

長方形を作成します。

Parameters
_size長方形の大きさ

◆ Rect() [7/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( value_type  _x,
value_type  _y,
value_type  _size 
)
constexprnoexcept

長方形を作成します。

Parameters
_x長方形の左上の点の X 座標
_y長方形の左上の点の Y 座標
_size長方形の縦横の大きさ

◆ Rect() [8/44]

template<class X , class Y , class S , std::enable_if_t< std::conjunction_v< std::is_integral< X >, std::is_integral< Y >, std::is_integral< S >>> * = nullptr>
constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( _x,
_y,
_size 
)
constexprnoexcept

◆ Rect() [9/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( value_type  _x,
value_type  _y,
value_type  _w,
value_type  _h 
)
constexprnoexcept

長方形を作成します。

Parameters
_x長方形の左上の点の X 座標
_y長方形の左上の点の Y 座標
_w長方形の幅
_h長方形の高さ

◆ Rect() [10/44]

template<class X , class Y , class W , class H , std::enable_if_t< std::conjunction_v< std::is_integral< X >, std::is_integral< Y >, std::is_integral< W >, std::is_integral< H >>> * = nullptr>
constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( _x,
_y,
_w,
_h 
)
constexprnoexcept

◆ Rect() [11/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( value_type  _x,
value_type  _y,
size_type  _size 
)
constexprnoexcept

長方形を作成します。

Parameters
_x長方形の左上の点の X 座標
_y長方形の左上の点の Y 座標
_size長方形の大きさ

◆ Rect() [12/44]

template<class X , class Y , std::enable_if_t< std::conjunction_v< std::is_integral< X >, std::is_integral< Y >>> * = nullptr>
constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( _x,
_y,
size_type  _size 
)
constexprnoexcept

◆ Rect() [13/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( position_type  _pos,
value_type  _size 
)
constexprnoexcept

長方形を作成します。

Parameters
_pos長方形の左上の点の座標
_size長方形の大きさ

◆ Rect() [14/44]

SIV3D_CONCEPT_INTEGRAL constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( position_type  _pos,
Int  _size 
)
constexprnoexcept

◆ Rect() [15/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( position_type  _pos,
value_type  _w,
value_type  _h 
)
constexprnoexcept

長方形を作成します。

Parameters
_pos長方形の左上の点の座標
_w長方形の幅
_h長方形の高さ

◆ Rect() [16/44]

template<class W , class H , std::enable_if_t< std::conjunction_v< std::is_integral< W >, std::is_integral< H >>> * = nullptr>
constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( position_type  _pos,
_w,
_h 
)
constexprnoexcept

◆ Rect() [17/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( position_type  _pos,
size_type  _size 
)
constexprnoexcept

長方形を作成します。

Parameters
_pos長方形の左上の点の座標
_size長方形の大きさ

◆ Rect() [18/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( Arg::center_< position_type _center,
value_type  _size 
)
constexprnoexcept
Parameters
_center
_size

◆ Rect() [19/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( Arg::center_< position_type _center,
value_type  _w,
value_type  _h 
)
constexprnoexcept
Parameters
_center
_w
_h

◆ Rect() [20/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( Arg::center_< position_type _center,
size_type  _size 
)
constexprnoexcept
Parameters
_center
_size

◆ Rect() [21/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( Arg::topLeft_< position_type topLeft,
value_type  _size 
)
constexprnoexcept
Parameters
topLeft
_size

◆ Rect() [22/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( Arg::topLeft_< position_type topLeft,
value_type  _w,
value_type  _h 
)
constexprnoexcept
Parameters
topLeft
_w
_h

◆ Rect() [23/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( Arg::topLeft_< position_type topLeft,
size_type  _size 
)
constexprnoexcept
Parameters
topLeft
_size

◆ Rect() [24/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( Arg::topCenter_< position_type topCenter,
value_type  _size 
)
constexprnoexcept
Parameters
topCenter
_size

◆ Rect() [25/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( Arg::topCenter_< position_type topCenter,
value_type  _w,
value_type  _h 
)
constexprnoexcept
Parameters
topCenter
_w
_h

◆ Rect() [26/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( Arg::topCenter_< position_type topCenter,
size_type  _size 
)
constexprnoexcept
Parameters
topCenter
_size

◆ Rect() [27/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( Arg::topRight_< position_type topRight,
value_type  _size 
)
constexprnoexcept
Parameters
topRight
_size

◆ Rect() [28/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( Arg::topRight_< position_type topRight,
value_type  _w,
value_type  _h 
)
constexprnoexcept
Parameters
topRight
_w
_h

◆ Rect() [29/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( Arg::topRight_< position_type topRight,
size_type  _size 
)
constexprnoexcept
Parameters
topRight
_size

◆ Rect() [30/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( Arg::rightCenter_< position_type rightCenter,
value_type  _size 
)
constexprnoexcept
Parameters
rightCenter
_size

◆ Rect() [31/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( Arg::rightCenter_< position_type rightCenter,
value_type  _w,
value_type  _h 
)
constexprnoexcept
Parameters
rightCenter
_w
_h

◆ Rect() [32/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( Arg::rightCenter_< position_type rightCenter,
size_type  _size 
)
constexprnoexcept
Parameters
rightCenter
_size

◆ Rect() [33/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( Arg::bottomRight_< position_type bottomRight,
value_type  _size 
)
constexprnoexcept
Parameters
bottomRight
_size

◆ Rect() [34/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( Arg::bottomRight_< position_type bottomRight,
value_type  _w,
value_type  _h 
)
constexprnoexcept
Parameters
bottomRight
_w
_h

◆ Rect() [35/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( Arg::bottomRight_< position_type bottomRight,
size_type  _size 
)
constexprnoexcept
Parameters
bottomRight
_size

◆ Rect() [36/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( Arg::bottomCenter_< position_type bottomCenter,
value_type  _size 
)
constexprnoexcept
Parameters
bottomCenter
_size

◆ Rect() [37/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( Arg::bottomCenter_< position_type bottomCenter,
value_type  _w,
value_type  _h 
)
constexprnoexcept
Parameters
bottomCenter
_w
_h

◆ Rect() [38/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( Arg::bottomCenter_< position_type bottomCenter,
size_type  _size 
)
constexprnoexcept
Parameters
bottomCenter
_size

◆ Rect() [39/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( Arg::bottomLeft_< position_type bottomLeft,
value_type  _size 
)
constexprnoexcept
Parameters
bottomLeft
_size

◆ Rect() [40/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( Arg::bottomLeft_< position_type bottomLeft,
value_type  _w,
value_type  _h 
)
constexprnoexcept
Parameters
bottomLeft
_w
_h

◆ Rect() [41/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( Arg::bottomLeft_< position_type bottomLeft,
size_type  _size 
)
constexprnoexcept
Parameters
bottomLeft
_size

◆ Rect() [42/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( Arg::leftCenter_< position_type leftCenter,
value_type  _size 
)
constexprnoexcept
Parameters
leftCenter
_size

◆ Rect() [43/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( Arg::leftCenter_< position_type leftCenter,
value_type  _w,
value_type  _h 
)
constexprnoexcept
Parameters
leftCenter
_w
_h

◆ Rect() [44/44]

constexpr SIV3D_NODISCARD_CXX20 s3d::Rect::Rect ( Arg::leftCenter_< position_type leftCenter,
size_type  _size 
)
constexprnoexcept
Parameters
leftCenter
_size

Member Function Documentation

◆ area()

constexpr value_type s3d::Rect::area ( ) const
constexprnoexcept

長方形の面積を返します。

Returns
長方形の面積

◆ asPolygon()

Polygon s3d::Rect::asPolygon ( ) const

長方形を Polygon として返します。

Returns
長方形の Polygon

◆ asQuad()

constexpr Quad s3d::Rect::asQuad ( ) const
constexprnoexcept

長方形を Quad として返します。

Returns
長方形の Quad

◆ bl()

constexpr size_type s3d::Rect::bl ( ) const
constexprnoexcept

長方形の左下の座標を返します。

Returns
長方形の左下の座標

◆ bottom()

constexpr Line s3d::Rect::bottom ( ) const
constexprnoexcept

長方形の下辺を Line として返します。

Returns
長方形の下辺

◆ bottomCenter()

constexpr Vec2 s3d::Rect::bottomCenter ( ) const
constexprnoexcept

長方形の下辺の中心座標を返します。

Returns
長方形の下辺の中心座標

◆ bottomY()

constexpr value_type s3d::Rect::bottomY ( ) const
constexprnoexcept

長方形の下辺の Y 座標を返します。

Returns
長方形の下辺の Y 座標

◆ br()

constexpr size_type s3d::Rect::br ( ) const
constexprnoexcept

長方形の右下の座標を返します。

Returns
長方形の右下の座標

◆ center()

constexpr Vec2 s3d::Rect::center ( ) const
constexprnoexcept

長方形の中心座標を返します。

Returns
長方形の中心座標

◆ centerX()

constexpr double s3d::Rect::centerX ( ) const
constexprnoexcept

長方形の中心の X 座標を返します。

Returns
長方形の中心の X 座標

◆ centerY()

constexpr double s3d::Rect::centerY ( ) const
constexprnoexcept

長方形の中心の Y 座標を返します。

Returns
長方形の中心の Y 座標

◆ contains()

template<class Shape2DType >
bool s3d::Rect::contains ( const Shape2DType &  other) const

◆ draw() [1/4]

const Rect& s3d::Rect::draw ( Arg::left_< ColorF leftColor,
Arg::right_< ColorF rightColor 
) const

長方形を描画します。

Parameters
leftColor長方形の左側の色
rightColor長方形の右側の色
Remarks
rect.draw(Arg::left = ColorF{ 0.0 }, Arg::right = ColorF{ 1.0 }) のように呼びます。
Returns
*this

◆ draw() [2/4]

const Rect& s3d::Rect::draw ( Arg::top_< ColorF topColor,
Arg::bottom_< ColorF bottomColor 
) const

長方形を描画します。

Parameters
topColor長方形の上側の色
bottomColor長方形の下側の色
Remarks
rect.draw(Arg::top = ColorF{ 0.0 }, Arg::bottom = ColorF{ 1.0 }) のように呼びます。
Returns
*this

◆ draw() [3/4]

const Rect& s3d::Rect::draw ( const ColorF color = Palette::White) const

長方形を描画します。

Parameters
color
Returns
*this

◆ draw() [4/4]

const Rect& s3d::Rect::draw ( const ColorF(&)  colors[4]) const

長方形を描画します。

Parameters
colors左上、右上、右下、左下の各頂点の色
Remarks
描画時には 2 つの三角形に分割されるため、斜め方向のグラデーションは方向によってグラデーションのかかり方が変わります。上下、左右方向のグラデーションには影響しません。
Returns
*this

◆ drawFrame() [1/4]

const Rect& s3d::Rect::drawFrame ( double  innerThickness,
double  outerThickness,
const ColorF color = Palette::White 
) const

長方形の枠を描画します。

Parameters
innerThickness内側寄りの枠の太さ
outerThickness外側寄りの枠の太さ
color
Returns
*this

◆ drawFrame() [2/4]

const Rect& s3d::Rect::drawFrame ( double  innerThickness,
double  outerThickness,
const ColorF innerColor,
const ColorF outerColor 
) const

長方形の枠を描画します。

Parameters
innerThickness内側寄りの枠の太さ
outerThickness外側寄りの枠の太さ
innerColor内側寄りの枠の色
outerColor外側寄りの枠の色
Returns
*this

◆ drawFrame() [3/4]

const Rect& s3d::Rect::drawFrame ( double  thickness,
const ColorF innerColor,
const ColorF outerColor 
) const

長方形の枠を描画します。

Parameters
thickness枠の太さ
innerColor内側寄りの枠の色
outerColor外側寄りの枠の色
Returns
*this

◆ drawFrame() [4/4]

const Rect& s3d::Rect::drawFrame ( double  thickness = 1.0,
const ColorF color = Palette::White 
) const

長方形の枠を描画します。

Parameters
thickness枠の太さ
color
Returns
*this

◆ drawShadow()

const Rect& s3d::Rect::drawShadow ( const Vec2 offset,
double  blurRadius,
double  spread = 0.0,
const ColorF color = ColorF{ 0.0, 0.5 } 
) const

長方形の影を描画します。

Parameters
offset影の位置のオフセット(ピクセル)
blurRadius影のぼかし半径(ピクセル)
spread影の膨張(ピクセル)
color影の色
Returns
*this

◆ Empty()

static constexpr Rect s3d::Rect::Empty ( )
staticconstexprnoexcept

空の長方形を返します。

Returns
空の長方形 (Rect{ 0, 0, 0, 0 })

◆ FromPoints()

static constexpr Rect s3d::Rect::FromPoints ( position_type  a,
position_type  b 
)
staticconstexprnoexcept

対角線上の 2 点の座標をもとに長方形を作成します。

Parameters
a対角線をなす座標の 1 つ
b対角線をなす座標の 1 つ
Returns
作成した長方形

◆ getOverlap() [1/2]

constexpr Rect s3d::Rect::getOverlap ( const Rect other) const
constexprnoexcept

別の長方形と重なる領域を返します。重ならない場合は空の長方形を返します。

Parameters
other別の長方形
Returns
別の長方形と重なる領域。重ならない場合は空の長方形

◆ getOverlap() [2/2]

constexpr RectF s3d::Rect::getOverlap ( const RectF other) const
constexprnoexcept

別の長方形と重なる領域を返します。重ならない場合は空の長方形を返します。

Parameters
other別の長方形
Returns
別の長方形と重なる領域。重ならない場合は空の長方形

◆ getRelativePoint()

constexpr Vec2 s3d::Rect::getRelativePoint ( double  relativeX,
double  relativeY 
) const
constexprnoexcept

長方形の左上を (0 ,0), 右下を (1, 1) としたときの (relativeX, relativeY) の座標を返します。

Parameters
relativeXX 座標の相対的な位置
relativeYY 座標の相対的な位置
Returns
長方形の左上を (0 ,0), 右下を (1, 1) としたときの (relativeX, relativeY) の座標

◆ hasArea()

constexpr bool s3d::Rect::hasArea ( ) const
constexprnoexcept

長方形が大きさを持っているかを返します。

Returns
長方形が大きさを持っている場合 true, それ以外の場合は false

◆ hash()

size_t s3d::Rect::hash ( ) const
noexcept

◆ horizontalAspectRatio()

template<class Type = double>
constexpr Type s3d::Rect::horizontalAspectRatio ( ) const
constexprnoexcept

◆ intersects()

template<class Shape2DType >
constexpr bool s3d::Rect::intersects ( const Shape2DType &  other) const
constexpr

◆ intersectsAt()

template<class Shape2DType >
Optional<Array<Vec2> > s3d::Rect::intersectsAt ( const Shape2DType &  other) const

◆ isEmpty()

constexpr bool s3d::Rect::isEmpty ( ) const
constexprnoexcept

長方形が空であるかを返します。

Returns
空の長方形である場合 true, それ以外の場合は false

◆ left()

constexpr Line s3d::Rect::left ( ) const
constexprnoexcept

長方形の左辺を Line として返します。

Returns
長方形の左辺

◆ leftCenter()

constexpr Vec2 s3d::Rect::leftCenter ( ) const
constexprnoexcept

長方形の左辺の中心座標を返します。

Returns
長方形の左辺の中心座標

◆ leftClicked()

bool s3d::Rect::leftClicked ( ) const
noexcept

長方形が現在のフレームで左クリックされ始めたかを返します。

Returns
長方形が現在のフレームで左クリックされ始めた場合 true, それ以外の場合は false

◆ leftPressed()

bool s3d::Rect::leftPressed ( ) const
noexcept

長方形が左クリックされているかを返します。

Returns
長方形が左クリックされている場合 true, それ以外の場合は false

◆ leftReleased()

bool s3d::Rect::leftReleased ( ) const
noexcept

現在のフレームで長方形への左クリックが離されたかを返します。

Returns
現在のフレームで長方形への左クリックが離された場合 true, それ以外の場合は false

◆ leftX()

constexpr value_type s3d::Rect::leftX ( ) const
constexprnoexcept

長方形の左辺の X 座標を返します。

Returns
長方形の左辺の X 座標

◆ lerp() [1/2]

constexpr RectF s3d::Rect::lerp ( const Rect other,
double  f 
) const
constexprnoexcept

◆ lerp() [2/2]

constexpr RectF s3d::Rect::lerp ( const RectF other,
double  f 
) const
constexprnoexcept

◆ mouseOver()

bool s3d::Rect::mouseOver ( ) const
noexcept

長方形上にマウスカーソルがあるかを返します。

Returns
長方形上にマウスカーソルがある場合 true, それ以外の場合は false

◆ moveBy() [1/2]

constexpr Rect& s3d::Rect::moveBy ( size_type  v)
constexprnoexcept

長方形を移動させます。

Parameters
v移動量
Returns
*this

◆ moveBy() [2/2]

constexpr Rect& s3d::Rect::moveBy ( value_type  _x,
value_type  _y 
)
constexprnoexcept

長方形を移動させます。

Parameters
_xX 軸方向の移動量
_yY 軸方向の移動量
Returns
*this

◆ movedBy() [1/2]

constexpr Rect s3d::Rect::movedBy ( size_type  v) const
constexprnoexcept

座標を移動した新しい長方形を返します。

Parameters
v移動量
Returns
新しい長方形

◆ movedBy() [2/2]

constexpr Rect s3d::Rect::movedBy ( value_type  _x,
value_type  _y 
) const
constexprnoexcept

座標を移動した新しい長方形を返します。

Parameters
_xX 軸方向の移動量
_yY 軸方向の移動量
Returns
新しい長方形

◆ operator bool()

constexpr s3d::Rect::operator bool ( ) const
explicitconstexprnoexcept

長方形が空でないかを返します。

Remarks
hasArea() と同じです。
Returns
長方形が空でない場合 true, それ以外の場合は false

◆ operator()() [1/2]

TexturedQuad s3d::Rect::operator() ( const Texture texture) const

◆ operator()() [2/2]

TexturedQuad s3d::Rect::operator() ( const TextureRegion textureRegion) const

◆ outline() [1/2]

LineString s3d::Rect::outline ( CloseRing  closeRing = CloseRing::No) const

長方形の輪郭を LineString として返します。

Parameters
closeRing頂点配列の終点を始点と重ねるかどうか
Returns
長方形の輪郭の LineString

◆ outline() [2/2]

LineString s3d::Rect::outline ( double  distanceFromOrigin,
double  length 
) const

長方形の輪郭の一部を LineString として返します。

Parameters
distanceFromOrigin開始地点の距離(長方形の左上の頂点から時計回りでの距離)
length長さ
Returns
長方形の輪郭の一部の LineString

◆ overwrite()

const Rect& s3d::Rect::overwrite ( Image dst,
const Color color 
) const

◆ overwriteFrame()

const Rect& s3d::Rect::overwriteFrame ( Image dst,
int32  innerThickness,
int32  outerThickness,
const Color color 
) const

◆ paint()

const Rect& s3d::Rect::paint ( Image dst,
const Color color 
) const

◆ paintFrame()

const Rect& s3d::Rect::paintFrame ( Image dst,
int32  innerThickness,
int32  outerThickness,
const Color color 
) const

◆ perimeter()

constexpr value_type s3d::Rect::perimeter ( ) const
constexprnoexcept

長方形の周の長さを返します。

Returns
長方形の周の長さ

◆ point()

constexpr position_type s3d::Rect::point ( size_t  index) const
constexpr

◆ right()

constexpr Line s3d::Rect::right ( ) const
constexprnoexcept

長方形の右辺を Line として返します。

Returns
長方形の右辺

◆ rightCenter()

constexpr Vec2 s3d::Rect::rightCenter ( ) const
constexprnoexcept

長方形の右辺の中心座標を返します。

Returns
長方形の右辺の中心座標

◆ rightClicked()

bool s3d::Rect::rightClicked ( ) const
noexcept

長方形が現在のフレームで右クリックされ始めたかを返します。

Returns
長方形が現在のフレームで右クリックされ始めた場合 true, それ以外の場合は false

◆ rightPressed()

bool s3d::Rect::rightPressed ( ) const
noexcept

長方形が右クリックされているかを返します。

Returns
長方形が右クリックされている場合 true, それ以外の場合は false

◆ rightReleased()

bool s3d::Rect::rightReleased ( ) const
noexcept

現在のフレームで長方形への右クリックが離されたかを返します。

Returns
現在のフレームで長方形への右クリックが離された場合 true, それ以外の場合は false

◆ rightX()

constexpr value_type s3d::Rect::rightX ( ) const
constexprnoexcept

長方形の右辺の X 座標を返します。

Returns
長方形の右辺の X 座標

◆ rotated()

Quad s3d::Rect::rotated ( double  angle) const
noexcept

◆ rotatedAt() [1/2]

Quad s3d::Rect::rotatedAt ( double  _x,
double  _y,
double  angle 
) const
noexcept

◆ rotatedAt() [2/2]

Quad s3d::Rect::rotatedAt ( Vec2  _pos,
double  angle 
) const
noexcept

◆ rounded() [1/2]

constexpr RoundRect s3d::Rect::rounded ( double  r) const
constexprnoexcept

◆ rounded() [2/2]

Polygon s3d::Rect::rounded ( double  tl,
double  tr,
double  br,
double  bl 
) const
noexcept

◆ scaled() [1/3]

constexpr RectF s3d::Rect::scaled ( double  s) const
constexprnoexcept

◆ scaled() [2/3]

constexpr RectF s3d::Rect::scaled ( double  sx,
double  sy 
) const
constexprnoexcept

◆ scaled() [3/3]

constexpr RectF s3d::Rect::scaled ( Vec2  s) const
constexprnoexcept

◆ scaledAt() [1/3]

constexpr RectF s3d::Rect::scaledAt ( Vec2  _pos,
double  s 
) const
constexprnoexcept

◆ scaledAt() [2/3]

constexpr RectF s3d::Rect::scaledAt ( Vec2  _pos,
double  sx,
double  sy 
) const
constexprnoexcept

◆ scaledAt() [3/3]

constexpr RectF s3d::Rect::scaledAt ( Vec2  _pos,
Vec2  s 
) const
constexprnoexcept

◆ set() [1/34]

constexpr Rect& s3d::Rect::set ( Arg::bottomCenter_< position_type bottomCenter,
size_type  _size 
)
constexprnoexcept

◆ set() [2/34]

constexpr Rect& s3d::Rect::set ( Arg::bottomCenter_< position_type bottomCenter,
value_type  _size 
)
constexprnoexcept

◆ set() [3/34]

constexpr Rect& s3d::Rect::set ( Arg::bottomCenter_< position_type bottomCenter,
value_type  _w,
value_type  _h 
)
constexprnoexcept

◆ set() [4/34]

constexpr Rect& s3d::Rect::set ( Arg::bottomLeft_< position_type bottomLeft,
size_type  _size 
)
constexprnoexcept

◆ set() [5/34]

constexpr Rect& s3d::Rect::set ( Arg::bottomLeft_< position_type bottomLeft,
value_type  _size 
)
constexprnoexcept

◆ set() [6/34]

constexpr Rect& s3d::Rect::set ( Arg::bottomLeft_< position_type bottomLeft,
value_type  _w,
value_type  _h 
)
constexprnoexcept

◆ set() [7/34]

constexpr Rect& s3d::Rect::set ( Arg::bottomRight_< position_type bottomRight,
size_type  _size 
)
constexprnoexcept

◆ set() [8/34]

constexpr Rect& s3d::Rect::set ( Arg::bottomRight_< position_type bottomRight,
value_type  _size 
)
constexprnoexcept

◆ set() [9/34]

constexpr Rect& s3d::Rect::set ( Arg::bottomRight_< position_type bottomRight,
value_type  _w,
value_type  _h 
)
constexprnoexcept

◆ set() [10/34]

constexpr Rect& s3d::Rect::set ( Arg::center_< position_type _center,
size_type  _size 
)
constexprnoexcept

◆ set() [11/34]

constexpr Rect& s3d::Rect::set ( Arg::center_< position_type _center,
value_type  _size 
)
constexprnoexcept

◆ set() [12/34]

constexpr Rect& s3d::Rect::set ( Arg::center_< position_type _center,
value_type  _w,
value_type  _h 
)
constexprnoexcept

◆ set() [13/34]

constexpr Rect& s3d::Rect::set ( Arg::leftCenter_< position_type leftCenter,
size_type  _size 
)
constexprnoexcept

◆ set() [14/34]

constexpr Rect& s3d::Rect::set ( Arg::leftCenter_< position_type leftCenter,
value_type  _size 
)
constexprnoexcept

◆ set() [15/34]

constexpr Rect& s3d::Rect::set ( Arg::leftCenter_< position_type leftCenter,
value_type  _w,
value_type  _h 
)
constexprnoexcept

◆ set() [16/34]

constexpr Rect& s3d::Rect::set ( Arg::rightCenter_< position_type rightCenter,
size_type  _size 
)
constexprnoexcept

◆ set() [17/34]

constexpr Rect& s3d::Rect::set ( Arg::rightCenter_< position_type rightCenter,
value_type  _size 
)
constexprnoexcept

◆ set() [18/34]

constexpr Rect& s3d::Rect::set ( Arg::rightCenter_< position_type rightCenter,
value_type  _w,
value_type  _h 
)
constexprnoexcept

◆ set() [19/34]

constexpr Rect& s3d::Rect::set ( Arg::topCenter_< position_type topCenter,
size_type  _size 
)
constexprnoexcept

◆ set() [20/34]

constexpr Rect& s3d::Rect::set ( Arg::topCenter_< position_type topCenter,
value_type  _size 
)
constexprnoexcept

◆ set() [21/34]

constexpr Rect& s3d::Rect::set ( Arg::topCenter_< position_type topCenter,
value_type  _w,
value_type  _h 
)
constexprnoexcept

◆ set() [22/34]

constexpr Rect& s3d::Rect::set ( Arg::topLeft_< position_type topLeft,
size_type  _size 
)
constexprnoexcept

◆ set() [23/34]

constexpr Rect& s3d::Rect::set ( Arg::topLeft_< position_type topLeft,
value_type  _size 
)
constexprnoexcept

◆ set() [24/34]

constexpr Rect& s3d::Rect::set ( Arg::topLeft_< position_type topLeft,
value_type  _w,
value_type  _h 
)
constexprnoexcept

◆ set() [25/34]

constexpr Rect& s3d::Rect::set ( Arg::topRight_< position_type topRight,
size_type  _size 
)
constexprnoexcept

◆ set() [26/34]

constexpr Rect& s3d::Rect::set ( Arg::topRight_< position_type topRight,
value_type  _size 
)
constexprnoexcept

◆ set() [27/34]

constexpr Rect& s3d::Rect::set ( Arg::topRight_< position_type topRight,
value_type  _w,
value_type  _h 
)
constexprnoexcept

◆ set() [28/34]

constexpr Rect& s3d::Rect::set ( const Rect r)
constexprnoexcept

◆ set() [29/34]

constexpr Rect& s3d::Rect::set ( position_type  _pos,
size_type  _size 
)
constexprnoexcept

◆ set() [30/34]

constexpr Rect& s3d::Rect::set ( position_type  _pos,
value_type  _size 
)
constexprnoexcept

◆ set() [31/34]

constexpr Rect& s3d::Rect::set ( position_type  _pos,
value_type  _w,
value_type  _h 
)
constexprnoexcept

◆ set() [32/34]

constexpr Rect& s3d::Rect::set ( value_type  _x,
value_type  _y,
size_type  _size 
)
constexprnoexcept

◆ set() [33/34]

constexpr Rect& s3d::Rect::set ( value_type  _x,
value_type  _y,
value_type  _size 
)
constexprnoexcept

◆ set() [34/34]

constexpr Rect& s3d::Rect::set ( value_type  _x,
value_type  _y,
value_type  _w,
value_type  _h 
)
constexprnoexcept

◆ setCenter() [1/2]

constexpr Rect& s3d::Rect::setCenter ( position_type  _pos)
constexprnoexcept

◆ setCenter() [2/2]

constexpr Rect& s3d::Rect::setCenter ( value_type  _x,
value_type  _y 
)
constexprnoexcept

◆ setPos() [1/11]

constexpr Rect& s3d::Rect::setPos ( Arg::bottomCenter_< position_type bottomCenter)
constexprnoexcept

◆ setPos() [2/11]

constexpr Rect& s3d::Rect::setPos ( Arg::bottomLeft_< position_type bottomLeft)
constexprnoexcept

◆ setPos() [3/11]

constexpr Rect& s3d::Rect::setPos ( Arg::bottomRight_< position_type bottomRight)
constexprnoexcept

◆ setPos() [4/11]

constexpr Rect& s3d::Rect::setPos ( Arg::center_< position_type _center)
constexprnoexcept

◆ setPos() [5/11]

constexpr Rect& s3d::Rect::setPos ( Arg::leftCenter_< position_type leftCenter)
constexprnoexcept

◆ setPos() [6/11]

constexpr Rect& s3d::Rect::setPos ( Arg::rightCenter_< position_type rightCenter)
constexprnoexcept

◆ setPos() [7/11]

constexpr Rect& s3d::Rect::setPos ( Arg::topCenter_< position_type topCenter)
constexprnoexcept

◆ setPos() [8/11]

constexpr Rect& s3d::Rect::setPos ( Arg::topLeft_< position_type topLeft)
constexprnoexcept

◆ setPos() [9/11]

constexpr Rect& s3d::Rect::setPos ( Arg::topRight_< position_type topRight)
constexprnoexcept

◆ setPos() [10/11]

constexpr Rect& s3d::Rect::setPos ( position_type  _pos)
constexprnoexcept

◆ setPos() [11/11]

constexpr Rect& s3d::Rect::setPos ( value_type  _x,
value_type  _y 
)
constexprnoexcept

◆ setSize() [1/3]

constexpr Rect& s3d::Rect::setSize ( size_type  _size)
constexprnoexcept

◆ setSize() [2/3]

constexpr Rect& s3d::Rect::setSize ( value_type  _size)
constexprnoexcept

◆ setSize() [3/3]

constexpr Rect& s3d::Rect::setSize ( value_type  _w,
value_type  _h 
)
constexprnoexcept

◆ shearedX()

constexpr Quad s3d::Rect::shearedX ( double  vx) const
constexprnoexcept

◆ shearedY()

constexpr Quad s3d::Rect::shearedY ( double  vy) const
constexprnoexcept

◆ side()

constexpr Line s3d::Rect::side ( size_t  index) const
constexpr

◆ stretched() [1/4]

constexpr Rect s3d::Rect::stretched ( size_type  xy) const
constexprnoexcept

◆ stretched() [2/4]

constexpr Rect s3d::Rect::stretched ( value_type  _x,
value_type  _y 
) const
constexprnoexcept

◆ stretched() [3/4]

constexpr Rect s3d::Rect::stretched ( value_type  top,
value_type  right,
value_type  bottom,
value_type  left 
) const
constexprnoexcept

◆ stretched() [4/4]

constexpr Rect s3d::Rect::stretched ( value_type  xy) const
constexprnoexcept

◆ tl()

constexpr size_type s3d::Rect::tl ( ) const
constexprnoexcept

長方形の左上の座標を返します。

Returns
長方形の左上の座標

◆ top()

constexpr Line s3d::Rect::top ( ) const
constexprnoexcept

長方形の上辺を Line として返します。

Returns
長方形の上辺

◆ topCenter()

constexpr Vec2 s3d::Rect::topCenter ( ) const
constexprnoexcept

長方形の上辺の中心座標を返します。

Returns
長方形の上辺の中心座標

◆ topY()

constexpr value_type s3d::Rect::topY ( ) const
constexprnoexcept

長方形の上辺の Y 座標を返します。

Returns
長方形の上辺の Y 座標

◆ tr()

constexpr size_type s3d::Rect::tr ( ) const
constexprnoexcept

長方形の右上の座標を返します。

Returns
長方形の右上の座標

◆ triangle()

constexpr Triangle s3d::Rect::triangle ( size_t  index) const
constexpr

Friends And Related Function Documentation

◆ Formatter

void Formatter ( FormatData formatData,
const Rect value 
)
friend

◆ operator!=

constexpr friend bool operator!= ( const Rect lhs,
const Rect rhs 
)
friend

◆ operator<<

template<class CharType >
std::basic_ostream<CharType>& operator<< ( std::basic_ostream< CharType > &  output,
const Rect value 
)
friend

◆ operator==

constexpr friend bool operator== ( const Rect lhs,
const Rect rhs 
)
friend

◆ operator>>

template<class CharType >
std::basic_istream<CharType>& operator>> ( std::basic_istream< CharType > &  input,
Rect value 
)
friend

Member Data Documentation

◆ @62

union { ... }

◆ @64

union { ... }

◆ h

value_type s3d::Rect::h

長方形の高さ

Remarks
この値が負の時の挙動は未規定です。

◆ pos

position_type s3d::Rect::pos

長方形の左上の点の位置

◆ size

size_type s3d::Rect::size

長方形のサイズ

◆ w

value_type s3d::Rect::w

長方形の幅

Remarks
この値が負の時の挙動は未規定です。

◆ x

value_type s3d::Rect::x

長方形の左上の点の X 座標

◆ y

value_type s3d::Rect::y

長方形の左上の点の Y 座標


The documentation for this struct was generated from the following file: