[DOCS] Camera documentation

This commit is contained in:
mhilbrunner 2017-10-07 18:12:47 +02:00 committed by mhilbrunner
parent bd10a00240
commit 255f30a9b7

View file

@ -15,6 +15,7 @@
<return type="void"> <return type="void">
</return> </return>
<description> <description>
If this is the current Camera, remove it from being current. If it is inside the node tree, request to make the next Camera current, if any.
</description> </description>
</method> </method>
<method name="get_camera_transform" qualifiers="const"> <method name="get_camera_transform" qualifiers="const">
@ -28,6 +29,7 @@
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Returns the culling mask, describing which 3D render layers are rendered by this Camera.
</description> </description>
</method> </method>
<method name="get_doppler_tracking" qualifiers="const"> <method name="get_doppler_tracking" qualifiers="const">
@ -40,30 +42,35 @@
<return type="Environment"> <return type="Environment">
</return> </return>
<description> <description>
Returns the [Environment] used by this Camera.
</description> </description>
</method> </method>
<method name="get_fov" qualifiers="const"> <method name="get_fov" qualifiers="const">
<return type="float"> <return type="float">
</return> </return>
<description> <description>
Returns the [i]FOV[/i] Y angle in degrees (FOV means Field of View).
</description> </description>
</method> </method>
<method name="get_h_offset" qualifiers="const"> <method name="get_h_offset" qualifiers="const">
<return type="float"> <return type="float">
</return> </return>
<description> <description>
Returns the horizontal (X) offset of the Camera viewport.
</description> </description>
</method> </method>
<method name="get_keep_aspect_mode" qualifiers="const"> <method name="get_keep_aspect_mode" qualifiers="const">
<return type="int" enum="Camera.KeepAspect"> <return type="int" enum="Camera.KeepAspect">
</return> </return>
<description> <description>
Returns the current mode for keeping the aspect ratio. See [code]KEEP_*[/code] constants.
</description> </description>
</method> </method>
<method name="get_projection" qualifiers="const"> <method name="get_projection" qualifiers="const">
<return type="int" enum="Camera.Projection"> <return type="int" enum="Camera.Projection">
</return> </return>
<description> <description>
Returns the Camera's projection. See PROJECTION_* constants.
</description> </description>
</method> </method>
<method name="get_size" qualifiers="const"> <method name="get_size" qualifiers="const">
@ -76,25 +83,28 @@
<return type="float"> <return type="float">
</return> </return>
<description> <description>
Returns the vertical (Y) offset of the Camera viewport.
</description> </description>
</method> </method>
<method name="get_zfar" qualifiers="const"> <method name="get_zfar" qualifiers="const">
<return type="float"> <return type="float">
</return> </return>
<description> <description>
Returns the far clip plane in world space units.
</description> </description>
</method> </method>
<method name="get_znear" qualifiers="const"> <method name="get_znear" qualifiers="const">
<return type="float"> <return type="float">
</return> </return>
<description> <description>
Returns the near clip plane in world space units.
</description> </description>
</method> </method>
<method name="is_current" qualifiers="const"> <method name="is_current" qualifiers="const">
<return type="bool"> <return type="bool">
</return> </return>
<description> <description>
Return whether the Camera is the current one in the [Viewport], or plans to become current (if outside the scene tree). Returns [code]true[/code] if the Camera is the current one in the [Viewport], or plans to become current (if outside the scene tree).
</description> </description>
</method> </method>
<method name="is_position_behind" qualifiers="const"> <method name="is_position_behind" qualifiers="const">
@ -103,6 +113,7 @@
<argument index="0" name="world_point" type="Vector3"> <argument index="0" name="world_point" type="Vector3">
</argument> </argument>
<description> <description>
Returns [code]true[/code] if the given position is behind the Camera.
</description> </description>
</method> </method>
<method name="make_current"> <method name="make_current">
@ -126,6 +137,7 @@
<argument index="0" name="screen_point" type="Vector2"> <argument index="0" name="screen_point" type="Vector2">
</argument> </argument>
<description> <description>
Returns how a 2D coordinate in the Viewport rectangle maps to a 3D point in worldspace.
</description> </description>
</method> </method>
<method name="project_ray_normal" qualifiers="const"> <method name="project_ray_normal" qualifiers="const">
@ -134,7 +146,7 @@
<argument index="0" name="screen_point" type="Vector2"> <argument index="0" name="screen_point" type="Vector2">
</argument> </argument>
<description> <description>
Return a normal vector in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin,normal) for object intersection or picking. Returns a normal vector in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking.
</description> </description>
</method> </method>
<method name="project_ray_origin" qualifiers="const"> <method name="project_ray_origin" qualifiers="const">
@ -143,7 +155,7 @@
<argument index="0" name="screen_point" type="Vector2"> <argument index="0" name="screen_point" type="Vector2">
</argument> </argument>
<description> <description>
Return a 3D position in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin,normal) for object intersection or picking. Returns a 3D position in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking.
</description> </description>
</method> </method>
<method name="set_cull_mask"> <method name="set_cull_mask">
@ -152,6 +164,7 @@
<argument index="0" name="mask" type="int"> <argument index="0" name="mask" type="int">
</argument> </argument>
<description> <description>
Sets the cull mask, describing which 3D render layers are rendered by this Camera.
</description> </description>
</method> </method>
<method name="set_doppler_tracking"> <method name="set_doppler_tracking">
@ -160,6 +173,7 @@
<argument index="0" name="mode" type="int" enum="Camera.DopplerTracking"> <argument index="0" name="mode" type="int" enum="Camera.DopplerTracking">
</argument> </argument>
<description> <description>
Changes Doppler effect tracking. See [code]DOPPLER_*[/code] constants.
</description> </description>
</method> </method>
<method name="set_environment"> <method name="set_environment">
@ -168,6 +182,7 @@
<argument index="0" name="env" type="Environment"> <argument index="0" name="env" type="Environment">
</argument> </argument>
<description> <description>
Sets the [Environment] to use for this Camera.
</description> </description>
</method> </method>
<method name="set_h_offset"> <method name="set_h_offset">
@ -176,6 +191,7 @@
<argument index="0" name="ofs" type="float"> <argument index="0" name="ofs" type="float">
</argument> </argument>
<description> <description>
Sets the horizontal (X) offset of the Camera viewport.
</description> </description>
</method> </method>
<method name="set_keep_aspect_mode"> <method name="set_keep_aspect_mode">
@ -184,6 +200,7 @@
<argument index="0" name="mode" type="int" enum="Camera.KeepAspect"> <argument index="0" name="mode" type="int" enum="Camera.KeepAspect">
</argument> </argument>
<description> <description>
Sets the mode for keeping the aspect ratio. See [code]KEEP_*[/code] constants.
</description> </description>
</method> </method>
<method name="set_orthogonal"> <method name="set_orthogonal">
@ -218,6 +235,7 @@
<argument index="0" name="ofs" type="float"> <argument index="0" name="ofs" type="float">
</argument> </argument>
<description> <description>
Sets the vertical (Y) offset of the Camera viewport.
</description> </description>
</method> </method>
<method name="unproject_position" qualifiers="const"> <method name="unproject_position" qualifiers="const">
@ -226,7 +244,7 @@
<argument index="0" name="world_point" type="Vector3"> <argument index="0" name="world_point" type="Vector3">
</argument> </argument>
<description> <description>
Return how a 3D point in worldspace maps to a 2D coordinate in the [Viewport] rectangle. Returns how a 3D point in worldspace maps to a 2D coordinate in the [Viewport] rectangle.
</description> </description>
</method> </method>
</methods> </methods>
@ -238,14 +256,19 @@
Orthogonal Projection (objects remain the same size on the screen no matter how far away they are). Orthogonal Projection (objects remain the same size on the screen no matter how far away they are).
</constant> </constant>
<constant name="KEEP_WIDTH" value="0"> <constant name="KEEP_WIDTH" value="0">
Try to keep the aspect ratio when scaling the Camera's viewport to the screen. If not possible, preserve the viewport's width by changing the height. Height is [code]sizey[/code] for orthographic projection, [code]fovy[/code] for perspective projection.
</constant> </constant>
<constant name="KEEP_HEIGHT" value="1"> <constant name="KEEP_HEIGHT" value="1">
Try to keep the aspect ratio when scaling the Camera's viewport to the screen. If not possible, preserve the viewport's height by changing the width. Width is [code]sizex[/code] for orthographic projection, [code]fovx[/code] for perspective projection.
</constant> </constant>
<constant name="DOPPLER_TRACKING_DISABLED" value="0"> <constant name="DOPPLER_TRACKING_DISABLED" value="0">
Disable Doppler effect simulation (default).
</constant> </constant>
<constant name="DOPPLER_TRACKING_IDLE_STEP" value="1"> <constant name="DOPPLER_TRACKING_IDLE_STEP" value="1">
Simulate Doppler effect by tracking positions of objects that are changed in [code]_process[/code]. Changes in the relative velocity of this Camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]).
</constant> </constant>
<constant name="DOPPLER_TRACKING_FIXED_STEP" value="2"> <constant name="DOPPLER_TRACKING_FIXED_STEP" value="2">
Simulate Doppler effect by tracking positions of objects that are changed in [code]_physics_process[/code]. Changes in the relative velocity of this Camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]).
</constant> </constant>
</constants> </constants>
</class> </class>