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

#include <Plane.hpp>

Public Types

using position_type = Vec3
 
using size_type = Vec2
 
using value_type = size_type::value_type
 

Public Member Functions

SIV3D_NODISCARD_CXX20 Plane ()=default
 
constexpr SIV3D_NODISCARD_CXX20 Plane (double _size) noexcept
 
SIV3D_CONCEPT_ARITHMETIC constexpr SIV3D_NODISCARD_CXX20 Plane (Arithmetic _size) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Plane (double _w, double _h) noexcept
 
template<class W , class H , std::enable_if_t< std::conjunction_v< std::is_arithmetic< W >, std::is_arithmetic< H >>> * = nullptr>
constexpr SIV3D_NODISCARD_CXX20 Plane (W _w, H _h) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Plane (const Vec2 &_size) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Plane (double cx, double cy, double cz, double _size) noexcept
 
template<class X , class Y , class Z , class S , std::enable_if_t< std::conjunction_v< std::is_arithmetic< X >, std::is_arithmetic< Y >, std::is_arithmetic< Z >, std::is_arithmetic< S >>> * = nullptr>
constexpr SIV3D_NODISCARD_CXX20 Plane (X cx, Y cy, Z cz, S _size) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Plane (double cx, double cy, double cz, double _w, double _h) noexcept
 
template<class X , class Y , class Z , class W , class H , std::enable_if_t< std::conjunction_v< std::is_arithmetic< X >, std::is_arithmetic< Y >, std::is_arithmetic< Z >, std::is_arithmetic< W >, std::is_arithmetic< H >>> * = nullptr>
constexpr Plane (X cx, Y cy, Z cz, W _w, H _h) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Plane (double cx, double cy, double cz, const Vec2 &_size) noexcept
 
template<class X , class Y , class Z , std::enable_if_t< std::conjunction_v< std::is_arithmetic< X >, std::is_arithmetic< Y >, std::is_arithmetic< Z >>> * = nullptr>
constexpr SIV3D_NODISCARD_CXX20 Plane (X cx, Y cy, Z cz, const Vec2 &_size) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Plane (const Vec3 &_center, double _size) noexcept
 
SIV3D_CONCEPT_ARITHMETIC constexpr SIV3D_NODISCARD_CXX20 Plane (const Vec3 &_center, Arithmetic _size) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Plane (const Vec3 &_center, double _w, double _h) noexcept
 
template<class W , class H , std::enable_if_t< std::conjunction_v< std::is_arithmetic< W >, std::is_arithmetic< H >>> * = nullptr>
constexpr SIV3D_NODISCARD_CXX20 Plane (const Vec3 &_center, W _w, H _h) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Plane (const Vec3 &_center, const Vec2 &_size) noexcept
 
constexpr Plane & setPos (value_type cx, value_type cy, value_type cz) noexcept
 
constexpr Plane & setPos (position_type _center) noexcept
 
constexpr Plane & setSize (value_type _w, value_type _d) noexcept
 
constexpr Plane & setSize (size_type _size) noexcept
 
constexpr Plane movedBy (value_type _x, value_type _y, value_type _z) const noexcept
 
constexpr Plane movedBy (position_type v) const noexcept
 
constexpr Plane & moveBy (value_type _x, value_type _y, value_type _z) noexcept
 
constexpr Plane & moveBy (position_type v) noexcept
 
constexpr Plane stretched (value_type xz) const noexcept
 
constexpr Plane stretched (value_type _x, value_type _z) const noexcept
 
constexpr Plane stretched (size_type xz) const noexcept
 
constexpr Plane scaled (double s) const noexcept
 
constexpr Plane scaled (double sx, double sz) const noexcept
 
constexpr Plane scaled (Vec2 s) const noexcept
 
constexpr bool hasArea () const noexcept
 
constexpr Plane lerp (const Plane &other, double f) const noexcept
 
Optional< float > intersects (const Ray &ray) const noexcept
 
const Plane & draw (const ColorF &color=Palette::White) const
 
