MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
MGglViewAttrib クラス

MGglViewAttrib is a class to serialize MGOpenGLView. [詳解]

公開メンバ関数

 MGglViewAttrib (bool is_perspective=true)
 
 MGglViewAttrib (const MGBox &box, const MGColor *gridColors=0)
 
 MGglViewAttrib (const MGOpenGLView &glview)
 
void copy (const MGOpenGLView &glview)
 ~MGglViewAttrib(); [詳解]
 
const MGPositioncenter () const
 return the center of the box of this view. [詳解]
 
MGPositioncenter ()
 
void compute_viewing_environment (const MGBox &box)
 
const MGConstructionPlanecplane () const
 
MGConstructionPlanecplane ()
 
double diameter () const
 Obtainthe the diameter of the sphere that surround the whole model. [詳解]
 
double & diameter ()
 
const MGPositioneye_position () const
 Get the eye position. [詳解]
 
MGPositioneye_position ()
 
bool is_perspective () const
 Return if this is a perspective view or not. [詳解]
 
void set_center (const MGPosition &pos)
 
void setEyePositionUpVector (const MGPosition &eyeP, const MGVector &upVector)
 Set m_eyeP and m_up_vector(the eye position and view-up-vector of the OpenGL). [詳解]
 
void set_fovy (double fovy)
 
void setHomeMatrix ()
 
void set_perspective (bool pers, double fovy=45.)
 Set if this view is a perspective view(true), or orthnormal view(falsle). [詳解]
 
void set_view_up_vector (const MGVector &up)
 Set the view-up vector. [詳解]
 
MGCL::VIEWMODE viewMode () const
 
const MGVectorview_up_vector () const
 Get the view up vector. [詳解]
 
MGVectorview_up_vector ()
 
double view_volume_far () const
 compute the view volume far. [詳解]
 
double view_volume_height () const
 compute the view volume height. [詳解]
 
double view_volume_near () const
 compute the view volume near. [詳解]
 

フレンド

MG_DLL_DECLR friend std::ostream & operator<< (std::ostream &out, const MGglViewAttrib &atr)
 Debug Function. [詳解]
 
MG_DLL_DECLR friend MGOfstreamoperator<< (MGOfstream &buf, const MGglViewAttrib &atr)
 Serialization fucntion. [詳解]
 
MG_DLL_DECLR friend MGIfstreamoperator>> (MGIfstream &buf, MGglViewAttrib &atr)
 

詳解

MGglViewAttrib is a class to serialize MGOpenGLView.

MGglViewAttrib is used by MGOpenGLView and MGContext to define view-mode, construction plane's geometry data, and viewing transformation matrix data.

構築子と解体子

MGglViewAttrib::MGglViewAttrib ( bool  is_perspective = true)
MGglViewAttrib::MGglViewAttrib ( const MGBox box,
const MGColor gridColors = 0 
)
MGglViewAttrib::MGglViewAttrib ( const MGOpenGLView glview)

関数詳解

const MGPosition& MGglViewAttrib::center ( ) const
inline

return the center of the box of this view.

MGPosition& MGglViewAttrib::center ( )
inline
void MGglViewAttrib::compute_viewing_environment ( const MGBox box)

Compute the viewing environment the parameter box. compute_viewing_environment() uses (eye_position,view_up_vector) as input. They must be set before compute_viewing_environment.

引数
boxInput the box of the target scene.
void MGglViewAttrib::copy ( const MGOpenGLView glview)

~MGglViewAttrib();

Copy the informations of glview2 into this.

const MGConstructionPlane& MGglViewAttrib::cplane ( ) const
inline
MGConstructionPlane& MGglViewAttrib::cplane ( )
inline
double MGglViewAttrib::diameter ( ) const
inline

Obtainthe the diameter of the sphere that surround the whole model.

double& MGglViewAttrib::diameter ( )
inline
const MGPosition& MGglViewAttrib::eye_position ( ) const
inline

Get the eye position.

MGPosition& MGglViewAttrib::eye_position ( )
inline
bool MGglViewAttrib::is_perspective ( ) const
inline

Return if this is a perspective view or not.

void MGglViewAttrib::set_center ( const MGPosition pos)
inline
void MGglViewAttrib::set_fovy ( double  fovy)
inline
void MGglViewAttrib::set_perspective ( bool  pers,
double  fovy = 45. 
)

Set if this view is a perspective view(true), or orthnormal view(falsle).

void MGglViewAttrib::set_view_up_vector ( const MGVector up)
inline

Set the view-up vector.

void MGglViewAttrib::setEyePositionUpVector ( const MGPosition eyeP,
const MGVector upVector 
)

Set m_eyeP and m_up_vector(the eye position and view-up-vector of the OpenGL).

void MGglViewAttrib::setHomeMatrix ( )
const MGVector& MGglViewAttrib::view_up_vector ( ) const
inline

Get the view up vector.

MGVector& MGglViewAttrib::view_up_vector ( )
inline
double MGglViewAttrib::view_volume_far ( ) const
inline

compute the view volume far.

double MGglViewAttrib::view_volume_height ( ) const
inline

compute the view volume height.

double MGglViewAttrib::view_volume_near ( ) const
inline

compute the view volume near.

MGCL::VIEWMODE MGglViewAttrib::viewMode ( ) const
inline

フレンドと関連関数の詳解

MG_DLL_DECLR friend std::ostream& operator<< ( std::ostream &  out,
const MGglViewAttrib atr 
)
friend

Debug Function.

MG_DLL_DECLR friend MGOfstream& operator<< ( MGOfstream buf,
const MGglViewAttrib atr 
)
friend

Serialization fucntion.

MG_DLL_DECLR friend MGIfstream& operator>> ( MGIfstream buf,
MGglViewAttrib atr 
)
friend

このクラス詳解は次のファイルから抽出されました: