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

#include <Sphere.hpp>

Public Types

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

Public Member Functions

 Sphere ()=default
 
constexpr SIV3D_NODISCARD_CXX20 Sphere (double _r) noexcept
 
SIV3D_CONCEPT_ARITHMETIC constexpr SIV3D_NODISCARD_CXX20 Sphere (Arithmetic _r) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Sphere (double _x, double _y, double _z, double _r) noexcept
 
template<class X , class Y , class Z , class R >
constexpr SIV3D_NODISCARD_CXX20 Sphere (X _x, Y _y, Z _z, R _r) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Sphere (const Vec3 &_center, double _r) noexcept
 
SIV3D_CONCEPT_ARITHMETIC constexpr SIV3D_NODISCARD_CXX20 Sphere (const Vec3 &_center, Arithmetic _r) noexcept
 
constexpr Sphereset (value_type _x, value_type _y, size_type _z, size_type _r) noexcept
 
constexpr Sphereset (position_type _center, size_type _r) noexcept
 
constexpr Sphereset (const Sphere &sphere) noexcept
 
constexpr SpheresetPos (value_type _x, value_type _y, value_type _z) noexcept
 
constexpr SpheresetPos (position_type _center) noexcept
 
constexpr SpheresetR (value_type _r) noexcept
 
constexpr Sphere movedBy (value_type _x, value_type _y, value_type _z) const noexcept
 
constexpr Sphere movedBy (position_type v) const noexcept
 
constexpr SpheremoveBy (value_type _x, value_type _y, value_type _z) noexcept
 
constexpr SpheremoveBy (position_type v) noexcept
 
constexpr Sphere stretched (value_type size) const noexcept
 
constexpr Sphere scaled (double s) const noexcept
 
constexpr position_type top () const noexcept
 
constexpr position_type bottom () const noexcept
 
constexpr position_type left () const noexcept
 
constexpr position_type right () const noexcept
 
constexpr position_type forward () const noexcept
 
constexpr position_type backward () const noexcept
 
constexpr Sphere lerp (const Sphere &other, double f) const noexcept
 
bool intersects (const Vec3 &point) const noexcept
 
bool intersects (const Triangle3D &triangle) const noexcept
 
bool intersects (const Sphere &sphere) const noexcept
 
bool intersects (const Box &box) const noexcept
 
bool intersects (const OrientedBox &box) const noexcept
 
bool intersects (const ViewFrustum &frustum) const noexcept
 
Optional< float > intersects (const Ray &ray) const noexcept
 
bool contains (const Vec3 &point) const noexcept
 
bool contains (const Triangle3D &triangle) const noexcept
 
bool contains (const Sphere &sphere) const noexcept
 
bool contains (const Box &box) const noexcept
 
bool contains (const OrientedBox &box) const noexcept
 
bool contains (const ViewFrustum &frustum) const noexcept
 
const Spheredraw (const ColorF &color=Palette::White) const
 
const Spheredraw (const Texture &texture, const ColorF &color=Palette::White) const
 
const Spheredraw (const Quaternion &rotation, const ColorF &color=Palette::White) const
 
const Spheredraw (const Quaternion &rotation, const Texture &texture, const ColorF &color=Palette::White) const
 
const Spheredraw (const Mat4x4 &mat, const ColorF &color=Palette::White) const
 
const Spheredraw (const Mat4x4 &mat, const Texture &texture, const ColorF &color=Palette::White) const
 
const Spheredraw (const PhongMaterial &material) const
 
const Spheredraw (const Texture &texture, const PhongMaterial &material) const
 
const Spheredraw (const Quaternion &rotation, const PhongMaterial &material) const
 
const Spheredraw (const Quaternion &rotation, const Texture &texture, const PhongMaterial &material) const
 
const Spheredraw (const Mat4x4 &mat, const PhongMaterial &material) const
 
const Spheredraw (const Mat4x4 &mat, const Texture &texture, const PhongMaterial &material) const
 

Public Attributes

union {
   position_type   center
 球の中心座標 More...
 
   struct {
      value_type   x
 球の中心の X 座標 More...
 
      value_type   y
 球の中心の Y 座標 More...
 
      value_type   z
 球の中心の Z 座標 More...
 
   } 
 
}; 
 
size_type r
 球の半径 More...
 

Friends

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

Member Typedef Documentation

◆ position_type

◆ size_type

◆ value_type

Constructor & Destructor Documentation

◆ Sphere() [1/7]

s3d::Sphere::Sphere ( )
default

◆ Sphere() [2/7]

constexpr SIV3D_NODISCARD_CXX20 s3d::Sphere::Sphere ( double  _r)
explicitconstexprnoexcept

◆ Sphere() [3/7]

SIV3D_CONCEPT_ARITHMETIC constexpr SIV3D_NODISCARD_CXX20 s3d::Sphere::Sphere ( Arithmetic  _r)
explicitconstexprnoexcept