const Plane & draw (const Texture &texture, const ColorF &color=Palette::White) const
 
const Plane & draw (const TextureRegion &textureRegion, const ColorF &color=Palette::White) const
 
const Plane & draw (const Quaternion &rotation, const ColorF &color=Palette::White) const
 
const Plane & draw (const Quaternion &rotation, const Texture &texture, const ColorF &color=Palette::White) const
 
const Plane & draw (const Quaternion &rotation, const TextureRegion &textureRegion, const ColorF &color=Palette::White) const
 
const Plane & draw (const Mat4x4 &mat, const ColorF &color=Palette::White) const
 
const Plane & draw (const Mat4x4 &mat, const Texture &texture, const ColorF &color=Palette::White) const
 
const Plane & draw (const Mat4x4 &mat, const TextureRegion &textureRegion, const ColorF &color=Palette::White) const
 
const Plane & draw (const PhongMaterial &material) const
 
const Plane & draw (const Texture &texture, const PhongMaterial &material) const
 
const Plane & draw (const TextureRegion &textureRegion, const PhongMaterial &material) const
 
const Plane & draw (const Quaternion &rotation, const PhongMaterial &material) const
 
const Plane & draw (const Quaternion &rotation, const Texture &texture, const PhongMaterial &material) const
 
const Plane & draw (const Quaternion &rotation, const TextureRegion &textureRegion, const PhongMaterial &material) const
 
const Plane & draw (const Mat4x4 &mat, const PhongMaterial &material) const
 
const Plane & draw (const Mat4x4 &mat, const Texture &texture, const PhongMaterial &material) const
 
const Plane & draw (const Mat4x4 &mat, const TextureRegion &textureRegion, const PhongMaterial &material) const
 

Public Attributes

union {
   position_type   center
 
   struct {
      value_type   x
 
      value_type   y
 
      value_type   z
 
   } 
 
}; 
 
union {
   size_type   size
 
   struct {
      value_type   w
 
      value_type   d
 
   } 
 
}; 
 

Friends

template<class CharType >
std::basic_ostream< CharType > & operator<< (std::basic_ostream< CharType > &output, const Plane &value)
 
template<class CharType >
std::basic_istream< CharType > & operator>> (std::basic_istream< CharType > &input, Plane &value)
 
void Formatter (FormatData &formatData, const Plane &value)
 

Member Typedef Documentation

◆ position_type

◆ size_type

◆ value_type

Constructor & Destructor Documentation

◆ Plane() [1/17]

SIV3D_NODISCARD_CXX20 s3d::Plane::Plane ( )
default

◆ Plane() [2/17]

constexpr SIV3D_NODISCARD_CXX20 s3d::Plane::Plane ( double  _size)
explicitconstexprnoexcept

◆ Plane() [3/17]

SIV3D_CONCEPT_ARITHMETIC constexpr SIV3D_NODISCARD_CXX20 s3d::Plane::Plane ( Arithmetic  _size)
explicitconstexprnoexcept

◆ Plane() [4/17]

constexpr SIV3D_NODISCARD_CXX20 s3d::Plane::Plane ( double  _w,
double  _h 
)
constexprnoexcept

◆ Plane() [5/17]

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

◆ Plane() [6/17]

constexpr SIV3D_NODISCARD_CXX20 s3d::Plane::Plane ( const Vec2 &  _size)
explicitconstexprnoexcept

◆ Plane() [7/17]

constexpr SIV3D_NODISCARD_CXX20 s3d::Plane::Plane ( double  cx,
double  cy,
double  cz,
double  _size 
)
constexprnoexcept

◆ Plane() [8/17]

template<class X , class Y , class Z , class S , std::enable_if_t< std::conjunction_v< std::is_arithmetic< X >, std::is_arithmetic< Y >, std::is_arithmetic< Z >, std::is_arithmetic< S >>> * = nullptr>
constexpr SIV3D_NODISCARD_CXX20 s3d::Plane::Plane ( X  cx,
Y  cy,
Z  cz,
S  _size 
)
constexprnoexcept

