CTR-Pia  5.4.3
Game Communication Engine
 全て クラス ネームスペース 関数 変数 型定義 列挙型 列挙型の値 ページ
クラス nn::pia::reckoning::Vector3f

Vector3fクラスは3次元ベクトルを扱うStrategyのために用意されたクラスです。 [詳細]

Public メソッド

 Vector3f ()
 デフォルトコンストラクタです。
 
 Vector3f (const float vx, const float vy, const float vz)
 引数で要素の初期化を行うコンストラクタです。
 
void MakeZero ()
 0ベクトルをセットします。
 
Vector3foperator+= (const Vector3f &v)
 指定したベクトルを加算して代入します。
 
Vector3foperator/= (const float &t)
 指定した値でスカラー除算して代入します。
 
float SquaredDistance (const Vector3f &v) const
 2点間の距離の2乗を返します。
 

Static Public メソッド

static void Add (Vector3f *out, const Vector3f &v)
 対象のベクトルに対して指定したベクトルを加算します。
 
static void Mul (Vector3f *out, const float &t)
 対象のベクトルに対して指定した値をスカラー乗算します。
 

説明

Vector3fクラスは3次元ベクトルを扱うStrategyのために用意されたクラスです。

コンストラクタとデストラクタ

nn::pia::reckoning::Vector3f::Vector3f ( const float  vx,
const float  vy,
const float  vz 
)
inline

引数で要素の初期化を行うコンストラクタです。

引数
[in]vx,vy,vz初期化する値を入れる必要があります。

関数

static void nn::pia::reckoning::Vector3f::Add ( Vector3f out,
const Vector3f v 
)
inlinestatic

対象のベクトルに対して指定したベクトルを加算します。

引数
[out]out対象ベクトル
[in]v加算ベクトル
static void nn::pia::reckoning::Vector3f::Mul ( Vector3f out,
const float &  t 
)
inlinestatic

対象のベクトルに対して指定した値をスカラー乗算します。

引数
[out]out対象ベクトル
[in]t乗算値
Vector3f& nn::pia::reckoning::Vector3f::operator+= ( const Vector3f v)
inline

指定したベクトルを加算して代入します。

引数
[in]v加算ベクトル
戻り値
加算後のベクトルを返します。
Vector3f& nn::pia::reckoning::Vector3f::operator/= ( const float &  t)
inline

指定した値でスカラー除算して代入します。

引数
[in]t除算値
戻り値
除算後のベクトルを返します。
float nn::pia::reckoning::Vector3f::SquaredDistance ( const Vector3f v) const
inline

2点間の距離の2乗を返します。

引数
[in]v距離を求めたい対象のベクトル
戻り値
距離の2乗を返します。