Springhead
An open source physics engine for virtual reality, haptics and motion generation.
構造体 SpatialVector

SpatialVector.

#include <Spatial.h>

SpatialVectorに対する継承グラフ

Public メソッド

Vec3dv ()
 
Vec3dw ()
 
const Vec3dv () const
 
const Vec3dw () const
 
 SpatialVector (const Vec3d &_v, const Vec3d &_w)
 
- Public メソッド inherited from TVec6< T >
 DEF_TVECTOR_BASIC_MEMBER (TVec6)
 継承されない基本的なメンバの定義. [詳細]
 
T & item_impl (size_t i)
 要素のアクセス
 
const T & item_impl (size_t i) const
 要素のアクセス
 
size_t stride_impl () const
 ストライド
 
const element_type & VX () const
 vx成分
 
const element_type & VY () const
 vy成分
 
const element_type & VZ () const
 vz成分
 
const element_type & WX () const
 wx成分
 
const element_type & WY () const
 wy成分
 
const element_type & WZ () const
 wz成分
 
element_type & VX ()
 vx成分
 
element_type & VY ()
 vy成分
 
element_type & VZ ()
 vz成分
 
element_type & WX ()
 wx成分
 
element_type & WY ()
 wy成分
 
element_type & WZ ()
 wz成分
 
template<class TVX , class TVY , class TVZ , class TWX , class TWY , class TWZ >
 TVec6 (TVX vxi, TVY vyi, TVZ vzi, TWX wxi, TWY wyi, TWZ wzi)
 コンストラクタ
 
- Public メソッド inherited from TVectorBase< 6, TVecDesc< TVec6< T >, T > >
size_t size_impl () const
 
void resize_impl (size_t sz)
 
- Public メソッド inherited from VectorImp< TVecDesc< TVec6< T >, T > >
 VectorImp ()
 コンストラクタ
 
exp_type & exp ()
 実体の取得
 
const exp_type & exp () const
 
const element_type & item (size_t n) const
 n番目の要素を返す(基数は0).
 
element_type & item (size_t n)
 
size_t size () const
 サイズの取得
 
void resize (size_t sz)
 サイズの設定
 
void resize (size_t sz, const element_type v)
 サイズの設定とベクトルの要素を全てvにする
 
size_t stride () const
 ストライドの取得
 
TVectorSlice< SZ::SIZE,
SZ::STRIDE, desc > & 
t_slice (SZ)
 スライスを返す.テンプレート版 このベクトルのSZ::OFFSET要素から SZ::OFFSET + SZ::SIZE要素までの 部分ベクトルへの参照を返す. [詳細]
 
const TVectorSlice< SZ::SIZE,
SZ::STRIDE, desc > & 
t_slice (SZ) const
 
TVectorSlice< SZ::SIZE,
SZ::STRIDE, desc > & 
t_slice (size_t off, SZ)
 スライスを返す.サイズだけテンプレート版 このベクトルの off 要素から off + SZ::SIZE要素までの 部分ベクトルへの参照を返す. [詳細]
 
const TVectorSlice< SZ::SIZE,
SZ::STRIDE, desc > & 
t_slice (size_t off, SZ) const
 
TSubVector< SZ::SIZE, desc > & sub_vector (SZ)
 部分ベクトルを返す.テンプレート版
 
const TSubVector< SZ::SIZE,
desc > & 
sub_vector (SZ) const
 
TSubVector< SZ::SIZE, desc > & sub_vector (size_t off, SZ)
 部分ベクトルを返す.サイズだけテンプレート版
 
const TSubVector< SZ::SIZE,
desc > & 
sub_vector (size_t off, SZ) const
 
EVectorSlice< element_type > v_range (size_t off, size_t sz)
 部分ベクトルを返す.変数版
 
ConstEVectorSlice< element_type > v_range (size_t off, size_t sz) const
 
EVectorSlice< element_type > v_slice (size_t off, size_t sz, size_t str)
 ベクトルのスライスを返す.
 
ConstEVectorSlice< element_type > v_slice (size_t off, size_t sz, size_t str) const
 
