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

#include <Cone.hpp>

Public Types

using position_type = Vec3
 
using value_type = position_type::value_type
 

Public Member Functions

SIV3D_NODISCARD_CXX20 Cone ()=default
 
SIV3D_NODISCARD_CXX20 Cone (double _r, double _h, const Quaternion &_orientation=Quaternion::Identity()) noexcept
 
SIV3D_NODISCARD_CXX20 Cone (double cx, double cy, double cz, double _r, double _h, const Quaternion &_orientation=Quaternion::Identity()) noexcept
 
SIV3D_NODISCARD_CXX20 Cone (const Vec3 &_center, double _r, double _h, const Quaternion &_orientation=Quaternion::Identity()) noexcept
 
SIV3D_NODISCARD_CXX20 Cone (const Vec3 &from, const Vec3 &to, double _r) noexcept
 
SIV3D_NODISCARD_CXX20 Cone (const Vec3 &from, const Vec3 &to, double _r, const Quaternion &_orientation) noexcept
 
ConesetPos (value_type cx, value_type cy, value_type cz) noexcept
 
ConesetPos (position_type _center) noexcept
 
ConesetSize (value_type _r, value_type _h) noexcept
 
ConesetOrientation (Quaternion _orientation) noexcept
 
Cone movedBy (value_type _x, value_type _y, value_type _z) const noexcept
 
Cone movedBy (position_type v) const noexcept
 
ConemoveBy (value_type _x, value_type _y, value_type _z) noexcept
 
ConemoveBy (position_type v) noexcept
 
Cone stretched (double _r, double _h) const noexcept
 
Cone scaled (double sr, double sh) const noexcept
 
bool hasVolume () const noexcept
 
Cone lerp (const Cone &other, double f) const noexcept
 
Vec3 vector () const noexcept
 
position_type top () const noexcept
 
position_type bottomCenter () const noexcept
 
const Conedraw (const ColorF &color=Palette::White) const
 
const Conedraw (const Texture &texture, const ColorF &color=Palette::White) const
 
const Conedraw (const Quaternion &rotation, const ColorF &color=Palette::White) const
 
const Conedraw (const Quaternion &rotation, const Texture &texture, const ColorF &color=Palette::White) const
 
const Conedraw (const Mat4x4 &mat, const ColorF &color=Palette::White) const
 
const Conedraw (const Mat4x4 &mat, const Texture &texture, const ColorF &color=Palette::White) const
 
const Conedraw (const PhongMaterial &material) const
 
const Conedraw (const Texture &texture, const PhongMaterial &material) const
 
const Conedraw (const Quaternion &rotation, const PhongMaterial &material) const
 
const Conedraw (const Quaternion &rotation, const Texture &texture, const PhongMaterial &material) const
 
const Conedraw (const Mat4x4 &mat, const PhongMaterial &material) const
 
const Conedraw (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
 

Member Typedef Documentation

◆ position_type

◆ value_type

Constructor & Destructor Documentation

◆ Cone() [1/6]

SIV3D_NODISCARD_CXX20 s3d::Cone::Cone ( )
default

◆ Cone() [2/6]

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

◆ Cone() [3/6]

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

◆ Cone() [4/6]

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

◆ Cone() [5/6]

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

◆ Cone() [6/6]

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

Member Function Documentation

◆ bottomCenter()

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

◆ draw() [1/12]

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

◆ draw() [2/12]

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

◆ draw() [3/12]

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

◆ draw() [4/12]

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

◆ draw() [5/12]

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

◆ draw() [6/12]

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

◆ draw() [7/12]

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

◆ draw() [8/12]

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

◆ draw() [9/12]

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

◆ draw() [10/12]

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

◆ draw() [11/12]

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

◆ draw() [12/12]

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

◆ hasVolume()

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

◆ lerp()

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

◆ moveBy() [1/2]

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

◆ moveBy() [2/2]

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

◆ movedBy() [1/2]

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

◆ movedBy() [2/2]

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

◆ scaled()

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

◆ setOrientation()

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

◆ setPos() [1/2]

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

◆ setPos() [2/2]

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

◆ setSize()

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

◆ stretched()

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

◆ top()

position_type s3d::Cone::top ( ) const
noexcept

◆ vector()

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

Member Data Documentation

◆ @13

union { ... }

◆ center

position_type s3d::Cone::center

◆ h

value_type s3d::Cone::h

◆ orientation

Quaternion s3d::Cone::orientation

◆ r

value_type s3d::Cone::r

◆ x

value_type s3d::Cone::x

◆ y

value_type s3d::Cone::y

◆ z

value_type s3d::Cone::z

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