◆ Plane() [9/17]

constexpr SIV3D_NODISCARD_CXX20 s3d::Plane::Plane ( double  cx,
double  cy,
double  cz,
double  _w,
double  _h 
)
constexprnoexcept

◆ Plane() [10/17]

template<class X , class Y , class Z , class W , class H , std::enable_if_t< std::conjunction_v< std::is_arithmetic< X >, std::is_arithmetic< Y >, std::is_arithmetic< Z >, std::is_arithmetic< W >, std::is_arithmetic< H >>> * = nullptr>
constexpr s3d::Plane::Plane ( X  cx,
Y  cy,
Z  cz,
W  _w,
H  _h 
)
constexprnoexcept

◆ Plane() [11/17]

constexpr SIV3D_NODISCARD_CXX20 s3d::Plane::Plane ( double  cx,
double  cy,
double  cz,
const Vec2 &  _size 
)
constexprnoexcept

◆ Plane() [12/17]

template<class X , class Y , class Z , std::enable_if_t< std::conjunction_v< std::is_arithmetic< X >, std::is_arithmetic< Y >, std::is_arithmetic< Z >>> * = nullptr>
constexpr SIV3D_NODISCARD_CXX20 s3d::Plane::Plane ( X  cx,
Y  cy,
Z  cz,
const Vec2 &  _size 
)
constexprnoexcept

◆ Plane() [13/17]

constexpr SIV3D_NODISCARD_CXX20 s3d::Plane::Plane ( const Vec3 &  _center,
double  _size 
)
constexprnoexcept

◆ Plane() [14/17]

SIV3D_CONCEPT_ARITHMETIC constexpr SIV3D_NODISCARD_CXX20 s3d::Plane::Plane ( const Vec3 &  _center,
Arithmetic  _size 
)
constexprnoexcept

◆ Plane() [15/17]

constexpr SIV3D_NODISCARD_CXX20 s3d::Plane::Plane ( const Vec3 &  _center,
double  _w,
double  _h 
)
constexprnoexcept

◆ Plane() [16/17]

template<class W , class H , std::enable_if_t< std::conjunction_v< std::is_arithmetic< W >, std::is_arithmetic< H >>> * = nullptr>
constexpr SIV3D_NODISCARD_CXX20 s3d::Plane::Plane ( const Vec3 &  _center,
W  _w,
H  _h 
)
constexprnoexcept

◆ Plane() [17/17]

constexpr SIV3D_NODISCARD_CXX20 s3d::Plane::Plane ( const Vec3 &  _center,
const Vec2 &  _size 
)
constexprnoexcept

Member Function Documentation

◆ draw() [1/18]

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

◆ draw() [2/18]

const Plane& s3d::Plane::draw ( const Mat4x4 &  mat,
const ColorF &  color = Palette::White 
) const

◆ draw() [3/18]

const Plane& s3d::Plane::draw ( const Mat4x4 &  mat,
const PhongMaterial &  material 
) const

◆ draw() [4/18]

const Plane& s3d::Plane::draw ( const Mat4x4 &  mat,
const Texture &  texture,
const ColorF &  color = Palette::White 
) const

◆ draw() [5/18]

const Plane& s3d::Plane::draw ( const Mat4x4 &  mat,
const Texture &  texture,
const PhongMaterial &  material 
) const

◆ draw() [6/18]

const Plane& s3d::Plane::draw ( const Mat4x4 &  mat,
const TextureRegion &  textureRegion,
const ColorF &  color = Palette::White 
) const

◆ draw() [7/18]

const Plane& s3d::Plane::draw ( const Mat4x4 &  mat,
const TextureRegion &  textureRegion,
const PhongMaterial &  material 
) const

◆ draw() [8/18]

const Plane& s3d::Plane::draw ( const PhongMaterial &  material) const

◆ draw() [9/18]

const Plane& s3d::Plane::draw ( const Quaternion &  rotation,
const ColorF &  color = Palette::White 
) const

◆ draw() [10/18]

const Plane& s3d::Plane::draw ( const Quaternion &  rotation,
const PhongMaterial &  material 
) const

◆ draw() [11/18]

const Plane& s3d::Plane::draw ( const Quaternion &  rotation,
const Texture &  texture,
const ColorF &  color = Palette::White 
) const

◆ draw() [12/18]

const Plane& s3d::Plane::draw ( const Quaternion &  rotation,
const Texture &  texture,
const PhongMaterial &  material 
) const

◆ draw() [13/18]

const Plane& s3d::Plane::draw ( const Quaternion &  rotation,
const TextureRegion &  textureRegion,
const ColorF &  color = Palette::White 
) const

◆ draw() [14/18]

const Plane& s3d::Plane::draw ( const Quaternion &  rotation,
const TextureRegion &  textureRegion,
const PhongMaterial &  material 
) const

◆ draw() [15/18]

const Plane& s3d::Plane::draw ( const Texture &  texture,
const ColorF &  color = Palette::White 
) const

◆ draw() [16/18]

const Plane& s3d::Plane::draw ( const Texture &  texture,
const PhongMaterial &  material 
) const

◆ draw() [17/18]

const Plane& s3d::Plane::draw ( const TextureRegion &  textureRegion,
const ColorF &  color = Palette::White 
) const

◆ draw() [18/18]

const Plane& s3d::Plane::draw ( const TextureRegion &  textureRegion,
const PhongMaterial &  material 
) const

◆ hasArea()

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

◆ intersects()

Optional<float> s3d::Plane::intersects ( const Ray &  ray) const
noexcept

◆ lerp()

constexpr Plane s3d::Plane::lerp ( const Plane &  other,
double  f 
) const
constexprnoexcept

◆ moveBy() [1/2]

constexpr Plane& s3d::Plane::moveBy ( position_type  v)
constexprnoexcept

◆ moveBy() [2/2]

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

◆ movedBy() [1/2]

constexpr Plane s3d::Plane::movedBy ( position_type  v) const
constexprnoexcept

◆ movedBy() [2/2]

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

◆ scaled() [1/3]

constexpr Plane s3d::Plane::scaled ( double  s) const
constexprnoexcept

◆ scaled() [2/3]

constexpr Plane s3d::Plane::scaled ( double  sx,
double  sz 
) const
constexprnoexcept

◆ scaled() [3/3]

constexpr Plane s3d::Plane::scaled ( Vec2  s) const
constexprnoexcept

◆ setPos() [1/2]

constexpr Plane& s3d::Plane::setPos ( position_type  _center)
constexprnoexcept

◆ setPos() [2/2]

constexpr Plane& s3d::Plane::setPos ( value_type  cx,
value_type  cy,
value_type  cz 
)
constexprnoexcept

◆ setSize() [1/2]

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

◆ setSize() [2/2]

constexpr Plane& s3d::Plane::setSize ( value_type  _w,
value_type  _d 
)
constexprnoexcept

◆ stretched() [1/3]

constexpr Plane s3d::Plane::stretched ( size_type  xz) const
constexprnoexcept

◆ stretched() [2/3]

constexpr Plane s3d::Plane::stretched ( value_type  _x,
value_type  _z 
) const
constexprnoexcept

◆ stretched() [3/3]

constexpr Plane s3d::Plane::stretched ( value_type  xz) const
constexprnoexcept

Friends And Related Function Documentation

◆ Formatter

void Formatter ( FormatData &  formatData,
const Plane &  value 
)
friend

◆ operator<<

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

◆ operator>>

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

Member Data Documentation

◆ @54

union { ... }

◆ @56

union { ... }

◆ center

position_type s3d::Plane::center

◆ d

value_type s3d::Plane::d

◆ size

size_type s3d::Plane::size

◆ w

value_type s3d::Plane::w

◆ x

value_type s3d::Plane::x

◆ y

value_type s3d::Plane::y

◆ z

value_type s3d::Plane::z

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