MQScene class manages an information of a rendering view.
For rendering | |
InitSize | Specify a size of an image for a rendering |
GetProjMatrix | Store a matrix for a perspective transform |
GetViewMatrix | Store a matrix for a view transform |
Camera | |
GetCameraPosition | Get a camera position |
SetCameraPosition | Set a camera position |
GetCameraAngle | Get a camera direction |
SetCameraAngle | Set a camera direction |
GetLookAtPosition | Get a camera look at position |
SetLookAtPosition | Set a camera look at position |
GetRotationCenter | Get a rotation center of the view |
SetRotationCenter | Set a rotation center of the view |
GetFOV | Get a viewing angle |
SetFOV | Set a viewing angle |
Entire scene | |
GetGlobalDirectionalLight | Get a direction of a directional light |
SetGlobalDirectionalLight | Set a direction of a directional light |
GetGlobalAmbientColor | Get an ambient color in the entire scene |
SetGlobalAmbientColor | Set an ambient color in the entire scene |
Transform | |
Convert3DToScreen | Convert a 3D space coordinate to a screen coordinate |
ConvertScreenTo3D | Convert a screen coordinate to a 3D coordinate |
GetVisibleFace | Acquire whether faces are displayed on a view |
void MQScene::InitSize(int width, int height);
(new in Rev2.10)
It specifies a size of an image for a rendering.
void MQScene::GetProjMatrix(float *matrix);
(new in Rev2.10)
It stores a matrix for a projection to the buffer specified by matrix which array has 16 lengths.
The arrangement of the matrix is compatible with the one used by glLoadMatrixf() in OpenGL. However, please be careful that the compatibility of a part of parameters may be lost in the future version.
void MQScene::GetViewMatrix(float *matrix);
(new in Rev2.10)
It stores a matrix for a view transform to the buffer specified by matrix which array has 16 lengths.
The arrangement of the matrix is compatible with the one used by glLoadMatrixf() in OpenGL.
MQPoint MQScene::GetCameraPosition();
(new in Rev2.40)
It gets a camera position.
void MQScene::SetCameraPosition(const MQPoint& p);
(new in Rev2.40)
It sets a camera position.
When the camera position has been changed, the look at point may also move together. Therefore, when you want to move both a position of a camera and a look at point, SetCameraPosition() must be called before calling SetLookAtPosition().
MQAngle MQScene::GetCameraAngle();
(new in Rev2.40)
It gets a camera direction.
void MQScene::SetCameraAngle(const MQAngle& angle);
(new in Rev2.40)
It sets a camera direction.
MQPoint MQScene::GetLookAtPosition();
(new in Rev2.40)
It gets a look at position of the camera.
void MQScene::SetLookAtPosition(const MQPoint& p);
(new in Rev2.40)
It sets a look at position of the camera. A rotation center is also set as the same position as the look at point.
When the camera position has been changed, the look at point may also move together. Therefore, when you want to move both a position of a camera and a look at point, SetLookAtPosition() must be called after calling SetCameraPosition().
MQPoint MQScene::GetRotationCenter();
(new in Rev2.40)
It gets the center position of the rotation of the view.
void MQScene::SetRotationCenter(const MQPoint& p);
(new in Rev2.40)
It sets the center position of the rotation of the view.
float MQScene::GetFOV();
(new in Rev2.40)
It gets a view angle of the view.
void MQScene::SetFOV(float fov);
(new in Rev2.40)
It sets a view angle of the view.
MQPoint MQScene::GetGlobalDirectionalLight();
(new in Rev2.40)
It gets a direction of a global directional light.
void MQScene::SetGlobalDirectionalLight(const MQPoint& vec);
(new in Rev2.40)
It sets a direction of a global directional light.
MQColor MQScene::GetGlobalAmbientColor();
(new in Rev2.40)
It gets an ambient color in the entire scene
void MQScene::SetGlobalAmbientColor(const MQColor& amb);
(new in Rev2.40)
It sets an ambient color in the entire scene.
MQPoint MQScene::Convert3DToScreen(const MQPoint& p, float *out_w);
(new in Rev2.40)
It converts the 3D space coordinate to the screen coordinate.
It returns (0,0,0) when the specified position is in front than the front clipping plane.
MQPoint MQScene::ConvertScreenTo3D(const MQPoint& p);
(new in Rev2.40)
It converts the screen coordinate to the 3D space coordinate.
BOOL MQScene::GetVisibleFace(MQObject obj, BOOL *visible);
(new in Rev2.41)
It acquires whether faces are displayed on a view.
The 'visible' must have the same size of an array as the number of the faces acquired by MQObject::GetFaceCount(). By calling this function, the visibility of each face in the view will be stored in the 'visible'.
The visibility of the face is variable by the 'Hide' operation, with the option for the front face only, or whether the face is in the front of the viewpoint.