OpenSiv3D  v0.6.5
C++20 framework for creative coding
s3d::P2SliderJoint Class Reference

#include <P2SliderJoint.hpp>

Public Member Functions

SIV3D_NODISCARD_CXX20 P2SliderJoint ()=default
 デフォルトコンストラクタ More...
 
void release ()
 ジョイントを破棄します。 More...
 
Vec2 getAnchorPosA () const
 BodyA のアンカーポイントをワールド座標で返します。 More...
 
Vec2 getAnchorPosB () const
 BodyB のアンカーポイントをワールド座標で返します。 More...
 
Vec2 getReactionForce (double timeStep) const
 ジョイントの反力 (N) を返します。 More...
 
double getReactionTorque (double timeStep) const
 ジョイントの反力トルク (N・m) を返します。 More...
 
double getJointTranslation () const
 ジョイントの移動量を返します。 More...
 
double getJointSpeed () const
 ジョイントの移動の速さを返します。 More...
 
P2SliderJointsetLimitEnabled (bool enabled)
 ジョイントの長さ制限の有効無効を設定します。 More...
 
bool getLimitEnabled () const
 ジョイントの長さ制限が有効かを返します。 More...
 
P2SliderJointsetLimits (double lower, double upper)
 ジョイントの長さの下限と上限を設定します。 More...
 
std::pair< double, double > getLimits () const
 現在設定されているジョイントの長さの下限と上限を返します。 More...
 
P2SliderJointsetMotorEnabled (bool enabled)
 モーターの ON / OFF を設定します。 More...
 
bool getMotorEnabled () const
 モーターが ON であるかを返します。 More...
 
P2SliderJointsetMotorSpeed (double speed)
 モーターの速さを設定します。 More...
 
double getMotorSpeed () const
 現在設定されているモーターの速さを返します。 More...
 
P2SliderJointsetMaxMotorForce (double force)
 モーターが発揮できる最大の力の強さを設定します。 More...
 
double getMaxMotorForce () const
 モーターが発揮できる最大の力の強さを返します。 More...
 
double getCurrentMotorForce (double timeStep) const
 現在モーターが発揮している力の強さを返します。 More...
 
void draw (const ColorF &color=Palette::White) const
 ジョイントをデバッグ表示します。 More...
 

Constructor & Destructor Documentation

◆ P2SliderJoint()

SIV3D_NODISCARD_CXX20 s3d::P2SliderJoint::P2SliderJoint ( )
default

デフォルトコンストラクタ

Member Function Documentation

◆ draw()

void s3d::P2SliderJoint::draw ( const ColorF color = Palette::White) const

ジョイントをデバッグ表示します。

Parameters
color

◆ getAnchorPosA()

Vec2 s3d::P2SliderJoint::getAnchorPosA ( ) const

BodyA のアンカーポイントをワールド座標で返します。

Returns
BodyA のアンカーポイントのワールド座標

◆ getAnchorPosB()

Vec2 s3d::P2SliderJoint::getAnchorPosB ( ) const

BodyB のアンカーポイントをワールド座標で返します。

Returns
BodyB のアンカーポイントのワールド座標

◆ getCurrentMotorForce()

double s3d::P2SliderJoint::getCurrentMotorForce ( double  timeStep) const

現在モーターが発揮している力の強さを返します。

Parameters
timeStepタイムステップ(秒)
Returns
現在モーターが発揮している力の強さ (N)

◆ getJointSpeed()

double s3d::P2SliderJoint::getJointSpeed ( ) const

ジョイントの移動の速さを返します。

Returns
ジョイントの移動の速さ

◆ getJointTranslation()

double s3d::P2SliderJoint::getJointTranslation ( ) const

ジョイントの移動量を返します。

Returns
ジョイントの移動量

◆ getLimitEnabled()

bool s3d::P2SliderJoint::getLimitEnabled ( ) const

ジョイントの長さ制限が有効かを返します。

Returns
ジョイントの長さ制限が有効な場合 true, それ以外の場合は false

◆ getLimits()

std::pair<double, double> s3d::P2SliderJoint::getLimits ( ) const

現在設定されているジョイントの長さの下限と上限を返します。

Returns
現在設定されているジョイントの長さの下限と上限

◆ getMaxMotorForce()

double s3d::P2SliderJoint::getMaxMotorForce ( ) const

モーターが発揮できる最大の力の強さを返します。

Returns
モーターが発揮できる最大の力の強さ (N)

◆ getMotorEnabled()

bool s3d::P2SliderJoint::getMotorEnabled ( ) const

モーターが ON であるかを返します。

Returns
モーターが ON である場合 true, それ以外の場合は false

◆ getMotorSpeed()

double s3d::P2SliderJoint::getMotorSpeed ( ) const

現在設定されているモーターの速さを返します。

Returns
現在設定されているモーターの速さ

◆ getReactionForce()

Vec2 s3d::P2SliderJoint::getReactionForce ( double  timeStep) const

ジョイントの反力 (N) を返します。

Parameters
timeStepタイムステップ(秒)
Returns
ジョイントの反力 (N)

◆ getReactionTorque()

double s3d::P2SliderJoint::getReactionTorque ( double  timeStep) const

ジョイントの反力トルク (N・m) を返します。

Parameters
timeStepタイムステップ(秒)
Returns
ジョイントの反力トルク (N・m)

◆ release()

void s3d::P2SliderJoint::release ( )

ジョイントを破棄します。

◆ setLimitEnabled()

P2SliderJoint& s3d::P2SliderJoint::setLimitEnabled ( bool  enabled)

ジョイントの長さ制限の有効無効を設定します。

Parameters
enabled有効にする場合 true, それ以外の場合は false
Returns
*this

◆ setLimits()

P2SliderJoint& s3d::P2SliderJoint::setLimits ( double  lower,
double  upper 
)

ジョイントの長さの下限と上限を設定します。

Parameters
lower長さの下限
upper長さの上限
Returns
*this

◆ setMaxMotorForce()

P2SliderJoint& s3d::P2SliderJoint::setMaxMotorForce ( double  force)

モーターが発揮できる最大の力の強さを設定します。

Parameters
force力の強さ (N)
Returns
*this

◆ setMotorEnabled()

P2SliderJoint& s3d::P2SliderJoint::setMotorEnabled ( bool  enabled)

モーターの ON / OFF を設定します。

Parameters
enabledモーターを ON にする場合 true, OFF にする場合は false
Returns
*this

◆ setMotorSpeed()

P2SliderJoint& s3d::P2SliderJoint::setMotorSpeed ( double  speed)

モーターの速さを設定します。

Parameters
speedモーターの速さ
Returns
*this

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