MQScene class

MQScene manages a camera and so on.

Property

get set Type Name Description
x x float head head angle
x x float pitch pitch angle
x x float bank bank angle
x x float fov field of view
x int ortho ortho
[0] perspective view
[1] ortho view
x x MQPoint globalDirectionalLight direction of light
x x MQColor globalAmbientColor color of global ambient

Method

Member Description
getCameraPos Get a position of the camera.
setCameraPos Set a position of the camera.
getCameraAngle Get an angle of the camera.
setCameraAngle Set an angle of the camera.
getLookAtPos Get a position that the camera looks at.
setLookAtPos Set a position that the camera looks at.
getRotationCenter Get a position of the rotation center of the camera.
setRotationCenter Set a position of the rotation center of the camera.
getBackgroundImage Get a filename of a background image.
setBackgroundImage Set a filename of a background image.
getBackgroundImagePosition Get a placement of a background image.
setBackgroundImagePosition Get a placement of a background image.

getCameraPos

Get a position of the camera.

Return value:
MQPoint - position of the camera

setCameraPos(pos)

Set a position of the camera.

Parameters:
MQPoint pos - position of the camera

getCameraAngle

Get an angle of the camera.

Return value:
MQAngle - angle of the camera

setCameraAngle(angle)

Set an angle of the camera.

Parameters:
MQAngle angle - angle of the camera

getLookAtPos

Get a position that the camera looks at.

Return value:
MQPoint - position of looking at

setLookAtPos(pos)

Set a position that the camera looks at.

Parameters:
MQPoint pos - position of looking at

getRotationCenter

Get a position of the rotation center of the camera.

Return value:
MQPoint - rotation center

setRotationCenter(center)

Set a position of the rotation center of the camera.

Parameters:
MQPoint center - rotation center

getBackgroundImage

Get a filename of a background image.

Return value:
string - filename

setBackgroundImage(filename)

Set a filename of a background image.

Parameters:
string filename - A filename to be loaded
Return value:
int - Result
[0] failed
[1] succeeded

getBackgroundImagePosition

Get a placement of a background image.

Return value:
list<float> - left, top, right, bottom, rotation

setBackgroundImagePosition(list)

Get a placement of a background image.

Parameters:
list<float> list - left, top, right, bottom, rotation
Return value:
int - Result
[0] failed
[1] succeeded