summaryrefslogtreecommitdiff
path: root/meta/3rd/Cocos4.0/library/cc.Camera.lua
blob: e24035763b810089840632e07771fc5ae4bc5858 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
---@meta

---@class cc.Camera :cc.Node
local Camera={ }
cc.Camera=Camera




---* get depth, camera with larger depth is drawn on top of camera with smaller depth, the depth of camera with CameraFlag::DEFAULT is 0, user defined camera is -1 by default
---@return char
function Camera:getDepth () end
---* get view projection matrix
---@return mat4_table
function Camera:getViewProjectionMatrix () end
---* 
---@return self
function Camera:applyViewport () end
---* set the background brush. See CameraBackgroundBrush for more information.<br>
---* param clearBrush Brush used to clear the background
---@param clearBrush cc.CameraBackgroundBrush
---@return self
function Camera:setBackgroundBrush (clearBrush) end
---* 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
---@param target vec3_table
---@param up vec3_table
---@return self
function Camera:lookAt (target,up) end
---* Apply the FBO, RenderTargets and viewport.
---@return self
function Camera:apply () end
---* Get clear brush
---@return cc.CameraBackgroundBrush
function Camera:getBackgroundBrush () end
---* Gets the camera's projection matrix.<br>
---* return The camera projection matrix.
---@return mat4_table
function Camera:getProjectionMatrix () end
---* 
---@return boolean
function Camera:isBrushValid () end
---* Get object depth towards camera
---@param transform mat4_table
---@return float
function Camera:getDepthInView (transform) end
---* Before rendering scene with this camera, the background need to be cleared. It clears the depth buffer with max depth by default. Use setBackgroundBrush to modify the default behavior
---@return self
function Camera:clearBackground () end
---* set additional matrix for the projection matrix, it multiplies mat to projection matrix when called, used by WP8
---@param mat mat4_table
---@return self
function Camera:setAdditionalProjection (mat) end
---*  init camera 
---@return boolean
function Camera:initDefault () end
---* get & set Camera flag
---@return int
function Camera:getCameraFlag () end
---* Gets the type of camera.<br>
---* return The camera type.
---@return int
function Camera:getType () end
---* 
---@param zoomX float
---@param zoomY float
---@param nearPlane float
---@param farPlane float
---@return boolean
function Camera:initOrthographic (zoomX,zoomY,nearPlane,farPlane) end
---* get rendered order
---@return int
function Camera:getRenderOrder () end
---* Is this aabb visible in frustum
---@param aabb cc.AABB
---@return boolean
function Camera:isVisibleInFrustum (aabb) end
---* set depth, camera with larger depth is drawn on top of camera with smaller depth, the depth of camera with CameraFlag::DEFAULT is 0, user defined camera is -1 by default
---@param depth char
---@return self
function Camera:setDepth (depth) end
---* Set the scene,this method shall not be invoke manually
---@param scene cc.Scene
---@return self
function Camera:setScene (scene) end
---* 
---@param src vec3_table
---@return vec2_table
function Camera:projectGL (src) end
---* Gets the camera's view matrix.<br>
---* return The camera view matrix.
---@return mat4_table
function Camera:getViewMatrix () end
---* Get the frustum's near plane.
---@return float
function Camera:getNearPlane () end
---* 
---@param src vec3_table
---@return vec2_table
function Camera:project (src) end
---* 
---@param flag int
---@return self
function Camera:setCameraFlag (flag) end
---* Get the frustum's far plane.
---@return float
function Camera:getFarPlane () end
---* Whether or not the viewprojection matrix was updated since the last frame.<br>
---* return True if the viewprojection matrix was updated since the last frame.
---@return boolean
function Camera:isViewProjectionUpdated () end
---* 
---@param fieldOfView float
---@param aspectRatio float
---@param nearPlane float
---@param farPlane float
---@return boolean
function Camera:initPerspective (fieldOfView,aspectRatio,nearPlane,farPlane) end
---* 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 nearPlane The near plane distance.<br>
---* param farPlane The far plane distance.
---@param zoomX float
---@param zoomY float
---@param nearPlane float
---@param farPlane float
---@return self
function Camera:createOrthographic (zoomX,zoomY,nearPlane,farPlane) end
---* Get the visiting camera , the visiting camera shall be set on Scene::render
---@return self
function Camera:getVisitingCamera () end
---*  create default camera, the camera type depends on Director::getProjection, the depth of the default camera is 0 
---@return self
function Camera:create () end
---* 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.
---@param fieldOfView float
---@param aspectRatio float
---@param nearPlane float
---@param farPlane float
---@return self
function Camera:createPerspective (fieldOfView,aspectRatio,nearPlane,farPlane) end
---* 
---@return cc.Viewport
function Camera:getDefaultViewport () end
---* 
---@param vp cc.Viewport
---@return self
function Camera:setDefaultViewport (vp) end
---* Get the default camera of the current running scene.
---@return self
function Camera:getDefaultCamera () end
---* 
---@param renderer cc.Renderer
---@param parentTransform mat4_table
---@param parentFlags unsigned_int
---@return self
function Camera:visit (renderer,parentTransform,parentFlags) end
---* 
---@return self
function Camera:Camera () end