void clear (const element_type v=zero(0))
 ベクトルの要素を全てvにする. [詳細]
 
void assign (const VectorImp< B > &b)
 代入(*this = b). [詳細]
 
void assign (const element_type *b)
 代入(*this = b). [詳細]
 
void add (const VectorImp< B > &b)
 加算(*this += b). [詳細]
 
void sub (const VectorImp< B > &b)
 減算(*this -= b). [詳細]
 
void multi (const element_type &b)
 定数倍(*this *= b). [詳細]
 
void div (const element_type &b)
 定数分の1(*this /= b). [詳細]
 
element_type dot (const VectorImp< B > &b) const
 内積(return *this * b). [詳細]
 
bool equal (const VectorImp< B > &b) const
 比較(return *this == b). [詳細]
 
void element_min (const VectorImp< B > &b)
 要素ごとの最小値(min(*this, b)). [詳細]
 
void element_max (const VectorImp< B > &b)
 要素ごとの最大値(max(*this, b)). [詳細]
 
element_type square () const
 ベクトルのノルム(大きさ)の2乗を返す.
 
element_type norm () const
 ベクトルのノルム(大きさ)を返す.
 
void unitize ()
 単位ベクトルにする.
 
void clip (const VectorImp< BD > &b, const VectorImp< ED > &e)
 クリッピングする(bとeを頂点とする矩形内に収まるようにする).
 
void print (std::ostream &os, const char *sep="( )") const
 表示. [詳細]
 
void input (T &is)
 表示. [詳細]
 
element_type & operator[] (I n)
 [] 演算子(基数は0).
 
const element_type & operator[] (I n) const
 [] 演算子(基数は0) (const 版).
 
 operator element_type * ()
 element_type * への変換
 
 operator const element_type * () const
 
ret_type operator* (element_type b) const
 ベクトルのスカラー倍(return this * b). [詳細]
 
ret_type operator/ (element_type b) const
 ベクトルのスカラー分の1(return this / b). [詳細]
 
ret_type operator+= (const VectorImp< BD > &b)
 += 演算子(*this = *this + b). [詳細]
 
ret_type operator-= (const VectorImp< BD > &b)
 -= 演算子(*this = *this - b) [詳細]
 
ret_type operator*= (T b)
 *= 演算子 (*this = *this * b) [詳細]
 
ret_type operator/= (T b)
 /= 演算子 (*this = 1/b * *this). [詳細]
 
ret_type operator- () const
 
ret_type unit () const
 単位ベクトルを返す.
 

Additional Inherited Members

- Public 型 inherited from TVec6< T >
typedef TVecDesc< TVec6< T >, T > desc
 
typedef PTM::TVectorBase< 6, descbase_type
 
- Public 型 inherited from VectorImp< TVecDesc< TVec6< T >, T > >
typedef TVecDesc< TVec6< T >, T > desc
 
typedef TYPENAME desc::exp_type exp_type
 
typedef TYPENAME desc::ret_type ret_type
 
typedef TYPENAME desc::element_type element_type
 
typedef TYPENAME desc::zero zero
 
- Static Public メソッド inherited from TVec6< T >
static TVec6< T > Zero ()
 零ベクトル
 
- Public 変数 inherited from TVec6< T >
union {
   T   data [6]
 
   struct {
      T   vx
 
      T   vy
 
      T   vz
 
      T   wx
 
      T   wy
 
      T   wz
 
   } 
 
   struct {
      TVec3< T >   r
 
      TVec3< T >   v
 
   } 
 
}; 
 
- Static Public 変数 inherited from TVectorBase< 6, TVecDesc< TVec6< T >, T > >
static const size_t SIZE
 
- Protected メソッド inherited from TVec6< T >
void set_default ()
 
- Protected メソッド inherited from VectorImp< TVecDesc< TVec6< T >, T > >
void init_buffer ()
 バッファの初期化.何もしない.
 
void set_default ()
 デフォルトコンストラクタ
 

この構造体の説明は次のファイルから生成されました: