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

円柱 More...

#include <Cylinder.hpp>

Public Types

using position_type = Vec3
 
using value_type = position_type::value_type
 

Public Member Functions

SIV3D_NODISCARD_CXX20 Cylinder ()=default
 
SIV3D_NODISCARD_CXX20 Cylinder (double _r, double _h, const Quaternion &_orientation=Quaternion::Identity()) noexcept
 
SIV3D_NODISCARD_CXX20 Cylinder (double cx, double cy, double cz, double _r, double _h, const Quaternion &_orientation=Quaternion::Identity()) noexcept
 
SIV3D_NODISCARD_CXX20 Cylinder (const Vec3 &_center, double _r, double _h, const Quaternion &_orientation=Quaternion::Identity()) noexcept
 
SIV3D_NODISCARD_CXX20 Cylinder (const Vec3 &from, const Vec3 &to, double _r) noexcept
 
SIV3D_NODISCARD_CXX20 Cylinder (const Vec3 &from, const Vec3 &to, double _r, const Quaternion &_orientation) noexcept
 
CylindersetPos (value_type cx, value_type cy, value_type cz) noexcept
 
CylindersetPos (position_type _center) noexcept
 
CylindersetSize (value_type _r, value_type _h) noexcept
 
CylindersetOrientation (Quaternion _orientation) noexcept
 
Cylinder movedBy (value_type _x, value_type _y, value_type _z) const noexcept
 
Cylinder movedBy (position_type v) const noexcept
 
CylindermoveBy (value_type _x, value_type _y, value_type _z) noexcept
 
CylindermoveBy (position_type v) noexcept
 
Cylinder stretched (double _r, double _h) const noexcept
 
Cylinder scaled (double sr, double sh) const noexcept
 
bool hasVolume () const noexcept
 
Cylinder lerp (const Cylinder &other, double f) const noexcept
 
Vec3 vector () const noexcept
 
position_type topCenter () const noexcept
 
position_type bottomCenter () const noexcept
 
const Cylinderdraw (const ColorF &color=Palette::White) const
 
const Cylinderdraw (const Texture &texture, const ColorF &color=Palette::White) const
 
const Cylinderdraw (const Quaternion &rotation, const ColorF &color=Palette::White) const
 
const Cylinderdraw (const Quaternion &rotation, const Texture &texture, const ColorF &color=Palette::White) const
 
const Cylinderdraw (const Mat4x4 &mat, const ColorF &color=Palette::White) const
 
const Cylinderdraw (const Mat4x4 &mat, const Texture &texture, const ColorF &color=Palette::White) const
 
const Cylinderdraw (const PhongMaterial &material) const
 
const Cylinderdraw (const Texture &texture, const PhongMaterial &material) const
 
const Cylinderdraw (const Quaternion &rotation, const PhongMaterial &material) const
 
const Cylinderdraw (const Quaternion &rotation, const Texture &texture, const PhongMaterial &material) const
 
const Cylinderdraw (const Mat4x4 &mat, const PhongMaterial &material) const
 
const Cylinderdraw (const Mat4x4 &mat, const Texture &texture, const PhongMaterial &material) const
 

Public Attributes

union {
   position_type   center
 
   struct {
      value_type   x
 
      value_type   y
 
      value_type   z
 
   } 
 
}; 
 
value_type r
 
value_type h
 
Quaternion orientation
 

Detailed Description

円柱

Member Typedef Documentation

◆ position_type

◆ value_type

Constructor & Destructor Documentation

◆ Cylinder() [1/6]

SIV3D_NODISCARD_CXX20 s3d::Cylinder::Cylinder ( )
default

◆ Cylinder() [2/6]

SIV3D_NODISCARD_CXX20 s3d::Cylinder::Cylinder ( double  _r,
double  _h,
const Quaternion _orientation = Quaternion::Identity() 
)
noexcept

◆ Cylinder() [3/6]

SIV3D_NODISCARD_CXX20 s3d::Cylinder::Cylinder ( double  cx,
double  cy,
double  cz,
double  _r,
double  _h,
const Quaternion _orientation = Quaternion::Identity() 
)
noexcept

◆ Cylinder() [4/6]

SIV3D_NODISCARD_CXX20 s3d::Cylinder::Cylinder ( const Vec3 _center,
double  _r,
double  _h,
const Quaternion _orientation = Quaternion::Identity() 
)
noexcept

◆ Cylinder() [5/6]

SIV3D_NODISCARD_CXX20 s3d::Cylinder::Cylinder ( const Vec3 from,
const Vec3 to,
double  _r 
)
noexcept

◆ Cylinder() [6/6]

SIV3D_NODISCARD_CXX20 s3d::Cylinder::Cylinder ( const Vec3 from,
const Vec3 to,
double  _r,
const Quaternion _orientation 
)
noexcept

Member Function Documentation

◆ bottomCenter()

position_type s3d::Cylinder::bottomCenter ( ) const
noexcept

◆ draw() [1/12]

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

◆ draw() [2/12]

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

◆ draw() [3/12]

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

◆ draw() [4/12]

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

◆ draw() [5/12]

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

◆ draw() [6/12]

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

◆ draw() [7/12]

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

◆ draw() [8/12]

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

◆ draw() [9/12]

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

◆ draw() [10/12]

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

◆ draw() [11/12]

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

◆ draw() [12/12]

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

◆ hasVolume()

bool s3d::Cylinder::hasVolume ( ) const
noexcept

◆ lerp()

Cylinder s3d::Cylinder::lerp ( const Cylinder other,
double  f 
) const
noexcept

◆ moveBy() [1/2]

Cylinder& s3d::Cylinder::moveBy ( position_type  v)
noexcept

◆ moveBy() [2/2]

Cylinder& s3d::Cylinder::moveBy ( value_type  _x,
value_type  _y,
value_type  _z 
)
noexcept

◆ movedBy() [1/2]

Cylinder s3d::Cylinder::movedBy ( position_type  v) const
noexcept

◆ movedBy() [2/2]

Cylinder s3d::Cylinder::movedBy ( value_type  _x,
value_type  _y,
value_type  _z 
) const
noexcept

◆ scaled()

Cylinder s3d::Cylinder::scaled ( double  sr,
double  sh 
) const
noexcept

◆ setOrientation()

Cylinder& s3d::Cylinder::setOrientation ( Quaternion  _orientation)
noexcept

◆ setPos() [1/2]

Cylinder& s3d::Cylinder::setPos ( position_type  _center)
noexcept

◆ setPos() [2/2]

Cylinder& s3d::Cylinder::setPos ( value_type  cx,
value_type  cy,
value_type  cz 
)
noexcept

◆ setSize()

Cylinder& s3d::Cylinder::setSize ( value_type  _r,
value_type  _h 
)
noexcept

◆ stretched()

Cylinder s3d::Cylinder::stretched ( double  _r,
double  _h 
) const
noexcept

◆ topCenter()

position_type s3d::Cylinder::topCenter ( ) const
noexcept

◆ vector()

Vec3 s3d::Cylinder::vector ( ) const
noexcept

Member Data Documentation

◆ @17

union { ... }

◆ center

position_type s3d::Cylinder::center

◆ h

value_type s3d::Cylinder::h

◆ orientation

Quaternion s3d::Cylinder::orientation

◆ r

value_type s3d::Cylinder::r

◆ x

value_type s3d::Cylinder::x

◆ y

value_type s3d::Cylinder::y

◆ z

value_type s3d::Cylinder::z

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