◆ Sphere() [4/7]

constexpr SIV3D_NODISCARD_CXX20 s3d::Sphere::Sphere ( double  _x,
double  _y,
double  _z,
double  _r 
)
constexprnoexcept

◆ Sphere() [5/7]

template<class X , class Y , class Z , class R >
constexpr SIV3D_NODISCARD_CXX20 s3d::Sphere::Sphere ( _x,
_y,
_z,
_r 
)
constexprnoexcept

◆ Sphere() [6/7]

constexpr SIV3D_NODISCARD_CXX20 s3d::Sphere::Sphere ( const Vec3 _center,
double  _r 
)
constexprnoexcept

◆ Sphere() [7/7]

SIV3D_CONCEPT_ARITHMETIC constexpr SIV3D_NODISCARD_CXX20 s3d::Sphere::Sphere ( const Vec3 _center,
Arithmetic  _r 
)
constexprnoexcept

Member Function Documentation

◆ backward()

constexpr position_type s3d::Sphere::backward ( ) const
constexprnoexcept

◆ bottom()

constexpr position_type s3d::Sphere::bottom ( ) const
constexprnoexcept

◆ contains() [1/6]

bool s3d::Sphere::contains ( const Box box) const
noexcept

◆ contains() [2/6]

bool s3d::Sphere::contains ( const OrientedBox box) const
noexcept

◆ contains() [3/6]

bool s3d::Sphere::contains ( const Sphere sphere) const
noexcept

◆ contains() [4/6]

bool s3d::Sphere::contains ( const Triangle3D triangle) const
noexcept

◆ contains() [5/6]

bool s3d::Sphere::contains ( const Vec3 point) const
noexcept

◆ contains() [6/6]

bool s3d::Sphere::contains ( const ViewFrustum frustum) const
noexcept

◆ draw() [1/12]

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

◆ draw() [2/12]

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

◆ draw() [3/12]

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

◆ draw() [4/12]

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

◆ draw() [5/12]

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

◆ draw() [6/12]

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

◆ draw() [7/12]

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

◆ draw() [8/12]

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

◆ draw() [9/12]

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

◆ draw() [10/12]

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

◆ draw() [11/12]

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

◆ draw() [12/12]

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

◆ forward()

constexpr position_type s3d::Sphere::forward ( ) const
constexprnoexcept

◆ intersects() [1/7]

bool s3d::Sphere::intersects ( const Box box) const
noexcept

◆ intersects() [2/7]

bool s3d::Sphere::intersects ( const OrientedBox box) const
noexcept

◆ intersects() [3/7]

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

◆ intersects() [4/7]

bool s3d::Sphere::intersects ( const Sphere sphere) const
noexcept

◆ intersects() [5/7]

bool s3d::Sphere::intersects ( const Triangle3D triangle) const
noexcept

◆ intersects() [6/7]

bool s3d::Sphere::intersects ( const Vec3 point) const
noexcept

◆ intersects() [7/7]

bool s3d::Sphere::intersects ( const ViewFrustum frustum) const
noexcept

◆ left()

constexpr position_type s3d::Sphere::left ( ) const
constexprnoexcept

◆ lerp()

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

◆ moveBy() [1/2]

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

◆ moveBy() [2/2]

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

◆ movedBy() [1/2]

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

◆ movedBy() [2/2]

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

◆ right()

constexpr position_type s3d::Sphere::right ( ) const
constexprnoexcept

◆ scaled()

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

◆ set() [1/3]

constexpr Sphere& s3d::Sphere::set ( const Sphere sphere)
constexprnoexcept

◆ set() [2/3]

constexpr Sphere& s3d::Sphere::set ( position_type  _center,
size_type  _r 
)
constexprnoexcept

◆ set() [3/3]

constexpr Sphere& s3d::Sphere::set ( value_type  _x,
value_type  _y,
size_type  _z,
size_type  _r 
)
constexprnoexcept

◆ setPos() [1/2]

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

◆ setPos() [2/2]

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

◆ setR()

constexpr Sphere& s3d::Sphere::setR ( value_type  _r)
constexprnoexcept

◆ stretched()

constexpr Sphere s3d::Sphere::stretched ( value_type  size) const
constexprnoexcept

◆ top()

constexpr position_type s3d::Sphere::top ( ) const
constexprnoexcept

Friends And Related Function Documentation

◆ Formatter

void Formatter ( FormatData formatData,
const Sphere value 
)
friend

◆ operator!=

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

◆ operator<<

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

◆ operator==

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

◆ operator>>

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

Member Data Documentation

◆ @82

union { ... }

◆ center

position_type s3d::Sphere::center

球の中心座標

◆ r

size_type s3d::Sphere::r

球の半径

◆ x

value_type s3d::Sphere::x

球の中心の X 座標

◆ y

value_type s3d::Sphere::y

球の中心の Y 座標

◆ z

value_type s3d::Sphere::z

球の中心の Z 座標


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