MGglViewAttrib is a class to serialize MGOpenGLView.
[詳解]
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.
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.
- 引数
-
box | Input the box of the target scene. |
~MGglViewAttrib();
Copy the informations of glview2 into this.
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 |
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 |
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 |
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.
MG_DLL_DECLR friend std::ostream& operator<< |
( |
std::ostream & |
out, |
|
|
const MGglViewAttrib & |
atr |
|
) |
| |
|
friend |
このクラス詳解は次のファイルから抽出されました: