2014-08-11 09:31:04 +08:00
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- @module Camera
|
|
|
|
-- @extend Node
|
|
|
|
-- @parent_module cc
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Gets the camera's projection matrix.<br>
|
|
|
|
-- return The camera projection matrix.
|
2014-08-11 09:31:04 +08:00
|
|
|
-- @function [parent=#Camera] getProjectionMatrix
|
|
|
|
-- @param self
|
|
|
|
-- @return mat4_table#mat4_table ret (return value: mat4_table)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- get view projection matrix
|
2014-08-11 09:31:04 +08:00
|
|
|
-- @function [parent=#Camera] getViewProjectionMatrix
|
|
|
|
-- @param self
|
|
|
|
-- @return mat4_table#mat4_table ret (return value: mat4_table)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Gets the camera's view matrix.<br>
|
|
|
|
-- return The camera view matrix.
|
2014-08-11 09:31:04 +08:00
|
|
|
-- @function [parent=#Camera] getViewMatrix
|
|
|
|
-- @param self
|
|
|
|
-- @return mat4_table#mat4_table ret (return value: mat4_table)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- get & set Camera flag
|
2014-08-11 09:31:04 +08:00
|
|
|
-- @function [parent=#Camera] getCameraFlag
|
|
|
|
-- @param self
|
|
|
|
-- @return int#int ret (return value: int)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Gets the type of camera.<br>
|
|
|
|
-- return The camera type.
|
2014-08-11 09:31:04 +08:00
|
|
|
-- @function [parent=#Camera] getType
|
|
|
|
-- @param self
|
|
|
|
-- @return int#int ret (return value: int)
|
|
|
|
|
2014-12-26 15:52:27 +08:00
|
|
|
--------------------------------
|
2015-01-14 16:26:14 +08:00
|
|
|
-- Get object depth towards camera
|
|
|
|
-- @function [parent=#Camera] getDepthInView
|
2014-12-26 15:52:27 +08:00
|
|
|
-- @param self
|
2015-01-14 16:26:14 +08:00
|
|
|
-- @param #mat4_table transform
|
|
|
|
-- @return float#float ret (return value: float)
|
2014-12-26 15:52:27 +08:00
|
|
|
|
2014-08-11 09:31:04 +08:00
|
|
|
--------------------------------
|
2015-01-14 11:43:27 +08:00
|
|
|
-- Make Camera looks at target<br>
|
|
|
|
-- param target The target camera is point at<br>
|
|
|
|
-- param up The up vector, usually it's Y axis
|
2014-08-11 09:31:04 +08:00
|
|
|
-- @function [parent=#Camera] lookAt
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #vec3_table target
|
|
|
|
-- @param #vec3_table up
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Camera#Camera self (return value: cc.Camera)
|
2014-08-11 09:31:04 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-12-26 15:52:27 +08:00
|
|
|
-- Is this aabb visible in frustum
|
|
|
|
-- @function [parent=#Camera] isVisibleInFrustum
|
2014-08-11 09:31:04 +08:00
|
|
|
-- @param self
|
2014-12-26 15:52:27 +08:00
|
|
|
-- @param #cc.AABB aabb
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
2014-08-11 09:31:04 +08:00
|
|
|
|
2014-12-26 15:46:45 +08:00
|
|
|
--------------------------------
|
2014-12-26 15:52:27 +08:00
|
|
|
--
|
|
|
|
-- @function [parent=#Camera] setCameraFlag
|
2014-12-26 15:46:45 +08:00
|
|
|
-- @param self
|
2014-12-26 15:52:27 +08:00
|
|
|
-- @param #int flag
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Camera#Camera self (return value: cc.Camera)
|
2014-12-26 15:46:45 +08:00
|
|
|
|
2014-08-11 09:31:04 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- create default camera, the camera type depends on Director::getProjection
|
2014-08-11 09:31:04 +08:00
|
|
|
-- @function [parent=#Camera] create
|
|
|
|
-- @param self
|
|
|
|
-- @return Camera#Camera ret (return value: cc.Camera)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Creates a perspective camera.<br>
|
|
|
|
-- param fieldOfView The field of view for the perspective camera (normally in the range of 40-60 degrees).<br>
|
|
|
|
-- param aspectRatio The aspect ratio of the camera (normally the width of the viewport divided by the height of the viewport).<br>
|
|
|
|
-- param nearPlane The near plane distance.<br>
|
|
|
|
-- param farPlane The far plane distance.
|
2014-08-11 09:31:04 +08:00
|
|
|
-- @function [parent=#Camera] createPerspective
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float fieldOfView
|
|
|
|
-- @param #float aspectRatio
|
|
|
|
-- @param #float nearPlane
|
|
|
|
-- @param #float farPlane
|
2014-08-11 09:31:04 +08:00
|
|
|
-- @return Camera#Camera ret (return value: cc.Camera)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Creates an orthographic camera.<br>
|
|
|
|
-- param zoomX The zoom factor along the X-axis of the orthographic projection (the width of the ortho projection).<br>
|
|
|
|
-- param zoomY The zoom factor along the Y-axis of the orthographic projection (the height of the ortho projection).<br>
|
|
|
|
-- param aspectRatio The aspect ratio of the orthographic projection.<br>
|
|
|
|
-- param nearPlane The near plane distance.<br>
|
|
|
|
-- param farPlane The far plane distance.
|
2014-08-11 09:31:04 +08:00
|
|
|
-- @function [parent=#Camera] createOrthographic
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float zoomX
|
|
|
|
-- @param #float zoomY
|
|
|
|
-- @param #float nearPlane
|
|
|
|
-- @param #float farPlane
|
2014-08-11 09:31:04 +08:00
|
|
|
-- @return Camera#Camera ret (return value: cc.Camera)
|
|
|
|
|
2015-01-14 11:43:27 +08:00
|
|
|
--------------------------------
|
|
|
|
--
|
|
|
|
-- @function [parent=#Camera] getDefaultCamera
|
|
|
|
-- @param self
|
|
|
|
-- @return Camera#Camera ret (return value: cc.Camera)
|
|
|
|
|
2014-08-11 09:31:04 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-08-11 09:31:04 +08:00
|
|
|
-- @function [parent=#Camera] getVisitingCamera
|
|
|
|
-- @param self
|
|
|
|
-- @return Camera#Camera ret (return value: cc.Camera)
|
|
|
|
|
|
|
|
return nil
|