diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst new file mode 100644 index 000000000..af6f435c5 --- /dev/null +++ b/classes/class_@gdscript.rst @@ -0,0 +1,530 @@ +.. _class_@GDScript: + +@GDScript +========= + +Category: Core +-------------- + +Brief Description +----------------- + +Built-in GDScript functions. + +Member Functions +---------------- + ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`sin` **(** :ref:`float` s **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`cos` **(** :ref:`float` s **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`tan` **(** :ref:`float` s **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`sinh` **(** :ref:`float` s **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`cosh` **(** :ref:`float` s **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`tanh` **(** :ref:`float` s **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`asin` **(** :ref:`float` s **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`acos` **(** :ref:`float` s **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`atan` **(** :ref:`float` s **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`atan2` **(** :ref:`float` x, :ref:`float` y **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`sqrt` **(** :ref:`float` s **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`fmod` **(** :ref:`float` x, :ref:`float` y **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`fposmod` **(** :ref:`float` x, :ref:`float` y **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`floor` **(** :ref:`float` s **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`ceil` **(** :ref:`float` s **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`round` **(** :ref:`float` s **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`abs` **(** :ref:`float` s **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`sign` **(** :ref:`float` s **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`pow` **(** :ref:`float` x, :ref:`float` y **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`log` **(** :ref:`float` s **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`exp` **(** :ref:`float` s **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`isnan` **(** :ref:`float` s **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`isinf` **(** :ref:`float` s **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`ease` **(** :ref:`float` s, :ref:`float` curve **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`decimals` **(** :ref:`float` step **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`stepify` **(** :ref:`float` s, :ref:`float` step **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`lerp` **(** :ref:`float` from, :ref:`float` to, :ref:`float` weight **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`dectime` **(** :ref:`float` value, :ref:`float` amount, :ref:`float` step **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Nil` | :ref:`randomize` **(** **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`randi` **(** **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`randf` **(** **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`rand_range` **(** :ref:`float` from, :ref:`float` to **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Nil` | :ref:`seed` **(** :ref:`float` seed **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`rand_seed` **(** :ref:`float` seed **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`deg2rad` **(** :ref:`float` deg **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`rad2deg` **(** :ref:`float` rad **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`linear2db` **(** :ref:`float` nrg **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`db2linear` **(** :ref:`float` db **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`max` **(** :ref:`float` a, :ref:`float` b **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`min` **(** :ref:`float` a, :ref:`float` b **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`clamp` **(** :ref:`float` val, :ref:`float` min, :ref:`float` max **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`nearest_po2` **(** :ref:`int` val **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`WeakRef` | :ref:`weakref` **(** :ref:`Object` obj **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`FuncRef` | :ref:`funcref` **(** :ref:`Object` instance, :ref:`String` funcname **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`convert` **(** Variant what, :ref:`int` type **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`typeof` **(** Variant what **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`str` **(** Variant what, Variant ... **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Nil` | :ref:`print` **(** Variant what, Variant ... **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Nil` | :ref:`printt` **(** Variant what, Variant ... **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Nil` | :ref:`prints` **(** Variant what, Variant ... **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Nil` | :ref:`printerr` **(** Variant what, Variant ... **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Nil` | :ref:`printraw` **(** Variant what, Variant ... **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`var2str` **(** Variant var **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Variant | :ref:`str2var` **(** :ref:`String` string **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RawArray` | :ref:`var2bytes` **(** Variant var **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Variant | :ref:`bytes2var` **(** :ref:`RawArray` bytes **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`range` **(** Variant ... **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Resource` | :ref:`load` **(** :ref:`String` path **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`inst2dict` **(** :ref:`Object` inst **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`dict2inst` **(** :ref:`Dictionary` dict **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`hash` **(** Variant var:Variant **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`Color8` **(** :ref:`int` r8, :ref:`int` g8, :ref:`int` b8, :ref:`int` a8 **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Nil` | :ref:`print_stack` **(** **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`instance_from_id` **(** :ref:`int` instance_id **)** | ++--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **PI** = **3.141593** --- Constant that represents how many times the diameter of a circumference fits around it's perimeter. + +Description +----------- + +This contains the list of built-in gdscript functions. Mostly math functions and other utilities. Everything else is expanded by objects. + +Member Function Description +--------------------------- + +.. _class_@GDScript_sin: + +- :ref:`float` **sin** **(** :ref:`float` s **)** + +Standard sine function. + +.. _class_@GDScript_cos: + +- :ref:`float` **cos** **(** :ref:`float` s **)** + +Standard cosine function. + +.. _class_@GDScript_tan: + +- :ref:`float` **tan** **(** :ref:`float` s **)** + +Standard tangent function. + +.. _class_@GDScript_sinh: + +- :ref:`float` **sinh** **(** :ref:`float` s **)** + +Hyperbolic sine. + +.. _class_@GDScript_cosh: + +- :ref:`float` **cosh** **(** :ref:`float` s **)** + +Hyperbolic cosine. + +.. _class_@GDScript_tanh: + +- :ref:`float` **tanh** **(** :ref:`float` s **)** + +Hyperbolic tangent. + +.. _class_@GDScript_asin: + +- :ref:`float` **asin** **(** :ref:`float` s **)** + +Arc-sine. + +.. _class_@GDScript_acos: + +- :ref:`float` **acos** **(** :ref:`float` s **)** + +Arc-cosine. + +.. _class_@GDScript_atan: + +- :ref:`float` **atan** **(** :ref:`float` s **)** + +Arc-tangent. + +.. _class_@GDScript_atan2: + +- :ref:`float` **atan2** **(** :ref:`float` x, :ref:`float` y **)** + +Arc-tangent that takes a 2D vector as argument, retuns the full -pi to +pi range. + +.. _class_@GDScript_sqrt: + +- :ref:`float` **sqrt** **(** :ref:`float` s **)** + +Square root. + +.. _class_@GDScript_fmod: + +- :ref:`float` **fmod** **(** :ref:`float` x, :ref:`float` y **)** + +Module (remainder of x/y). + +.. _class_@GDScript_fposmod: + +- :ref:`float` **fposmod** **(** :ref:`float` x, :ref:`float` y **)** + +Module (remainder of x/y) that wraps equally in positive and negative. + +.. _class_@GDScript_floor: + +- :ref:`float` **floor** **(** :ref:`float` s **)** + +Floor (rounds down to nearest integer). + +.. _class_@GDScript_ceil: + +- :ref:`float` **ceil** **(** :ref:`float` s **)** + +Ceiling (rounds up to nearest integer). + +.. _class_@GDScript_round: + +- :ref:`float` **round** **(** :ref:`float` s **)** + +Round to nearest integer. + +.. _class_@GDScript_abs: + +- :ref:`float` **abs** **(** :ref:`float` s **)** + +Remove sign (works for integer and float). + +.. _class_@GDScript_sign: + +- :ref:`float` **sign** **(** :ref:`float` s **)** + +Return sign (-1 or +1). + +.. _class_@GDScript_pow: + +- :ref:`float` **pow** **(** :ref:`float` x, :ref:`float` y **)** + +Power function, x elevate to y. + +.. _class_@GDScript_log: + +- :ref:`float` **log** **(** :ref:`float` s **)** + +Natural logarithm. + +.. _class_@GDScript_exp: + +- :ref:`float` **exp** **(** :ref:`float` s **)** + +Exponential logarithm. + +.. _class_@GDScript_isnan: + +- :ref:`float` **isnan** **(** :ref:`float` s **)** + +Return true if the float is not a number. + +.. _class_@GDScript_isinf: + +- :ref:`float` **isinf** **(** :ref:`float` s **)** + +Return true if the float is infinite. + +.. _class_@GDScript_ease: + +- :ref:`float` **ease** **(** :ref:`float` s, :ref:`float` curve **)** + +Easing function, based on exponent. 0 is constant, 1 is linear, 0 to 1 is ease-in, 1+ is ease out. Negative values are in-out/out in. + +.. _class_@GDScript_decimals: + +- :ref:`float` **decimals** **(** :ref:`float` step **)** + +Return the amount of decimals in the floating point value. + +.. _class_@GDScript_stepify: + +- :ref:`float` **stepify** **(** :ref:`float` s, :ref:`float` step **)** + +Snap float value to a given step. + +.. _class_@GDScript_lerp: + +- :ref:`float` **lerp** **(** :ref:`float` from, :ref:`float` to, :ref:`float` weight **)** + +Linear interpolates between two values by a normalized value. + +.. _class_@GDScript_dectime: + +- :ref:`float` **dectime** **(** :ref:`float` value, :ref:`float` amount, :ref:`float` step **)** + +Decreases time by a specified amount. + +.. _class_@GDScript_randomize: + +- :ref:`Nil` **randomize** **(** **)** + +Reset the seed of the random number generator with a new, different one. + +.. _class_@GDScript_randi: + +- :ref:`int` **randi** **(** **)** + +Random 32 bits value (integer). To obtain a value from 0 to N, you can use remainder, like (for random from 0 to 19): randi() % 20. + +.. _class_@GDScript_randf: + +- :ref:`float` **randf** **(** **)** + +Random value (0 to 1 float). + +.. _class_@GDScript_rand_range: + +- :ref:`float` **rand_range** **(** :ref:`float` from, :ref:`float` to **)** + +Random range, any floating point value between 'from' and 'to' + +.. _class_@GDScript_seed: + +- :ref:`Nil` **seed** **(** :ref:`float` seed **)** + +.. _class_@GDScript_rand_seed: + +- :ref:`Array` **rand_seed** **(** :ref:`float` seed **)** + +Random from seed, pass a seed and an array with both number and new seed is returned. + +.. _class_@GDScript_deg2rad: + +- :ref:`float` **deg2rad** **(** :ref:`float` deg **)** + +Convert from degrees to radians. + +.. _class_@GDScript_rad2deg: + +- :ref:`float` **rad2deg** **(** :ref:`float` rad **)** + +Convert from radias to degrees. + +.. _class_@GDScript_linear2db: + +- :ref:`float` **linear2db** **(** :ref:`float` nrg **)** + +Convert from linear energy to decibels (audio). + +.. _class_@GDScript_db2linear: + +- :ref:`float` **db2linear** **(** :ref:`float` db **)** + +Convert from decibels to linear energy (audio). + +.. _class_@GDScript_max: + +- :ref:`float` **max** **(** :ref:`float` a, :ref:`float` b **)** + +Return the maximum of two values. + +.. _class_@GDScript_min: + +- :ref:`float` **min** **(** :ref:`float` a, :ref:`float` b **)** + +Return the minimum of two values. + +.. _class_@GDScript_clamp: + +- :ref:`float` **clamp** **(** :ref:`float` val, :ref:`float` min, :ref:`float` max **)** + +Clamp both values to a range. + +.. _class_@GDScript_nearest_po2: + +- :ref:`int` **nearest_po2** **(** :ref:`int` val **)** + +Return the nearest larger power of 2 for an integer. + +.. _class_@GDScript_weakref: + +- :ref:`WeakRef` **weakref** **(** :ref:`Object` obj **)** + +Return a weak reference to an object. + +.. _class_@GDScript_funcref: + +- :ref:`FuncRef` **funcref** **(** :ref:`Object` instance, :ref:`String` funcname **)** + +Returns a reference to the specified function + +.. _class_@GDScript_convert: + +- :ref:`Object` **convert** **(** Variant what, :ref:`int` type **)** + +Convert from a type to another in the best way possible. The "type" parameter uses the enum TYPE_* in :ref:`@Global Scope`. + +.. _class_@GDScript_typeof: + +- :ref:`int` **typeof** **(** Variant what **)** + +Returns the internal type of the given Variant object, using the TYPE_* enum in :ref:`@Global Scope`. + +.. _class_@GDScript_str: + +- :ref:`String` **str** **(** Variant what, Variant ... **)** + +Convert one or more arguments to strings in the best way possible. + +.. _class_@GDScript_print: + +- :ref:`Nil` **print** **(** Variant what, Variant ... **)** + +Print one or more arguments to strings in the best way possible to a console line. + +.. _class_@GDScript_printt: + +- :ref:`Nil` **printt** **(** Variant what, Variant ... **)** + +Print one or more arguments to the console with a tab between each argument. + +.. _class_@GDScript_prints: + +- :ref:`Nil` **prints** **(** Variant what, Variant ... **)** + +.. _class_@GDScript_printerr: + +- :ref:`Nil` **printerr** **(** Variant what, Variant ... **)** + +Print one or more arguments to strings in the best way possible to standard error line. + +.. _class_@GDScript_printraw: + +- :ref:`Nil` **printraw** **(** Variant what, Variant ... **)** + +Print one or more arguments to strings in the best way possible to console. No newline is added at the end. + +.. _class_@GDScript_var2str: + +- :ref:`String` **var2str** **(** Variant var **)** + +Converts the value of a variable to a String. + +.. _class_@GDScript_str2var: + +- Variant **str2var** **(** :ref:`String` string **)** + +.. _class_@GDScript_var2bytes: + +- :ref:`RawArray` **var2bytes** **(** Variant var **)** + +.. _class_@GDScript_bytes2var: + +- Variant **bytes2var** **(** :ref:`RawArray` bytes **)** + +.. _class_@GDScript_range: + +- :ref:`Array` **range** **(** Variant ... **)** + +Return an array with the given range. Range can be 1 argument N (0 to N-1), two arguments (initial, final-1) or three arguments (initial,final-1,increment). + +.. _class_@GDScript_load: + +- :ref:`Resource` **load** **(** :ref:`String` path **)** + +Load a resource from the filesystem, pass a valid path as argument. + +.. _class_@GDScript_inst2dict: + +- :ref:`Dictionary` **inst2dict** **(** :ref:`Object` inst **)** + +Convert a script class instance to a dictionary (useful for serializing). + +.. _class_@GDScript_dict2inst: + +- :ref:`Object` **dict2inst** **(** :ref:`Dictionary` dict **)** + +Convert a previously converted instances to dictionary back into an instance. Useful for deserializing. + +.. _class_@GDScript_hash: + +- :ref:`int` **hash** **(** Variant var:Variant **)** + +Hashes the variable passed and returns an integer. + +.. _class_@GDScript_Color8: + +- :ref:`Color` **Color8** **(** :ref:`int` r8, :ref:`int` g8, :ref:`int` b8, :ref:`int` a8 **)** + +.. _class_@GDScript_print_stack: + +- :ref:`Nil` **print_stack** **(** **)** + +Print a stack track at code location, only works when running with debugger turned on. + +.. _class_@GDScript_instance_from_id: + +- :ref:`Object` **instance_from_id** **(** :ref:`int` instance_id **)** + + diff --git a/classes/class_@global scope.rst b/classes/class_@global scope.rst new file mode 100644 index 000000000..e4c00743b --- /dev/null +++ b/classes/class_@global scope.rst @@ -0,0 +1,496 @@ +.. _class_@Global Scope: + +@Global Scope +============= + +Category: Core +-------------- + +Brief Description +----------------- + +Global scope constants and variables. + +Member Variables +---------------- + +- :ref:`Performance` **Performance** +- :ref:`Globals` **Globals** +- :ref:`IP` **IP** +- :ref:`Geometry` **Geometry** +- :ref:`ResourceLoader` **ResourceLoader** +- :ref:`ResourceSaver` **ResourceSaver** +- :ref:`PathRemap` **PathRemap** +- :ref:`OS` **OS** +- :ref:`Reference` **Marshalls** +- :ref:`TranslationServer` **TranslationServer** +- :ref:`TranslationServer` **TS** +- :ref:`Input` **Input** +- :ref:`InputMap` **InputMap** +- :ref:`VisualServer` **VisualServer** +- :ref:`VisualServer` **VS** +- :ref:`AudioServer` **AudioServer** +- :ref:`AudioServer` **AS** +- :ref:`PhysicsServer` **PhysicsServer** +- :ref:`PhysicsServer` **PS** +- :ref:`Physics2DServer` **Physics2DServer** +- :ref:`Physics2DServer` **PS2D** +- :ref:`SpatialSoundServer` **SpatialSoundServer** +- :ref:`SpatialSoundServer` **SS** +- :ref:`SpatialSound2DServer` **SpatialSound2DServer** +- :ref:`SpatialSound2DServer` **SS2D** + +Numeric Constants +----------------- + +- **MARGIN_LEFT** = **0** --- Left margin, used usually for :ref:`Control` or :ref:`StyleBox` derived classes. +- **MARGIN_TOP** = **1** --- Top margin, used usually for :ref:`Control` or :ref:`StyleBox` derived classes. +- **MARGIN_RIGHT** = **2** --- Right margin, used usually for :ref:`Control` or :ref:`StyleBox` derived classes. +- **MARGIN_BOTTOM** = **3** --- Bottom margin, used usually for :ref:`Control` or :ref:`StyleBox` derived classes. +- **VERTICAL** = **1** --- General vertical alignment, used usually for :ref:`Separator`, :ref:`ScrollBar`, :ref:`Slider`, etc. +- **HORIZONTAL** = **0** --- General horizontal alignment, used usually for :ref:`Separator`, :ref:`ScrollBar`, :ref:`Slider`, etc. +- **HALIGN_LEFT** = **0** --- Horizontal left alignment, usually for text-derived classes. +- **HALIGN_CENTER** = **1** --- Horizontal center alignment, usually for text-derived classes. +- **HALIGN_RIGHT** = **2** --- Horizontal right alignment, usually for text-derived classes. +- **VALIGN_TOP** = **0** --- Vertical top alignment, usually for text-derived classes. +- **VALIGN_CENTER** = **1** --- Vertical center alignment, usually for text-derived classes. +- **VALIGN_BOTTOM** = **2** --- Vertical bottom alignment, usually for text-derived classes. +- **SPKEY** = **16777216** --- Scancodes with this bit applied are non printable. +- **KEY_ESCAPE** = **16777217** --- Escape Key +- **KEY_TAB** = **16777218** --- Tab Key +- **KEY_BACKTAB** = **16777219** --- Shift-Tab key +- **KEY_BACKSPACE** = **16777220** +- **KEY_RETURN** = **16777221** +- **KEY_ENTER** = **16777222** +- **KEY_INSERT** = **16777223** +- **KEY_DELETE** = **16777224** +- **KEY_PAUSE** = **16777225** +- **KEY_PRINT** = **16777226** +- **KEY_SYSREQ** = **16777227** +- **KEY_CLEAR** = **16777228** +- **KEY_HOME** = **16777229** +- **KEY_END** = **16777230** +- **KEY_LEFT** = **16777231** +- **KEY_UP** = **16777232** +- **KEY_RIGHT** = **16777233** +- **KEY_DOWN** = **16777234** +- **KEY_PAGEUP** = **16777235** +- **KEY_PAGEDOWN** = **16777236** +- **KEY_SHIFT** = **16777237** +- **KEY_CONTROL** = **16777238** +- **KEY_META** = **16777239** +- **KEY_ALT** = **16777240** +- **KEY_CAPSLOCK** = **16777241** +- **KEY_NUMLOCK** = **16777242** +- **KEY_SCROLLLOCK** = **16777243** +- **KEY_F1** = **16777244** +- **KEY_F2** = **16777245** +- **KEY_F3** = **16777246** +- **KEY_F4** = **16777247** +- **KEY_F5** = **16777248** +- **KEY_F6** = **16777249** +- **KEY_F7** = **16777250** +- **KEY_F8** = **16777251** +- **KEY_F9** = **16777252** +- **KEY_F10** = **16777253** +- **KEY_F11** = **16777254** +- **KEY_F12** = **16777255** +- **KEY_F13** = **16777256** +- **KEY_F14** = **16777257** +- **KEY_F15** = **16777258** +- **KEY_F16** = **16777259** +- **KEY_KP_ENTER** = **16777344** +- **KEY_KP_MULTIPLY** = **16777345** +- **KEY_KP_DIVIDE** = **16777346** +- **KEY_KP_SUBSTRACT** = **16777347** +- **KEY_KP_PERIOD** = **16777348** +- **KEY_KP_ADD** = **16777349** +- **KEY_KP_0** = **16777350** +- **KEY_KP_1** = **16777351** +- **KEY_KP_2** = **16777352** +- **KEY_KP_3** = **16777353** +- **KEY_KP_4** = **16777354** +- **KEY_KP_5** = **16777355** +- **KEY_KP_6** = **16777356** +- **KEY_KP_7** = **16777357** +- **KEY_KP_8** = **16777358** +- **KEY_KP_9** = **16777359** +- **KEY_SUPER_L** = **16777260** +- **KEY_SUPER_R** = **16777261** +- **KEY_MENU** = **16777262** +- **KEY_HYPER_L** = **16777263** +- **KEY_HYPER_R** = **16777264** +- **KEY_HELP** = **16777265** +- **KEY_DIRECTION_L** = **16777266** +- **KEY_DIRECTION_R** = **16777267** +- **KEY_BACK** = **16777280** +- **KEY_FORWARD** = **16777281** +- **KEY_STOP** = **16777282** +- **KEY_REFRESH** = **16777283** +- **KEY_VOLUMEDOWN** = **16777284** +- **KEY_VOLUMEMUTE** = **16777285** +- **KEY_VOLUMEUP** = **16777286** +- **KEY_BASSBOOST** = **16777287** +- **KEY_BASSUP** = **16777288** +- **KEY_BASSDOWN** = **16777289** +- **KEY_TREBLEUP** = **16777290** +- **KEY_TREBLEDOWN** = **16777291** +- **KEY_MEDIAPLAY** = **16777292** +- **KEY_MEDIASTOP** = **16777293** +- **KEY_MEDIAPREVIOUS** = **16777294** +- **KEY_MEDIANEXT** = **16777295** +- **KEY_MEDIARECORD** = **16777296** +- **KEY_HOMEPAGE** = **16777297** +- **KEY_FAVORITES** = **16777298** +- **KEY_SEARCH** = **16777299** +- **KEY_STANDBY** = **16777300** +- **KEY_OPENURL** = **16777301** +- **KEY_LAUNCHMAIL** = **16777302** +- **KEY_LAUNCHMEDIA** = **16777303** +- **KEY_LAUNCH0** = **16777304** +- **KEY_LAUNCH1** = **16777305** +- **KEY_LAUNCH2** = **16777306** +- **KEY_LAUNCH3** = **16777307** +- **KEY_LAUNCH4** = **16777308** +- **KEY_LAUNCH5** = **16777309** +- **KEY_LAUNCH6** = **16777310** +- **KEY_LAUNCH7** = **16777311** +- **KEY_LAUNCH8** = **16777312** +- **KEY_LAUNCH9** = **16777313** +- **KEY_LAUNCHA** = **16777314** +- **KEY_LAUNCHB** = **16777315** +- **KEY_LAUNCHC** = **16777316** +- **KEY_LAUNCHD** = **16777317** +- **KEY_LAUNCHE** = **16777318** +- **KEY_LAUNCHF** = **16777319** +- **KEY_UNKNOWN** = **33554431** +- **KEY_SPACE** = **32** +- **KEY_EXCLAM** = **33** +- **KEY_QUOTEDBL** = **34** +- **KEY_NUMBERSIGN** = **35** +- **KEY_DOLLAR** = **36** +- **KEY_PERCENT** = **37** +- **KEY_AMPERSAND** = **38** +- **KEY_APOSTROPHE** = **39** +- **KEY_PARENLEFT** = **40** +- **KEY_PARENRIGHT** = **41** +- **KEY_ASTERISK** = **42** +- **KEY_PLUS** = **43** +- **KEY_COMMA** = **44** +- **KEY_MINUS** = **45** +- **KEY_PERIOD** = **46** +- **KEY_SLASH** = **47** +- **KEY_0** = **48** +- **KEY_1** = **49** +- **KEY_2** = **50** +- **KEY_3** = **51** +- **KEY_4** = **52** +- **KEY_5** = **53** +- **KEY_6** = **54** +- **KEY_7** = **55** +- **KEY_8** = **56** +- **KEY_9** = **57** +- **KEY_COLON** = **58** +- **KEY_SEMICOLON** = **59** +- **KEY_LESS** = **60** +- **KEY_EQUAL** = **61** +- **KEY_GREATER** = **62** +- **KEY_QUESTION** = **63** +- **KEY_AT** = **64** +- **KEY_A** = **65** +- **KEY_B** = **66** +- **KEY_C** = **67** +- **KEY_D** = **68** +- **KEY_E** = **69** +- **KEY_F** = **70** +- **KEY_G** = **71** +- **KEY_H** = **72** +- **KEY_I** = **73** +- **KEY_J** = **74** +- **KEY_K** = **75** +- **KEY_L** = **76** +- **KEY_M** = **77** +- **KEY_N** = **78** +- **KEY_O** = **79** +- **KEY_P** = **80** +- **KEY_Q** = **81** +- **KEY_R** = **82** +- **KEY_S** = **83** +- **KEY_T** = **84** +- **KEY_U** = **85** +- **KEY_V** = **86** +- **KEY_W** = **87** +- **KEY_X** = **88** +- **KEY_Y** = **89** +- **KEY_Z** = **90** +- **KEY_BRACKETLEFT** = **91** +- **KEY_BACKSLASH** = **92** +- **KEY_BRACKETRIGHT** = **93** +- **KEY_ASCIICIRCUM** = **94** +- **KEY_UNDERSCORE** = **95** +- **KEY_QUOTELEFT** = **96** +- **KEY_BRACELEFT** = **123** +- **KEY_BAR** = **124** +- **KEY_BRACERIGHT** = **125** +- **KEY_ASCIITILDE** = **126** +- **KEY_NOBREAKSPACE** = **160** +- **KEY_EXCLAMDOWN** = **161** +- **KEY_CENT** = **162** +- **KEY_STERLING** = **163** +- **KEY_CURRENCY** = **164** +- **KEY_YEN** = **165** +- **KEY_BROKENBAR** = **166** +- **KEY_SECTION** = **167** +- **KEY_DIAERESIS** = **168** +- **KEY_COPYRIGHT** = **169** +- **KEY_ORDFEMININE** = **170** +- **KEY_GUILLEMOTLEFT** = **171** +- **KEY_NOTSIGN** = **172** +- **KEY_HYPHEN** = **173** +- **KEY_REGISTERED** = **174** +- **KEY_MACRON** = **175** +- **KEY_DEGREE** = **176** +- **KEY_PLUSMINUS** = **177** +- **KEY_TWOSUPERIOR** = **178** +- **KEY_THREESUPERIOR** = **179** +- **KEY_ACUTE** = **180** +- **KEY_MU** = **181** +- **KEY_PARAGRAPH** = **182** +- **KEY_PERIODCENTERED** = **183** +- **KEY_CEDILLA** = **184** +- **KEY_ONESUPERIOR** = **185** +- **KEY_MASCULINE** = **186** +- **KEY_GUILLEMOTRIGHT** = **187** +- **KEY_ONEQUARTER** = **188** +- **KEY_ONEHALF** = **189** +- **KEY_THREEQUARTERS** = **190** +- **KEY_QUESTIONDOWN** = **191** +- **KEY_AGRAVE** = **192** +- **KEY_AACUTE** = **193** +- **KEY_ACIRCUMFLEX** = **194** +- **KEY_ATILDE** = **195** +- **KEY_ADIAERESIS** = **196** +- **KEY_ARING** = **197** +- **KEY_AE** = **198** +- **KEY_CCEDILLA** = **199** +- **KEY_EGRAVE** = **200** +- **KEY_EACUTE** = **201** +- **KEY_ECIRCUMFLEX** = **202** +- **KEY_EDIAERESIS** = **203** +- **KEY_IGRAVE** = **204** +- **KEY_IACUTE** = **205** +- **KEY_ICIRCUMFLEX** = **206** +- **KEY_IDIAERESIS** = **207** +- **KEY_ETH** = **208** +- **KEY_NTILDE** = **209** +- **KEY_OGRAVE** = **210** +- **KEY_OACUTE** = **211** +- **KEY_OCIRCUMFLEX** = **212** +- **KEY_OTILDE** = **213** +- **KEY_ODIAERESIS** = **214** +- **KEY_MULTIPLY** = **215** +- **KEY_OOBLIQUE** = **216** +- **KEY_UGRAVE** = **217** +- **KEY_UACUTE** = **218** +- **KEY_UCIRCUMFLEX** = **219** +- **KEY_UDIAERESIS** = **220** +- **KEY_YACUTE** = **221** +- **KEY_THORN** = **222** +- **KEY_SSHARP** = **223** +- **KEY_DIVISION** = **247** +- **KEY_YDIAERESIS** = **255** +- **KEY_CODE_MASK** = **33554431** +- **KEY_MODIFIER_MASK** = **-16777216** +- **KEY_MASK_SHIFT** = **33554432** +- **KEY_MASK_ALT** = **67108864** +- **KEY_MASK_META** = **134217728** +- **KEY_MASK_CTRL** = **268435456** +- **KEY_MASK_CMD** = **268435456** +- **KEY_MASK_KPAD** = **536870912** +- **KEY_MASK_GROUP_SWITCH** = **1073741824** +- **BUTTON_LEFT** = **1** +- **BUTTON_RIGHT** = **2** +- **BUTTON_MIDDLE** = **3** +- **BUTTON_WHEEL_UP** = **4** +- **BUTTON_WHEEL_DOWN** = **5** +- **BUTTON_WHEEL_LEFT** = **6** +- **BUTTON_WHEEL_RIGHT** = **7** +- **BUTTON_MASK_LEFT** = **1** +- **BUTTON_MASK_RIGHT** = **2** +- **BUTTON_MASK_MIDDLE** = **4** +- **JOY_BUTTON_0** = **0** --- Joystick Button 0 +- **JOY_BUTTON_1** = **1** --- Joystick Button 1 +- **JOY_BUTTON_2** = **2** --- Joystick Button 2 +- **JOY_BUTTON_3** = **3** --- Joystick Button 3 +- **JOY_BUTTON_4** = **4** --- Joystick Button 4 +- **JOY_BUTTON_5** = **5** --- Joystick Button 5 +- **JOY_BUTTON_6** = **6** --- Joystick Button 6 +- **JOY_BUTTON_7** = **7** --- Joystick Button 7 +- **JOY_BUTTON_8** = **8** --- Joystick Button 8 +- **JOY_BUTTON_9** = **9** --- Joystick Button 9 +- **JOY_BUTTON_10** = **10** --- Joystick Button 10 +- **JOY_BUTTON_11** = **11** --- Joystick Button 11 +- **JOY_BUTTON_12** = **12** --- Joystick Button 12 +- **JOY_BUTTON_13** = **13** --- Joystick Button 13 +- **JOY_BUTTON_14** = **14** --- Joystick Button 14 +- **JOY_BUTTON_15** = **15** --- Joystick Button 15 +- **JOY_BUTTON_MAX** = **16** --- Joystick Button 16 +- **JOY_SNES_A** = **1** +- **JOY_SNES_B** = **0** +- **JOY_SNES_X** = **3** +- **JOY_SNES_Y** = **2** +- **JOY_SONY_CIRCLE** = **1** +- **JOY_SONY_X** = **0** +- **JOY_SONY_SQUARE** = **2** +- **JOY_SONY_TRIANGLE** = **3** +- **JOY_SEGA_B** = **1** +- **JOY_SEGA_A** = **0** +- **JOY_SEGA_X** = **2** +- **JOY_SEGA_Y** = **3** +- **JOY_XBOX_B** = **1** +- **JOY_XBOX_A** = **0** +- **JOY_XBOX_X** = **2** +- **JOY_XBOX_Y** = **3** +- **JOY_DS_A** = **1** +- **JOY_DS_B** = **0** +- **JOY_DS_X** = **3** +- **JOY_DS_Y** = **2** +- **JOY_SELECT** = **10** +- **JOY_START** = **11** +- **JOY_DPAD_UP** = **12** +- **JOY_DPAD_DOWN** = **13** +- **JOY_DPAD_LEFT** = **14** +- **JOY_DPAD_RIGHT** = **15** +- **JOY_L** = **4** +- **JOY_L2** = **6** +- **JOY_L3** = **8** +- **JOY_R** = **5** +- **JOY_R2** = **7** +- **JOY_R3** = **9** +- **JOY_AXIS_0** = **0** +- **JOY_AXIS_1** = **1** +- **JOY_AXIS_2** = **2** +- **JOY_AXIS_3** = **3** +- **JOY_AXIS_4** = **4** +- **JOY_AXIS_5** = **5** +- **JOY_AXIS_6** = **6** +- **JOY_AXIS_7** = **7** +- **JOY_AXIS_MAX** = **8** +- **JOY_ANALOG_0_X** = **0** +- **JOY_ANALOG_0_Y** = **1** +- **JOY_ANALOG_1_X** = **2** +- **JOY_ANALOG_1_Y** = **3** +- **JOY_ANALOG_2_X** = **4** +- **JOY_ANALOG_2_Y** = **5** +- **JOY_ANALOG_L2** = **6** +- **JOY_ANALOG_R2** = **7** +- **OK** = **0** --- Functions that return :ref:`Error` return OK when everything went ok. Most functions don't return error anyway and/or just print errors to stdout. +- **FAILED** = **1** --- Generic fail return error. +- **ERR_UNAVAILABLE** = **2** +- **ERR_UNCONFIGURED** = **3** +- **ERR_UNAUTHORIZED** = **4** +- **ERR_PARAMETER_RANGE_ERROR** = **5** +- **ERR_OUT_OF_MEMORY** = **6** +- **ERR_FILE_NOT_FOUND** = **7** +- **ERR_FILE_BAD_DRIVE** = **8** +- **ERR_FILE_BAD_PATH** = **9** +- **ERR_FILE_NO_PERMISSION** = **10** +- **ERR_FILE_ALREADY_IN_USE** = **11** +- **ERR_FILE_CANT_OPEN** = **12** +- **ERR_FILE_CANT_WRITE** = **13** +- **ERR_FILE_CANT_READ** = **14** +- **ERR_FILE_UNRECOGNIZED** = **15** +- **ERR_FILE_CORRUPT** = **16** +- **ERR_FILE_MISSING_DEPENDENCIES** = **17** +- **ERR_FILE_EOF** = **18** +- **ERR_CANT_OPEN** = **19** +- **ERR_CANT_CREATE** = **20** +- **ERROR_QUERY_FAILED** = **21** +- **ERR_ALREADY_IN_USE** = **22** +- **ERR_LOCKED** = **23** +- **ERR_TIMEOUT** = **24** +- **ERR_CANT_AQUIRE_RESOURCE** = **28** +- **ERR_INVALID_DATA** = **30** +- **ERR_INVALID_PARAMETER** = **31** +- **ERR_ALREADY_EXISTS** = **32** +- **ERR_DOES_NOT_EXIST** = **33** +- **ERR_DATABASE_CANT_READ** = **34** +- **ERR_DATABASE_CANT_WRITE** = **35** +- **ERR_COMPILATION_FAILED** = **36** +- **ERR_METHOD_NOT_FOUND** = **37** +- **ERR_LINK_FAILED** = **38** +- **ERR_SCRIPT_FAILED** = **39** +- **ERR_CYCLIC_LINK** = **40** +- **ERR_BUSY** = **44** +- **ERR_HELP** = **46** +- **ERR_BUG** = **47** +- **ERR_WTF** = **49** +- **PROPERTY_HINT_NONE** = **0** --- No hint for edited property. +- **PROPERTY_HINT_RANGE** = **1** --- Hints that the string is a range, defined as "min,max" or "min,max,step". This is valid for integers and floats. +- **PROPERTY_HINT_EXP_RANGE** = **2** --- Hints that the string is an exponential range, defined as "min,max" or "min,max,step". This is valid for integers and floats. +- **PROPERTY_HINT_ENUM** = **3** --- Property hint for an enumerated value, like "Hello,Something,Else". This is valid for integer, float and string properties. +- **PROPERTY_HINT_EXP_EASING** = **4** +- **PROPERTY_HINT_LENGTH** = **5** +- **PROPERTY_HINT_KEY_ACCEL** = **7** +- **PROPERTY_HINT_FLAGS** = **8** --- Property hint for a bitmask description, for bits 0,1,2,3 and 5 the hint would be like "Bit0,Bit1,Bit2,Bit3,,Bit5". Valid only for integers. +- **PROPERTY_HINT_ALL_FLAGS** = **9** --- Property hint for a bitmask description that covers all 32 bits. Valid only for integers. +- **PROPERTY_HINT_FILE** = **10** --- String property is a file (so pop up a file dialog when edited). Hint string can be a set of wildcards like "*.doc". +- **PROPERTY_HINT_DIR** = **11** --- String property is a directory (so pop up a file dialog when edited). +- **PROPERTY_HINT_GLOBAL_FILE** = **12** +- **PROPERTY_HINT_GLOBAL_DIR** = **13** +- **PROPERTY_HINT_RESOURCE_TYPE** = **14** --- String property is a resource, so open the resource popup menu when edited. +- **PROPERTY_HINT_MULTILINE_TEXT** = **15** +- **PROPERTY_HINT_COLOR_NO_ALPHA** = **16** +- **PROPERTY_HINT_IMAGE_COMPRESS_LOSSY** = **17** +- **PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS** = **18** +- **PROPERTY_USAGE_STORAGE** = **1** --- Property will be used as storage (default). +- **PROPERTY_USAGE_STORAGE** = **1** --- Property will be used as storage (default). +- **PROPERTY_USAGE_EDITOR** = **2** --- Property will be visible in editor (default). +- **PROPERTY_USAGE_NETWORK** = **4** +- **PROPERTY_USAGE_DEFAULT** = **7** --- Default usage (storage and editor). +- **METHOD_FLAG_NORMAL** = **1** +- **METHOD_FLAG_EDITOR** = **2** +- **METHOD_FLAG_NOSCRIPT** = **4** +- **METHOD_FLAG_CONST** = **8** +- **METHOD_FLAG_REVERSE** = **16** +- **METHOD_FLAG_VIRTUAL** = **32** +- **METHOD_FLAG_FROM_SCRIPT** = **64** +- **METHOD_FLAGS_DEFAULT** = **1** +- **TYPE_NIL** = **0** --- Variable is of type nil (only applied for null). +- **TYPE_BOOL** = **1** --- Variable is of type bool. +- **TYPE_INT** = **2** --- Variable is of type integer. +- **TYPE_REAL** = **3** --- Variable is of type float/real. +- **TYPE_STRING** = **4** --- Variable is of type :ref:`String`. +- **TYPE_VECTOR2** = **5** --- Variable is of type :ref:`Vector2`. +- **TYPE_RECT2** = **6** --- Variable is of type :ref:`Rect2`. +- **TYPE_VECTOR3** = **7** --- Variable is of type :ref:`Vector3`. +- **TYPE_MATRIX32** = **8** --- Variable is of type :ref:`Matrix32`. +- **TYPE_PLANE** = **9** --- Variable is of type :ref:`Plane`. +- **TYPE_QUAT** = **10** --- Variable is of type :ref:`Quat`. +- **TYPE_AABB** = **11** --- Variable is of type :ref:`AABB`. +- **TYPE_MATRIX3** = **12** --- Variable is fo type :ref:`Matrix3`. +- **TYPE_TRANSFORM** = **13** --- Variable is fo type :ref:`Transform`. +- **TYPE_COLOR** = **14** --- Variable is fo type :ref:`Color`. +- **TYPE_IMAGE** = **15** --- Variable is fo type :ref:`Image`. +- **TYPE_NODE_PATH** = **16** --- Variable is fo type :ref:`NodePath`. +- **TYPE_RID** = **17** --- Variable is fo type :ref:`RID`. +- **TYPE_OBJECT** = **18** --- Variable is fo type :ref:`Object`. +- **TYPE_INPUT_EVENT** = **19** --- Variable is fo type :ref:`InputEvent`. +- **TYPE_DICTIONARY** = **20** --- Variable is fo type :ref:`Dictionary`. +- **TYPE_ARRAY** = **21** --- Variable is fo type :ref:`Array`. +- **TYPE_RAW_ARRAY** = **22** +- **TYPE_INT_ARRAY** = **23** +- **TYPE_REAL_ARRAY** = **24** +- **TYPE_STRING_ARRAY** = **25** +- **TYPE_VECTOR2_ARRAY** = **26** +- **TYPE_VECTOR3_ARRAY** = **27** +- **TYPE_COLOR_ARRAY** = **28** +- **TYPE_MAX** = **29** + +Description +----------- + +Global scope constants and variables. This is all that resides in the globals, constants regarding error codes, scancodes, property hints, etc. It's not much. + +Singletons are also documented here, since they can be accessed from anywhere. + diff --git a/classes/class_aabb.rst b/classes/class_aabb.rst new file mode 100644 index 000000000..76cc43d34 --- /dev/null +++ b/classes/class_aabb.rst @@ -0,0 +1,200 @@ +.. _class_AABB: + +AABB +==== + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + +Axis-Aligned Bounding Box. + +Member Functions +---------------- + ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`encloses` **(** :ref:`AABB` with **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`AABB` | :ref:`expand` **(** :ref:`Vector3` to_point **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_area` **(** **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_endpoint` **(** :ref:`int` idx **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_longest_axis` **(** **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_longest_axis_index` **(** **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_longest_axis_size` **(** **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_shortest_axis` **(** **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_shortest_axis_index` **(** **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_shortest_axis_size` **(** **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_support` **(** :ref:`Vector3` dir **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`AABB` | :ref:`grow` **(** :ref:`float` by **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_no_area` **(** **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_no_surface` **(** **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_point` **(** :ref:`Vector3` point **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`AABB` | :ref:`intersection` **(** :ref:`AABB` with **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`intersects` **(** :ref:`AABB` with **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`intersects_plane` **(** :ref:`Plane` plane **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`intersects_segment` **(** :ref:`Vector3` from, :ref:`Vector3` to **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`AABB` | :ref:`merge` **(** :ref:`AABB` with **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`AABB` | :ref:`AABB` **(** :ref:`Vector3` pos, :ref:`Vector3` size **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Variables +---------------- + +- :ref:`Vector3` **pos** +- :ref:`Vector3` **size** +- :ref:`Vector3` **end** + +Description +----------- + +AABB provides an 3D Axis-Aligned Bounding Box. It consists of a position, a size, and several utility functions. It is typically used for simple (fast) overlap tests. + +Member Function Description +--------------------------- + +.. _class_AABB_encloses: + +- :ref:`bool` **encloses** **(** :ref:`AABB` with **)** + +Return true if this :ref:`AABB` completely encloses another one. + +.. _class_AABB_expand: + +- :ref:`AABB` **expand** **(** :ref:`Vector3` to_point **)** + +Return this :ref:`AABB` expanded to include a given point. + +.. _class_AABB_get_area: + +- :ref:`float` **get_area** **(** **)** + +Get the area of the :ref:`AABB`. + +.. _class_AABB_get_endpoint: + +- :ref:`Vector3` **get_endpoint** **(** :ref:`int` idx **)** + +Get the position of the 8 endpoints of the :ref:`AABB` in space. + +.. _class_AABB_get_longest_axis: + +- :ref:`Vector3` **get_longest_axis** **(** **)** + +Return the normalized longest axis of the :ref:`AABB`. + +.. _class_AABB_get_longest_axis_index: + +- :ref:`int` **get_longest_axis_index** **(** **)** + +Return the index of the longest axis of the :ref:`AABB` (according to :ref:`Vector3`::AXIS* enum). + +.. _class_AABB_get_longest_axis_size: + +- :ref:`float` **get_longest_axis_size** **(** **)** + +Return the scalar length of the longest axis of the :ref:`AABB`. + +.. _class_AABB_get_shortest_axis: + +- :ref:`Vector3` **get_shortest_axis** **(** **)** + +Return the normalized shortest axis of the :ref:`AABB`. + +.. _class_AABB_get_shortest_axis_index: + +- :ref:`int` **get_shortest_axis_index** **(** **)** + +Return the index of the shortest axis of the :ref:`AABB` (according to :ref:`Vector3`::AXIS* enum). + +.. _class_AABB_get_shortest_axis_size: + +- :ref:`float` **get_shortest_axis_size** **(** **)** + +Return the scalar length of the shortest axis of the :ref:`AABB`. + +.. _class_AABB_get_support: + +- :ref:`Vector3` **get_support** **(** :ref:`Vector3` dir **)** + +Return the support point in a given direction. This is useful for collision detection algorithms. + +.. _class_AABB_grow: + +- :ref:`AABB` **grow** **(** :ref:`float` by **)** + +Return a copy of the :ref:`AABB` grown a given amount of units towards all the sides. + +.. _class_AABB_has_no_area: + +- :ref:`bool` **has_no_area** **(** **)** + +Return true if the :ref:`AABB` is flat or empty. + +.. _class_AABB_has_no_surface: + +- :ref:`bool` **has_no_surface** **(** **)** + +Return true if the :ref:`AABB` is empty. + +.. _class_AABB_has_point: + +- :ref:`bool` **has_point** **(** :ref:`Vector3` point **)** + +Return true if the :ref:`AABB` contains a point. + +.. _class_AABB_intersection: + +- :ref:`AABB` **intersection** **(** :ref:`AABB` with **)** + +Return the intersection between two :ref:`AABB`s. An empty AABB (size 0,0,0) is returned on failure. + +.. _class_AABB_intersects: + +- :ref:`bool` **intersects** **(** :ref:`AABB` with **)** + +Return true if the :ref:`AABB` overlaps with another. + +.. _class_AABB_intersects_plane: + +- :ref:`bool` **intersects_plane** **(** :ref:`Plane` plane **)** + +Return true if the :ref:`AABB` is at both sides of a plane. + +.. _class_AABB_intersects_segment: + +- :ref:`bool` **intersects_segment** **(** :ref:`Vector3` from, :ref:`Vector3` to **)** + +.. _class_AABB_merge: + +- :ref:`AABB` **merge** **(** :ref:`AABB` with **)** + +Combine this :ref:`AABB` with another, a larger one is returned that contains both. + +.. _class_AABB_AABB: + +- :ref:`AABB` **AABB** **(** :ref:`Vector3` pos, :ref:`Vector3` size **)** + +Optional constructor, accepts position and size. + + diff --git a/classes/class_acceptdialog.rst b/classes/class_acceptdialog.rst new file mode 100644 index 000000000..b12b79724 --- /dev/null +++ b/classes/class_acceptdialog.rst @@ -0,0 +1,104 @@ +.. _class_AcceptDialog: + +AcceptDialog +============ + +Inherits: :ref:`WindowDialog` +------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Base dialog for user notification. + +Member Functions +---------------- + ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_ok` **(** **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_label` **(** **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_hide_on_ok` **(** :ref:`bool` enabled **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_hide_on_ok` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Button` | :ref:`add_button` **(** :ref:`String` text, :ref:`bool` right=false, :ref:`String` action="" **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Button` | :ref:`add_cancel` **(** :ref:`String` name **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`LineEdit` | :ref:`register_text_enter` **(** :ref:`Object` line_edit **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_text` **(** :ref:`String` text **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_text` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **confirmed** **(** **)** +- **custom_action** **(** :ref:`String` action **)** + +Description +----------- + +This dialog is useful for small notifications to the user about an event. It can only be accepted or closed, with the same result. + +Member Function Description +--------------------------- + +.. _class_AcceptDialog_get_ok: + +- :ref:`Object` **get_ok** **(** **)** + +Return the OK Button. + +.. _class_AcceptDialog_get_label: + +- :ref:`Object` **get_label** **(** **)** + +Return the label used for built-in text. + +.. _class_AcceptDialog_set_hide_on_ok: + +- void **set_hide_on_ok** **(** :ref:`bool` enabled **)** + +Set whether the dialog is hidden when accepted (default true). + +.. _class_AcceptDialog_get_hide_on_ok: + +- :ref:`bool` **get_hide_on_ok** **(** **)** const + +Return true if the dialog will be hidden when accepted (default true). + +.. _class_AcceptDialog_add_button: + +- :ref:`Button` **add_button** **(** :ref:`String` text, :ref:`bool` right=false, :ref:`String` action="" **)** + +.. _class_AcceptDialog_add_cancel: + +- :ref:`Button` **add_cancel** **(** :ref:`String` name **)** + +.. _class_AcceptDialog_register_text_enter: + +- :ref:`LineEdit` **register_text_enter** **(** :ref:`Object` line_edit **)** + +Register a :ref:`LineEdit` in the dialog. When the enter key is pressed, the dialog will be accepted. + +.. _class_AcceptDialog_set_text: + +- void **set_text** **(** :ref:`String` text **)** + +Set the built-in label text. + +.. _class_AcceptDialog_get_text: + +- :ref:`String` **get_text** **(** **)** const + +Return the built-in label text. + + diff --git a/classes/class_animatedsprite.rst b/classes/class_animatedsprite.rst new file mode 100644 index 000000000..1b2cc052a --- /dev/null +++ b/classes/class_animatedsprite.rst @@ -0,0 +1,147 @@ +.. _class_AnimatedSprite: + +AnimatedSprite +============== + +Inherits: :ref:`Node2D` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Sprite node that can use multiple textures for animation. + +Member Functions +---------------- + ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_sprite_frames` **(** :ref:`SpriteFrames` sprite_frames **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`SpriteFrames` | :ref:`get_sprite_frames` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_centered` **(** :ref:`bool` centered **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_centered` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_offset` **(** :ref:`Vector2` offset **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_offset` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_flip_h` **(** :ref:`bool` flip_h **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_flipped_h` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_flip_v` **(** :ref:`bool` flip_v **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_flipped_v` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_frame` **(** :ref:`int` frame **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_frame` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_modulate` **(** :ref:`Color` modulate **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_modulate` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **frame_changed** **(** **)** + +Description +----------- + +Sprite node that can use multiple textures for animation. + +Member Function Description +--------------------------- + +.. _class_AnimatedSprite_set_sprite_frames: + +- void **set_sprite_frames** **(** :ref:`SpriteFrames` sprite_frames **)** + +Set the :ref:`SpriteFrames` resource, which contains all frames. + +.. _class_AnimatedSprite_get_sprite_frames: + +- :ref:`SpriteFrames` **get_sprite_frames** **(** **)** const + +Get the :ref:`SpriteFrames` resource, which contains all frames. + +.. _class_AnimatedSprite_set_centered: + +- void **set_centered** **(** :ref:`bool` centered **)** + +When turned on, offset at (0,0) is the center of the sprite, when off, the top-left corner is. + +.. _class_AnimatedSprite_is_centered: + +- :ref:`bool` **is_centered** **(** **)** const + +Return true when centered. See :ref:`set_centered`. + +.. _class_AnimatedSprite_set_offset: + +- void **set_offset** **(** :ref:`Vector2` offset **)** + +Set the offset of the sprite in the node origin. Position varies depending on whether it is centered or not. + +.. _class_AnimatedSprite_get_offset: + +- :ref:`Vector2` **get_offset** **(** **)** const + +Return the offset of the sprite in the node origin. + +.. _class_AnimatedSprite_set_flip_h: + +- void **set_flip_h** **(** :ref:`bool` flip_h **)** + +If true, sprite is flipped horizontally. + +.. _class_AnimatedSprite_is_flipped_h: + +- :ref:`bool` **is_flipped_h** **(** **)** const + +Return true if sprite is flipped horizontally. + +.. _class_AnimatedSprite_set_flip_v: + +- void **set_flip_v** **(** :ref:`bool` flip_v **)** + +If true, sprite is flipped vertically. + +.. _class_AnimatedSprite_is_flipped_v: + +- :ref:`bool` **is_flipped_v** **(** **)** const + +Return true if sprite is flipped vertically. + +.. _class_AnimatedSprite_set_frame: + +- void **set_frame** **(** :ref:`int` frame **)** + +Set the visible sprite frame index (from the list of frames inside the :ref:`SpriteFrames` resource). + +.. _class_AnimatedSprite_get_frame: + +- :ref:`int` **get_frame** **(** **)** const + +Return the visible frame index. + +.. _class_AnimatedSprite_set_modulate: + +- void **set_modulate** **(** :ref:`Color` modulate **)** + +Change the color modulation (multiplication) for this sprite. + +.. _class_AnimatedSprite_get_modulate: + +- :ref:`Color` **get_modulate** **(** **)** const + +Return the color modulation for this sprite. + + diff --git a/classes/class_animatedsprite3d.rst b/classes/class_animatedsprite3d.rst new file mode 100644 index 000000000..00ba0687f --- /dev/null +++ b/classes/class_animatedsprite3d.rst @@ -0,0 +1,54 @@ +.. _class_AnimatedSprite3D: + +AnimatedSprite3D +================ + +Inherits: :ref:`SpriteBase3D` +------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_sprite_frames` **(** :ref:`SpriteFrames` sprite_frames **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_sprite_frames` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_frame` **(** :ref:`int` frame **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_frame` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **frame_changed** **(** **)** + +Member Function Description +--------------------------- + +.. _class_AnimatedSprite3D_set_sprite_frames: + +- void **set_sprite_frames** **(** :ref:`SpriteFrames` sprite_frames **)** + +.. _class_AnimatedSprite3D_get_sprite_frames: + +- :ref:`Texture` **get_sprite_frames** **(** **)** const + +.. _class_AnimatedSprite3D_set_frame: + +- void **set_frame** **(** :ref:`int` frame **)** + +.. _class_AnimatedSprite3D_get_frame: + +- :ref:`int` **get_frame** **(** **)** const + + diff --git a/classes/class_animation.rst b/classes/class_animation.rst new file mode 100644 index 000000000..c5f90a1f6 --- /dev/null +++ b/classes/class_animation.rst @@ -0,0 +1,324 @@ +.. _class_Animation: + +Animation +========= + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Contains data used to animate everything in the engine. + +Member Functions +---------------- + ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`add_track` **(** :ref:`int` type, :ref:`int` at_pos=-1 **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_track` **(** :ref:`int` idx **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_track_count` **(** **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`track_get_type` **(** :ref:`int` idx **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`NodePath` | :ref:`track_get_path` **(** :ref:`int` idx **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`track_set_path` **(** :ref:`int` idx, :ref:`NodePath` path **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`find_track` **(** :ref:`NodePath` path **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`track_move_up` **(** :ref:`int` idx **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`track_move_down` **(** :ref:`int` idx **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`transform_track_insert_key` **(** :ref:`int` idx, :ref:`float` time, :ref:`Vector3` loc, :ref:`Quat` rot, :ref:`Vector3` scale **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`track_insert_key` **(** :ref:`int` idx, :ref:`float` time, var key, :ref:`float` transition=1 **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`track_remove_key` **(** :ref:`int` idx, :ref:`int` key_idx **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`track_remove_key_at_pos` **(** :ref:`int` idx, :ref:`float` pos **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`track_set_key_value` **(** :ref:`int` idx, :ref:`int` key, var value **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`track_set_key_transition` **(** :ref:`int` idx, :ref:`int` key_idx, :ref:`float` transition **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`track_get_key_transition` **(** :ref:`int` idx, :ref:`int` key_idx **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`track_get_key_count` **(** :ref:`int` idx **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`track_get_key_value` **(** :ref:`int` idx, :ref:`int` key_idx **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`track_get_key_time` **(** :ref:`int` idx, :ref:`int` key_idx **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`track_find_key` **(** :ref:`int` idx, :ref:`float` time, :ref:`bool` exact=false **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`track_set_interpolation_type` **(** :ref:`int` idx, :ref:`int` interpolation **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`track_get_interpolation_type` **(** :ref:`int` idx **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`transform_track_interpolate` **(** :ref:`int` idx, :ref:`float` time_sec **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`value_track_set_continuous` **(** :ref:`int` idx, :ref:`bool` continuous **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`value_track_is_continuous` **(** :ref:`int` idx **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`IntArray` | :ref:`value_track_get_key_indices` **(** :ref:`int` idx, :ref:`float` time_sec, :ref:`float` delta **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`IntArray` | :ref:`method_track_get_key_indices` **(** :ref:`int` idx, :ref:`float` time_sec, :ref:`float` delta **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`method_track_get_name` **(** :ref:`int` idx, :ref:`int` key_idx **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`method_track_get_params` **(** :ref:`int` idx, :ref:`int` key_idx **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_length` **(** :ref:`float` time_sec **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_length` **(** **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_loop` **(** :ref:`bool` enabled **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_loop` **(** **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_step` **(** :ref:`float` size_sec **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_step` **(** **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **TYPE_VALUE** = **0** --- Value tracks set values in node properties, but only those which can be Interpolated. +- **TYPE_TRANSFORM** = **1** --- Transform tracks are used to change node local transforms or skeleton pose bones. Transitions are Interpolated. +- **TYPE_METHOD** = **2** --- Method tracks call functions with given arguments per key. +- **INTERPOLATION_NEAREST** = **0** --- No interpolation (nearest value). +- **INTERPOLATION_LINEAR** = **1** --- Linear interpolation. +- **INTERPOLATION_CUBIC** = **2** --- Cubic interpolation. + +Description +----------- + +An Animation resource contains data used to animate everything in the engine. Animations are divided into tracks, and each track must be linked to a node. The state of that node can be changed through time, by adding timed keys (events) to the track. + +Animations are just data containers, and must be added to odes such as an :ref:`AnimationPlayer` or :ref:`AnimationTreePlayer` to be played back. + +Member Function Description +--------------------------- + +.. _class_Animation_add_track: + +- :ref:`int` **add_track** **(** :ref:`int` type, :ref:`int` at_pos=-1 **)** + +Add a track to the Animation. The track type must be specified as any of the values in te TYPE_* enumeration. + +.. _class_Animation_remove_track: + +- void **remove_track** **(** :ref:`int` idx **)** + +Remove a track by specifying the track index. + +.. _class_Animation_get_track_count: + +- :ref:`int` **get_track_count** **(** **)** const + +Return the amount of tracks in the animation. + +.. _class_Animation_track_get_type: + +- :ref:`int` **track_get_type** **(** :ref:`int` idx **)** const + +Get the type of a track. + +.. _class_Animation_track_get_path: + +- :ref:`NodePath` **track_get_path** **(** :ref:`int` idx **)** const + +Get the path of a track. for more information on the path format, see :ref:`track_set_path` + +.. _class_Animation_track_set_path: + +- void **track_set_path** **(** :ref:`int` idx, :ref:`NodePath` path **)** + +Set the path of a track. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. Tracks that control properties or bones must append their name after the path, separated by ":". Example: "character/skeleton:ankle" or "character/mesh:transform/local" + +.. _class_Animation_find_track: + +- :ref:`int` **find_track** **(** :ref:`NodePath` path **)** const + +.. _class_Animation_track_move_up: + +- void **track_move_up** **(** :ref:`int` idx **)** + +Move a track up. + +.. _class_Animation_track_move_down: + +- void **track_move_down** **(** :ref:`int` idx **)** + +Nove a track down. + +.. _class_Animation_transform_track_insert_key: + +- :ref:`int` **transform_track_insert_key** **(** :ref:`int` idx, :ref:`float` time, :ref:`Vector3` loc, :ref:`Quat` rot, :ref:`Vector3` scale **)** + +Insert a transform key for a transform track. + +.. _class_Animation_track_insert_key: + +- void **track_insert_key** **(** :ref:`int` idx, :ref:`float` time, var key, :ref:`float` transition=1 **)** + +Insert a generic key in a given track. + +.. _class_Animation_track_remove_key: + +- void **track_remove_key** **(** :ref:`int` idx, :ref:`int` key_idx **)** + +Remove a key by index in a given track. + +.. _class_Animation_track_remove_key_at_pos: + +- void **track_remove_key_at_pos** **(** :ref:`int` idx, :ref:`float` pos **)** + +Remove a key by position (seconds) in a given track. + +.. _class_Animation_track_set_key_value: + +- void **track_set_key_value** **(** :ref:`int` idx, :ref:`int` key, var value **)** + +Set the value of an existing key. + +.. _class_Animation_track_set_key_transition: + +- void **track_set_key_transition** **(** :ref:`int` idx, :ref:`int` key_idx, :ref:`float` transition **)** + +Set the transition curve (easing) for a specific key (see built-in math function "ease"). + +.. _class_Animation_track_get_key_transition: + +- :ref:`float` **track_get_key_transition** **(** :ref:`int` idx, :ref:`int` key_idx **)** const + +Return the transition curve (easing) for a specific key (see built-in math function "ease"). + +.. _class_Animation_track_get_key_count: + +- :ref:`int` **track_get_key_count** **(** :ref:`int` idx **)** const + +Return the amount of keys in a given track. + +.. _class_Animation_track_get_key_value: + +- void **track_get_key_value** **(** :ref:`int` idx, :ref:`int` key_idx **)** const + +Return the value of a given key in a given track. + +.. _class_Animation_track_get_key_time: + +- :ref:`float` **track_get_key_time** **(** :ref:`int` idx, :ref:`int` key_idx **)** const + +Return the time at which the key is located. + +.. _class_Animation_track_find_key: + +- :ref:`int` **track_find_key** **(** :ref:`int` idx, :ref:`float` time, :ref:`bool` exact=false **)** const + +Find the key index by time in a given track. Optionally, only find it if the exact time is given. + +.. _class_Animation_track_set_interpolation_type: + +- void **track_set_interpolation_type** **(** :ref:`int` idx, :ref:`int` interpolation **)** + +Set the interpolation type of a given track, from the INTERPOLATION_* enum. + +.. _class_Animation_track_get_interpolation_type: + +- :ref:`int` **track_get_interpolation_type** **(** :ref:`int` idx **)** const + +Return the interpolation type of a given track, from the INTERPOLATION_* enum. + +.. _class_Animation_transform_track_interpolate: + +- :ref:`Array` **transform_track_interpolate** **(** :ref:`int` idx, :ref:`float` time_sec **)** const + +Return the interpolated value of a transform track at a given time (in seconds). An array consisting of 3 elements: position (:ref:`Vector3`), rotation (:ref:`Quat`) and scale (:ref:`Vector3`). + +.. _class_Animation_value_track_set_continuous: + +- void **value_track_set_continuous** **(** :ref:`int` idx, :ref:`bool` continuous **)** + +Enable or disable interpolation for a whole track. By default tracks are interpolated. + +.. _class_Animation_value_track_is_continuous: + +- :ref:`bool` **value_track_is_continuous** **(** :ref:`int` idx **)** const + +Return wether interpolation is enabled or disabled for a whole track. By default tracks are interpolated. + +.. _class_Animation_value_track_get_key_indices: + +- :ref:`IntArray` **value_track_get_key_indices** **(** :ref:`int` idx, :ref:`float` time_sec, :ref:`float` delta **)** const + +Return all the key indices of a value track, given a position and delta time. + +.. _class_Animation_method_track_get_key_indices: + +- :ref:`IntArray` **method_track_get_key_indices** **(** :ref:`int` idx, :ref:`float` time_sec, :ref:`float` delta **)** const + +Return all the key indices of a method track, given a position and delta time. + +.. _class_Animation_method_track_get_name: + +- :ref:`String` **method_track_get_name** **(** :ref:`int` idx, :ref:`int` key_idx **)** const + +Return the method name of a method track. + +.. _class_Animation_method_track_get_params: + +- :ref:`Array` **method_track_get_params** **(** :ref:`int` idx, :ref:`int` key_idx **)** const + +Return the arguments values to be called on a method track for a given key in a given track. + +.. _class_Animation_set_length: + +- void **set_length** **(** :ref:`float` time_sec **)** + +Set the total length of the animation (in seconds). Note that length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping. + +.. _class_Animation_get_length: + +- :ref:`float` **get_length** **(** **)** const + +Return the total length of the animation (in seconds). + +.. _class_Animation_set_loop: + +- void **set_loop** **(** :ref:`bool` enabled **)** + +Set a flag indicating that the animation must loop. This is uses for correct interpolation of animation cycles, and for hinting the player that it must restart the animation. + +.. _class_Animation_has_loop: + +- :ref:`bool` **has_loop** **(** **)** const + +Return wether the animation has the loop flag set. + +.. _class_Animation_set_step: + +- void **set_step** **(** :ref:`float` size_sec **)** + +.. _class_Animation_get_step: + +- :ref:`float` **get_step** **(** **)** const + +.. _class_Animation_clear: + +- void **clear** **(** **)** + +Clear the animation (clear all tracks and reset all). + + diff --git a/classes/class_animationplayer.rst b/classes/class_animationplayer.rst new file mode 100644 index 000000000..536b2805b --- /dev/null +++ b/classes/class_animationplayer.rst @@ -0,0 +1,326 @@ +.. _class_AnimationPlayer: + +AnimationPlayer +=============== + +Inherits: :ref:`Node` +--------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Container and player of :ref:`Animation` resources. + +Member Functions +---------------- + ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`add_animation` **(** :ref:`String` name, :ref:`Animation` animation **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_animation` **(** :ref:`String` name **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`rename_animation` **(** :ref:`String` name, :ref:`String` newname **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_animation` **(** :ref:`String` name **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Animation` | :ref:`get_animation` **(** :ref:`String` name **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_animation_list` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_blend_time` **(** :ref:`String` anim_from, :ref:`String` anim_to, :ref:`float` sec **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_blend_time` **(** :ref:`String` anim_from, :ref:`String` anim_to **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_default_blend_time` **(** :ref:`float` sec **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_default_blend_time` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`play` **(** :ref:`String` name="", :ref:`float` custom_blend=-1, :ref:`float` custom_speed=1, :ref:`bool` from_end=false **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`play_backwards` **(** :ref:`String` name="", :ref:`float` custom_blend=-1 **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`stop` **(** :ref:`bool` reset=true **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`stop_all` **(** **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_playing` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_current_animation` **(** :ref:`String` anim **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_current_animation` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`queue` **(** :ref:`String` name **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_queue` **(** **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_active` **(** :ref:`bool` active **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_active` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_speed` **(** :ref:`float` speed **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_speed` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_autoplay` **(** :ref:`String` name **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_autoplay` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_root` **(** :ref:`NodePath` path **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`NodePath` | :ref:`get_root` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`seek` **(** :ref:`float` pos_sec, :ref:`bool` update=false **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_pos` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`find_animation` **(** :ref:`Animation` animation **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_caches` **(** **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_animation_process_mode` **(** :ref:`int` mode **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_animation_process_mode` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_current_animation_pos` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_current_animation_length` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`advance` **(** :ref:`float` delta **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **animation_changed** **(** :ref:`String` old_name, :ref:`String` new_name **)** +- **finished** **(** **)** + +Numeric Constants +----------------- + +- **ANIMATION_PROCESS_FIXED** = **0** --- Process animation on fixed process. This is specially useful when animating kinematic bodies. +- **ANIMATION_PROCESS_IDLE** = **1** --- Process animation on idle process. + +Description +----------- + +An animation player is used for general purpose playback of :ref:`Animation` resources. It contains a dictionary of animations (referenced by name) and custom blend times between their transitions. Additionally, animations can be played and blended in diferent channels. + +Member Function Description +--------------------------- + +.. _class_AnimationPlayer_add_animation: + +- :ref:`int` **add_animation** **(** :ref:`String` name, :ref:`Animation` animation **)** + +Add an animation resource to the player, which will be later referenced by the "name" argument. + +.. _class_AnimationPlayer_remove_animation: + +- void **remove_animation** **(** :ref:`String` name **)** + +Remove an animation from the player (by supplying the same name used to add it). + +.. _class_AnimationPlayer_rename_animation: + +- void **rename_animation** **(** :ref:`String` name, :ref:`String` newname **)** + +Rename an existing animation. + +.. _class_AnimationPlayer_has_animation: + +- :ref:`bool` **has_animation** **(** :ref:`String` name **)** const + +Request wether an :ref:`Animation` name exist within the player. + +.. _class_AnimationPlayer_get_animation: + +- :ref:`Animation` **get_animation** **(** :ref:`String` name **)** const + +Get an :ref:`Animation` resource by requesting a name. + +.. _class_AnimationPlayer_get_animation_list: + +- :ref:`StringArray` **get_animation_list** **(** **)** const + +Get the list of names of the animations stored in the player. + +.. _class_AnimationPlayer_set_blend_time: + +- void **set_blend_time** **(** :ref:`String` anim_from, :ref:`String` anim_to, :ref:`float` sec **)** + +Specify a blend time (in seconds) between two animations, referemced by their names. + +.. _class_AnimationPlayer_get_blend_time: + +- :ref:`float` **get_blend_time** **(** :ref:`String` anim_from, :ref:`String` anim_to **)** const + +Get the blend time between two animations, referemced by their names. + +.. _class_AnimationPlayer_set_default_blend_time: + +- void **set_default_blend_time** **(** :ref:`float` sec **)** + +Set the default blend time between animations. + +.. _class_AnimationPlayer_get_default_blend_time: + +- :ref:`float` **get_default_blend_time** **(** **)** const + +Return the default blend time between animations. + +.. _class_AnimationPlayer_play: + +- void **play** **(** :ref:`String` name="", :ref:`float` custom_blend=-1, :ref:`float` custom_speed=1, :ref:`bool` from_end=false **)** + +Play a given animation by the animation name. Custom speed and blend times can be set. If custom speed is negative (-1), 'from_end' being true can play the animation backwards. + +.. _class_AnimationPlayer_play_backwards: + +- void **play_backwards** **(** :ref:`String` name="", :ref:`float` custom_blend=-1 **)** + +.. _class_AnimationPlayer_stop: + +- void **stop** **(** :ref:`bool` reset=true **)** + +.. _class_AnimationPlayer_stop_all: + +- void **stop_all** **(** **)** + +Stop playback of animations (deprecated). + +.. _class_AnimationPlayer_is_playing: + +- :ref:`bool` **is_playing** **(** **)** const + +Return wether an animation is playing. + +.. _class_AnimationPlayer_set_current_animation: + +- void **set_current_animation** **(** :ref:`String` anim **)** + +Set the current animation (even if no playback occurs). Using set_current_animation() and set_active() are similar to calling play(). + +.. _class_AnimationPlayer_get_current_animation: + +- :ref:`String` **get_current_animation** **(** **)** const + +Return the name of the animation being played. + +.. _class_AnimationPlayer_queue: + +- void **queue** **(** :ref:`String` name **)** + +Queue an animation for playback once the current one is done. + +.. _class_AnimationPlayer_clear_queue: + +- void **clear_queue** **(** **)** + +If animations are queued to play, clear them. + +.. _class_AnimationPlayer_set_active: + +- void **set_active** **(** :ref:`bool` active **)** + +Set the player as active (playing). If false, it + +will do nothing. + +.. _class_AnimationPlayer_is_active: + +- :ref:`bool` **is_active** **(** **)** const + +Return true if the player is active. + +.. _class_AnimationPlayer_set_speed: + +- void **set_speed** **(** :ref:`float` speed **)** + +Set a speed scaling ratio in a given animation channel (or channel 0 if none is provided). Default ratio is *1* (no scaling). + +.. _class_AnimationPlayer_get_speed: + +- :ref:`float` **get_speed** **(** **)** const + +Get the speed scaling ratio in a given animation channel (or channel 0 if none is provided). Default ratio is *1* (no scaling). + +.. _class_AnimationPlayer_set_autoplay: + +- void **set_autoplay** **(** :ref:`String` name **)** + +Set the name of the animation that will be automatically played when the scene is loaded. + +.. _class_AnimationPlayer_get_autoplay: + +- :ref:`String` **get_autoplay** **(** **)** const + +Return the name of the animation that will be automatically played when the scene is loaded. + +.. _class_AnimationPlayer_set_root: + +- void **set_root** **(** :ref:`NodePath` path **)** + +AnimationPlayer resolves animation track paths from this node (which is relative to itself), by default root is "..", but it can be changed. + +.. _class_AnimationPlayer_get_root: + +- :ref:`NodePath` **get_root** **(** **)** const + +Return path to root node (see :ref:`set_root`). + +.. _class_AnimationPlayer_seek: + +- void **seek** **(** :ref:`float` pos_sec, :ref:`bool` update=false **)** + +Seek the animation to a given position in time (in seconds). If 'update' is true, the animation will be updated too, otherwise it will be updated at process time. + +.. _class_AnimationPlayer_get_pos: + +- :ref:`float` **get_pos** **(** **)** const + +Return the playback position (in seconds) in an animation channel (or channel 0 if none is provided). + +.. _class_AnimationPlayer_find_animation: + +- :ref:`String` **find_animation** **(** :ref:`Animation` animation **)** const + +Find an animation name by resource. + +.. _class_AnimationPlayer_clear_caches: + +- void **clear_caches** **(** **)** + +The animation player creates caches for faster access to the nodes it will animate. However, if a specific node is removed, it may not notice it, so clear_caches will force the player to search for the nodes again. + +.. _class_AnimationPlayer_set_animation_process_mode: + +- void **set_animation_process_mode** **(** :ref:`int` mode **)** + +Set the mode in which the animation player processes. By default, it processes on idle time (framerate dependent), but using fixed time works well for animating static collision bodies in 2D and 3D. See enum ANIMATION_PROCESS_*. + +.. _class_AnimationPlayer_get_animation_process_mode: + +- :ref:`int` **get_animation_process_mode** **(** **)** const + +Return the mode in which the animation player processes. See :ref:`set_animation_process_mode`. + +.. _class_AnimationPlayer_get_current_animation_pos: + +- :ref:`float` **get_current_animation_pos** **(** **)** const + +Get the position (in seconds) of the currently being played animation. + +.. _class_AnimationPlayer_get_current_animation_length: + +- :ref:`float` **get_current_animation_length** **(** **)** const + +Get the length (in seconds) of the currently being played animation. + +.. _class_AnimationPlayer_advance: + +- void **advance** **(** :ref:`float` delta **)** + + diff --git a/classes/class_animationtreeplayer.rst b/classes/class_animationtreeplayer.rst new file mode 100644 index 000000000..1d7e17d0f --- /dev/null +++ b/classes/class_animationtreeplayer.rst @@ -0,0 +1,436 @@ +.. _class_AnimationTreePlayer: + +AnimationTreePlayer +=================== + +Inherits: :ref:`Node` +--------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Animation Player that uses a node graph for the blending. + +Member Functions +---------------- + ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_node` **(** :ref:`int` type, :ref:`String` id **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`node_exists` **(** :ref:`String` node **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`node_rename` **(** :ref:`String` node, :ref:`String` new_name **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`node_get_type` **(** :ref:`String` id **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`node_get_input_count` **(** :ref:`String` id **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`node_get_input_source` **(** :ref:`String` id, :ref:`int` idx **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`animation_node_set_animation` **(** :ref:`String` id, :ref:`Animation` animation **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Animation` | :ref:`animation_node_get_animation` **(** :ref:`String` id **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`animation_node_set_master_animation` **(** :ref:`String` id, :ref:`String` source **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`animation_node_get_master_animation` **(** :ref:`String` id **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`oneshot_node_set_fadein_time` **(** :ref:`String` id, :ref:`float` time_sec **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`oneshot_node_get_fadein_time` **(** :ref:`String` id **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`oneshot_node_set_fadeout_time` **(** :ref:`String` id, :ref:`float` time_sec **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`oneshot_node_get_fadeout_time` **(** :ref:`String` id **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`oneshot_node_set_autorestart` **(** :ref:`String` id, :ref:`bool` enable **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`oneshot_node_set_autorestart_delay` **(** :ref:`String` id, :ref:`float` delay_sec **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`oneshot_node_set_autorestart_random_delay` **(** :ref:`String` id, :ref:`float` rand_sec **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`oneshot_node_has_autorestart` **(** :ref:`String` id **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`oneshot_node_get_autorestart_delay` **(** :ref:`String` id **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`oneshot_node_get_autorestart_random_delay` **(** :ref:`String` id **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`oneshot_node_start` **(** :ref:`String` id **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`oneshot_node_stop` **(** :ref:`String` id **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`oneshot_node_is_active` **(** :ref:`String` id **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`oneshot_node_set_filter_path` **(** :ref:`String` id, :ref:`NodePath` path, :ref:`bool` enable **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`mix_node_set_amount` **(** :ref:`String` id, :ref:`float` ratio **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`mix_node_get_amount` **(** :ref:`String` id **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`blend2_node_set_amount` **(** :ref:`String` id, :ref:`float` blend **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`blend2_node_get_amount` **(** :ref:`String` id **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`blend2_node_set_filter_path` **(** :ref:`String` id, :ref:`NodePath` path, :ref:`bool` enable **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`blend3_node_set_amount` **(** :ref:`String` id, :ref:`float` blend **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`blend3_node_get_amount` **(** :ref:`String` id **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`blend4_node_set_amount` **(** :ref:`String` id, :ref:`Vector2` blend **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`blend4_node_get_amount` **(** :ref:`String` id **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`timescale_node_set_scale` **(** :ref:`String` id, :ref:`float` scale **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`timescale_node_get_scale` **(** :ref:`String` id **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`timeseek_node_seek` **(** :ref:`String` id, :ref:`float` pos_sec **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`transition_node_set_input_count` **(** :ref:`String` id, :ref:`int` count **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`transition_node_get_input_count` **(** :ref:`String` id **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`transition_node_delete_input` **(** :ref:`String` id, :ref:`int` input_idx **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`transition_node_set_input_auto_advance` **(** :ref:`String` id, :ref:`int` input_idx, :ref:`bool` enable **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`transition_node_has_input_auto_advance` **(** :ref:`String` id, :ref:`int` input_idx **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`transition_node_set_xfade_time` **(** :ref:`String` id, :ref:`float` time_sec **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`transition_node_get_xfade_time` **(** :ref:`String` id **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`transition_node_set_current` **(** :ref:`String` id, :ref:`int` input_idx **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`transition_node_get_current` **(** :ref:`String` id **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`node_set_pos` **(** :ref:`String` id, :ref:`Vector2` screen_pos **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`node_get_pos` **(** :ref:`String` id **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_node` **(** :ref:`String` id **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`connect` **(** :ref:`String` id, :ref:`String` dst_id, :ref:`int` dst_input_idx **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_connected` **(** :ref:`String` id, :ref:`String` dst_id, :ref:`int` dst_input_idx **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`disconnect` **(** :ref:`String` id, :ref:`int` dst_input_idx **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_active` **(** :ref:`bool` enabled **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_active` **(** **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_base_path` **(** :ref:`NodePath` path **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`NodePath` | :ref:`get_base_path` **(** **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_master_player` **(** :ref:`NodePath` nodepath **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`NodePath` | :ref:`get_master_player` **(** **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_node_list` **(** **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_animation_process_mode` **(** :ref:`int` mode **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_animation_process_mode` **(** **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`advance` **(** :ref:`float` delta **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`reset` **(** **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`recompute_caches` **(** **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **NODE_OUTPUT** = **0** +- **NODE_ANIMATION** = **1** +- **NODE_ONESHOT** = **2** +- **NODE_MIX** = **3** +- **NODE_BLEND2** = **4** +- **NODE_BLEND3** = **5** +- **NODE_BLEND4** = **6** +- **NODE_TIMESCALE** = **7** +- **NODE_TIMESEEK** = **8** +- **NODE_TRANSITION** = **9** + +Description +----------- + +Animation Player that uses a node graph for the blending. This kind of player is very useful when animating character or other skeleton based rigs, because it can combine several animations to form a desired pose. + +Member Function Description +--------------------------- + +.. _class_AnimationTreePlayer_add_node: + +- void **add_node** **(** :ref:`int` type, :ref:`String` id **)** + +Add a node of a given type in the graph with given id. + +.. _class_AnimationTreePlayer_node_exists: + +- :ref:`bool` **node_exists** **(** :ref:`String` node **)** const + +Check if a node exists (by name). + +.. _class_AnimationTreePlayer_node_rename: + +- :ref:`int` **node_rename** **(** :ref:`String` node, :ref:`String` new_name **)** + +Rename a node in the graph. + +.. _class_AnimationTreePlayer_node_get_type: + +- :ref:`int` **node_get_type** **(** :ref:`String` id **)** const + +Get the node type, will return from NODE_* enum. + +.. _class_AnimationTreePlayer_node_get_input_count: + +- :ref:`int` **node_get_input_count** **(** :ref:`String` id **)** const + +Return the input count for a given node. Different types of nodes have different amount of inputs. + +.. _class_AnimationTreePlayer_node_get_input_source: + +- :ref:`String` **node_get_input_source** **(** :ref:`String` id, :ref:`int` idx **)** const + +Return the input source for a given node input. + +.. _class_AnimationTreePlayer_animation_node_set_animation: + +- void **animation_node_set_animation** **(** :ref:`String` id, :ref:`Animation` animation **)** + +Set the animation for an animation node. + +.. _class_AnimationTreePlayer_animation_node_get_animation: + +- :ref:`Animation` **animation_node_get_animation** **(** :ref:`String` id **)** const + +.. _class_AnimationTreePlayer_animation_node_set_master_animation: + +- void **animation_node_set_master_animation** **(** :ref:`String` id, :ref:`String` source **)** + +.. _class_AnimationTreePlayer_animation_node_get_master_animation: + +- :ref:`String` **animation_node_get_master_animation** **(** :ref:`String` id **)** const + +.. _class_AnimationTreePlayer_oneshot_node_set_fadein_time: + +- void **oneshot_node_set_fadein_time** **(** :ref:`String` id, :ref:`float` time_sec **)** + +.. _class_AnimationTreePlayer_oneshot_node_get_fadein_time: + +- :ref:`float` **oneshot_node_get_fadein_time** **(** :ref:`String` id **)** const + +.. _class_AnimationTreePlayer_oneshot_node_set_fadeout_time: + +- void **oneshot_node_set_fadeout_time** **(** :ref:`String` id, :ref:`float` time_sec **)** + +.. _class_AnimationTreePlayer_oneshot_node_get_fadeout_time: + +- :ref:`float` **oneshot_node_get_fadeout_time** **(** :ref:`String` id **)** const + +.. _class_AnimationTreePlayer_oneshot_node_set_autorestart: + +- void **oneshot_node_set_autorestart** **(** :ref:`String` id, :ref:`bool` enable **)** + +.. _class_AnimationTreePlayer_oneshot_node_set_autorestart_delay: + +- void **oneshot_node_set_autorestart_delay** **(** :ref:`String` id, :ref:`float` delay_sec **)** + +.. _class_AnimationTreePlayer_oneshot_node_set_autorestart_random_delay: + +- void **oneshot_node_set_autorestart_random_delay** **(** :ref:`String` id, :ref:`float` rand_sec **)** + +.. _class_AnimationTreePlayer_oneshot_node_has_autorestart: + +- :ref:`bool` **oneshot_node_has_autorestart** **(** :ref:`String` id **)** const + +.. _class_AnimationTreePlayer_oneshot_node_get_autorestart_delay: + +- :ref:`float` **oneshot_node_get_autorestart_delay** **(** :ref:`String` id **)** const + +.. _class_AnimationTreePlayer_oneshot_node_get_autorestart_random_delay: + +- :ref:`float` **oneshot_node_get_autorestart_random_delay** **(** :ref:`String` id **)** const + +.. _class_AnimationTreePlayer_oneshot_node_start: + +- void **oneshot_node_start** **(** :ref:`String` id **)** + +.. _class_AnimationTreePlayer_oneshot_node_stop: + +- void **oneshot_node_stop** **(** :ref:`String` id **)** + +.. _class_AnimationTreePlayer_oneshot_node_is_active: + +- :ref:`bool` **oneshot_node_is_active** **(** :ref:`String` id **)** const + +.. _class_AnimationTreePlayer_oneshot_node_set_filter_path: + +- void **oneshot_node_set_filter_path** **(** :ref:`String` id, :ref:`NodePath` path, :ref:`bool` enable **)** + +.. _class_AnimationTreePlayer_mix_node_set_amount: + +- void **mix_node_set_amount** **(** :ref:`String` id, :ref:`float` ratio **)** + +.. _class_AnimationTreePlayer_mix_node_get_amount: + +- :ref:`float` **mix_node_get_amount** **(** :ref:`String` id **)** const + +.. _class_AnimationTreePlayer_blend2_node_set_amount: + +- void **blend2_node_set_amount** **(** :ref:`String` id, :ref:`float` blend **)** + +.. _class_AnimationTreePlayer_blend2_node_get_amount: + +- :ref:`float` **blend2_node_get_amount** **(** :ref:`String` id **)** const + +.. _class_AnimationTreePlayer_blend2_node_set_filter_path: + +- void **blend2_node_set_filter_path** **(** :ref:`String` id, :ref:`NodePath` path, :ref:`bool` enable **)** + +.. _class_AnimationTreePlayer_blend3_node_set_amount: + +- void **blend3_node_set_amount** **(** :ref:`String` id, :ref:`float` blend **)** + +.. _class_AnimationTreePlayer_blend3_node_get_amount: + +- :ref:`float` **blend3_node_get_amount** **(** :ref:`String` id **)** const + +.. _class_AnimationTreePlayer_blend4_node_set_amount: + +- void **blend4_node_set_amount** **(** :ref:`String` id, :ref:`Vector2` blend **)** + +.. _class_AnimationTreePlayer_blend4_node_get_amount: + +- :ref:`Vector2` **blend4_node_get_amount** **(** :ref:`String` id **)** const + +.. _class_AnimationTreePlayer_timescale_node_set_scale: + +- void **timescale_node_set_scale** **(** :ref:`String` id, :ref:`float` scale **)** + +.. _class_AnimationTreePlayer_timescale_node_get_scale: + +- :ref:`float` **timescale_node_get_scale** **(** :ref:`String` id **)** const + +.. _class_AnimationTreePlayer_timeseek_node_seek: + +- void **timeseek_node_seek** **(** :ref:`String` id, :ref:`float` pos_sec **)** + +.. _class_AnimationTreePlayer_transition_node_set_input_count: + +- void **transition_node_set_input_count** **(** :ref:`String` id, :ref:`int` count **)** + +.. _class_AnimationTreePlayer_transition_node_get_input_count: + +- :ref:`int` **transition_node_get_input_count** **(** :ref:`String` id **)** const + +.. _class_AnimationTreePlayer_transition_node_delete_input: + +- void **transition_node_delete_input** **(** :ref:`String` id, :ref:`int` input_idx **)** + +.. _class_AnimationTreePlayer_transition_node_set_input_auto_advance: + +- void **transition_node_set_input_auto_advance** **(** :ref:`String` id, :ref:`int` input_idx, :ref:`bool` enable **)** + +.. _class_AnimationTreePlayer_transition_node_has_input_auto_advance: + +- :ref:`bool` **transition_node_has_input_auto_advance** **(** :ref:`String` id, :ref:`int` input_idx **)** const + +.. _class_AnimationTreePlayer_transition_node_set_xfade_time: + +- void **transition_node_set_xfade_time** **(** :ref:`String` id, :ref:`float` time_sec **)** + +.. _class_AnimationTreePlayer_transition_node_get_xfade_time: + +- :ref:`float` **transition_node_get_xfade_time** **(** :ref:`String` id **)** const + +.. _class_AnimationTreePlayer_transition_node_set_current: + +- void **transition_node_set_current** **(** :ref:`String` id, :ref:`int` input_idx **)** + +.. _class_AnimationTreePlayer_transition_node_get_current: + +- :ref:`int` **transition_node_get_current** **(** :ref:`String` id **)** const + +.. _class_AnimationTreePlayer_node_set_pos: + +- void **node_set_pos** **(** :ref:`String` id, :ref:`Vector2` screen_pos **)** + +.. _class_AnimationTreePlayer_node_get_pos: + +- :ref:`Vector2` **node_get_pos** **(** :ref:`String` id **)** const + +.. _class_AnimationTreePlayer_remove_node: + +- void **remove_node** **(** :ref:`String` id **)** + +.. _class_AnimationTreePlayer_connect: + +- :ref:`int` **connect** **(** :ref:`String` id, :ref:`String` dst_id, :ref:`int` dst_input_idx **)** + +.. _class_AnimationTreePlayer_is_connected: + +- :ref:`bool` **is_connected** **(** :ref:`String` id, :ref:`String` dst_id, :ref:`int` dst_input_idx **)** const + +.. _class_AnimationTreePlayer_disconnect: + +- void **disconnect** **(** :ref:`String` id, :ref:`int` dst_input_idx **)** + +.. _class_AnimationTreePlayer_set_active: + +- void **set_active** **(** :ref:`bool` enabled **)** + +.. _class_AnimationTreePlayer_is_active: + +- :ref:`bool` **is_active** **(** **)** const + +.. _class_AnimationTreePlayer_set_base_path: + +- void **set_base_path** **(** :ref:`NodePath` path **)** + +.. _class_AnimationTreePlayer_get_base_path: + +- :ref:`NodePath` **get_base_path** **(** **)** const + +.. _class_AnimationTreePlayer_set_master_player: + +- void **set_master_player** **(** :ref:`NodePath` nodepath **)** + +.. _class_AnimationTreePlayer_get_master_player: + +- :ref:`NodePath` **get_master_player** **(** **)** const + +.. _class_AnimationTreePlayer_get_node_list: + +- :ref:`StringArray` **get_node_list** **(** **)** + +.. _class_AnimationTreePlayer_set_animation_process_mode: + +- void **set_animation_process_mode** **(** :ref:`int` mode **)** + +.. _class_AnimationTreePlayer_get_animation_process_mode: + +- :ref:`int` **get_animation_process_mode** **(** **)** const + +.. _class_AnimationTreePlayer_advance: + +- void **advance** **(** :ref:`float` delta **)** + +.. _class_AnimationTreePlayer_reset: + +- void **reset** **(** **)** + +.. _class_AnimationTreePlayer_recompute_caches: + +- void **recompute_caches** **(** **)** + + diff --git a/classes/class_area.rst b/classes/class_area.rst new file mode 100644 index 000000000..4d7f41290 --- /dev/null +++ b/classes/class_area.rst @@ -0,0 +1,193 @@ +.. _class_Area: + +Area +==== + +Inherits: :ref:`CollisionObject` +------------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_space_override_mode` **(** :ref:`int` enable **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_space_override_mode` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_gravity_is_point` **(** :ref:`bool` enable **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_gravity_a_point` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_gravity_distance_scale` **(** :ref:`float` distance_scale **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_gravity_distance_scale` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_gravity_vector` **(** :ref:`Vector3` vector **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_gravity_vector` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_gravity` **(** :ref:`float` gravity **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_gravity` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_angular_damp` **(** :ref:`float` angular_damp **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_angular_damp` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_linear_damp` **(** :ref:`float` linear_damp **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_linear_damp` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_priority` **(** :ref:`float` priority **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_priority` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_monitorable` **(** :ref:`bool` enable **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_monitorable` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_enable_monitoring` **(** :ref:`bool` enable **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_monitoring_enabled` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_overlapping_bodies` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_overlapping_areas` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PhysicsBody` | :ref:`overlaps_body` **(** :ref:`Object` body **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Area` | :ref:`overlaps_area` **(** :ref:`Object` area **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **body_enter** **(** :ref:`Object` body **)** +- **body_enter_shape** **(** :ref:`int` body_id, :ref:`Object` body, :ref:`int` body_shape, :ref:`int` area_shape **)** +- **area_enter** **(** :ref:`Object` area **)** +- **area_enter_shape** **(** :ref:`int` area_id, :ref:`Object` area, :ref:`int` area_shape, :ref:`int` area_shape **)** +- **body_exit** **(** :ref:`Object` body **)** +- **body_exit_shape** **(** :ref:`int` body_id, :ref:`Object` body, :ref:`int` body_shape, :ref:`int` area_shape **)** +- **area_exit** **(** :ref:`Object` area **)** +- **area_exit_shape** **(** :ref:`int` area_id, :ref:`Object` area, :ref:`int` area_shape, :ref:`int` area_shape **)** + +Member Function Description +--------------------------- + +.. _class_Area_set_space_override_mode: + +- void **set_space_override_mode** **(** :ref:`int` enable **)** + +Set the space override mode. This mode controls how an area affects gravity and damp. + +AREA_SPACE_OVERRIDE_DISABLED: This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them. + +AREA_SPACE_OVERRIDE_COMBINE: This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects. + +AREA_SPACE_OVERRIDE_COMBINE_REPLACE: This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one. + +AREA_SPACE_OVERRIDE_REPLACE: This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas. + +AREA_SPACE_OVERRIDE_REPLACE_COMBINE: This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. + +.. _class_Area_get_space_override_mode: + +- :ref:`int` **get_space_override_mode** **(** **)** const + +.. _class_Area_set_gravity_is_point: + +- void **set_gravity_is_point** **(** :ref:`bool` enable **)** + +.. _class_Area_is_gravity_a_point: + +- :ref:`bool` **is_gravity_a_point** **(** **)** const + +.. _class_Area_set_gravity_distance_scale: + +- void **set_gravity_distance_scale** **(** :ref:`float` distance_scale **)** + +.. _class_Area_get_gravity_distance_scale: + +- :ref:`float` **get_gravity_distance_scale** **(** **)** const + +.. _class_Area_set_gravity_vector: + +- void **set_gravity_vector** **(** :ref:`Vector3` vector **)** + +.. _class_Area_get_gravity_vector: + +- :ref:`Vector3` **get_gravity_vector** **(** **)** const + +.. _class_Area_set_gravity: + +- void **set_gravity** **(** :ref:`float` gravity **)** + +.. _class_Area_get_gravity: + +- :ref:`float` **get_gravity** **(** **)** const + +.. _class_Area_set_angular_damp: + +- void **set_angular_damp** **(** :ref:`float` angular_damp **)** + +.. _class_Area_get_angular_damp: + +- :ref:`float` **get_angular_damp** **(** **)** const + +.. _class_Area_set_linear_damp: + +- void **set_linear_damp** **(** :ref:`float` linear_damp **)** + +.. _class_Area_get_linear_damp: + +- :ref:`float` **get_linear_damp** **(** **)** const + +.. _class_Area_set_priority: + +- void **set_priority** **(** :ref:`float` priority **)** + +.. _class_Area_get_priority: + +- :ref:`float` **get_priority** **(** **)** const + +.. _class_Area_set_monitorable: + +- void **set_monitorable** **(** :ref:`bool` enable **)** + +.. _class_Area_is_monitorable: + +- :ref:`bool` **is_monitorable** **(** **)** const + +.. _class_Area_set_enable_monitoring: + +- void **set_enable_monitoring** **(** :ref:`bool` enable **)** + +.. _class_Area_is_monitoring_enabled: + +- :ref:`bool` **is_monitoring_enabled** **(** **)** const + +.. _class_Area_get_overlapping_bodies: + +- :ref:`Array` **get_overlapping_bodies** **(** **)** const + +.. _class_Area_get_overlapping_areas: + +- :ref:`Array` **get_overlapping_areas** **(** **)** const + +.. _class_Area_overlaps_body: + +- :ref:`PhysicsBody` **overlaps_body** **(** :ref:`Object` body **)** const + +.. _class_Area_overlaps_area: + +- :ref:`Area` **overlaps_area** **(** :ref:`Object` area **)** const + + diff --git a/classes/class_area2d.rst b/classes/class_area2d.rst new file mode 100644 index 000000000..de6512ba1 --- /dev/null +++ b/classes/class_area2d.rst @@ -0,0 +1,322 @@ +.. _class_Area2D: + +Area2D +====== + +Inherits: :ref:`CollisionObject2D` +----------------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +General purpose area detection and influence for 2D physics. + +Member Functions +---------------- + ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_space_override_mode` **(** :ref:`int` enable **)** | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_space_override_mode` **(** **)** const | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_gravity_is_point` **(** :ref:`bool` enable **)** | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_gravity_a_point` **(** **)** const | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_gravity_distance_scale` **(** :ref:`float` distance_scale **)** | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_gravity_distance_scale` **(** **)** const | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_gravity_vector` **(** :ref:`Vector2` vector **)** | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_gravity_vector` **(** **)** const | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_gravity` **(** :ref:`float` gravity **)** | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_gravity` **(** **)** const | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_linear_damp` **(** :ref:`float` linear_damp **)** | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_linear_damp` **(** **)** const | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_angular_damp` **(** :ref:`float` angular_damp **)** | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_angular_damp` **(** **)** const | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_priority` **(** :ref:`float` priority **)** | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_priority` **(** **)** const | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_mask` **(** :ref:`int` collision_mask **)** | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_collision_mask` **(** **)** const | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_layer_mask` **(** :ref:`int` layer_mask **)** | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_layer_mask` **(** **)** const | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_mask_bit` **(** :ref:`int` bit, :ref:`bool` value **)** | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_collision_mask_bit` **(** :ref:`int` bit **)** const | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_layer_mask_bit` **(** :ref:`int` bit, :ref:`bool` value **)** | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_layer_mask_bit` **(** :ref:`int` bit **)** const | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_enable_monitoring` **(** :ref:`bool` enable **)** | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_monitoring_enabled` **(** **)** const | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_monitorable` **(** :ref:`bool` enable **)** | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_monitorable` **(** **)** const | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_overlapping_bodies` **(** **)** const | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_overlapping_areas` **(** **)** const | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PhysicsBody2D` | :ref:`overlaps_body` **(** :ref:`Object` body **)** const | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Area2D` | :ref:`overlaps_area` **(** :ref:`Object` area **)** const | ++--------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **body_enter** **(** :ref:`Object` body **)** +- **body_enter_shape** **(** :ref:`int` body_id, :ref:`Object` body, :ref:`int` body_shape, :ref:`int` area_shape **)** +- **area_enter** **(** :ref:`Object` area **)** +- **area_enter_shape** **(** :ref:`int` area_id, :ref:`Object` area, :ref:`int` area_shape, :ref:`int` area_shape **)** +- **body_exit** **(** :ref:`Object` body **)** +- **body_exit_shape** **(** :ref:`int` body_id, :ref:`Object` body, :ref:`int` body_shape, :ref:`int` area_shape **)** +- **area_exit** **(** :ref:`Object` area **)** +- **area_exit_shape** **(** :ref:`int` area_id, :ref:`Object` area, :ref:`int` area_shape, :ref:`int` area_shape **)** + +Description +----------- + +General purpose area detection for 2D physics. Areas can be used for detection of objects that enter/exit them, as well as overriding space parameters (changing gravity, damping, etc). For this, use any space override different from AREA_SPACE_OVERRIDE_DISABLE and point gravity at the center of mass. + +Member Function Description +--------------------------- + +.. _class_Area2D_set_space_override_mode: + +- void **set_space_override_mode** **(** :ref:`int` enable **)** + +Set the space override mode. This mode controls how an area affects gravity and damp. + +AREA_SPACE_OVERRIDE_DISABLED: This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them. + +AREA_SPACE_OVERRIDE_COMBINE: This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects. + +AREA_SPACE_OVERRIDE_COMBINE_REPLACE: This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one. + +AREA_SPACE_OVERRIDE_REPLACE: This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas. + +AREA_SPACE_OVERRIDE_REPLACE_COMBINE: This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. + +.. _class_Area2D_get_space_override_mode: + +- :ref:`int` **get_space_override_mode** **(** **)** const + +Return the space override mode. + +.. _class_Area2D_set_gravity_is_point: + +- void **set_gravity_is_point** **(** :ref:`bool` enable **)** + +When overriding space parameters, this method sets whether this area has a center of gravity. To set/get the location of the center of gravity, use :ref:`set_gravity_vector`/:ref:`get_gravity_vector`. + +.. _class_Area2D_is_gravity_a_point: + +- :ref:`bool` **is_gravity_a_point** **(** **)** const + +Return whether gravity is a point. A point gravity will attract objects towards it, as opposed to a gravity vector, which moves them in a given direction. + +.. _class_Area2D_set_gravity_distance_scale: + +- void **set_gravity_distance_scale** **(** :ref:`float` distance_scale **)** + +Set the falloff factor for point gravity. The greater this value is, the faster the strength of gravity decreases with the square of distance. + +.. _class_Area2D_get_gravity_distance_scale: + +- :ref:`float` **get_gravity_distance_scale** **(** **)** const + +Return the falloff factor for point gravity. + +.. _class_Area2D_set_gravity_vector: + +- void **set_gravity_vector** **(** :ref:`Vector2` vector **)** + +Set the gravity vector. This vector does not have to be normalized. + +If gravity is a point (see :ref:`is_gravity_a_point`), this will be the attraction center. + +.. _class_Area2D_get_gravity_vector: + +- :ref:`Vector2` **get_gravity_vector** **(** **)** const + +Return the gravity vector. If gravity is a point (see :ref:`is_gravity_a_point`), this will be the attraction center. + +.. _class_Area2D_set_gravity: + +- void **set_gravity** **(** :ref:`float` gravity **)** + +Set the gravity intensity. This is useful to alter the force of gravity without altering its direction. + +This value multiplies the gravity vector, whether it is the given vector (:ref:`set_gravity_vector`), or a calculated one (when using a center of gravity). + +.. _class_Area2D_get_gravity: + +- :ref:`float` **get_gravity** **(** **)** const + +Return the gravity intensity. + +.. _class_Area2D_set_linear_damp: + +- void **set_linear_damp** **(** :ref:`float` linear_damp **)** + +Set the rate at which objects stop moving in this area, if there are not any other forces moving it. The value is a fraction of its current speed, lost per second. Thus, a value of 1.0 should mean stopping immediately, and 0.0 means the object never stops. + +In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second. + +.. _class_Area2D_get_linear_damp: + +- :ref:`float` **get_linear_damp** **(** **)** const + +Return the linear damp rate. + +.. _class_Area2D_set_angular_damp: + +- void **set_angular_damp** **(** :ref:`float` angular_damp **)** + +Set the rate at which objects stop spinning in this area, if there are not any other forces making it spin. The value is a fraction of its current speed, lost per second. Thus, a value of 1.0 should mean stopping immediately, and 0.0 means the object never stops. + +In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second. + +.. _class_Area2D_get_angular_damp: + +- :ref:`float` **get_angular_damp** **(** **)** const + +Return the angular damp rate. + +.. _class_Area2D_set_priority: + +- void **set_priority** **(** :ref:`float` priority **)** + +Set the order in which the area is processed. Greater values mean the area gets processed first. This is useful for areas which have an space override different from AREA_SPACE_OVERRIDE_DISABLED or AREA_SPACE_OVERRIDE_COMBINE, as they replace values, and are thus order-dependent. + +Areas with the same priority value get evaluated in an unpredictable order, and should be differentiated if evaluation order is to be important. + +.. _class_Area2D_get_priority: + +- :ref:`float` **get_priority** **(** **)** const + +Return the processing order of this area. + +.. _class_Area2D_set_collision_mask: + +- void **set_collision_mask** **(** :ref:`int` collision_mask **)** + +Set the physics layers this area can scan for collisions. + +.. _class_Area2D_get_collision_mask: + +- :ref:`int` **get_collision_mask** **(** **)** const + +Return the physics layers this area can scan for collisions. + +.. _class_Area2D_set_layer_mask: + +- void **set_layer_mask** **(** :ref:`int` layer_mask **)** + +Set the physics layers this area is in. + +Collidable objects can exist in any of 32 different layers. These layers are not visual, but more of a tagging system instead. A collidable can use these layers/tags to select with which objects it can collide, using :ref:`set_collision_mask`. + +A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. + +.. _class_Area2D_get_layer_mask: + +- :ref:`int` **get_layer_mask** **(** **)** const + +Return the physics layer this area is in. + +.. _class_Area2D_set_collision_mask_bit: + +- void **set_collision_mask_bit** **(** :ref:`int` bit, :ref:`bool` value **)** + +Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier. + +.. _class_Area2D_get_collision_mask_bit: + +- :ref:`bool` **get_collision_mask_bit** **(** :ref:`int` bit **)** const + +Return an individual bit on the collision mask. + +.. _class_Area2D_set_layer_mask_bit: + +- void **set_layer_mask_bit** **(** :ref:`int` bit, :ref:`bool` value **)** + +Set/clear individual bits on the layer mask. This makes getting an area in/out of only one layer easier. + +.. _class_Area2D_get_layer_mask_bit: + +- :ref:`bool` **get_layer_mask_bit** **(** :ref:`int` bit **)** const + +Return an individual bit on the layer mask. + +.. _class_Area2D_set_enable_monitoring: + +- void **set_enable_monitoring** **(** :ref:`bool` enable **)** + +Set whether this area can detect bodies/areas entering/exiting it. + +.. _class_Area2D_is_monitoring_enabled: + +- :ref:`bool` **is_monitoring_enabled** **(** **)** const + +Return whether this area detects bodies/areas entering/exiting it. + +.. _class_Area2D_set_monitorable: + +- void **set_monitorable** **(** :ref:`bool` enable **)** + +Set whether this area can be detected by other, monitoring, areas. Only areas need to be marked as monitorable. Bodies are always so. + +.. _class_Area2D_is_monitorable: + +- :ref:`bool` **is_monitorable** **(** **)** const + +Set whether this area can be detected by other, monitoring, areas. + +.. _class_Area2D_get_overlapping_bodies: + +- :ref:`Array` **get_overlapping_bodies** **(** **)** const + +Return a list of the bodies (:ref:`PhysicsBody2D`) that are totally or partially inside this area. + +.. _class_Area2D_get_overlapping_areas: + +- :ref:`Array` **get_overlapping_areas** **(** **)** const + +Return a list of the areas that are totally or partially inside this area. + +.. _class_Area2D_overlaps_body: + +- :ref:`PhysicsBody2D` **overlaps_body** **(** :ref:`Object` body **)** const + +Return whether the body passed is totally or partially inside this area. + +.. _class_Area2D_overlaps_area: + +- :ref:`Area2D` **overlaps_area** **(** :ref:`Object` area **)** const + +Return whether the area passed is totally or partially inside this area. + + diff --git a/classes/class_array.rst b/classes/class_array.rst new file mode 100644 index 000000000..9310cbdb6 --- /dev/null +++ b/classes/class_array.rst @@ -0,0 +1,221 @@ +.. _class_Array: + +Array +===== + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + +Generic array datatype. + +Member Functions +---------------- + ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`append` **(** var value **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`empty` **(** **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`erase` **(** var value **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`find` **(** var value **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`hash` **(** **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`insert` **(** :ref:`int` pos, var value **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`invert` **(** **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_shared` **(** **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`pop_back` **(** **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`pop_front` **(** **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`push_back` **(** var value **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`push_front` **(** var value **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove` **(** :ref:`int` pos **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`resize` **(** :ref:`int` pos **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`size` **(** **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`sort` **(** **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`sort_custom` **(** :ref:`Object` obj, :ref:`String` func **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`Array` **(** :ref:`RawArray` from **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`Array` **(** :ref:`IntArray` from **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`Array` **(** :ref:`RealArray` from **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`Array` **(** :ref:`StringArray` from **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`Array` **(** :ref:`Vector2Array` from **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`Array` **(** :ref:`Vector3Array` from **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`Array` **(** :ref:`ColorArray` from **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Generic array, contains several elements of any type, accessible by numerical index starting at 0. Arrays are always passed by reference. + +Member Function Description +--------------------------- + +.. _class_Array_append: + +- void **append** **(** var value **)** + +Append an element at the end of the array (alias of :ref:`push_back`). + +.. _class_Array_clear: + +- void **clear** **(** **)** + +Clear the array (resize to 0). + +.. _class_Array_empty: + +- :ref:`bool` **empty** **(** **)** + +Return true if the array is empty (size==0). + +.. _class_Array_erase: + +- void **erase** **(** var value **)** + +Remove the first occurence of a value from the array. + +.. _class_Array_find: + +- :ref:`int` **find** **(** var value **)** + +Searches the array for a value and returns its index or -1 if not found. + +.. _class_Array_hash: + +- :ref:`int` **hash** **(** **)** + +Return a hashed integer value representing the array contents. + +.. _class_Array_insert: + +- void **insert** **(** :ref:`int` pos, var value **)** + +Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()). + +.. _class_Array_invert: + +- void **invert** **(** **)** + +Reverse the order of the elements in the array (so first element will now be the last). + +.. _class_Array_is_shared: + +- :ref:`bool` **is_shared** **(** **)** + +Get whether this is a shared array instance. + +.. _class_Array_pop_back: + +- void **pop_back** **(** **)** + +.. _class_Array_pop_front: + +- void **pop_front** **(** **)** + +.. _class_Array_push_back: + +- void **push_back** **(** var value **)** + +Append an element at the end of the array. + +.. _class_Array_push_front: + +- void **push_front** **(** var value **)** + +.. _class_Array_remove: + +- void **remove** **(** :ref:`int` pos **)** + +Remove an element from the array by index. + +.. _class_Array_resize: + +- void **resize** **(** :ref:`int` pos **)** + +Resize the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are Null. + +.. _class_Array_size: + +- :ref:`int` **size** **(** **)** + +Return the amount of elements in the array. + +.. _class_Array_sort: + +- void **sort** **(** **)** + +Sort the array using natural order. + +.. _class_Array_sort_custom: + +- void **sort_custom** **(** :ref:`Object` obj, :ref:`String` func **)** + +Sort the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return true if the first argument is less than the second, and return false otherwise. + +.. _class_Array_Array: + +- :ref:`Array` **Array** **(** :ref:`RawArray` from **)** + +Construct an array from a :ref:`RawArray`. + +.. _class_Array_Array: + +- :ref:`Array` **Array** **(** :ref:`IntArray` from **)** + +Construct an array from a :ref:`RawArray`. + +.. _class_Array_Array: + +- :ref:`Array` **Array** **(** :ref:`RealArray` from **)** + +Construct an array from a :ref:`RawArray`. + +.. _class_Array_Array: + +- :ref:`Array` **Array** **(** :ref:`StringArray` from **)** + +Construct an array from a :ref:`RawArray`. + +.. _class_Array_Array: + +- :ref:`Array` **Array** **(** :ref:`Vector2Array` from **)** + +Construct an array from a :ref:`RawArray`. + +.. _class_Array_Array: + +- :ref:`Array` **Array** **(** :ref:`Vector3Array` from **)** + +Construct an array from a :ref:`RawArray`. + +.. _class_Array_Array: + +- :ref:`Array` **Array** **(** :ref:`ColorArray` from **)** + +Construct an array from a :ref:`RawArray`. + + diff --git a/classes/class_atlastexture.rst b/classes/class_atlastexture.rst new file mode 100644 index 000000000..af173568e --- /dev/null +++ b/classes/class_atlastexture.rst @@ -0,0 +1,61 @@ +.. _class_AtlasTexture: + +AtlasTexture +============ + +Inherits: :ref:`Texture` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------------+--------------------------------------------------------------------------------------------------+ +| void | :ref:`set_atlas` **(** :ref:`Texture` atlas **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_atlas` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------+ +| void | :ref:`set_region` **(** :ref:`Rect2` region **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`get_region` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------+ +| void | :ref:`set_margin` **(** :ref:`Rect2` margin **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`get_margin` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_AtlasTexture_set_atlas: + +- void **set_atlas** **(** :ref:`Texture` atlas **)** + +.. _class_AtlasTexture_get_atlas: + +- :ref:`Texture` **get_atlas** **(** **)** const + +.. _class_AtlasTexture_set_region: + +- void **set_region** **(** :ref:`Rect2` region **)** + +.. _class_AtlasTexture_get_region: + +- :ref:`Rect2` **get_region** **(** **)** const + +.. _class_AtlasTexture_set_margin: + +- void **set_margin** **(** :ref:`Rect2` margin **)** + +.. _class_AtlasTexture_get_margin: + +- :ref:`Rect2` **get_margin** **(** **)** const + + diff --git a/classes/class_audioserver.rst b/classes/class_audioserver.rst new file mode 100644 index 000000000..93aad2d3f --- /dev/null +++ b/classes/class_audioserver.rst @@ -0,0 +1,432 @@ +.. _class_AudioServer: + +AudioServer +=========== + +Inherits: :ref:`Object` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Server interface for low level audio access. + +Member Functions +---------------- + ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`sample_create` **(** :ref:`int` format, :ref:`bool` stereo, :ref:`int` length **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`sample_set_description` **(** :ref:`RID` sample, :ref:`String` description **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`sample_get_description` **(** :ref:`RID` sample **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`sample_get_format` **(** :ref:`RID` sample **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`sample_is_stereo` **(** :ref:`RID` sample **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`sample_get_length` **(** :ref:`RID` sample **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`sample_set_signed_data` **(** :ref:`RID` sample, :ref:`RealArray` data **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`sample_set_data` **(** :ref:`RID` sample, :ref:`RawArray` data **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RawArray` | :ref:`sample_get_data` **(** :ref:`RID` sample **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`sample_set_mix_rate` **(** :ref:`RID` sample, :ref:`int` mix_rate **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`sample_get_mix_rate` **(** :ref:`RID` sample **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`sample_set_loop_format` **(** :ref:`RID` sample, :ref:`int` loop_format **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`sample_get_loop_format` **(** :ref:`RID` sample **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`sample_set_loop_begin` **(** :ref:`RID` sample, :ref:`int` pos **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`sample_get_loop_begin` **(** :ref:`RID` sample **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`sample_set_loop_end` **(** :ref:`RID` sample, :ref:`int` pos **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`sample_get_loop_end` **(** :ref:`RID` sample **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`voice_create` **(** **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`voice_play` **(** :ref:`RID` voice, :ref:`RID` sample **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`voice_set_volume` **(** :ref:`RID` voice, :ref:`float` volume **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`voice_set_pan` **(** :ref:`RID` voice, :ref:`float` pan, :ref:`float` depth=0, :ref:`float` height=0 **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`voice_set_filter` **(** :ref:`RID` voice, :ref:`int` type, :ref:`float` cutoff, :ref:`float` resonance, :ref:`float` gain=0 **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`voice_set_chorus` **(** :ref:`RID` voice, :ref:`float` chorus **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`voice_set_reverb` **(** :ref:`RID` voice, :ref:`int` room, :ref:`float` reverb **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`voice_set_mix_rate` **(** :ref:`RID` voice, :ref:`int` rate **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`voice_set_positional` **(** :ref:`RID` voice, :ref:`bool` enabled **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`voice_get_volume` **(** :ref:`RID` voice **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`voice_get_pan` **(** :ref:`RID` voice **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`voice_get_pan_height` **(** :ref:`RID` voice **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`voice_get_pan_depth` **(** :ref:`RID` voice **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`voice_get_filter_type` **(** :ref:`RID` voice **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`voice_get_filter_cutoff` **(** :ref:`RID` voice **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`voice_get_filter_resonance` **(** :ref:`RID` voice **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`voice_get_chorus` **(** :ref:`RID` voice **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`voice_get_reverb_type` **(** :ref:`RID` voice **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`voice_get_reverb` **(** :ref:`RID` voice **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`voice_get_mix_rate` **(** :ref:`RID` voice **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`voice_is_positional` **(** :ref:`RID` voice **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`voice_stop` **(** :ref:`RID` voice **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`free_rid` **(** :ref:`RID` rid **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_stream_global_volume_scale` **(** :ref:`float` scale **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_stream_global_volume_scale` **(** **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_fx_global_volume_scale` **(** :ref:`float` scale **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_fx_global_volume_scale` **(** **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_event_voice_global_volume_scale` **(** :ref:`float` scale **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_event_voice_global_volume_scale` **(** **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **SAMPLE_FORMAT_PCM8** = **0** --- Sample format is 8 bits, signed. +- **SAMPLE_FORMAT_PCM16** = **1** --- Sample format is 16 bits, little-endian, signed. +- **SAMPLE_FORMAT_IMA_ADPCM** = **2** --- Sample format is IMA-ADPCM compressed. +- **SAMPLE_LOOP_NONE** = **0** --- Sample does not loop. +- **SAMPLE_LOOP_FORWARD** = **1** --- Sample loops in forward mode. +- **SAMPLE_LOOP_PING_PONG** = **2** --- Sample loops in a bidirectional way. +- **FILTER_NONE** = **0** --- Filter is disabled. +- **FILTER_LOWPASS** = **1** --- Filter is a resonant lowpass. +- **FILTER_BANDPASS** = **2** --- Filter is a resonant bandpass. +- **FILTER_HIPASS** = **3** --- Filter is a resonant highpass. +- **FILTER_NOTCH** = **4** --- Filter is a notch (band reject). +- **FILTER_BANDLIMIT** = **6** --- Filter is a bandlimit (resonance used as highpass). +- **REVERB_SMALL** = **0** --- Small reverb room (closet, bathroom, etc). +- **REVERB_MEDIUM** = **1** --- Medium reverb room (living room) +- **REVERB_LARGE** = **2** --- Large reverb room (warehouse). +- **REVERB_HALL** = **3** --- Large reverb room with long decay. + +Description +----------- + +AudioServer is a low level server interface for audio access. It is in charge of creating sample data (playable audio) as well as its playback via a voice interface. + +Member Function Description +--------------------------- + +.. _class_AudioServer_sample_create: + +- :ref:`RID` **sample_create** **(** :ref:`int` format, :ref:`bool` stereo, :ref:`int` length **)** + +Create an audio sample, return a :ref:`RID` referencing it. The sample will be created with a given format (from the SAMPLE_FORMAT_* enum), a total length (in samples, not bytes), in either stereo or mono. + +Even if a stereo sample consists of a left sample and a right sample, it still counts as one sample for length purposes. + +.. _class_AudioServer_sample_set_description: + +- void **sample_set_description** **(** :ref:`RID` sample, :ref:`String` description **)** + +Set the description of an audio sample. Mainly used for organization. + +.. _class_AudioServer_sample_get_description: + +- :ref:`String` **sample_get_description** **(** :ref:`RID` sample **)** const + +Return the description of an audio sample. Mainly used for organization. + +.. _class_AudioServer_sample_get_format: + +- :ref:`int` **sample_get_format** **(** :ref:`RID` sample **)** const + +Return the format of the audio sample, in the form of the SAMPLE_FORMAT_* enum. + +.. _class_AudioServer_sample_is_stereo: + +- :ref:`bool` **sample_is_stereo** **(** :ref:`RID` sample **)** const + +Return whether the sample is stereo (2 channels). + +.. _class_AudioServer_sample_get_length: + +- :ref:`int` **sample_get_length** **(** :ref:`RID` sample **)** const + +Return the length in samples (not bytes) of the audio sample. Even if a stereo sample consists of a left sample and a right sample, it still counts as one sample for length purposes. + +.. _class_AudioServer_sample_set_signed_data: + +- void **sample_set_signed_data** **(** :ref:`RID` sample, :ref:`RealArray` data **)** + +Set the sample data for a given sample as an array of floats. The length must be equal to the sample lenght or an error will be produced. + +For this method, a stereo sample is made from two samples. Thus, in case of a stereo sample, the array length must be twice the length returned by :ref:`sample_get_length`. + +Trying to alter a SAMPLE_FORMAT_IMA_ADPCM sample is not supported. It will throw an error to the console, but will not alter the sample data. + +.. _class_AudioServer_sample_set_data: + +- void **sample_set_data** **(** :ref:`RID` sample, :ref:`RawArray` data **)** + +Set the sample data for a given sample as an array of bytes. The length must be equal to the sample lenght expected in bytes or an error will be produced. The byte length can be calculated as follows: + +Get the sample length (:ref:`get_sample_length`). + +If the sample format is SAMPLE_FORMAT_PCM16, multiply it by 2. + +If the sample format is SAMPLE_FORMAT_IMA_ADPCM, divide it by 2 (rounding any fraction up), then add 4. + +If the sample is stereo (:ref:`sample_is_stereo`), multiply it by 2. + +.. _class_AudioServer_sample_get_data: + +- :ref:`RawArray` **sample_get_data** **(** :ref:`RID` sample **)** const + +Return the sample data as an array of bytes. The length will be the expected length in bytes. + +.. _class_AudioServer_sample_set_mix_rate: + +- void **sample_set_mix_rate** **(** :ref:`RID` sample, :ref:`int` mix_rate **)** + +Change the default mix rate of a given sample. + +.. _class_AudioServer_sample_get_mix_rate: + +- :ref:`int` **sample_get_mix_rate** **(** :ref:`RID` sample **)** const + +Return the mix rate of the given sample. + +.. _class_AudioServer_sample_set_loop_format: + +- void **sample_set_loop_format** **(** :ref:`RID` sample, :ref:`int` loop_format **)** + +Set the loop format for a sample from the SAMPLE_LOOP_* enum. As a warning, Ping Pong loops may not be available on some hardware-mixing platforms. + +.. _class_AudioServer_sample_get_loop_format: + +- :ref:`int` **sample_get_loop_format** **(** :ref:`RID` sample **)** const + +Return the loop format for a sample, as a value from the SAMPLE_LOOP_* enum. + +.. _class_AudioServer_sample_set_loop_begin: + +- void **sample_set_loop_begin** **(** :ref:`RID` sample, :ref:`int` pos **)** + +Set the initial loop point of a sample. Only has effect if sample loop is enabled. See :ref:`sample_set_loop_format`. + +.. _class_AudioServer_sample_get_loop_begin: + +- :ref:`int` **sample_get_loop_begin** **(** :ref:`RID` sample **)** const + +Return the initial loop point of a sample. Only has effect if sample loop is enabled. See :ref:`sample_set_loop_format`. + +.. _class_AudioServer_sample_set_loop_end: + +- void **sample_set_loop_end** **(** :ref:`RID` sample, :ref:`int` pos **)** + +Set the final loop point of a sample. Only has effect if sample loop is enabled. See :ref:`sample_set_loop_format`. + +.. _class_AudioServer_sample_get_loop_end: + +- :ref:`int` **sample_get_loop_end** **(** :ref:`RID` sample **)** const + +Return the final loop point of a sample. Only has effect if sample loop is enabled. See :ref:`sample_set_loop_format`. + +.. _class_AudioServer_voice_create: + +- :ref:`RID` **voice_create** **(** **)** + +Allocate a voice for playback. Voices are persistent. A voice can play a single sample at the same time. See :ref:`sample_create`. + +.. _class_AudioServer_voice_play: + +- void **voice_play** **(** :ref:`RID` voice, :ref:`RID` sample **)** + +Start playback of a given voice using a given sample. If the voice was already playing it will be restarted. + +.. _class_AudioServer_voice_set_volume: + +- void **voice_set_volume** **(** :ref:`RID` voice, :ref:`float` volume **)** + +Change the volume of a currently playing voice. Volume is expressed as linear gain where 0.0 is mute and 1.0 is default. + +.. _class_AudioServer_voice_set_pan: + +- void **voice_set_pan** **(** :ref:`RID` voice, :ref:`float` pan, :ref:`float` depth=0, :ref:`float` height=0 **)** + +Change the pan of a currently playing voice and, optionally, the depth and height for a positional/3D sound. Panning values are expressed within the -1 to +1 range. + +.. _class_AudioServer_voice_set_filter: + +- void **voice_set_filter** **(** :ref:`RID` voice, :ref:`int` type, :ref:`float` cutoff, :ref:`float` resonance, :ref:`float` gain=0 **)** + +Set a resonant filter post processing for the voice. Filter type is a value from the FILTER_* enum. + +.. _class_AudioServer_voice_set_chorus: + +- void **voice_set_chorus** **(** :ref:`RID` voice, :ref:`float` chorus **)** + +Set chorus send post processing for the voice (from 0 to 1). + +.. _class_AudioServer_voice_set_reverb: + +- void **voice_set_reverb** **(** :ref:`RID` voice, :ref:`int` room, :ref:`float` reverb **)** + +Set the reverb send post processing for the voice (from 0 to 1) and the reverb type, from the REVERB_* enum. + +.. _class_AudioServer_voice_set_mix_rate: + +- void **voice_set_mix_rate** **(** :ref:`RID` voice, :ref:`int` rate **)** + +Set a different playback mix rate for the given voice. + +.. _class_AudioServer_voice_set_positional: + +- void **voice_set_positional** **(** :ref:`RID` voice, :ref:`bool` enabled **)** + +Set wether a given voice is positional. This is only interpreted as a hint and used for backends that may support binaural encoding. + +.. _class_AudioServer_voice_get_volume: + +- :ref:`float` **voice_get_volume** **(** :ref:`RID` voice **)** const + +Return the current volume for a given voice. + +.. _class_AudioServer_voice_get_pan: + +- :ref:`float` **voice_get_pan** **(** :ref:`RID` voice **)** const + +Return the current pan for a given voice (-1 to +1 range). + +.. _class_AudioServer_voice_get_pan_height: + +- :ref:`float` **voice_get_pan_height** **(** :ref:`RID` voice **)** const + +Return the current pan height for a given voice (-1 to +1 range). + +.. _class_AudioServer_voice_get_pan_depth: + +- :ref:`float` **voice_get_pan_depth** **(** :ref:`RID` voice **)** const + +Return the current pan depth for a given voice (-1 to +1 range). + +.. _class_AudioServer_voice_get_filter_type: + +- :ref:`int` **voice_get_filter_type** **(** :ref:`RID` voice **)** const + +Return the current selected filter type for a given voice, from the FILTER_* enum. + +.. _class_AudioServer_voice_get_filter_cutoff: + +- :ref:`float` **voice_get_filter_cutoff** **(** :ref:`RID` voice **)** const + +Return the current filter cutoff (in hz) for a given voice. + +.. _class_AudioServer_voice_get_filter_resonance: + +- :ref:`float` **voice_get_filter_resonance** **(** :ref:`RID` voice **)** const + +Return the current filter resonance for a given voice. + +.. _class_AudioServer_voice_get_chorus: + +- :ref:`float` **voice_get_chorus** **(** :ref:`RID` voice **)** const + +Return the current chorus send for a given voice (0 to 1). + +.. _class_AudioServer_voice_get_reverb_type: + +- :ref:`int` **voice_get_reverb_type** **(** :ref:`RID` voice **)** const + +Return the current reverb type for a given voice from the REVERB_* enum. + +.. _class_AudioServer_voice_get_reverb: + +- :ref:`float` **voice_get_reverb** **(** :ref:`RID` voice **)** const + +Return the current reverb send for a given voice (0 to 1). + +.. _class_AudioServer_voice_get_mix_rate: + +- :ref:`int` **voice_get_mix_rate** **(** :ref:`RID` voice **)** const + +Return the current mix rate for a given voice. + +.. _class_AudioServer_voice_is_positional: + +- :ref:`bool` **voice_is_positional** **(** :ref:`RID` voice **)** const + +Return wether the current voice is positional. See :ref:`voice_set_positional`. + +.. _class_AudioServer_voice_stop: + +- void **voice_stop** **(** :ref:`RID` voice **)** + +Stop a given voice. + +.. _class_AudioServer_free_rid: + +- void **free_rid** **(** :ref:`RID` rid **)** + +Free a :ref:`RID` resource. + +.. _class_AudioServer_set_stream_global_volume_scale: + +- void **set_stream_global_volume_scale** **(** :ref:`float` scale **)** + +Set global scale for stream playback. Default is 1.0. + +.. _class_AudioServer_get_stream_global_volume_scale: + +- :ref:`float` **get_stream_global_volume_scale** **(** **)** const + +Return the global scale for stream playback. + +.. _class_AudioServer_set_fx_global_volume_scale: + +- void **set_fx_global_volume_scale** **(** :ref:`float` scale **)** + +Set global scale for all voices (not including streams). Default is 1.0. + +.. _class_AudioServer_get_fx_global_volume_scale: + +- :ref:`float` **get_fx_global_volume_scale** **(** **)** const + +Return the global scale for all voices. + +.. _class_AudioServer_set_event_voice_global_volume_scale: + +- void **set_event_voice_global_volume_scale** **(** :ref:`float` scale **)** + +Set global scale for event-based stream (:ref:`EventStream`) playback. Default is 1.0. + +.. _class_AudioServer_get_event_voice_global_volume_scale: + +- :ref:`float` **get_event_voice_global_volume_scale** **(** **)** const + +Return the global scale for event-based stream playback. + + diff --git a/classes/class_audioserversw.rst b/classes/class_audioserversw.rst new file mode 100644 index 000000000..5646e3c2f --- /dev/null +++ b/classes/class_audioserversw.rst @@ -0,0 +1,23 @@ +.. _class_AudioServerSW: + +AudioServerSW +============= + +Inherits: :ref:`AudioServer` +----------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Software implementation of :ref:`AudioServer`. + +Description +----------- + +This is a software audio server. It does not use any kind of hardware acceleration. + +This class does not expose any new method. + diff --git a/classes/class_audiostream.rst b/classes/class_audiostream.rst new file mode 100644 index 000000000..b4be1b855 --- /dev/null +++ b/classes/class_audiostream.rst @@ -0,0 +1,21 @@ +.. _class_AudioStream: + +AudioStream +=========== + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Base class for audio streams. + +Description +----------- + +Base class for audio streams. Audio streams are used for music playback, or other types of streamed sounds that don't fit or requiere more flexibility than a :ref:`Sample`. + diff --git a/classes/class_audiostreammpc.rst b/classes/class_audiostreammpc.rst new file mode 100644 index 000000000..48e892208 --- /dev/null +++ b/classes/class_audiostreammpc.rst @@ -0,0 +1,21 @@ +.. _class_AudioStreamMPC: + +AudioStreamMPC +============== + +Inherits: :ref:`AudioStream` +----------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +MusePack audio stream driver. + +Description +----------- + +MusePack audio stream driver. + diff --git a/classes/class_audiostreamoggvorbis.rst b/classes/class_audiostreamoggvorbis.rst new file mode 100644 index 000000000..3bd600e1c --- /dev/null +++ b/classes/class_audiostreamoggvorbis.rst @@ -0,0 +1,21 @@ +.. _class_AudioStreamOGGVorbis: + +AudioStreamOGGVorbis +==================== + +Inherits: :ref:`AudioStream` +----------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +OGG Vorbis audio stream driver. + +Description +----------- + +OGG Vorbis audio stream driver. + diff --git a/classes/class_audiostreamopus.rst b/classes/class_audiostreamopus.rst new file mode 100644 index 000000000..6ebc34e5f --- /dev/null +++ b/classes/class_audiostreamopus.rst @@ -0,0 +1,21 @@ +.. _class_AudioStreamOpus: + +AudioStreamOpus +=============== + +Inherits: :ref:`AudioStream` +----------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Opus Codec audio stream driver. + +Description +----------- + +Opus Codec audio stream driver. + diff --git a/classes/class_audiostreamplayback.rst b/classes/class_audiostreamplayback.rst new file mode 100644 index 000000000..3db3cf50b --- /dev/null +++ b/classes/class_audiostreamplayback.rst @@ -0,0 +1,97 @@ +.. _class_AudioStreamPlayback: + +AudioStreamPlayback +=================== + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------+------------------------------------------------------------------------------------------------------+ +| void | :ref:`play` **(** :ref:`float` from_pos_sec=0 **)** | ++----------------------------+------------------------------------------------------------------------------------------------------+ +| void | :ref:`stop` **(** **)** | ++----------------------------+------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_playing` **(** **)** const | ++----------------------------+------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_loop` **(** :ref:`bool` enabled **)** | ++----------------------------+------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_loop` **(** **)** const | ++----------------------------+------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_loop_count` **(** **)** const | ++----------------------------+------------------------------------------------------------------------------------------------------+ +| void | :ref:`seek_pos` **(** :ref:`float` pos **)** | ++----------------------------+------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_pos` **(** **)** const | ++----------------------------+------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_length` **(** **)** const | ++----------------------------+------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_channels` **(** **)** const | ++----------------------------+------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_mix_rate` **(** **)** const | ++----------------------------+------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_minimum_buffer_size` **(** **)** const | ++----------------------------+------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_AudioStreamPlayback_play: + +- void **play** **(** :ref:`float` from_pos_sec=0 **)** + +.. _class_AudioStreamPlayback_stop: + +- void **stop** **(** **)** + +.. _class_AudioStreamPlayback_is_playing: + +- :ref:`bool` **is_playing** **(** **)** const + +.. _class_AudioStreamPlayback_set_loop: + +- void **set_loop** **(** :ref:`bool` enabled **)** + +.. _class_AudioStreamPlayback_has_loop: + +- :ref:`bool` **has_loop** **(** **)** const + +.. _class_AudioStreamPlayback_get_loop_count: + +- :ref:`int` **get_loop_count** **(** **)** const + +.. _class_AudioStreamPlayback_seek_pos: + +- void **seek_pos** **(** :ref:`float` pos **)** + +.. _class_AudioStreamPlayback_get_pos: + +- :ref:`float` **get_pos** **(** **)** const + +.. _class_AudioStreamPlayback_get_length: + +- :ref:`float` **get_length** **(** **)** const + +.. _class_AudioStreamPlayback_get_channels: + +- :ref:`int` **get_channels** **(** **)** const + +.. _class_AudioStreamPlayback_get_mix_rate: + +- :ref:`int` **get_mix_rate** **(** **)** const + +.. _class_AudioStreamPlayback_get_minimum_buffer_size: + +- :ref:`int` **get_minimum_buffer_size** **(** **)** const + + diff --git a/classes/class_audiostreamspeex.rst b/classes/class_audiostreamspeex.rst new file mode 100644 index 000000000..47c07a2d1 --- /dev/null +++ b/classes/class_audiostreamspeex.rst @@ -0,0 +1,21 @@ +.. _class_AudioStreamSpeex: + +AudioStreamSpeex +================ + +Inherits: :ref:`AudioStream` +----------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Speex audio stream driver. + +Description +----------- + +Speex audio stream driver. Speex is very useful for compressed speech. It allows loading a very large amount of speech in memory at little IO/latency cost. + diff --git a/classes/class_backbuffercopy.rst b/classes/class_backbuffercopy.rst new file mode 100644 index 000000000..2465a84b1 --- /dev/null +++ b/classes/class_backbuffercopy.rst @@ -0,0 +1,56 @@ +.. _class_BackBufferCopy: + +BackBufferCopy +============== + +Inherits: :ref:`Node2D` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------+--------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_rect` **(** :ref:`Rect2` rect **)** | ++----------------------------+--------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`get_rect` **(** **)** const | ++----------------------------+--------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_copy_mode` **(** :ref:`int` copy_mode **)** | ++----------------------------+--------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_copy_mode` **(** **)** const | ++----------------------------+--------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **COPY_MODE_DISABLED** = **0** +- **COPY_MODE_RECT** = **1** +- **COPY_MODE_VIEWPORT** = **2** + +Member Function Description +--------------------------- + +.. _class_BackBufferCopy_set_rect: + +- void **set_rect** **(** :ref:`Rect2` rect **)** + +.. _class_BackBufferCopy_get_rect: + +- :ref:`Rect2` **get_rect** **(** **)** const + +.. _class_BackBufferCopy_set_copy_mode: + +- void **set_copy_mode** **(** :ref:`int` copy_mode **)** + +.. _class_BackBufferCopy_get_copy_mode: + +- :ref:`int` **get_copy_mode** **(** **)** const + + diff --git a/classes/class_bakedlight.rst b/classes/class_bakedlight.rst new file mode 100644 index 000000000..2fb0ceae8 --- /dev/null +++ b/classes/class_bakedlight.rst @@ -0,0 +1,294 @@ +.. _class_BakedLight: + +BakedLight +========== + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_mode` **(** :ref:`int` mode **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_mode` **(** **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_octree` **(** :ref:`RawArray` octree **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RawArray` | :ref:`get_octree` **(** **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_light` **(** :ref:`RawArray` light **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RawArray` | :ref:`get_light` **(** **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_sampler_octree` **(** :ref:`IntArray` sampler_octree **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`IntArray` | :ref:`get_sampler_octree` **(** **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_lightmap` **(** :ref:`Texture` texture, :ref:`Vector2` gen_size **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`erase_lightmap` **(** :ref:`int` id **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_lightmaps` **(** **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_cell_subdivision` **(** :ref:`int` cell_subdivision **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_cell_subdivision` **(** **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_initial_lattice_subdiv` **(** :ref:`int` cell_subdivision **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_initial_lattice_subdiv` **(** **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_plot_size` **(** :ref:`float` plot_size **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_plot_size` **(** **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_bounces` **(** :ref:`int` bounces **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_bounces` **(** **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_cell_extra_margin` **(** :ref:`float` cell_extra_margin **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_cell_extra_margin` **(** **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_edge_damp` **(** :ref:`float` edge_damp **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_edge_damp` **(** **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_normal_damp` **(** :ref:`float` normal_damp **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_normal_damp` **(** **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_tint` **(** :ref:`float` tint **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_tint` **(** **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_saturation` **(** :ref:`float` saturation **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_saturation` **(** **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_ao_radius` **(** :ref:`float` ao_radius **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_ao_radius` **(** **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_ao_strength` **(** :ref:`float` ao_strength **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_ao_strength` **(** **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_format` **(** :ref:`int` format **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_format` **(** **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_transfer_lightmaps_only_to_uv2` **(** :ref:`bool` enable **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_transfer_lightmaps_only_to_uv2` **(** **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_energy_multiplier` **(** :ref:`float` energy_multiplier **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_energy_multiplier` **(** **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_gamma_adjust` **(** :ref:`float` gamma_adjust **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_gamma_adjust` **(** **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_bake_flag` **(** :ref:`int` flag, :ref:`bool` enabled **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_bake_flag` **(** :ref:`int` flag **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **MODE_OCTREE** = **0** +- **MODE_LIGHTMAPS** = **1** +- **BAKE_DIFFUSE** = **0** +- **BAKE_SPECULAR** = **1** +- **BAKE_TRANSLUCENT** = **2** +- **BAKE_CONSERVE_ENERGY** = **3** +- **BAKE_MAX** = **5** + +Member Function Description +--------------------------- + +.. _class_BakedLight_set_mode: + +- void **set_mode** **(** :ref:`int` mode **)** + +.. _class_BakedLight_get_mode: + +- :ref:`int` **get_mode** **(** **)** const + +.. _class_BakedLight_set_octree: + +- void **set_octree** **(** :ref:`RawArray` octree **)** + +.. _class_BakedLight_get_octree: + +- :ref:`RawArray` **get_octree** **(** **)** const + +.. _class_BakedLight_set_light: + +- void **set_light** **(** :ref:`RawArray` light **)** + +.. _class_BakedLight_get_light: + +- :ref:`RawArray` **get_light** **(** **)** const + +.. _class_BakedLight_set_sampler_octree: + +- void **set_sampler_octree** **(** :ref:`IntArray` sampler_octree **)** + +.. _class_BakedLight_get_sampler_octree: + +- :ref:`IntArray` **get_sampler_octree** **(** **)** const + +.. _class_BakedLight_add_lightmap: + +- void **add_lightmap** **(** :ref:`Texture` texture, :ref:`Vector2` gen_size **)** + +.. _class_BakedLight_erase_lightmap: + +- void **erase_lightmap** **(** :ref:`int` id **)** + +.. _class_BakedLight_clear_lightmaps: + +- void **clear_lightmaps** **(** **)** + +.. _class_BakedLight_set_cell_subdivision: + +- void **set_cell_subdivision** **(** :ref:`int` cell_subdivision **)** + +.. _class_BakedLight_get_cell_subdivision: + +- :ref:`int` **get_cell_subdivision** **(** **)** const + +.. _class_BakedLight_set_initial_lattice_subdiv: + +- void **set_initial_lattice_subdiv** **(** :ref:`int` cell_subdivision **)** + +.. _class_BakedLight_get_initial_lattice_subdiv: + +- :ref:`int` **get_initial_lattice_subdiv** **(** **)** const + +.. _class_BakedLight_set_plot_size: + +- void **set_plot_size** **(** :ref:`float` plot_size **)** + +.. _class_BakedLight_get_plot_size: + +- :ref:`float` **get_plot_size** **(** **)** const + +.. _class_BakedLight_set_bounces: + +- void **set_bounces** **(** :ref:`int` bounces **)** + +.. _class_BakedLight_get_bounces: + +- :ref:`int` **get_bounces** **(** **)** const + +.. _class_BakedLight_set_cell_extra_margin: + +- void **set_cell_extra_margin** **(** :ref:`float` cell_extra_margin **)** + +.. _class_BakedLight_get_cell_extra_margin: + +- :ref:`float` **get_cell_extra_margin** **(** **)** const + +.. _class_BakedLight_set_edge_damp: + +- void **set_edge_damp** **(** :ref:`float` edge_damp **)** + +.. _class_BakedLight_get_edge_damp: + +- :ref:`float` **get_edge_damp** **(** **)** const + +.. _class_BakedLight_set_normal_damp: + +- void **set_normal_damp** **(** :ref:`float` normal_damp **)** + +.. _class_BakedLight_get_normal_damp: + +- :ref:`float` **get_normal_damp** **(** **)** const + +.. _class_BakedLight_set_tint: + +- void **set_tint** **(** :ref:`float` tint **)** + +.. _class_BakedLight_get_tint: + +- :ref:`float` **get_tint** **(** **)** const + +.. _class_BakedLight_set_saturation: + +- void **set_saturation** **(** :ref:`float` saturation **)** + +.. _class_BakedLight_get_saturation: + +- :ref:`float` **get_saturation** **(** **)** const + +.. _class_BakedLight_set_ao_radius: + +- void **set_ao_radius** **(** :ref:`float` ao_radius **)** + +.. _class_BakedLight_get_ao_radius: + +- :ref:`float` **get_ao_radius** **(** **)** const + +.. _class_BakedLight_set_ao_strength: + +- void **set_ao_strength** **(** :ref:`float` ao_strength **)** + +.. _class_BakedLight_get_ao_strength: + +- :ref:`float` **get_ao_strength** **(** **)** const + +.. _class_BakedLight_set_format: + +- void **set_format** **(** :ref:`int` format **)** + +.. _class_BakedLight_get_format: + +- :ref:`int` **get_format** **(** **)** const + +.. _class_BakedLight_set_transfer_lightmaps_only_to_uv2: + +- void **set_transfer_lightmaps_only_to_uv2** **(** :ref:`bool` enable **)** + +.. _class_BakedLight_get_transfer_lightmaps_only_to_uv2: + +- :ref:`bool` **get_transfer_lightmaps_only_to_uv2** **(** **)** const + +.. _class_BakedLight_set_energy_multiplier: + +- void **set_energy_multiplier** **(** :ref:`float` energy_multiplier **)** + +.. _class_BakedLight_get_energy_multiplier: + +- :ref:`float` **get_energy_multiplier** **(** **)** const + +.. _class_BakedLight_set_gamma_adjust: + +- void **set_gamma_adjust** **(** :ref:`float` gamma_adjust **)** + +.. _class_BakedLight_get_gamma_adjust: + +- :ref:`float` **get_gamma_adjust** **(** **)** const + +.. _class_BakedLight_set_bake_flag: + +- void **set_bake_flag** **(** :ref:`int` flag, :ref:`bool` enabled **)** + +.. _class_BakedLight_get_bake_flag: + +- :ref:`bool` **get_bake_flag** **(** :ref:`int` flag **)** const + + diff --git a/classes/class_bakedlightinstance.rst b/classes/class_bakedlightinstance.rst new file mode 100644 index 000000000..34bf1f8ba --- /dev/null +++ b/classes/class_bakedlightinstance.rst @@ -0,0 +1,48 @@ +.. _class_BakedLightInstance: + +BakedLightInstance +================== + +Inherits: :ref:`VisualInstance` +----------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_baked_light` **(** :ref:`Object` baked_light **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_baked_light` **(** **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_baked_light_instance` **(** **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **baked_light_changed** **(** **)** + +Member Function Description +--------------------------- + +.. _class_BakedLightInstance_set_baked_light: + +- void **set_baked_light** **(** :ref:`Object` baked_light **)** + +.. _class_BakedLightInstance_get_baked_light: + +- :ref:`Object` **get_baked_light** **(** **)** const + +.. _class_BakedLightInstance_get_baked_light_instance: + +- :ref:`RID` **get_baked_light_instance** **(** **)** const + + diff --git a/classes/class_bakedlightsampler.rst b/classes/class_bakedlightsampler.rst new file mode 100644 index 000000000..875307d5b --- /dev/null +++ b/classes/class_bakedlightsampler.rst @@ -0,0 +1,58 @@ +.. _class_BakedLightSampler: + +BakedLightSampler +================= + +Inherits: :ref:`VisualInstance` +----------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_param` **(** :ref:`int` param, :ref:`float` value **)** | ++----------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_param` **(** :ref:`int` param **)** const | ++----------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_resolution` **(** :ref:`int` resolution **)** | ++----------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_resolution` **(** **)** const | ++----------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **PARAM_RADIUS** = **0** +- **PARAM_STRENGTH** = **1** +- **PARAM_ATTENUATION** = **2** +- **PARAM_DETAIL_RATIO** = **3** +- **PARAM_MAX** = **4** + +Member Function Description +--------------------------- + +.. _class_BakedLightSampler_set_param: + +- void **set_param** **(** :ref:`int` param, :ref:`float` value **)** + +.. _class_BakedLightSampler_get_param: + +- :ref:`float` **get_param** **(** :ref:`int` param **)** const + +.. _class_BakedLightSampler_set_resolution: + +- void **set_resolution** **(** :ref:`int` resolution **)** + +.. _class_BakedLightSampler_get_resolution: + +- :ref:`int` **get_resolution** **(** **)** const + + diff --git a/classes/class_basebutton.rst b/classes/class_basebutton.rst new file mode 100644 index 000000000..64334be8c --- /dev/null +++ b/classes/class_basebutton.rst @@ -0,0 +1,135 @@ +.. _class_BaseButton: + +BaseButton +========== + +Inherits: :ref:`Control` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Provides a base class for different kinds of buttons. + +Member Functions +---------------- + ++--------------------------+-------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_pressed` **(** **)** virtual | ++--------------------------+-------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_toggled` **(** :ref:`bool` pressed **)** virtual | ++--------------------------+-------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_pressed` **(** :ref:`bool` pressed **)** | ++--------------------------+-------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_pressed` **(** **)** const | ++--------------------------+-------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_hovered` **(** **)** const | ++--------------------------+-------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_toggle_mode` **(** :ref:`bool` enabled **)** | ++--------------------------+-------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_toggle_mode` **(** **)** const | ++--------------------------+-------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_disabled` **(** :ref:`bool` disabled **)** | ++--------------------------+-------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_disabled` **(** **)** const | ++--------------------------+-------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_click_on_press` **(** :ref:`bool` enable **)** | ++--------------------------+-------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_click_on_press` **(** **)** const | ++--------------------------+-------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_draw_mode` **(** **)** const | ++--------------------------+-------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **released** **(** **)** +- **toggled** **(** :ref:`bool` pressed **)** +- **pressed** **(** **)** + +Numeric Constants +----------------- + +- **DRAW_NORMAL** = **0** +- **DRAW_PRESSED** = **1** +- **DRAW_HOVER** = **2** +- **DRAW_DISABLED** = **3** + +Description +----------- + +BaseButton is the abstract base class for buttons, so it shouldn't be used directly (It doesnt display anything). Other types of buttons inherit from it. + +Member Function Description +--------------------------- + +.. _class_BaseButton__pressed: + +- void **_pressed** **(** **)** virtual + +.. _class_BaseButton__toggled: + +- void **_toggled** **(** :ref:`bool` pressed **)** virtual + +.. _class_BaseButton_set_pressed: + +- void **set_pressed** **(** :ref:`bool` pressed **)** + +Set the button to pressed state (only if toggle_mode is active). + +.. _class_BaseButton_is_pressed: + +- :ref:`bool` **is_pressed** **(** **)** const + +If toggle_mode is active, return whether the button is toggled. If toggle_mode is not active, return whether the button is pressed down. + +.. _class_BaseButton_is_hovered: + +- :ref:`bool` **is_hovered** **(** **)** const + +.. _class_BaseButton_set_toggle_mode: + +- void **set_toggle_mode** **(** :ref:`bool` enabled **)** + +Set the button toggle_mode property. Toggle mode makes the button flip state between pressed and unpressed each time its area is clicked. + +.. _class_BaseButton_is_toggle_mode: + +- :ref:`bool` **is_toggle_mode** **(** **)** const + +Return the toggle_mode property (see :ref:`set_toggle_mode`). + +.. _class_BaseButton_set_disabled: + +- void **set_disabled** **(** :ref:`bool` disabled **)** + +Set the button into disabled state. When a button is disabled, it can't be clicked or toggled. + +.. _class_BaseButton_is_disabled: + +- :ref:`bool` **is_disabled** **(** **)** const + +Return wether the button is in disabled state (see :ref:`set_disabled`). + +.. _class_BaseButton_set_click_on_press: + +- void **set_click_on_press** **(** :ref:`bool` enable **)** + +Set the button click_on_press mode. This mode generates click events when a mousebutton or key is just pressed (by default events are generated when the button/keys are released and both press and release occur in the visual area of the Button). + +.. _class_BaseButton_get_click_on_press: + +- :ref:`bool` **get_click_on_press** **(** **)** const + +Return the state of the click_on_press property (see :ref:`set_click_on_press`). + +.. _class_BaseButton_get_draw_mode: + +- :ref:`int` **get_draw_mode** **(** **)** const + +Return the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overiding _draw() or connecting to "draw" signal. The visual state of the button is defined by the DRAW_* enum. + + diff --git a/classes/class_bitmap.rst b/classes/class_bitmap.rst new file mode 100644 index 000000000..6fc7c1edf --- /dev/null +++ b/classes/class_bitmap.rst @@ -0,0 +1,67 @@ +.. _class_BitMap: + +BitMap +====== + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`create` **(** :ref:`Vector2` size **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`create_from_image_alpha` **(** :ref:`Image` image **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_bit` **(** :ref:`Vector2` pos, :ref:`bool` bit **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_bit` **(** :ref:`Vector2` pos **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_bit_rect` **(** :ref:`Rect2` p_rect, :ref:`bool` bit **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_true_bit_count` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_size` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_BitMap_create: + +- void **create** **(** :ref:`Vector2` size **)** + +.. _class_BitMap_create_from_image_alpha: + +- void **create_from_image_alpha** **(** :ref:`Image` image **)** + +.. _class_BitMap_set_bit: + +- void **set_bit** **(** :ref:`Vector2` pos, :ref:`bool` bit **)** + +.. _class_BitMap_get_bit: + +- :ref:`bool` **get_bit** **(** :ref:`Vector2` pos **)** const + +.. _class_BitMap_set_bit_rect: + +- void **set_bit_rect** **(** :ref:`Rect2` p_rect, :ref:`bool` bit **)** + +.. _class_BitMap_get_true_bit_count: + +- :ref:`int` **get_true_bit_count** **(** **)** const + +.. _class_BitMap_get_size: + +- :ref:`Vector2` **get_size** **(** **)** const + + diff --git a/classes/class_boneattachment.rst b/classes/class_boneattachment.rst new file mode 100644 index 000000000..f4cd5c3fd --- /dev/null +++ b/classes/class_boneattachment.rst @@ -0,0 +1,16 @@ +.. _class_BoneAttachment: + +BoneAttachment +============== + +Inherits: :ref:`Spatial` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + diff --git a/classes/class_bool.rst b/classes/class_bool.rst new file mode 100644 index 000000000..e0ab5b0ba --- /dev/null +++ b/classes/class_bool.rst @@ -0,0 +1,45 @@ +.. _class_bool: + +bool +==== + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + +Boolean built-in type + +Member Functions +---------------- + ++--------------------------+-----------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`bool` **(** :ref:`int` from **)** | ++--------------------------+-----------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`bool` **(** :ref:`float` from **)** | ++--------------------------+-----------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`bool` **(** :ref:`String` from **)** | ++--------------------------+-----------------------------------------------------------------------------+ + +Description +----------- + +Boolean built-in type. + +Member Function Description +--------------------------- + +.. _class_bool_bool: + +- :ref:`bool` **bool** **(** :ref:`int` from **)** + +.. _class_bool_bool: + +- :ref:`bool` **bool** **(** :ref:`float` from **)** + +.. _class_bool_bool: + +- :ref:`bool` **bool** **(** :ref:`String` from **)** + + diff --git a/classes/class_boxcontainer.rst b/classes/class_boxcontainer.rst new file mode 100644 index 000000000..f26fbdf21 --- /dev/null +++ b/classes/class_boxcontainer.rst @@ -0,0 +1,49 @@ +.. _class_BoxContainer: + +BoxContainer +============ + +Inherits: :ref:`Container` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Base class for Box containers. + +Member Functions +---------------- + ++------------------------+------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_alignment` **(** **)** const | ++------------------------+------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_alignment` **(** :ref:`int` alignment **)** | ++------------------------+------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **ALIGN_BEGIN** = **0** +- **ALIGN_CENTER** = **1** +- **ALIGN_END** = **2** + +Description +----------- + +Base class for Box containers. It arranges children controls vertically or horizontally, and rearranges them automatically when their minimum size changes. + +Member Function Description +--------------------------- + +.. _class_BoxContainer_get_alignment: + +- :ref:`int` **get_alignment** **(** **)** const + +.. _class_BoxContainer_set_alignment: + +- void **set_alignment** **(** :ref:`int` alignment **)** + + diff --git a/classes/class_boxshape.rst b/classes/class_boxshape.rst new file mode 100644 index 000000000..626ec4d8a --- /dev/null +++ b/classes/class_boxshape.rst @@ -0,0 +1,46 @@ +.. _class_BoxShape: + +BoxShape +======== + +Inherits: :ref:`Shape` +----------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Box shape resource. + +Member Functions +---------------- + ++--------------------------------+----------------------------------------------------------------------------------------------------+ +| void | :ref:`set_extents` **(** :ref:`Vector3` extents **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_extents` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------+ + +Description +----------- + +Box shape resource, which can be set into a :ref:`PhysicsBody` or area. + +Member Function Description +--------------------------- + +.. _class_BoxShape_set_extents: + +- void **set_extents** **(** :ref:`Vector3` extents **)** + +Set the half extents for the shape. + +.. _class_BoxShape_get_extents: + +- :ref:`Vector3` **get_extents** **(** **)** const + +Return the half extents of the shape. + + diff --git a/classes/class_button.rst b/classes/class_button.rst new file mode 100644 index 000000000..c28386631 --- /dev/null +++ b/classes/class_button.rst @@ -0,0 +1,102 @@ +.. _class_Button: + +Button +====== + +Inherits: :ref:`BaseButton` +--------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Standard themed Button. + +Member Functions +---------------- + ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_text` **(** :ref:`String` text **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_text` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_button_icon` **(** :ref:`Texture` texture **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_button_icon` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_flat` **(** :ref:`bool` enabled **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_clip_text` **(** :ref:`bool` enabled **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_clip_text` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_text_align` **(** :ref:`int` align **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_text_align` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_flat` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Button is just the standard themed button: :ref:`image src="images/button_example.png"/` It can contain text and an icon, and will display them according to the current :ref:`Theme`. + +Member Function Description +--------------------------- + +.. _class_Button_set_text: + +- void **set_text** **(** :ref:`String` text **)** + +Set the button text, which will be displayed inside the button area. + +.. _class_Button_get_text: + +- :ref:`String` **get_text** **(** **)** const + +Return the button text. + +.. _class_Button_set_button_icon: + +- void **set_button_icon** **(** :ref:`Texture` texture **)** + +.. _class_Button_get_button_icon: + +- :ref:`Texture` **get_button_icon** **(** **)** const + +.. _class_Button_set_flat: + +- void **set_flat** **(** :ref:`bool` enabled **)** + +Set the *flat* property of a Button. Flat buttons don't display decoration unless hoevered or pressed. + +.. _class_Button_set_clip_text: + +- void **set_clip_text** **(** :ref:`bool` enabled **)** + +Set the *clip_text* property of a Button. When this property is enabled, text that is too large to fit the button is clipped, when disabled (default) the Button will always be wide enough to hold the text. + +.. _class_Button_get_clip_text: + +- :ref:`bool` **get_clip_text** **(** **)** const + +Return the state of the *clip_text* property (see :ref:`set_clip_text`) + +.. _class_Button_set_text_align: + +- void **set_text_align** **(** :ref:`int` align **)** + +.. _class_Button_get_text_align: + +- :ref:`int` **get_text_align** **(** **)** const + +.. _class_Button_is_flat: + +- :ref:`bool` **is_flat** **(** **)** const + +Return the state of the *flat* property (see :ref:`set_flat`) + + diff --git a/classes/class_buttonarray.rst b/classes/class_buttonarray.rst new file mode 100644 index 000000000..ea4f37a63 --- /dev/null +++ b/classes/class_buttonarray.rst @@ -0,0 +1,136 @@ +.. _class_ButtonArray: + +ButtonArray +=========== + +Inherits: :ref:`Control` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Array of Buttons. + +Member Functions +---------------- + ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_button` **(** :ref:`String` text **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_icon_button` **(** :ref:`Object` icon, :ref:`String` text="" **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_button_text` **(** :ref:`int` button, :ref:`String` text **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_button_icon` **(** :ref:`int` button, :ref:`Object` icon **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_button_text` **(** :ref:`int` button **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_button_icon` **(** :ref:`int` button **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_button_count` **(** **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_selected` **(** **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_hovered` **(** **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_selected` **(** :ref:`int` button **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`erase_button` **(** :ref:`int` button **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **button_selected** **(** :ref:`int` button **)** + +Numeric Constants +----------------- + +- **ALIGN_BEGIN** = **0** --- Align buttons at the begining. +- **ALIGN_CENTER** = **1** --- Align buttons in the middle. +- **ALIGN_END** = **2** --- Align buttons at the end. +- **ALIGN_FILL** = **3** --- Spread the buttons, but keep them small. +- **ALIGN_EXPAND_FILL** = **4** --- Spread the buttons, but expand them. + +Description +----------- + +Array of Buttons. A Button array is useful to have an array of buttons laid out vertically or horizontally. Only one can be selected. This is useful for joypad based interfaces and option menus. + +Member Function Description +--------------------------- + +.. _class_ButtonArray_add_button: + +- void **add_button** **(** :ref:`String` text **)** + +Add a new button. + +.. _class_ButtonArray_add_icon_button: + +- void **add_icon_button** **(** :ref:`Object` icon, :ref:`String` text="" **)** + +.. _class_ButtonArray_set_button_text: + +- void **set_button_text** **(** :ref:`int` button, :ref:`String` text **)** + +.. _class_ButtonArray_set_button_icon: + +- void **set_button_icon** **(** :ref:`int` button, :ref:`Object` icon **)** + +Set the icon of an existing button. + +.. _class_ButtonArray_get_button_text: + +- :ref:`String` **get_button_text** **(** :ref:`int` button **)** const + +Return the text of an existing button. + +.. _class_ButtonArray_get_button_icon: + +- :ref:`Object` **get_button_icon** **(** :ref:`int` button **)** const + +Return the icon of an existing button. + +.. _class_ButtonArray_get_button_count: + +- :ref:`int` **get_button_count** **(** **)** const + +Return the amount of buttons in the array. + +.. _class_ButtonArray_get_selected: + +- :ref:`int` **get_selected** **(** **)** const + +Return the currently selected button in the array. + +.. _class_ButtonArray_get_hovered: + +- :ref:`int` **get_hovered** **(** **)** const + +Return the currently hovered button in the array. + +.. _class_ButtonArray_set_selected: + +- void **set_selected** **(** :ref:`int` button **)** + +Sekect a button in the array. + +.. _class_ButtonArray_erase_button: + +- void **erase_button** **(** :ref:`int` button **)** + +Remove a button in the array, by index. + +.. _class_ButtonArray_clear: + +- void **clear** **(** **)** + +Clear the button array. + + diff --git a/classes/class_buttongroup.rst b/classes/class_buttongroup.rst new file mode 100644 index 000000000..77883c71d --- /dev/null +++ b/classes/class_buttongroup.rst @@ -0,0 +1,70 @@ +.. _class_ButtonGroup: + +ButtonGroup +=========== + +Inherits: :ref:`BoxContainer` +------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Group of Buttons. + +Member Functions +---------------- + ++--------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| :ref:`BaseButton` | :ref:`get_pressed_button` **(** **)** const | ++--------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_pressed_button_index` **(** **)** const | ++--------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| :ref:`BaseButton` | :ref:`get_focused_button` **(** **)** const | ++--------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_button_list` **(** **)** const | ++--------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_pressed_button` **(** :ref:`BaseButton` button **)** | ++--------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Group of :ref:`Button`s. All direct and indirect children buttons become radios. Only one allows being pressed. + +Member Function Description +--------------------------- + +.. _class_ButtonGroup_get_pressed_button: + +- :ref:`BaseButton` **get_pressed_button** **(** **)** const + +Return the pressed button. + +.. _class_ButtonGroup_get_pressed_button_index: + +- :ref:`int` **get_pressed_button_index** **(** **)** const + +Return the index of the pressed button (by tree order). + +.. _class_ButtonGroup_get_focused_button: + +- :ref:`BaseButton` **get_focused_button** **(** **)** const + +Return the focused button. + +.. _class_ButtonGroup_get_button_list: + +- :ref:`Array` **get_button_list** **(** **)** const + +Return the list of all the buttons in the group. + +.. _class_ButtonGroup_set_pressed_button: + +- void **set_pressed_button** **(** :ref:`BaseButton` button **)** + +Set the button to be pressed. + + diff --git a/classes/class_camera.rst b/classes/class_camera.rst new file mode 100644 index 000000000..67dc35aa5 --- /dev/null +++ b/classes/class_camera.rst @@ -0,0 +1,192 @@ +.. _class_Camera: + +Camera +====== + +Inherits: :ref:`Spatial` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Camera node, displays from a point of view. + +Member Functions +---------------- + ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`project_ray_normal` **(** :ref:`Vector2` screen_point **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`project_local_ray_normal` **(** :ref:`Vector2` screen_point **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`project_ray_origin` **(** :ref:`Vector2` screen_point **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`unproject_position` **(** :ref:`Vector3` world_point **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_position_behind` **(** :ref:`Vector3` world_point **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`project_position` **(** :ref:`Vector2` screen_point **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_perspective` **(** :ref:`float` fov, :ref:`float` z_near, :ref:`float` z_far **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_orthogonal` **(** :ref:`float` size, :ref:`float` z_near, :ref:`float` z_far **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`make_current` **(** **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_current` **(** **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_current` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`get_camera_transform` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_fov` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_size` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_zfar` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_znear` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_projection` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_visible_layers` **(** :ref:`int` mask **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_visible_layers` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_environment` **(** :ref:`Environment` env **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Environment` | :ref:`get_environment` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_keep_aspect_mode` **(** :ref:`int` mode **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_keep_aspect_mode` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **PROJECTION_PERSPECTIVE** = **0** --- Perspective Projection (object's size on the screen becomes smaller when far away). +- **PROJECTION_ORTHOGONAL** = **1** --- Orthogonal Projection (objects remain the same size on the screen no matter how far away they are). +- **KEEP_WIDTH** = **0** +- **KEEP_HEIGHT** = **1** + +Description +----------- + +Camera is a special node that displays what is visible from its current location. Cameras register themselves in the nearest :ref:`Viewport` node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the Camera will register in the global viewport. In other words, a Camera just provides *3D* display capabilities to a :ref:`Viewport`, and, without one, a :ref:`Scene` registered in that :ref:`Viewport` (or higher viewports) can't be displayed. + +Member Function Description +--------------------------- + +.. _class_Camera_project_ray_normal: + +- :ref:`Vector3` **project_ray_normal** **(** :ref:`Vector2` screen_point **)** const + +Return a normal vector in worldspace, that is the result of projecting a point on the :ref:`Viewport` rectangle by the camera projection. This is useful for casting rays in the form of (origin,normal) for object intersection or picking. + +.. _class_Camera_project_local_ray_normal: + +- :ref:`Vector3` **project_local_ray_normal** **(** :ref:`Vector2` screen_point **)** const + +.. _class_Camera_project_ray_origin: + +- :ref:`Vector3` **project_ray_origin** **(** :ref:`Vector2` screen_point **)** const + +Return a 3D position in worldspace, that is the result of projecting a point on the :ref:`Viewport` rectangle by the camera projection. This is useful for casting rays in the form of (origin,normal) for object intersection or picking. + +.. _class_Camera_unproject_position: + +- :ref:`Vector2` **unproject_position** **(** :ref:`Vector3` world_point **)** const + +Return how a 3D point in worldpsace maps to a 2D coordinate in the :ref:`Viewport` rectangle. + +.. _class_Camera_is_position_behind: + +- :ref:`bool` **is_position_behind** **(** :ref:`Vector3` world_point **)** const + +.. _class_Camera_project_position: + +- :ref:`Vector3` **project_position** **(** :ref:`Vector2` screen_point **)** const + +.. _class_Camera_set_perspective: + +- void **set_perspective** **(** :ref:`float` fov, :ref:`float` z_near, :ref:`float` z_far **)** + +Set the camera projection to perspective mode, by specifying a *FOV* Y angle in degrees (FOV means Field of View), and the *near* and *far* clip planes in worldspace units. + +.. _class_Camera_set_orthogonal: + +- void **set_orthogonal** **(** :ref:`float` size, :ref:`float` z_near, :ref:`float` z_far **)** + +Set the camera projection to orthogonal mode, by specifying a width and the *near* and *far* clip planes in worldspace units. (As a hint, 2D games often use this projection, with values specified in pixels) + +.. _class_Camera_make_current: + +- void **make_current** **(** **)** + +Make this camera the current Camera for the :ref:`Viewport` (see class description). If the Camera Node is outside the scene tree, it will attempt to become current once it's added. + +.. _class_Camera_clear_current: + +- void **clear_current** **(** **)** + +.. _class_Camera_is_current: + +- :ref:`bool` **is_current** **(** **)** const + +Return wether the Camera is the current one in the :ref:`Viewport`, or plans to become current (if outside the scene tree). + +.. _class_Camera_get_camera_transform: + +- :ref:`Transform` **get_camera_transform** **(** **)** const + +Get the camera transform. Subclassed cameras (such as CharacterCamera) may provide different transforms than the :ref:`Node` transform. + +.. _class_Camera_get_fov: + +- :ref:`float` **get_fov** **(** **)** const + +.. _class_Camera_get_size: + +- :ref:`float` **get_size** **(** **)** const + +.. _class_Camera_get_zfar: + +- :ref:`float` **get_zfar** **(** **)** const + +.. _class_Camera_get_znear: + +- :ref:`float` **get_znear** **(** **)** const + +.. _class_Camera_get_projection: + +- :ref:`int` **get_projection** **(** **)** const + +.. _class_Camera_set_visible_layers: + +- void **set_visible_layers** **(** :ref:`int` mask **)** + +.. _class_Camera_get_visible_layers: + +- :ref:`int` **get_visible_layers** **(** **)** const + +.. _class_Camera_set_environment: + +- void **set_environment** **(** :ref:`Environment` env **)** + +.. _class_Camera_get_environment: + +- :ref:`Environment` **get_environment** **(** **)** const + +.. _class_Camera_set_keep_aspect_mode: + +- void **set_keep_aspect_mode** **(** :ref:`int` mode **)** + +.. _class_Camera_get_keep_aspect_mode: + +- :ref:`int` **get_keep_aspect_mode** **(** **)** const + + diff --git a/classes/class_camera2d.rst b/classes/class_camera2d.rst new file mode 100644 index 000000000..fb31b6d04 --- /dev/null +++ b/classes/class_camera2d.rst @@ -0,0 +1,238 @@ +.. _class_Camera2D: + +Camera2D +======== + +Inherits: :ref:`Node2D` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Camera node for 2D scenes. + +Member Functions +---------------- + ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_offset` **(** :ref:`Vector2` offset **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_offset` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_anchor_mode` **(** :ref:`int` anchor_mode **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_anchor_mode` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_rotating` **(** :ref:`bool` rotating **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_rotating` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`make_current` **(** **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_current` **(** **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_current` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_limit` **(** :ref:`int` margin, :ref:`int` limit **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_limit` **(** :ref:`int` margin **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_v_drag_enabled` **(** :ref:`bool` enabled **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_v_drag_enabled` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_h_drag_enabled` **(** :ref:`bool` enabled **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_h_drag_enabled` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_v_offset` **(** :ref:`float` ofs **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_v_offset` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_h_offset` **(** :ref:`float` ofs **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_h_offset` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_drag_margin` **(** :ref:`int` margin, :ref:`float` drag_margin **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_drag_margin` **(** :ref:`int` margin **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_camera_pos` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_camera_screen_center` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_zoom` **(** :ref:`Vector2` zoom **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_zoom` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_follow_smoothing` **(** :ref:`float` follow_smoothing **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_follow_smoothing` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_enable_follow_smoothing` **(** :ref:`bool` follow_smoothing **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_follow_smoothing_enabled` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`force_update_scroll` **(** **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **ANCHOR_MODE_DRAG_CENTER** = **1** +- **ANCHOR_MODE_FIXED_TOP_LEFT** = **0** + +Description +----------- + +Camera node for 2D scenes. It forces the screen (current layer) to scroll following this node. This makes it easier (and faster) to program scrollable scenes than manually changing the position of :ref:`CanvasItem` based nodes. + +This node is intended to be a simple helper get get things going quickly and it may happen often that more functionality is desired to change how the camera works. To make your own custom camera node, simply inherit from :ref:`Node2D` and change the transform of the canvas by calling get_viewport().set_canvas_transform(m) in :ref:`Viewport`. + +Member Function Description +--------------------------- + +.. _class_Camera2D_set_offset: + +- void **set_offset** **(** :ref:`Vector2` offset **)** + +Set the scroll offset. Useful for looking around or camera shake animations. + +.. _class_Camera2D_get_offset: + +- :ref:`Vector2` **get_offset** **(** **)** const + +Return the scroll offset. + +.. _class_Camera2D_set_anchor_mode: + +- void **set_anchor_mode** **(** :ref:`int` anchor_mode **)** + +.. _class_Camera2D_get_anchor_mode: + +- :ref:`int` **get_anchor_mode** **(** **)** const + +.. _class_Camera2D_set_rotating: + +- void **set_rotating** **(** :ref:`bool` rotating **)** + +.. _class_Camera2D_is_rotating: + +- :ref:`bool` **is_rotating** **(** **)** const + +.. _class_Camera2D_make_current: + +- void **make_current** **(** **)** + +Make this the current 2D camera for the scene (viewport and layer), in case there's many cameras in the scene. + +.. _class_Camera2D_clear_current: + +- void **clear_current** **(** **)** + +.. _class_Camera2D_is_current: + +- :ref:`bool` **is_current** **(** **)** const + +Return true of this is the current camera (see :ref:`Camera2D.make_current`). + +.. _class_Camera2D_set_limit: + +- void **set_limit** **(** :ref:`int` margin, :ref:`int` limit **)** + +Set the scrolling limit in pixels. + +.. _class_Camera2D_get_limit: + +- :ref:`int` **get_limit** **(** :ref:`int` margin **)** const + +Return the scrolling limit in pixels. + +.. _class_Camera2D_set_v_drag_enabled: + +- void **set_v_drag_enabled** **(** :ref:`bool` enabled **)** + +.. _class_Camera2D_is_v_drag_enabled: + +- :ref:`bool` **is_v_drag_enabled** **(** **)** const + +.. _class_Camera2D_set_h_drag_enabled: + +- void **set_h_drag_enabled** **(** :ref:`bool` enabled **)** + +.. _class_Camera2D_is_h_drag_enabled: + +- :ref:`bool` **is_h_drag_enabled** **(** **)** const + +.. _class_Camera2D_set_v_offset: + +- void **set_v_offset** **(** :ref:`float` ofs **)** + +.. _class_Camera2D_get_v_offset: + +- :ref:`float` **get_v_offset** **(** **)** const + +.. _class_Camera2D_set_h_offset: + +- void **set_h_offset** **(** :ref:`float` ofs **)** + +.. _class_Camera2D_get_h_offset: + +- :ref:`float` **get_h_offset** **(** **)** const + +.. _class_Camera2D_set_drag_margin: + +- void **set_drag_margin** **(** :ref:`int` margin, :ref:`float` drag_margin **)** + +Set the margins needed to drag the camera (relative to the screen size). Margin uses the MARGIN_* enum. Drag margins of 0,0,0,0 will keep the camera at the center of the screen, while drag margins of 1,1,1,1 will only move when the camera is at the edges. + +.. _class_Camera2D_get_drag_margin: + +- :ref:`float` **get_drag_margin** **(** :ref:`int` margin **)** const + +Return the margins needed to drag the camera (see :ref:`set_drag_margin`). + +.. _class_Camera2D_get_camera_pos: + +- :ref:`Vector2` **get_camera_pos** **(** **)** const + +Return the camera position. + +.. _class_Camera2D_get_camera_screen_center: + +- :ref:`Vector2` **get_camera_screen_center** **(** **)** const + +.. _class_Camera2D_set_zoom: + +- void **set_zoom** **(** :ref:`Vector2` zoom **)** + +.. _class_Camera2D_get_zoom: + +- :ref:`Vector2` **get_zoom** **(** **)** const + +.. _class_Camera2D_set_follow_smoothing: + +- void **set_follow_smoothing** **(** :ref:`float` follow_smoothing **)** + +.. _class_Camera2D_get_follow_smoothing: + +- :ref:`float` **get_follow_smoothing** **(** **)** const + +.. _class_Camera2D_set_enable_follow_smoothing: + +- void **set_enable_follow_smoothing** **(** :ref:`bool` follow_smoothing **)** + +.. _class_Camera2D_is_follow_smoothing_enabled: + +- :ref:`bool` **is_follow_smoothing_enabled** **(** **)** const + +.. _class_Camera2D_force_update_scroll: + +- void **force_update_scroll** **(** **)** + +Force the camera to update scroll immediately. + + diff --git a/classes/class_canvasitem.rst b/classes/class_canvasitem.rst new file mode 100644 index 000000000..b302873c0 --- /dev/null +++ b/classes/class_canvasitem.rst @@ -0,0 +1,444 @@ +.. _class_CanvasItem: + +CanvasItem +========== + +Inherits: :ref:`Node` +--------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Base class of anything 2D. + +Member Functions +---------------- + ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_draw` **(** **)** virtual | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`edit_set_state` **(** var state **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`edit_get` **(** **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`edit_set_rect` **(** :ref:`Rect2` rect **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`edit_rotate` **(** :ref:`float` degrees **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`get_item_rect` **(** **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_canvas_item` **(** **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_visible` **(** **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_hidden` **(** **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`show` **(** **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`hide` **(** **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_hidden` **(** :ref:`bool` hidden **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`update` **(** **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_as_toplevel` **(** :ref:`bool` enable **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_set_as_toplevel` **(** **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_blend_mode` **(** :ref:`int` blend_mode **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_blend_mode` **(** **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_light_mask` **(** :ref:`int` light_mask **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_light_mask` **(** **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_opacity` **(** :ref:`float` opacity **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_opacity` **(** **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_self_opacity` **(** :ref:`float` self_opacity **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_self_opacity` **(** **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_draw_behind_parent` **(** :ref:`bool` enable **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_draw_behind_parent_enabled` **(** **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw_line` **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=1 **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw_rect` **(** :ref:`Rect2` rect, :ref:`Color` color **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw_circle` **(** :ref:`Vector2` pos, :ref:`float` radius, :ref:`Color` color **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw_texture` **(** :ref:`Texture` texture, :ref:`Vector2` pos, :ref:`Color` modulate=Color(1,1,1,1) **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw_texture_rect` **(** :ref:`Texture` texture, :ref:`Rect2` rect, :ref:`bool` tile, :ref:`Color` modulate=Color(1,1,1,1), :ref:`bool` transpose=false **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw_texture_rect_region` **(** :ref:`Texture` texture, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1,1,1,1), :ref:`bool` transpose=false **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw_style_box` **(** :ref:`StyleBox` style_box, :ref:`Rect2` rect **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw_primitive` **(** :ref:`Vector2Array` points, :ref:`ColorArray` colors, :ref:`Vector2Array` uvs=Array(), :ref:`Texture` texture=Object(), :ref:`float` width=1 **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw_polygon` **(** :ref:`Vector2Array` points, :ref:`ColorArray` colors, :ref:`Vector2Array` uvs=Array(), :ref:`Texture` texture=Object() **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw_colored_polygon` **(** :ref:`Vector2Array` points, :ref:`Color` color, :ref:`Vector2Array` uvs=Array(), :ref:`Texture` texture=Object() **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw_string` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`Color` modulate=Color(1,1,1,1), :ref:`int` clip_w=-1 **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`draw_char` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` char, :ref:`String` next, :ref:`Color` modulate=Color(1,1,1,1) **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw_set_transform` **(** :ref:`Vector2` pos, :ref:`float` rot, :ref:`Vector2` scale **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`get_transform` **(** **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`get_global_transform` **(** **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`get_global_transform_with_canvas` **(** **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`get_viewport_transform` **(** **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`get_viewport_rect` **(** **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`get_canvas_transform` **(** **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_local_mouse_pos` **(** **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_global_mouse_pos` **(** **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_canvas` **(** **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_world_2d` **(** **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_material` **(** :ref:`CanvasItemMaterial` material **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`CanvasItemMaterial` | :ref:`get_material` **(** **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_use_parent_material` **(** :ref:`bool` enable **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_use_parent_material` **(** **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`InputEvent` | :ref:`make_input_local` **(** :ref:`InputEvent` event **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **item_rect_changed** **(** **)** +- **draw** **(** **)** +- **visibility_changed** **(** **)** +- **hide** **(** **)** + +Numeric Constants +----------------- + +- **BLEND_MODE_MIX** = **0** --- Mix blending mode. Colors are assumed to be independent of the alpha (opacity) value. +- **BLEND_MODE_ADD** = **1** --- Additive blending mode. +- **BLEND_MODE_SUB** = **2** --- Substractive blending mode. +- **BLEND_MODE_MUL** = **3** --- Multiplicative blending mode. +- **BLEND_MODE_PREMULT_ALPHA** = **4** --- Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value. +- **NOTIFICATION_DRAW** = **30** --- CanvasItem is requested to draw. +- **NOTIFICATION_VISIBILITY_CHANGED** = **31** --- Canvas item visibility has changed. +- **NOTIFICATION_ENTER_CANVAS** = **32** --- Canvas item has entered the canvas. +- **NOTIFICATION_EXIT_CANVAS** = **33** --- Canvas item has exited the canvas. +- **NOTIFICATION_TRANSFORM_CHANGED** = **29** --- Canvas item transform has changed. Only received if requested. + +Description +----------- + +Base class of anything 2D. Canvas items are laid out in a tree and children inherit and extend the transform of their parent. CanvasItem is extended by :ref:`Control`, for anything GUI related, and by :ref:`Node2D` for anything 2D engine related. + +Any CanvasItem can draw. For this, the "update" function must be called, then NOTIFICATION_DRAW will be received on idle time to request redraw. Because of this, canvas items don't need to be redraw on every frame, improving the performance significan'tly. Several functions for drawing on the CanvasItem are provided (see draw_* functions). They can only be used inside the notification, signal or _draw() overrided function, though. + +Canvas items are draw in tree order. By default, children are on top of their parents so a root CanvasItem will be drawn behind everything (this can be changed per item though). + +Canvas items can also be hidden (hiding also their subtree). They provide many means for changing standard parameters such as opacity (for it and the subtree) and self opacity, blend mode. + +Ultimately, a transform notification can be requested, which will notify the node that its global position changed in case the parent tree changed. + +Member Function Description +--------------------------- + +.. _class_CanvasItem__draw: + +- void **_draw** **(** **)** virtual + +Called (if exists) to draw the canvas item. + +.. _class_CanvasItem_edit_set_state: + +- void **edit_set_state** **(** var state **)** + +Used for editing, returns an opaque value represeting the transform state. + +.. _class_CanvasItem_edit_get: + +- void **edit_get** **(** **)** const + +.. _class_CanvasItem_edit_set_rect: + +- void **edit_set_rect** **(** :ref:`Rect2` rect **)** + +.. _class_CanvasItem_edit_rotate: + +- void **edit_rotate** **(** :ref:`float` degrees **)** + +Used for editing, handle rotation. + +.. _class_CanvasItem_get_item_rect: + +- :ref:`Rect2` **get_item_rect** **(** **)** const + +Return a rect containing the editable contents of the item. + +.. _class_CanvasItem_get_canvas_item: + +- :ref:`RID` **get_canvas_item** **(** **)** const + +Return the canvas item RID used by :ref:`VisualServer` for this item. + +.. _class_CanvasItem_is_visible: + +- :ref:`bool` **is_visible** **(** **)** const + +Return true if this CanvasItem is visible. It may be invisible because itself or a parent canvas item is hidden. + +.. _class_CanvasItem_is_hidden: + +- :ref:`bool` **is_hidden** **(** **)** const + +Return true if this CanvasItem is hidden. Note that the CanvasItem may not be visible, but as long as it's not hidden (:ref:`hide` called) the function will return false. + +.. _class_CanvasItem_show: + +- void **show** **(** **)** + +Show the CanvasItem currently hidden. + +.. _class_CanvasItem_hide: + +- void **hide** **(** **)** + +Hide the CanvasItem currently visible. + +.. _class_CanvasItem_set_hidden: + +- void **set_hidden** **(** :ref:`bool` hidden **)** + +.. _class_CanvasItem_update: + +- void **update** **(** **)** + +Queue the CanvasItem for update. NOTIFICATION_DRAW will be called on idle time to request redraw. + +.. _class_CanvasItem_set_as_toplevel: + +- void **set_as_toplevel** **(** :ref:`bool` enable **)** + +Set as toplevel. This means that it will not inherit transform from parent canvas items. + +.. _class_CanvasItem_is_set_as_toplevel: + +- :ref:`bool` **is_set_as_toplevel** **(** **)** const + +Return if set as toplevel. See :ref:`set_as_toplevel`/ + +.. _class_CanvasItem_set_blend_mode: + +- void **set_blend_mode** **(** :ref:`int` blend_mode **)** + +Set the blending mode from enum BLEND_MODE_*. + +.. _class_CanvasItem_get_blend_mode: + +- :ref:`int` **get_blend_mode** **(** **)** const + +Return the current blending mode from enum BLEND_MODE_*. + +.. _class_CanvasItem_set_light_mask: + +- void **set_light_mask** **(** :ref:`int` light_mask **)** + +.. _class_CanvasItem_get_light_mask: + +- :ref:`int` **get_light_mask** **(** **)** const + +.. _class_CanvasItem_set_opacity: + +- void **set_opacity** **(** :ref:`float` opacity **)** + +Set canvas item opacity. This will affect the canvas item and all the children. + +.. _class_CanvasItem_get_opacity: + +- :ref:`float` **get_opacity** **(** **)** const + +Return the canvas item opacity. This affects the canvas item and all the children. + +.. _class_CanvasItem_set_self_opacity: + +- void **set_self_opacity** **(** :ref:`float` self_opacity **)** + +Set canvas item self-opacity. This does not affect the opacity of children items. + +.. _class_CanvasItem_get_self_opacity: + +- :ref:`float` **get_self_opacity** **(** **)** const + +Return the canvas item self-opacity. + +.. _class_CanvasItem_set_draw_behind_parent: + +- void **set_draw_behind_parent** **(** :ref:`bool` enable **)** + +Sets whether the canvas item is drawn behind its parent. + +.. _class_CanvasItem_is_draw_behind_parent_enabled: + +- :ref:`bool` **is_draw_behind_parent_enabled** **(** **)** const + +Return whether the item is drawn behind its parent. + +.. _class_CanvasItem_draw_line: + +- void **draw_line** **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=1 **)** + +Draw a line from a 2D point to another, with a given color and width. + +.. _class_CanvasItem_draw_rect: + +- void **draw_rect** **(** :ref:`Rect2` rect, :ref:`Color` color **)** + +Draw a colored rectangle. + +.. _class_CanvasItem_draw_circle: + +- void **draw_circle** **(** :ref:`Vector2` pos, :ref:`float` radius, :ref:`Color` color **)** + +Draw a colored circle. + +.. _class_CanvasItem_draw_texture: + +- void **draw_texture** **(** :ref:`Texture` texture, :ref:`Vector2` pos, :ref:`Color` modulate=Color(1,1,1,1) **)** + +Draw a texture at a given position. + +.. _class_CanvasItem_draw_texture_rect: + +- void **draw_texture_rect** **(** :ref:`Texture` texture, :ref:`Rect2` rect, :ref:`bool` tile, :ref:`Color` modulate=Color(1,1,1,1), :ref:`bool` transpose=false **)** + +Draw a textured rectangle at a given position, optionally modulated by a color. Transpose swaps the x and y coordinates when reading the texture. + +.. _class_CanvasItem_draw_texture_rect_region: + +- void **draw_texture_rect_region** **(** :ref:`Texture` texture, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1,1,1,1), :ref:`bool` transpose=false **)** + +Draw a textured rectangle region at a given position, optionally modulated by a color. Transpose swaps the x and y coordinates when reading the texture. + +.. _class_CanvasItem_draw_style_box: + +- void **draw_style_box** **(** :ref:`StyleBox` style_box, :ref:`Rect2` rect **)** + +Draw a styled rectangle. + +.. _class_CanvasItem_draw_primitive: + +- void **draw_primitive** **(** :ref:`Vector2Array` points, :ref:`ColorArray` colors, :ref:`Vector2Array` uvs=Array(), :ref:`Texture` texture=Object(), :ref:`float` width=1 **)** + +Draw a custom primitive, 1 point for a point, 2 points for a line, 3 points for a triangle and 4 points for a quad. + +.. _class_CanvasItem_draw_polygon: + +- void **draw_polygon** **(** :ref:`Vector2Array` points, :ref:`ColorArray` colors, :ref:`Vector2Array` uvs=Array(), :ref:`Texture` texture=Object() **)** + +Draw a polygon of any amount of points, convex or concave. + +.. _class_CanvasItem_draw_colored_polygon: + +- void **draw_colored_polygon** **(** :ref:`Vector2Array` points, :ref:`Color` color, :ref:`Vector2Array` uvs=Array(), :ref:`Texture` texture=Object() **)** + +Draw a colored polygon of any amount of points, convex or concave. + +.. _class_CanvasItem_draw_string: + +- void **draw_string** **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`Color` modulate=Color(1,1,1,1), :ref:`int` clip_w=-1 **)** + +Draw a string using a custom font. + +.. _class_CanvasItem_draw_char: + +- :ref:`float` **draw_char** **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` char, :ref:`String` next, :ref:`Color` modulate=Color(1,1,1,1) **)** + +Draw a string character using a custom font. Returns the advance, depending on the char width and kerning with an optional next char. + +.. _class_CanvasItem_draw_set_transform: + +- void **draw_set_transform** **(** :ref:`Vector2` pos, :ref:`float` rot, :ref:`Vector2` scale **)** + +Set a custom transform for drawing. Anything drawn afterwards will be transformed by this. + +.. _class_CanvasItem_get_transform: + +- :ref:`Matrix32` **get_transform** **(** **)** const + +.. _class_CanvasItem_get_global_transform: + +- :ref:`Matrix32` **get_global_transform** **(** **)** const + +.. _class_CanvasItem_get_global_transform_with_canvas: + +- :ref:`Matrix32` **get_global_transform_with_canvas** **(** **)** const + +.. _class_CanvasItem_get_viewport_transform: + +- :ref:`Matrix32` **get_viewport_transform** **(** **)** const + +.. _class_CanvasItem_get_viewport_rect: + +- :ref:`Rect2` **get_viewport_rect** **(** **)** const + +.. _class_CanvasItem_get_canvas_transform: + +- :ref:`Matrix32` **get_canvas_transform** **(** **)** const + +.. _class_CanvasItem_get_local_mouse_pos: + +- :ref:`Vector2` **get_local_mouse_pos** **(** **)** const + +.. _class_CanvasItem_get_global_mouse_pos: + +- :ref:`Vector2` **get_global_mouse_pos** **(** **)** const + +.. _class_CanvasItem_get_canvas: + +- :ref:`RID` **get_canvas** **(** **)** const + +.. _class_CanvasItem_get_world_2d: + +- :ref:`Object` **get_world_2d** **(** **)** const + +.. _class_CanvasItem_set_material: + +- void **set_material** **(** :ref:`CanvasItemMaterial` material **)** + +.. _class_CanvasItem_get_material: + +- :ref:`CanvasItemMaterial` **get_material** **(** **)** const + +.. _class_CanvasItem_set_use_parent_material: + +- void **set_use_parent_material** **(** :ref:`bool` enable **)** + +.. _class_CanvasItem_get_use_parent_material: + +- :ref:`bool` **get_use_parent_material** **(** **)** const + +.. _class_CanvasItem_make_input_local: + +- :ref:`InputEvent` **make_input_local** **(** :ref:`InputEvent` event **)** const + + diff --git a/classes/class_canvasitemmaterial.rst b/classes/class_canvasitemmaterial.rst new file mode 100644 index 000000000..b27ed663f --- /dev/null +++ b/classes/class_canvasitemmaterial.rst @@ -0,0 +1,68 @@ +.. _class_CanvasItemMaterial: + +CanvasItemMaterial +================== + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shader` **(** :ref:`Shader` shader **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Shader` | :ref:`get_shader` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shader_param` **(** :ref:`String` param, var value **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`get_shader_param` **(** :ref:`String` param **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shading_mode` **(** :ref:`int` mode **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_shading_mode` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **SHADING_NORMAL** = **0** +- **SHADING_UNSHADED** = **1** +- **SHADING_ONLY_LIGHT** = **2** + +Member Function Description +--------------------------- + +.. _class_CanvasItemMaterial_set_shader: + +- void **set_shader** **(** :ref:`Shader` shader **)** + +.. _class_CanvasItemMaterial_get_shader: + +- :ref:`Shader` **get_shader** **(** **)** const + +.. _class_CanvasItemMaterial_set_shader_param: + +- void **set_shader_param** **(** :ref:`String` param, var value **)** + +.. _class_CanvasItemMaterial_get_shader_param: + +- void **get_shader_param** **(** :ref:`String` param **)** const + +.. _class_CanvasItemMaterial_set_shading_mode: + +- void **set_shading_mode** **(** :ref:`int` mode **)** + +.. _class_CanvasItemMaterial_get_shading_mode: + +- :ref:`int` **get_shading_mode** **(** **)** const + + diff --git a/classes/class_canvasitemshader.rst b/classes/class_canvasitemshader.rst new file mode 100644 index 000000000..a914d5354 --- /dev/null +++ b/classes/class_canvasitemshader.rst @@ -0,0 +1,16 @@ +.. _class_CanvasItemShader: + +CanvasItemShader +================ + +Inherits: :ref:`Shader` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + diff --git a/classes/class_canvasitemshadergraph.rst b/classes/class_canvasitemshadergraph.rst new file mode 100644 index 000000000..ce0501bb4 --- /dev/null +++ b/classes/class_canvasitemshadergraph.rst @@ -0,0 +1,16 @@ +.. _class_CanvasItemShaderGraph: + +CanvasItemShaderGraph +===================== + +Inherits: :ref:`ShaderGraph` +----------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + diff --git a/classes/class_canvaslayer.rst b/classes/class_canvaslayer.rst new file mode 100644 index 000000000..75a89f774 --- /dev/null +++ b/classes/class_canvaslayer.rst @@ -0,0 +1,126 @@ +.. _class_CanvasLayer: + +CanvasLayer +=========== + +Inherits: :ref:`Node` +--------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Canvas Item layer. + +Member Functions +---------------- + ++----------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_layer` **(** :ref:`int` layer **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_layer` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_transform` **(** :ref:`Matrix32` transform **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`get_transform` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_offset` **(** :ref:`Vector2` offset **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_offset` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_rotation` **(** :ref:`float` rotation **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_rotation` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_scale` **(** :ref:`Vector2` scale **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_scale` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------+ +| Canvas | :ref:`get_world_2d` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_viewport` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Canvas Item layer. :ref:`CanvasItem` nodes that are direct or indirect children of a :ref:`CanvasLayer` will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a :ref:`CanvasLayer` with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below). + +Member Function Description +--------------------------- + +.. _class_CanvasLayer_set_layer: + +- void **set_layer** **(** :ref:`int` layer **)** + +Set the layer index, determines the draw order, a lower value will be below a higher one. + +.. _class_CanvasLayer_get_layer: + +- :ref:`int` **get_layer** **(** **)** const + +Return the layer index, determines the draw order, a lower value will be below a higher one. + +.. _class_CanvasLayer_set_transform: + +- void **set_transform** **(** :ref:`Matrix32` transform **)** + +Set the base transform for this layer. + +.. _class_CanvasLayer_get_transform: + +- :ref:`Matrix32` **get_transform** **(** **)** const + +Return the base transform for this layer. + +.. _class_CanvasLayer_set_offset: + +- void **set_offset** **(** :ref:`Vector2` offset **)** + +Set the base offset for this layer (helper). + +.. _class_CanvasLayer_get_offset: + +- :ref:`Vector2` **get_offset** **(** **)** const + +Return the base offset for this layer (helper). + +.. _class_CanvasLayer_set_rotation: + +- void **set_rotation** **(** :ref:`float` rotation **)** + +Set the base rotation for this layer (helper). + +.. _class_CanvasLayer_get_rotation: + +- :ref:`float` **get_rotation** **(** **)** const + +Return the base rotation for this layer (helper). + +.. _class_CanvasLayer_set_scale: + +- void **set_scale** **(** :ref:`Vector2` scale **)** + +Set the base scale for this layer (helper). + +.. _class_CanvasLayer_get_scale: + +- :ref:`Vector2` **get_scale** **(** **)** const + +Return the base scale for this layer (helper). + +.. _class_CanvasLayer_get_world_2d: + +- Canvas **get_world_2d** **(** **)** const + +Return the :ref:`World2D` used by this layer. + +.. _class_CanvasLayer_get_viewport: + +- :ref:`RID` **get_viewport** **(** **)** const + +Return the viewport RID for this layer. + + diff --git a/classes/class_canvasmodulate.rst b/classes/class_canvasmodulate.rst new file mode 100644 index 000000000..6cd4e62b1 --- /dev/null +++ b/classes/class_canvasmodulate.rst @@ -0,0 +1,37 @@ +.. _class_CanvasModulate: + +CanvasModulate +============== + +Inherits: :ref:`Node2D` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------+------------------------------------------------------------------------------------------------+ +| void | :ref:`set_color` **(** :ref:`Color` color **)** | ++----------------------------+------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_color` **(** **)** const | ++----------------------------+------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_CanvasModulate_set_color: + +- void **set_color** **(** :ref:`Color` color **)** + +.. _class_CanvasModulate_get_color: + +- :ref:`Color` **get_color** **(** **)** const + + diff --git a/classes/class_capsuleshape.rst b/classes/class_capsuleshape.rst new file mode 100644 index 000000000..e5bf87480 --- /dev/null +++ b/classes/class_capsuleshape.rst @@ -0,0 +1,62 @@ +.. _class_CapsuleShape: + +CapsuleShape +============ + +Inherits: :ref:`Shape` +----------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Capsule shape resource. + +Member Functions +---------------- + ++----------------------------+-------------------------------------------------------------------------------------------------+ +| void | :ref:`set_radius` **(** :ref:`float` radius **)** | ++----------------------------+-------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_radius` **(** **)** const | ++----------------------------+-------------------------------------------------------------------------------------------------+ +| void | :ref:`set_height` **(** :ref:`float` height **)** | ++----------------------------+-------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_height` **(** **)** const | ++----------------------------+-------------------------------------------------------------------------------------------------+ + +Description +----------- + +Capsule shape resource, which can be set into a :ref:`PhysicsBody` or area. + +Member Function Description +--------------------------- + +.. _class_CapsuleShape_set_radius: + +- void **set_radius** **(** :ref:`float` radius **)** + +Set the capsule radius. + +.. _class_CapsuleShape_get_radius: + +- :ref:`float` **get_radius** **(** **)** const + +Return the capsule radius. + +.. _class_CapsuleShape_set_height: + +- void **set_height** **(** :ref:`float` height **)** + +Set the capsule height. + +.. _class_CapsuleShape_get_height: + +- :ref:`float` **get_height** **(** **)** const + +Return the capsule height. + + diff --git a/classes/class_capsuleshape2d.rst b/classes/class_capsuleshape2d.rst new file mode 100644 index 000000000..1db5f3b66 --- /dev/null +++ b/classes/class_capsuleshape2d.rst @@ -0,0 +1,62 @@ +.. _class_CapsuleShape2D: + +CapsuleShape2D +============== + +Inherits: :ref:`Shape2D` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Capsule 2D shape resource for physics. + +Member Functions +---------------- + ++----------------------------+---------------------------------------------------------------------------------------------------+ +| void | :ref:`set_radius` **(** :ref:`float` radius **)** | ++----------------------------+---------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_radius` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------+ +| void | :ref:`set_height` **(** :ref:`float` height **)** | ++----------------------------+---------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_height` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------+ + +Description +----------- + +Capsule 2D shape resource for physics. A capsule (or sometimes called "pill") is like a line grown in all directions. It has a radius and a height, and is often useful for modelling biped characters. + +Member Function Description +--------------------------- + +.. _class_CapsuleShape2D_set_radius: + +- void **set_radius** **(** :ref:`float` radius **)** + +Set the radius of the :ref:`CapsuleShape2D`. + +.. _class_CapsuleShape2D_get_radius: + +- :ref:`float` **get_radius** **(** **)** const + +Return the radius of the :ref:`CapsuleShape2D`. + +.. _class_CapsuleShape2D_set_height: + +- void **set_height** **(** :ref:`float` height **)** + +Set the height of the :ref:`CapsuleShape2D`. + +.. _class_CapsuleShape2D_get_height: + +- :ref:`float` **get_height** **(** **)** const + +Return the height of the :ref:`CapsuleShape2D`. + + diff --git a/classes/class_centercontainer.rst b/classes/class_centercontainer.rst new file mode 100644 index 000000000..ff1dac626 --- /dev/null +++ b/classes/class_centercontainer.rst @@ -0,0 +1,42 @@ +.. _class_CenterContainer: + +CenterContainer +=============== + +Inherits: :ref:`Container` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Keeps children controls centered. + +Member Functions +---------------- + ++--------------------------+--------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_use_top_left` **(** :ref:`bool` enable **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_using_top_left` **(** **)** const | ++--------------------------+--------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +CenterContainer Keeps children controls centered. This container keeps all children to their minimum size, in the center. + +Member Function Description +--------------------------- + +.. _class_CenterContainer_set_use_top_left: + +- void **set_use_top_left** **(** :ref:`bool` enable **)** + +.. _class_CenterContainer_is_using_top_left: + +- :ref:`bool` **is_using_top_left** **(** **)** const + + diff --git a/classes/class_checkbox.rst b/classes/class_checkbox.rst new file mode 100644 index 000000000..811c72d34 --- /dev/null +++ b/classes/class_checkbox.rst @@ -0,0 +1,16 @@ +.. _class_CheckBox: + +CheckBox +======== + +Inherits: :ref:`Button` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + diff --git a/classes/class_checkbutton.rst b/classes/class_checkbutton.rst new file mode 100644 index 000000000..fbd2b9579 --- /dev/null +++ b/classes/class_checkbutton.rst @@ -0,0 +1,21 @@ +.. _class_CheckButton: + +CheckButton +=========== + +Inherits: :ref:`Button` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Checkable button. + +Description +----------- + +CheckButton is a toggle button displayed as a check field. + diff --git a/classes/class_circleshape2d.rst b/classes/class_circleshape2d.rst new file mode 100644 index 000000000..8c69b8b2e --- /dev/null +++ b/classes/class_circleshape2d.rst @@ -0,0 +1,46 @@ +.. _class_CircleShape2D: + +CircleShape2D +============= + +Inherits: :ref:`Shape2D` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Circular Shape for 2D Physics. + +Member Functions +---------------- + ++----------------------------+--------------------------------------------------------------------------------------------------+ +| void | :ref:`set_radius` **(** :ref:`float` radius **)** | ++----------------------------+--------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_radius` **(** **)** const | ++----------------------------+--------------------------------------------------------------------------------------------------+ + +Description +----------- + +Circular Shape for 2D Physics. This shape is useful for modelling balls or small characters and it's collision detection with everything else is very fast. + +Member Function Description +--------------------------- + +.. _class_CircleShape2D_set_radius: + +- void **set_radius** **(** :ref:`float` radius **)** + +Set the radius of the circle shape. + +.. _class_CircleShape2D_get_radius: + +- :ref:`float` **get_radius** **(** **)** const + +Return the radius of the circle shape. + + diff --git a/classes/class_collisionobject.rst b/classes/class_collisionobject.rst new file mode 100644 index 000000000..36230d82d --- /dev/null +++ b/classes/class_collisionobject.rst @@ -0,0 +1,128 @@ +.. _class_CollisionObject: + +CollisionObject +=============== + +Inherits: :ref:`Spatial` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_input_event` **(** :ref:`Object` camera, :ref:`InputEvent` event, :ref:`Vector3` click_pos, :ref:`Vector3` click_normal, :ref:`int` shape_idx **)** virtual | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_shape` **(** :ref:`Shape` shape, :ref:`Transform` transform=Transform() **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_shape_count` **(** **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shape` **(** :ref:`int` shape_idx, :ref:`Shape` shape **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shape_transform` **(** :ref:`int` shape_idx, :ref:`Transform` transform **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shape_as_trigger` **(** :ref:`int` shape_idx, :ref:`bool` enable **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_shape_set_as_trigger` **(** :ref:`int` shape_idx **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Shape` | :ref:`get_shape` **(** :ref:`int` shape_idx **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`get_shape_transform` **(** :ref:`int` shape_idx **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_shape` **(** :ref:`int` shape_idx **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_shapes` **(** **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_ray_pickable` **(** :ref:`bool` ray_pickable **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_ray_pickable` **(** **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_capture_input_on_drag` **(** :ref:`bool` enable **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_capture_input_on_drag` **(** **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_rid` **(** **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **mouse_enter** **(** **)** +- **input_event** **(** :ref:`Object` camera, :ref:`InputEvent` event, :ref:`Vector3` click_pos, :ref:`Vector3` click_normal, :ref:`int` shape_idx **)** +- **mouse_exit** **(** **)** + +Member Function Description +--------------------------- + +.. _class_CollisionObject__input_event: + +- void **_input_event** **(** :ref:`Object` camera, :ref:`InputEvent` event, :ref:`Vector3` click_pos, :ref:`Vector3` click_normal, :ref:`int` shape_idx **)** virtual + +.. _class_CollisionObject_add_shape: + +- void **add_shape** **(** :ref:`Shape` shape, :ref:`Transform` transform=Transform() **)** + +.. _class_CollisionObject_get_shape_count: + +- :ref:`int` **get_shape_count** **(** **)** const + +.. _class_CollisionObject_set_shape: + +- void **set_shape** **(** :ref:`int` shape_idx, :ref:`Shape` shape **)** + +.. _class_CollisionObject_set_shape_transform: + +- void **set_shape_transform** **(** :ref:`int` shape_idx, :ref:`Transform` transform **)** + +.. _class_CollisionObject_set_shape_as_trigger: + +- void **set_shape_as_trigger** **(** :ref:`int` shape_idx, :ref:`bool` enable **)** + +.. _class_CollisionObject_is_shape_set_as_trigger: + +- :ref:`bool` **is_shape_set_as_trigger** **(** :ref:`int` shape_idx **)** const + +.. _class_CollisionObject_get_shape: + +- :ref:`Shape` **get_shape** **(** :ref:`int` shape_idx **)** const + +.. _class_CollisionObject_get_shape_transform: + +- :ref:`Transform` **get_shape_transform** **(** :ref:`int` shape_idx **)** const + +.. _class_CollisionObject_remove_shape: + +- void **remove_shape** **(** :ref:`int` shape_idx **)** + +.. _class_CollisionObject_clear_shapes: + +- void **clear_shapes** **(** **)** + +.. _class_CollisionObject_set_ray_pickable: + +- void **set_ray_pickable** **(** :ref:`bool` ray_pickable **)** + +.. _class_CollisionObject_is_ray_pickable: + +- :ref:`bool` **is_ray_pickable** **(** **)** const + +.. _class_CollisionObject_set_capture_input_on_drag: + +- void **set_capture_input_on_drag** **(** :ref:`bool` enable **)** + +.. _class_CollisionObject_get_capture_input_on_drag: + +- :ref:`bool` **get_capture_input_on_drag** **(** **)** const + +.. _class_CollisionObject_get_rid: + +- :ref:`RID` **get_rid** **(** **)** const + + diff --git a/classes/class_collisionobject2d.rst b/classes/class_collisionobject2d.rst new file mode 100644 index 000000000..8a3ec91e3 --- /dev/null +++ b/classes/class_collisionobject2d.rst @@ -0,0 +1,149 @@ +.. _class_CollisionObject2D: + +CollisionObject2D +================= + +Inherits: :ref:`Node2D` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Base node for 2D collisionables. + +Member Functions +---------------- + ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_input_event` **(** :ref:`Object` viewport, :ref:`InputEvent` event, :ref:`int` shape_idx **)** virtual | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_shape` **(** :ref:`Shape2D` shape, :ref:`Matrix32` transform=1,0, 0,1, 0,0 **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_shape_count` **(** **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shape` **(** :ref:`int` shape_idx, :ref:`Shape` shape **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shape_transform` **(** :ref:`int` shape_idx, :ref:`Matrix32` transform **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shape_as_trigger` **(** :ref:`int` shape_idx, :ref:`bool` enable **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Shape2D` | :ref:`get_shape` **(** :ref:`int` shape_idx **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`get_shape_transform` **(** :ref:`int` shape_idx **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_shape_set_as_trigger` **(** :ref:`int` shape_idx **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_shape` **(** :ref:`int` shape_idx **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_shapes` **(** **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_rid` **(** **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_pickable` **(** :ref:`bool` enabled **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_pickable` **(** **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **mouse_enter** **(** **)** +- **input_event** **(** :ref:`Object` viewport, :ref:`InputEvent` event, :ref:`int` shape_idx **)** +- **mouse_exit** **(** **)** + +Description +----------- + +CollisionObject2D is the base class for 2D physics collisionables. They can hold any number of 2D collision shapes. Usually, they are edited by placing :ref:`CollisionShape2D` and/or :ref:`CollisionPolygon2D` nodes as children. Such nodes are for reference and not present outside the editor, so code should use the regular shape API. + +Member Function Description +--------------------------- + +.. _class_CollisionObject2D__input_event: + +- void **_input_event** **(** :ref:`Object` viewport, :ref:`InputEvent` event, :ref:`int` shape_idx **)** virtual + +This method can be used to override normal input processing. The first parameter is the viewport where the event took place. The second holds the input event received, and the third the shape of this object where it happened. + +.. _class_CollisionObject2D_add_shape: + +- void **add_shape** **(** :ref:`Shape2D` shape, :ref:`Matrix32` transform=1,0, 0,1, 0,0 **)** + +Add a :ref:`Shape2D` to the collision body, with a given custom transform. + +.. _class_CollisionObject2D_get_shape_count: + +- :ref:`int` **get_shape_count** **(** **)** const + +Return the amount of shapes in the collision body. Because a :ref:`CollisionPolygon2D` can generate more than one :ref:`Shape2D`, the amount returned does not have to match the sum of :ref:`CollisionShape2D` and :ref:`CollisionPolygon2D`. + +.. _class_CollisionObject2D_set_shape: + +- void **set_shape** **(** :ref:`int` shape_idx, :ref:`Shape` shape **)** + +Change a shape in the collision body. + +.. _class_CollisionObject2D_set_shape_transform: + +- void **set_shape_transform** **(** :ref:`int` shape_idx, :ref:`Matrix32` transform **)** + +Change the shape transform in the collision body. + +.. _class_CollisionObject2D_set_shape_as_trigger: + +- void **set_shape_as_trigger** **(** :ref:`int` shape_idx, :ref:`bool` enable **)** + +Set whether a shape is a trigger. A trigger shape detects collisions, but is otherwise unaffected by physics (i.e. colliding objects will not get blocked). + +.. _class_CollisionObject2D_get_shape: + +- :ref:`Shape2D` **get_shape** **(** :ref:`int` shape_idx **)** const + +Return the shape in the given index. + +.. _class_CollisionObject2D_get_shape_transform: + +- :ref:`Matrix32` **get_shape_transform** **(** :ref:`int` shape_idx **)** const + +Return the shape transform in the given index. + +.. _class_CollisionObject2D_is_shape_set_as_trigger: + +- :ref:`bool` **is_shape_set_as_trigger** **(** :ref:`int` shape_idx **)** const + +Return whether a shape is a trigger. A trigger shape detects collisions, but is otherwise unaffected by physics (i.e. colliding objects will not get blocked). + +.. _class_CollisionObject2D_remove_shape: + +- void **remove_shape** **(** :ref:`int` shape_idx **)** + +Remove the shape in the given index. + +.. _class_CollisionObject2D_clear_shapes: + +- void **clear_shapes** **(** **)** + +Remove all shapes. + +.. _class_CollisionObject2D_get_rid: + +- :ref:`RID` **get_rid** **(** **)** const + +Return the RID of this object. + +.. _class_CollisionObject2D_set_pickable: + +- void **set_pickable** **(** :ref:`bool` enabled **)** + +Set whether this object is pickable. A pickable object can detect the mouse pointer enter/leave it and, if the mouse is inside it, report input events. + +.. _class_CollisionObject2D_is_pickable: + +- :ref:`bool` **is_pickable** **(** **)** const + +Return whether this object is pickable. + + diff --git a/classes/class_collisionpolygon.rst b/classes/class_collisionpolygon.rst new file mode 100644 index 000000000..3f6d08786 --- /dev/null +++ b/classes/class_collisionpolygon.rst @@ -0,0 +1,73 @@ +.. _class_CollisionPolygon: + +CollisionPolygon +================ + +Inherits: :ref:`Spatial` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_build_mode` **(** :ref:`int` build_mode **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_build_mode` **(** **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_depth` **(** :ref:`float` depth **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_depth` **(** **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_polygon` **(** :ref:`Vector2Array` polygon **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2Array` | :ref:`get_polygon` **(** **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_collision_object_first_shape` **(** **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_collision_object_last_shape` **(** **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_CollisionPolygon_set_build_mode: + +- void **set_build_mode** **(** :ref:`int` build_mode **)** + +.. _class_CollisionPolygon_get_build_mode: + +- :ref:`int` **get_build_mode** **(** **)** const + +.. _class_CollisionPolygon_set_depth: + +- void **set_depth** **(** :ref:`float` depth **)** + +.. _class_CollisionPolygon_get_depth: + +- :ref:`float` **get_depth** **(** **)** const + +.. _class_CollisionPolygon_set_polygon: + +- void **set_polygon** **(** :ref:`Vector2Array` polygon **)** + +.. _class_CollisionPolygon_get_polygon: + +- :ref:`Vector2Array` **get_polygon** **(** **)** const + +.. _class_CollisionPolygon_get_collision_object_first_shape: + +- :ref:`int` **get_collision_object_first_shape** **(** **)** const + +.. _class_CollisionPolygon_get_collision_object_last_shape: + +- :ref:`int` **get_collision_object_last_shape** **(** **)** const + + diff --git a/classes/class_collisionpolygon2d.rst b/classes/class_collisionpolygon2d.rst new file mode 100644 index 000000000..7e77a212c --- /dev/null +++ b/classes/class_collisionpolygon2d.rst @@ -0,0 +1,100 @@ +.. _class_CollisionPolygon2D: + +CollisionPolygon2D +================== + +Inherits: :ref:`Node2D` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Editor-only class for easy editing of collision polygons. + +Member Functions +---------------- + ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_polygon` **(** :ref:`Vector2Array` polygon **)** | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2Array` | :ref:`get_polygon` **(** **)** const | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_build_mode` **(** :ref:`int` build_mode **)** | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_build_mode` **(** **)** const | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_trigger` **(** :ref:`bool` trigger **)** | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_trigger` **(** **)** const | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_collision_object_first_shape` **(** **)** const | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_collision_object_last_shape` **(** **)** const | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Editor-only class. This is not present when running the game. It's used in the editor to properly edit and position collision shapes in :ref:`CollisionObject2D`. This is not accessible from regular code. This class is for editing custom shape polygons. + +Member Function Description +--------------------------- + +.. _class_CollisionPolygon2D_set_polygon: + +- void **set_polygon** **(** :ref:`Vector2Array` polygon **)** + +Set the array of points forming the polygon. + +When editing the point list via the editor, depending on :ref:`get_build_mode`, it has to be a list of points (for :ref:`code`build_mode:ref:`/code`=0), or a list of lines (for :ref:`code`build_mode:ref:`/code`=1). In the second case, the even elements of the array define the start point of the line, and the odd elements the end point. + +.. _class_CollisionPolygon2D_get_polygon: + +- :ref:`Vector2Array` **get_polygon** **(** **)** const + +Return the list of points that define the polygon. + +.. _class_CollisionPolygon2D_set_build_mode: + +- void **set_build_mode** **(** :ref:`int` build_mode **)** + +Set whether the polygon is to be a :ref:`ConvexPolygon2D` (:ref:`code`build_mode:ref:`/code`=0), or a :ref:`ConcavePolygon2D` (:ref:`code`build_mode:ref:`/code`=1). + +.. _class_CollisionPolygon2D_get_build_mode: + +- :ref:`int` **get_build_mode** **(** **)** const + +Return whether the polygon is a :ref:`ConvexPolygon2D` (:ref:`code`build_mode:ref:`/code`=0), or a :ref:`ConcavePolygon2D` (:ref:`code`build_mode:ref:`/code`=1). + +.. _class_CollisionPolygon2D_set_trigger: + +- void **set_trigger** **(** :ref:`bool` trigger **)** + +Set whether this polygon is a trigger. A trigger polygon detects collisions, but is otherwise unaffected by physics (i.e. colliding objects will not get blocked). + +.. _class_CollisionPolygon2D_is_trigger: + +- :ref:`bool` **is_trigger** **(** **)** const + +Return whether this polygon is a trigger. + +.. _class_CollisionPolygon2D_get_collision_object_first_shape: + +- :ref:`int` **get_collision_object_first_shape** **(** **)** const + +Return the index of the first shape generated by the editor. + +When :ref:`code`build_mode:ref:`/code` is set to generate convex polygons, the shape shown in the editor may be decomopsed into many convex polygons. In that case, a range of indexes is needed to directly access the :ref:`Shape2D`s. + +When :ref:`code`build_mode:ref:`/code` is set to generate concave polygons, there is only one :ref:`Shape2D` generated, so the start index and the end index are the same. + +.. _class_CollisionPolygon2D_get_collision_object_last_shape: + +- :ref:`int` **get_collision_object_last_shape** **(** **)** const + +Return the index of the last shape generated by the editor. + + diff --git a/classes/class_collisionshape.rst b/classes/class_collisionshape.rst new file mode 100644 index 000000000..463cf5c76 --- /dev/null +++ b/classes/class_collisionshape.rst @@ -0,0 +1,67 @@ +.. _class_CollisionShape: + +CollisionShape +============== + +Inherits: :ref:`Spatial` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`resource_changed` **(** :ref:`Object` resource **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shape` **(** :ref:`Object` shape **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_shape` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_trigger` **(** :ref:`bool` enable **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_trigger` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`make_convex_from_brothers` **(** **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_collision_object_shape_index` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_CollisionShape_resource_changed: + +- void **resource_changed** **(** :ref:`Object` resource **)** + +.. _class_CollisionShape_set_shape: + +- void **set_shape** **(** :ref:`Object` shape **)** + +.. _class_CollisionShape_get_shape: + +- :ref:`Object` **get_shape** **(** **)** const + +.. _class_CollisionShape_set_trigger: + +- void **set_trigger** **(** :ref:`bool` enable **)** + +.. _class_CollisionShape_is_trigger: + +- :ref:`bool` **is_trigger** **(** **)** const + +.. _class_CollisionShape_make_convex_from_brothers: + +- void **make_convex_from_brothers** **(** **)** + +.. _class_CollisionShape_get_collision_object_shape_index: + +- :ref:`int` **get_collision_object_shape_index** **(** **)** const + + diff --git a/classes/class_collisionshape2d.rst b/classes/class_collisionshape2d.rst new file mode 100644 index 000000000..979104d36 --- /dev/null +++ b/classes/class_collisionshape2d.rst @@ -0,0 +1,70 @@ +.. _class_CollisionShape2D: + +CollisionShape2D +================ + +Inherits: :ref:`Node2D` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Editor-only class for easy editing of shapes. + +Member Functions +---------------- + ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shape` **(** :ref:`Object` shape **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_shape` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_trigger` **(** :ref:`bool` enable **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_trigger` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_collision_object_shape_index` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Editor-only class. This is not present when running the game. It's used in the editor to properly edit and position collision shapes in :ref:`CollisionObject2D`. This is not accessible from regular code. + +Member Function Description +--------------------------- + +.. _class_CollisionShape2D_set_shape: + +- void **set_shape** **(** :ref:`Object` shape **)** + +Set this shape's :ref:`Shape2D`. This will not appear as a node, but can be directly edited as a property. + +.. _class_CollisionShape2D_get_shape: + +- :ref:`Object` **get_shape** **(** **)** const + +Return this shape's :ref:`Shape2D`. + +.. _class_CollisionShape2D_set_trigger: + +- void **set_trigger** **(** :ref:`bool` enable **)** + +Set whether this shape is a trigger. A trigger shape detects collisions, but is otherwise unaffected by physics (i.e. will not block movement of colliding objects). + +.. _class_CollisionShape2D_is_trigger: + +- :ref:`bool` **is_trigger** **(** **)** const + +Return whether this shape is a trigger. + +.. _class_CollisionShape2D_get_collision_object_shape_index: + +- :ref:`int` **get_collision_object_shape_index** **(** **)** const + +Return the index of this shape inside its container :ref:`CollisionObject2D`. This can be used to directly access the underlying :ref:`Shape2D`. + + diff --git a/classes/class_color.rst b/classes/class_color.rst new file mode 100644 index 000000000..3c85b427f --- /dev/null +++ b/classes/class_color.rst @@ -0,0 +1,136 @@ +.. _class_Color: + +Color +===== + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + +Color in RGBA format. + +Member Functions +---------------- + ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`blend` **(** :ref:`Color` over **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`contrasted` **(** **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`gray` **(** **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`inverted` **(** **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`linear_interpolate` **(** :ref:`Color` b, :ref:`float` t **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`to_32` **(** **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`to_ARGB32` **(** **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`to_html` **(** :ref:`bool` with_alpha=True **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`Color` **(** :ref:`float` r, :ref:`float` g, :ref:`float` b, :ref:`float` a **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`Color` **(** :ref:`float` r, :ref:`float` g, :ref:`float` b **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`Color` **(** :ref:`int` from **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`Color` **(** :ref:`String` from **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Variables +---------------- + +- :ref:`float` **r** +- :ref:`float` **g** +- :ref:`float` **b** +- :ref:`float` **a** +- :ref:`float` **h** +- :ref:`float` **s** +- :ref:`float` **v** +- :ref:`int` **r8** +- :ref:`int` **g8** +- :ref:`int` **b8** +- :ref:`int` **a8** + +Description +----------- + +A color is represented as red, green and blue (r,g,b) components. Additionally, "a" represents the alpha component, often used for transparency. Values are in floating point and usually range from 0 to 1. Some methods (such as set_modulate() ) may accept values > 1. + +Member Function Description +--------------------------- + +.. _class_Color_blend: + +- :ref:`Color` **blend** **(** :ref:`Color` over **)** + +.. _class_Color_contrasted: + +- :ref:`Color` **contrasted** **(** **)** + +Return the most contrasting color with this one. + +.. _class_Color_gray: + +- :ref:`float` **gray** **(** **)** + +Convert the color to gray. + +.. _class_Color_inverted: + +- :ref:`Color` **inverted** **(** **)** + +Return the inverted color (1-r, 1-g, 1-b, 1-a). + +.. _class_Color_linear_interpolate: + +- :ref:`Color` **linear_interpolate** **(** :ref:`Color` b, :ref:`float` t **)** + +Return the linear interpolation with another color. + +.. _class_Color_to_32: + +- :ref:`int` **to_32** **(** **)** + +Convert the color to a 32 its integer (each byte represets a RGBA). + +.. _class_Color_to_ARGB32: + +- :ref:`int` **to_ARGB32** **(** **)** + +Convert color to ARGB32, more compatible with DirectX. + +.. _class_Color_to_html: + +- :ref:`String` **to_html** **(** :ref:`bool` with_alpha=True **)** + +Return the HTML hexadecimal color string. + +.. _class_Color_Color: + +- :ref:`Color` **Color** **(** :ref:`float` r, :ref:`float` g, :ref:`float` b, :ref:`float` a **)** + +Construct the color from an RGBA profile. + +.. _class_Color_Color: + +- :ref:`Color` **Color** **(** :ref:`float` r, :ref:`float` g, :ref:`float` b **)** + +Construct the color from an RGBA profile. + +.. _class_Color_Color: + +- :ref:`Color` **Color** **(** :ref:`int` from **)** + +Construct the color from an RGBA profile. + +.. _class_Color_Color: + +- :ref:`Color` **Color** **(** :ref:`String` from **)** + +Construct the color from an RGBA profile. + + diff --git a/classes/class_colorarray.rst b/classes/class_colorarray.rst new file mode 100644 index 000000000..098e0a63c --- /dev/null +++ b/classes/class_colorarray.rst @@ -0,0 +1,67 @@ +.. _class_ColorArray: + +ColorArray +========== + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + +Array of Colors + +Member Functions +---------------- + ++--------------------------------------+-----------------------------------------------------------------------------------------------------------+ +| void | :ref:`push_back` **(** :ref:`Color` color **)** | ++--------------------------------------+-----------------------------------------------------------------------------------------------------------+ +| void | :ref:`resize` **(** :ref:`int` idx **)** | ++--------------------------------------+-----------------------------------------------------------------------------------------------------------+ +| void | :ref:`set` **(** :ref:`int` idx, :ref:`Color` color **)** | ++--------------------------------------+-----------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`size` **(** **)** | ++--------------------------------------+-----------------------------------------------------------------------------------------------------------+ +| :ref:`ColorArray` | :ref:`ColorArray` **(** :ref:`Array` from **)** | ++--------------------------------------+-----------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Array of Color, can only contains colors. Optimized for memory usage, can't fragment the memory. + +Member Function Description +--------------------------- + +.. _class_ColorArray_push_back: + +- void **push_back** **(** :ref:`Color` color **)** + +Append a value to the array. + +.. _class_ColorArray_resize: + +- void **resize** **(** :ref:`int` idx **)** + +Resize the array. + +.. _class_ColorArray_set: + +- void **set** **(** :ref:`int` idx, :ref:`Color` color **)** + +Set an index in the array. + +.. _class_ColorArray_size: + +- :ref:`int` **size** **(** **)** + +Return the array size. + +.. _class_ColorArray_ColorArray: + +- :ref:`ColorArray` **ColorArray** **(** :ref:`Array` from **)** + +Create from a generic array. + + diff --git a/classes/class_colorpicker.rst b/classes/class_colorpicker.rst new file mode 100644 index 000000000..3d5e61828 --- /dev/null +++ b/classes/class_colorpicker.rst @@ -0,0 +1,81 @@ +.. _class_ColorPicker: + +ColorPicker +=========== + +Inherits: :ref:`BoxContainer` +------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Color picker control. + +Member Functions +---------------- + ++----------------------------+----------------------------------------------------------------------------------------------------+ +| void | :ref:`set_color` **(** :ref:`Color` color **)** | ++----------------------------+----------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_color` **(** **)** const | ++----------------------------+----------------------------------------------------------------------------------------------------+ +| void | :ref:`set_raw_mode` **(** :ref:`bool` mode **)** | ++----------------------------+----------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_raw_mode` **(** **)** const | ++----------------------------+----------------------------------------------------------------------------------------------------+ +| void | :ref:`set_edit_alpha` **(** :ref:`bool` show **)** | ++----------------------------+----------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_editing_alpha` **(** **)** const | ++----------------------------+----------------------------------------------------------------------------------------------------+ +| void | :ref:`add_preset` **(** :ref:`Color` arg0 **)** | ++----------------------------+----------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **color_changed** **(** :ref:`Color` color **)** + +Description +----------- + +This is a simple color picker :ref:`Control`. It's useful for selecting a color from an RGB/RGBA colorspace. + +Member Function Description +--------------------------- + +.. _class_ColorPicker_set_color: + +- void **set_color** **(** :ref:`Color` color **)** + +Select the current color. + +.. _class_ColorPicker_get_color: + +- :ref:`Color` **get_color** **(** **)** const + +Return the current (edited) color. + +.. _class_ColorPicker_set_raw_mode: + +- void **set_raw_mode** **(** :ref:`bool` mode **)** + +.. _class_ColorPicker_is_raw_mode: + +- :ref:`bool` **is_raw_mode** **(** **)** const + +.. _class_ColorPicker_set_edit_alpha: + +- void **set_edit_alpha** **(** :ref:`bool` show **)** + +.. _class_ColorPicker_is_editing_alpha: + +- :ref:`bool` **is_editing_alpha** **(** **)** const + +.. _class_ColorPicker_add_preset: + +- void **add_preset** **(** :ref:`Color` arg0 **)** + + diff --git a/classes/class_colorpickerbutton.rst b/classes/class_colorpickerbutton.rst new file mode 100644 index 000000000..e01acfa61 --- /dev/null +++ b/classes/class_colorpickerbutton.rst @@ -0,0 +1,54 @@ +.. _class_ColorPickerButton: + +ColorPickerButton +================= + +Inherits: :ref:`Button` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_color` **(** :ref:`Color` color **)** | ++----------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_color` **(** **)** const | ++----------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_edit_alpha` **(** :ref:`bool` show **)** | ++----------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_editing_alpha` **(** **)** const | ++----------------------------+----------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **color_changed** **(** :ref:`Color` color **)** + +Member Function Description +--------------------------- + +.. _class_ColorPickerButton_set_color: + +- void **set_color** **(** :ref:`Color` color **)** + +.. _class_ColorPickerButton_get_color: + +- :ref:`Color` **get_color** **(** **)** const + +.. _class_ColorPickerButton_set_edit_alpha: + +- void **set_edit_alpha** **(** :ref:`bool` show **)** + +.. _class_ColorPickerButton_is_editing_alpha: + +- :ref:`bool` **is_editing_alpha** **(** **)** const + + diff --git a/classes/class_colorramp.rst b/classes/class_colorramp.rst new file mode 100644 index 000000000..68edf2556 --- /dev/null +++ b/classes/class_colorramp.rst @@ -0,0 +1,97 @@ +.. _class_ColorRamp: + +ColorRamp +========= + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_point` **(** :ref:`float` offset, :ref:`Color` color **)** | ++--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_point` **(** :ref:`int` offset **)** | ++--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_offset` **(** :ref:`int` point, :ref:`float` offset **)** | ++--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_offset` **(** :ref:`int` point **)** const | ++--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_color` **(** :ref:`int` point, :ref:`Color` color **)** | ++--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_color` **(** :ref:`int` point **)** const | ++--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`interpolate` **(** :ref:`float` offset **)** | ++--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_point_count` **(** **)** const | ++--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_offsets` **(** :ref:`RealArray` offsets **)** | ++--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RealArray` | :ref:`get_offsets` **(** **)** const | ++--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_colors` **(** :ref:`ColorArray` colors **)** | ++--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`ColorArray` | :ref:`get_colors` **(** **)** const | ++--------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_ColorRamp_add_point: + +- void **add_point** **(** :ref:`float` offset, :ref:`Color` color **)** + +.. _class_ColorRamp_remove_point: + +- void **remove_point** **(** :ref:`int` offset **)** + +.. _class_ColorRamp_set_offset: + +- void **set_offset** **(** :ref:`int` point, :ref:`float` offset **)** + +.. _class_ColorRamp_get_offset: + +- :ref:`float` **get_offset** **(** :ref:`int` point **)** const + +.. _class_ColorRamp_set_color: + +- void **set_color** **(** :ref:`int` point, :ref:`Color` color **)** + +.. _class_ColorRamp_get_color: + +- :ref:`Color` **get_color** **(** :ref:`int` point **)** const + +.. _class_ColorRamp_interpolate: + +- :ref:`Color` **interpolate** **(** :ref:`float` offset **)** + +.. _class_ColorRamp_get_point_count: + +- :ref:`int` **get_point_count** **(** **)** const + +.. _class_ColorRamp_set_offsets: + +- void **set_offsets** **(** :ref:`RealArray` offsets **)** + +.. _class_ColorRamp_get_offsets: + +- :ref:`RealArray` **get_offsets** **(** **)** const + +.. _class_ColorRamp_set_colors: + +- void **set_colors** **(** :ref:`ColorArray` colors **)** + +.. _class_ColorRamp_get_colors: + +- :ref:`ColorArray` **get_colors** **(** **)** const + + diff --git a/classes/class_concavepolygonshape.rst b/classes/class_concavepolygonshape.rst new file mode 100644 index 000000000..885db8bf8 --- /dev/null +++ b/classes/class_concavepolygonshape.rst @@ -0,0 +1,46 @@ +.. _class_ConcavePolygonShape: + +ConcavePolygonShape +=================== + +Inherits: :ref:`Shape` +----------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Concave polygon shape. + +Member Functions +---------------- + ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_faces` **(** :ref:`Vector3Array` faces **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3Array` | :ref:`get_faces` **(** **)** const | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Concave polygon shape resource, which can be set into a :ref:`PhysicsBody` or area. This shape is created by feeding a list of triangles. + +Member Function Description +--------------------------- + +.. _class_ConcavePolygonShape_set_faces: + +- void **set_faces** **(** :ref:`Vector3Array` faces **)** + +Set the faces (an array of triangles). + +.. _class_ConcavePolygonShape_get_faces: + +- :ref:`Vector3Array` **get_faces** **(** **)** const + +Return the faces (an array of triangles). + + diff --git a/classes/class_concavepolygonshape2d.rst b/classes/class_concavepolygonshape2d.rst new file mode 100644 index 000000000..7f15f1d2d --- /dev/null +++ b/classes/class_concavepolygonshape2d.rst @@ -0,0 +1,48 @@ +.. _class_ConcavePolygonShape2D: + +ConcavePolygonShape2D +===================== + +Inherits: :ref:`Shape2D` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Concave polygon 2D shape resource for physics. + +Member Functions +---------------- + ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_segments` **(** :ref:`Vector2Array` segments **)** | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2Array` | :ref:`get_segments` **(** **)** const | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Concave polygon 2D shape resource for physics. It is made out of segments and is very optimal for complex polygonal concave collisions. It is really not advised to use for RigidBody nodes. A CollisionPolygon2D in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better for static collisions. + +The main difference between a :ref:`ConvexPolygonShape2D` and a :ref:`ConcavePolygonShape2D` is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection. + +Member Function Description +--------------------------- + +.. _class_ConcavePolygonShape2D_set_segments: + +- void **set_segments** **(** :ref:`Vector2Array` segments **)** + +Set the array of segments. + +.. _class_ConcavePolygonShape2D_get_segments: + +- :ref:`Vector2Array` **get_segments** **(** **)** const + +Return the array of segments. + + diff --git a/classes/class_conetwistjoint.rst b/classes/class_conetwistjoint.rst new file mode 100644 index 000000000..141cfab1d --- /dev/null +++ b/classes/class_conetwistjoint.rst @@ -0,0 +1,47 @@ +.. _class_ConeTwistJoint: + +ConeTwistJoint +============== + +Inherits: :ref:`Joint` +----------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_param` **(** :ref:`int` param, :ref:`float` value **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_param` **(** :ref:`int` param **)** const | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **PARAM_SWING_SPAN** = **0** +- **PARAM_TWIST_SPAN** = **1** +- **PARAM_BIAS** = **2** +- **PARAM_SOFTNESS** = **3** +- **PARAM_RELAXATION** = **4** +- **PARAM_MAX** = **5** + +Member Function Description +--------------------------- + +.. _class_ConeTwistJoint_set_param: + +- void **set_param** **(** :ref:`int` param, :ref:`float` value **)** + +.. _class_ConeTwistJoint_get_param: + +- :ref:`float` **get_param** **(** :ref:`int` param **)** const + + diff --git a/classes/class_configfile.rst b/classes/class_configfile.rst new file mode 100644 index 000000000..001b68dff --- /dev/null +++ b/classes/class_configfile.rst @@ -0,0 +1,73 @@ +.. _class_ConfigFile: + +ConfigFile +========== + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_value` **(** :ref:`String` section, :ref:`String` key, var value **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`get_value` **(** :ref:`String` section, :ref:`String` key, var default=NULL **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_section` **(** :ref:`String` section **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_section_key` **(** :ref:`String` section, :ref:`String` key **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_sections` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_section_keys` **(** :ref:`String` section **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Error | :ref:`load` **(** :ref:`String` path **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Error | :ref:`save` **(** :ref:`String` path **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_ConfigFile_set_value: + +- void **set_value** **(** :ref:`String` section, :ref:`String` key, var value **)** + +.. _class_ConfigFile_get_value: + +- void **get_value** **(** :ref:`String` section, :ref:`String` key, var default=NULL **)** const + +.. _class_ConfigFile_has_section: + +- :ref:`bool` **has_section** **(** :ref:`String` section **)** const + +.. _class_ConfigFile_has_section_key: + +- :ref:`bool` **has_section_key** **(** :ref:`String` section, :ref:`String` key **)** const + +.. _class_ConfigFile_get_sections: + +- :ref:`StringArray` **get_sections** **(** **)** const + +.. _class_ConfigFile_get_section_keys: + +- :ref:`StringArray` **get_section_keys** **(** :ref:`String` section **)** const + +.. _class_ConfigFile_load: + +- Error **load** **(** :ref:`String` path **)** + +.. _class_ConfigFile_save: + +- Error **save** **(** :ref:`String` path **)** + + diff --git a/classes/class_confirmationdialog.rst b/classes/class_confirmationdialog.rst new file mode 100644 index 000000000..231d36504 --- /dev/null +++ b/classes/class_confirmationdialog.rst @@ -0,0 +1,38 @@ +.. _class_ConfirmationDialog: + +ConfirmationDialog +================== + +Inherits: :ref:`AcceptDialog` +------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Dialog for confirmation of actions. + +Member Functions +---------------- + ++------------------------------+---------------------------------------------------------------------+ +| :ref:`Button` | :ref:`get_cancel` **(** **)** | ++------------------------------+---------------------------------------------------------------------+ + +Description +----------- + +Dialog for confirmation of actions. This dialog inherits from :ref:`AcceptDialog`, but has by default an OK and Cancel buton (in host OS order). + +Member Function Description +--------------------------- + +.. _class_ConfirmationDialog_get_cancel: + +- :ref:`Button` **get_cancel** **(** **)** + +Return the cancel button. + + diff --git a/classes/class_container.rst b/classes/class_container.rst new file mode 100644 index 000000000..32ee01404 --- /dev/null +++ b/classes/class_container.rst @@ -0,0 +1,58 @@ +.. _class_Container: + +Container +========= + +Inherits: :ref:`Control` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Base node for containers. + +Member Functions +---------------- + ++-------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`queue_sort` **(** **)** | ++-------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`fit_child_in_rect` **(** :ref:`Control` child, :ref:`Rect2` rect **)** | ++-------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **sort_children** **(** **)** + +Numeric Constants +----------------- + +- **NOTIFICATION_SORT_CHILDREN** = **50** --- Notification for when sorting the children, it must be obeyed immediately. + +Description +----------- + +Base node for conainers. A :ref:`Container` contains other controls and automatically arranges them in a certain way. + +A Control can inherit this to reate custom container classes. + +Member Function Description +--------------------------- + +.. _class_Container_queue_sort: + +- void **queue_sort** **(** **)** + +Queue resort of the contained children. This is called automatically anyway, but can be called upon request. + +.. _class_Container_fit_child_in_rect: + +- void **fit_child_in_rect** **(** :ref:`Control` child, :ref:`Rect2` rect **)** + +Fit a child control in a given rect. This is mainly a helper for creating custom container classes. + + diff --git a/classes/class_control.rst b/classes/class_control.rst new file mode 100644 index 000000000..2fc0ce08b --- /dev/null +++ b/classes/class_control.rst @@ -0,0 +1,633 @@ +.. _class_Control: + +Control +======= + +Inherits: :ref:`CanvasItem` +--------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Control is the base node for all the GUI components. + +Member Functions +---------------- + ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_input_event` **(** :ref:`InputEvent` event **)** virtual | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`can_drop_data` **(** :ref:`Vector2` pos, var data **)** virtual | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`drop_data` **(** :ref:`Vector2` pos, var data **)** virtual | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_drag_data` **(** :ref:`Vector2` pos **)** virtual | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_minimum_size` **(** **)** virtual | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`accept_event` **(** **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_minimum_size` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_combined_minimum_size` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_anchor` **(** :ref:`int` margin, :ref:`int` anchor_mode **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_anchor` **(** :ref:`int` margin **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_margin` **(** :ref:`int` margin, :ref:`float` offset **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_anchor_and_margin` **(** :ref:`int` margin, :ref:`int` anchor_mode, :ref:`float` offset **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_begin` **(** :ref:`Vector2` pos **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_end` **(** :ref:`Vector2` pos **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_pos` **(** :ref:`Vector2` pos **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_size` **(** :ref:`Vector2` size **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_custom_minimum_size` **(** :ref:`Vector2` size **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_global_pos` **(** :ref:`Vector2` pos **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_rotation` **(** :ref:`float` rotation **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_scale` **(** :ref:`Vector2` scale **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_margin` **(** :ref:`int` margin **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_begin` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_end` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_pos` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_size` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_rotation` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_scale` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_custom_minimum_size` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_parent_area_size` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_global_pos` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`get_rect` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`get_global_rect` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_area_as_parent_rect` **(** :ref:`int` margin=0 **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`show_modal` **(** :ref:`bool` exclusive=false **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_focus_mode` **(** :ref:`int` mode **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_focus` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`grab_focus` **(** **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`release_focus` **(** **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Control` | :ref:`get_focus_owner` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_h_size_flags` **(** :ref:`int` flags **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_h_size_flags` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_stretch_ratio` **(** :ref:`float` ratio **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_stretch_ratio` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_v_size_flags` **(** :ref:`int` flags **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_v_size_flags` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_theme` **(** :ref:`Theme` theme **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Theme` | :ref:`get_theme` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_icon_override` **(** :ref:`String` name, :ref:`Texture` texture **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_shader_override` **(** :ref:`String` name, :ref:`Shader` shader **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_style_override` **(** :ref:`String` name, :ref:`StyleBox` stylebox **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_font_override` **(** :ref:`String` name, :ref:`Font` font **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_color_override` **(** :ref:`String` name, :ref:`Color` color **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_constant_override` **(** :ref:`String` name, :ref:`int` constant **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_icon` **(** :ref:`String` name, :ref:`String` type="" **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StyleBox` | :ref:`get_stylebox` **(** :ref:`String` name, :ref:`String` type="" **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Font` | :ref:`get_font` **(** :ref:`String` name, :ref:`String` type="" **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_color` **(** :ref:`String` name, :ref:`String` type="" **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_constant` **(** :ref:`String` name, :ref:`String` type="" **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Control` | :ref:`get_parent_control` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_tooltip` **(** :ref:`String` tooltip **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_tooltip` **(** :ref:`Vector2` atpos=Vector2(0,0) **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_default_cursor_shape` **(** :ref:`int` shape **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_default_cursor_shape` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_cursor_shape` **(** :ref:`Vector2` pos=Vector2(0,0) **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_focus_neighbour` **(** :ref:`int` margin, :ref:`NodePath` neighbour **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`NodePath` | :ref:`get_focus_neighbour` **(** :ref:`int` margin **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_ignore_mouse` **(** :ref:`bool` ignore **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_ignoring_mouse` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`force_drag` **(** var data, :ref:`Object` preview **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_stop_mouse` **(** :ref:`bool` stop **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_stopping_mouse` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`grab_click_focus` **(** **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_drag_preview` **(** :ref:`Control` control **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`warp_mouse` **(** :ref:`Vector2` to_pos **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **focus_enter** **(** **)** +- **mouse_enter** **(** **)** +- **resized** **(** **)** +- **minimum_size_changed** **(** **)** +- **size_flags_changed** **(** **)** +- **focus_exit** **(** **)** +- **input_event** **(** :ref:`InputEvent` ev **)** +- **modal_close** **(** **)** +- **mouse_exit** **(** **)** + +Numeric Constants +----------------- + +- **ANCHOR_BEGIN** = **0** --- X is relative to MARGIN_LEFT, Y is relative to MARGIN_TOP. +- **ANCHOR_END** = **1** --- X is relative to -MARGIN_RIGHT, Y is relative to -MARGIN_BOTTOM. +- **ANCHOR_RATIO** = **2** --- X and Y are a ratio (0 to 1) relative to the parent size 0 is left/top, 1 is right/bottom. +- **ANCHOR_CENTER** = **3** +- **FOCUS_NONE** = **0** --- Control can't acquire focus. +- **FOCUS_CLICK** = **1** --- Control can acquire focus only if clicked. +- **FOCUS_ALL** = **2** --- Control can acquire focus if clicked, or by pressing TAB/Directionals in the keyboard from another Control. +- **NOTIFICATION_RESIZED** = **40** --- Control changed size (get_size() reports the new size). +- **NOTIFICATION_MOUSE_ENTER** = **41** --- Mouse pointer entered the area of the Control. +- **NOTIFICATION_MOUSE_EXIT** = **42** --- Mouse pointer exited the area of the Control. +- **NOTIFICATION_FOCUS_ENTER** = **43** --- Control gained focus. +- **NOTIFICATION_FOCUS_EXIT** = **44** --- Control lost focus. +- **NOTIFICATION_THEME_CHANGED** = **45** --- Theme changed. Redrawing is desired. +- **NOTIFICATION_MODAL_CLOSE** = **46** --- Modal control was closed. +- **CURSOR_ARROW** = **0** +- **CURSOR_IBEAM** = **1** +- **CURSOR_POINTING_HAND** = **2** +- **CURSOR_CROSS** = **3** +- **CURSOR_WAIT** = **4** +- **CURSOR_BUSY** = **5** +- **CURSOR_DRAG** = **6** +- **CURSOR_CAN_DROP** = **7** +- **CURSOR_FORBIDDEN** = **8** +- **CURSOR_VSIZE** = **9** +- **CURSOR_HSIZE** = **10** +- **CURSOR_BDIAGSIZE** = **11** +- **CURSOR_FDIAGSIZE** = **12** +- **CURSOR_MOVE** = **13** +- **CURSOR_VSPLIT** = **14** +- **CURSOR_HSPLIT** = **15** +- **CURSOR_HELP** = **16** +- **SIZE_EXPAND** = **1** +- **SIZE_FILL** = **2** +- **SIZE_EXPAND_FILL** = **3** + +Description +----------- + +Control is the base class Node for all the GUI components. Every GUI component inherits from it, directly or indirectly. In this way, sections of the scene tree made of contiguous control nodes, become user interfaces. + +Controls are relative to the parent position and size by using anchors and margins. This ensures that they can adapt easily in most situation to changing dialog and screen sizes. When more flexibility is desired, :ref:`Container` derived nodes can be used. + +Anchors work by defining which margin do they follow, and a value relative to it. Allowed anchoring modes are ANCHOR_BEGIN, where the margin is relative to the top or left margins of the parent (in pixels), ANCHOR_END for the right and bottom margins of the parent and ANCHOR_RATIO, which is a ratio from 0 to 1 in the parent range. + +Input device events (:ref:`InputEvent`) are first sent to the root controls via the :ref:`Node._input`, which distribute it through the tree, then delivers them to the adequate one (under cursor or keyboard focus based) by calling :ref:`Node._input_event`. There is no need to enable input processing on controls to receive such events. To ensure that no one else will receive the event (not even :ref:`Node._unhandled_input`), the control can accept it by calling :ref:`accept_event`. + +Only one control can hold the keyboard focus (receiving keyboard events), for that the control must define the focus mode with :ref:`set_focus_mode`. Focus is lost when another control gains it, or the current focus owner is hidden. + +It is sometimes desired for a control to ignore mouse/pointer events. This is often the case when placing other controls on top of a button, in such cases. Calling :ref:`set_ignore_mouse` enables this function. + +Finally, controls are skinned according to a :ref:`Theme`. Setting a :ref:`Theme` on a control will propagate all the skinning down the tree. Optionally, skinning can be overrided per each control by calling the add_*_override functions, or from the editor. + +Member Function Description +--------------------------- + +.. _class_Control__input_event: + +- void **_input_event** **(** :ref:`InputEvent` event **)** virtual + +Called when an input event reaches the control. + +.. _class_Control_can_drop_data: + +- :ref:`bool` **can_drop_data** **(** :ref:`Vector2` pos, var data **)** virtual + +.. _class_Control_drop_data: + +- void **drop_data** **(** :ref:`Vector2` pos, var data **)** virtual + +.. _class_Control_get_drag_data: + +- :ref:`Object` **get_drag_data** **(** :ref:`Vector2` pos **)** virtual + +.. _class_Control_get_minimum_size: + +- :ref:`Vector2` **get_minimum_size** **(** **)** virtual + +Return the minimum size this Control can shrink to. A control will never be displayed or resized smaller than its minimum size. + +.. _class_Control_accept_event: + +- void **accept_event** **(** **)** + +Handles the event, no other control will receive it and it will not be sent to nodes waiting on :ref:`Node._unhandled_input` or :ref:`Node._unhandled_key_input`. + +.. _class_Control_get_minimum_size: + +- :ref:`Vector2` **get_minimum_size** **(** **)** const + +Return the minimum size this Control can shrink to. A control will never be displayed or resized smaller than its minimum size. + +.. _class_Control_get_combined_minimum_size: + +- :ref:`Vector2` **get_combined_minimum_size** **(** **)** const + +.. _class_Control_set_anchor: + +- void **set_anchor** **(** :ref:`int` margin, :ref:`int` anchor_mode **)** + +Change the anchor (ANCHOR_BEGIN, ANCHOR_END, ANCHOR_RATIO) type for a margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). Changing the anchor mode converts the current margin offset from the previos anchor mode to the new one, so margin offsets (:ref:`set_margin`) must be done after setting anchors, or at the same time (:ref:`set_anchor_and_margin`). + +.. _class_Control_get_anchor: + +- :ref:`int` **get_anchor** **(** :ref:`int` margin **)** const + +Return the anchor type (ANCHOR_BEGIN, ANCHOR_END, ANCHOR_RATIO) for a given margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). + +.. _class_Control_set_margin: + +- void **set_margin** **(** :ref:`int` margin, :ref:`float` offset **)** + +Set a margin offset. Margin can be one of (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). Offset value being set depends on the anchor mode. + +.. _class_Control_set_anchor_and_margin: + +- void **set_anchor_and_margin** **(** :ref:`int` margin, :ref:`int` anchor_mode, :ref:`float` offset **)** + +Change the anchor (ANCHOR_BEGIN, ANCHOR_END, ANCHOR_RATIO) type for a margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM), and also set its offset. This is a helper (see :ref:`set_anchor` and :ref:`set_margin`). + +.. _class_Control_set_begin: + +- void **set_begin** **(** :ref:`Vector2` pos **)** + +Sets MARGIN_LEFT and MARGIN_TOP at the same time. This is a helper (see :ref:`set_margin`). + +.. _class_Control_set_end: + +- void **set_end** **(** :ref:`Vector2` pos **)** + +Sets MARGIN_RIGHT and MARGIN_BOTTOM at the same time. This is a helper (see :ref:`set_margin`). + +.. _class_Control_set_pos: + +- void **set_pos** **(** :ref:`Vector2` pos **)** + +Move the Control to a new position, relative to the top-left corner of the parent Control, changing all margins if needed and without changing current anchor mode. This is a helper (see :ref:`set_margin`). + +.. _class_Control_set_size: + +- void **set_size** **(** :ref:`Vector2` size **)** + +Changes MARGIN_RIGHT and MARGIN_BOTTOM to fit a given size. This is a helper (see :ref:`set_margin`). + +.. _class_Control_set_custom_minimum_size: + +- void **set_custom_minimum_size** **(** :ref:`Vector2` size **)** + +.. _class_Control_set_global_pos: + +- void **set_global_pos** **(** :ref:`Vector2` pos **)** + +Move the Control to a new position, relative to the top-left corner of the *window* Control, and without changing current anchor mode. (see :ref:`set_margin`). + +.. _class_Control_set_rotation: + +- void **set_rotation** **(** :ref:`float` rotation **)** + +.. _class_Control_set_scale: + +- void **set_scale** **(** :ref:`Vector2` scale **)** + +.. _class_Control_get_margin: + +- :ref:`float` **get_margin** **(** :ref:`int` margin **)** const + +Return a margin offset. Margin can be one of (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). Offset value being returned depends on the anchor mode. + +.. _class_Control_get_begin: + +- :ref:`Vector2` **get_begin** **(** **)** const + +.. _class_Control_get_end: + +- :ref:`Vector2` **get_end** **(** **)** const + +Returns MARGIN_LEFT and MARGIN_TOP at the same time. This is a helper (see :ref:`set_margin`). + +.. _class_Control_get_pos: + +- :ref:`Vector2` **get_pos** **(** **)** const + +Returns the Control position, relative to the top-left corner of the parent Control and independly of the anchor mode. + +.. _class_Control_get_size: + +- :ref:`Vector2` **get_size** **(** **)** const + +Returns the size of the Control, computed from all margins, however the size returned will **never be smaller than the minimum size reported by :ref:`get_minimum_size`**. This means that even if end position of the Control rectangle is smaller than the begin position, the Control will still display and interact correctly. (see description, :ref:`get_minimum_size`, :ref:`set_margin`, :ref:`set_anchor`). + +.. _class_Control_get_rotation: + +- :ref:`float` **get_rotation** **(** **)** const + +.. _class_Control_get_scale: + +- :ref:`Vector2` **get_scale** **(** **)** const + +.. _class_Control_get_custom_minimum_size: + +- :ref:`Vector2` **get_custom_minimum_size** **(** **)** const + +.. _class_Control_get_parent_area_size: + +- :ref:`Vector2` **get_parent_area_size** **(** **)** const + +.. _class_Control_get_global_pos: + +- :ref:`Vector2` **get_global_pos** **(** **)** const + +Returns the Control position, relative to the top-left corner of the parent Control and independent of the anchor mode. + +.. _class_Control_get_rect: + +- :ref:`Rect2` **get_rect** **(** **)** const + +Return position and size of the Control, relative to the top-left corner of the parent Control. This is a helper (see :ref:`get_pos`,:ref:`get_size`). + +.. _class_Control_get_global_rect: + +- :ref:`Rect2` **get_global_rect** **(** **)** const + +Return position and size of the Control, relative to the top-left corner of the *window* Control. This is a helper (see :ref:`get_global_pos`,:ref:`get_size`). + +.. _class_Control_set_area_as_parent_rect: + +- void **set_area_as_parent_rect** **(** :ref:`int` margin=0 **)** + +Change all margins and anchors, so this Control always takes up the same area as the parent Control. This is a helper (see :ref:`set_anchor`,:ref:`set_margin`). + +.. _class_Control_show_modal: + +- void **show_modal** **(** :ref:`bool` exclusive=false **)** + +Display a Control as modal. Control must be a subwindow (see :ref:`set_as_subwindow`). Modal controls capture the input signals until closed or the area outside them is accessed. When a modal control loses focus, or the ESC key is pressed, they automatically hide. Modal controls are used extensively for popup dialogs and menus. + +.. _class_Control_set_focus_mode: + +- void **set_focus_mode** **(** :ref:`int` mode **)** + +Set the focus access mode for the control (FOCUS_NONE, FOCUS_CLICK, FOCUS_ALL). Only one Control can be focused at the same time, and it will receive keyboard signals. + +.. _class_Control_has_focus: + +- :ref:`bool` **has_focus** **(** **)** const + +Return wether the Control is the current focused control (see :ref:`set_focus_mode`). + +.. _class_Control_grab_focus: + +- void **grab_focus** **(** **)** + +Steal the focus from another control and become the focused control (see :ref:`set_focus_mode`). + +.. _class_Control_release_focus: + +- void **release_focus** **(** **)** + +Give up the focus, no other control will be able to receive keyboard input. + +.. _class_Control_get_focus_owner: + +- :ref:`Control` **get_focus_owner** **(** **)** const + +Return which control is owning the keyboard focus, or null if no one. + +.. _class_Control_set_h_size_flags: + +- void **set_h_size_flags** **(** :ref:`int` flags **)** + +Hint for containers, set horizontal positioning flags. + +.. _class_Control_get_h_size_flags: + +- :ref:`int` **get_h_size_flags** **(** **)** const + +Hint for containers, return horizontal positioning flags. + +.. _class_Control_set_stretch_ratio: + +- void **set_stretch_ratio** **(** :ref:`float` ratio **)** + +Hint for containers, set the stretch ratio. This value is relative to other stretch ratio, so if this control has 2 and another has 1, this one will be twice as big. + +.. _class_Control_get_stretch_ratio: + +- :ref:`float` **get_stretch_ratio** **(** **)** const + +Hint for containers, return the stretch ratio. This value is relative to other stretch ratio, so if this control has 2 and another has 1, this one will be twice as big. + +.. _class_Control_set_v_size_flags: + +- void **set_v_size_flags** **(** :ref:`int` flags **)** + +Hint for containers, set vertical positioning flags. + +.. _class_Control_get_v_size_flags: + +- :ref:`int` **get_v_size_flags** **(** **)** const + +Hint for containers, return vertical positioning flags. + +.. _class_Control_set_theme: + +- void **set_theme** **(** :ref:`Theme` theme **)** + +Override whole the :ref:`Theme` for this Control and all its children controls. + +.. _class_Control_get_theme: + +- :ref:`Theme` **get_theme** **(** **)** const + +Return a :ref:`Theme` override, if one exists (see :ref:`set_theme`). + +.. _class_Control_add_icon_override: + +- void **add_icon_override** **(** :ref:`String` name, :ref:`Texture` texture **)** + +Override a single icon (:ref:`Texture`) in the theme of this Control. If texture is empty, override is cleared. + +.. _class_Control_add_shader_override: + +- void **add_shader_override** **(** :ref:`String` name, :ref:`Shader` shader **)** + +.. _class_Control_add_style_override: + +- void **add_style_override** **(** :ref:`String` name, :ref:`StyleBox` stylebox **)** + +Override a single stylebox (:ref:`Stylebox`) in the theme of this Control. If stylebox is empty, override is cleared. + +.. _class_Control_add_font_override: + +- void **add_font_override** **(** :ref:`String` name, :ref:`Font` font **)** + +Override a single font (font) in the theme of this Control. If font is empty, override is cleared. + +.. _class_Control_add_color_override: + +- void **add_color_override** **(** :ref:`String` name, :ref:`Color` color **)** + +.. _class_Control_add_constant_override: + +- void **add_constant_override** **(** :ref:`String` name, :ref:`int` constant **)** + +Override a single constant (integer) in the theme of this Control. If constant equals Theme.INVALID_CONSTANT, override is cleared. + +.. _class_Control_get_icon: + +- :ref:`Texture` **get_icon** **(** :ref:`String` name, :ref:`String` type="" **)** const + +.. _class_Control_get_stylebox: + +- :ref:`StyleBox` **get_stylebox** **(** :ref:`String` name, :ref:`String` type="" **)** const + +.. _class_Control_get_font: + +- :ref:`Font` **get_font** **(** :ref:`String` name, :ref:`String` type="" **)** const + +.. _class_Control_get_color: + +- :ref:`Color` **get_color** **(** :ref:`String` name, :ref:`String` type="" **)** const + +.. _class_Control_get_constant: + +- :ref:`int` **get_constant** **(** :ref:`String` name, :ref:`String` type="" **)** const + +.. _class_Control_get_parent_control: + +- :ref:`Control` **get_parent_control** **(** **)** const + +.. _class_Control_set_tooltip: + +- void **set_tooltip** **(** :ref:`String` tooltip **)** + +Set a tooltip, which will appear when the cursor is resting over this control. + +.. _class_Control_get_tooltip: + +- :ref:`String` **get_tooltip** **(** :ref:`Vector2` atpos=Vector2(0,0) **)** const + +Return the tooltip, which will appear when the cursor is resting over this control. + +.. _class_Control_set_default_cursor_shape: + +- void **set_default_cursor_shape** **(** :ref:`int` shape **)** + +Set the default cursor shape for this control. See enum CURSOR_* for the list of shapes. + +.. _class_Control_get_default_cursor_shape: + +- :ref:`int` **get_default_cursor_shape** **(** **)** const + +Return the default cursor shape for this control. See enum CURSOR_* for the list of shapes. + +.. _class_Control_get_cursor_shape: + +- :ref:`int` **get_cursor_shape** **(** :ref:`Vector2` pos=Vector2(0,0) **)** const + +Return the cursor shape at a certain position in the control. + +.. _class_Control_set_focus_neighbour: + +- void **set_focus_neighbour** **(** :ref:`int` margin, :ref:`NodePath` neighbour **)** + +Force a neighbour for moving the input focus to. When pressing TAB or directional/joypad directions focus is moved to the next control in that direction. However, the neighbour to move to can be forced with this function. + +.. _class_Control_get_focus_neighbour: + +- :ref:`NodePath` **get_focus_neighbour** **(** :ref:`int` margin **)** const + +Return the forced neighbour for moving the input focus to. When pressing TAB or directional/joypad directions focus is moved to the next control in that direction. However, the neighbour to move to can be forced with this function. + +.. _class_Control_set_ignore_mouse: + +- void **set_ignore_mouse** **(** :ref:`bool` ignore **)** + +Ignore mouse events on this control (even touchpad events send mouse events). + +.. _class_Control_is_ignoring_mouse: + +- :ref:`bool` **is_ignoring_mouse** **(** **)** const + +Return if the control is ignoring mouse events (even touchpad events send mouse events). + +.. _class_Control_force_drag: + +- void **force_drag** **(** var data, :ref:`Object` preview **)** + +.. _class_Control_set_stop_mouse: + +- void **set_stop_mouse** **(** :ref:`bool` stop **)** + +.. _class_Control_is_stopping_mouse: + +- :ref:`bool` **is_stopping_mouse** **(** **)** const + +.. _class_Control_grab_click_focus: + +- void **grab_click_focus** **(** **)** + +.. _class_Control_set_drag_preview: + +- void **set_drag_preview** **(** :ref:`Control` control **)** + +.. _class_Control_warp_mouse: + +- void **warp_mouse** **(** :ref:`Vector2` to_pos **)** + + diff --git a/classes/class_convexpolygonshape.rst b/classes/class_convexpolygonshape.rst new file mode 100644 index 000000000..69cfe6863 --- /dev/null +++ b/classes/class_convexpolygonshape.rst @@ -0,0 +1,42 @@ +.. _class_ConvexPolygonShape: + +ConvexPolygonShape +================== + +Inherits: :ref:`Shape` +----------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Convex Polygon Shape. + +Member Functions +---------------- + ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_points` **(** :ref:`Vector3Array` points **)** | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3Array` | :ref:`get_points` **(** **)** const | ++------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Convex polygon shape resource, which can be set into a :ref:`PhysicsBody` or area. + +Member Function Description +--------------------------- + +.. _class_ConvexPolygonShape_set_points: + +- void **set_points** **(** :ref:`Vector3Array` points **)** + +.. _class_ConvexPolygonShape_get_points: + +- :ref:`Vector3Array` **get_points** **(** **)** const + + diff --git a/classes/class_convexpolygonshape2d.rst b/classes/class_convexpolygonshape2d.rst new file mode 100644 index 000000000..b082cd04d --- /dev/null +++ b/classes/class_convexpolygonshape2d.rst @@ -0,0 +1,56 @@ +.. _class_ConvexPolygonShape2D: + +ConvexPolygonShape2D +==================== + +Inherits: :ref:`Shape2D` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Convex Polygon Shape for 2D physics. + +Member Functions +---------------- + ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_cloud` **(** :ref:`Vector2Array` point_cloud **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_points` **(** :ref:`Vector2Array` points **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2Array` | :ref:`get_points` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Convex Polygon Shape for 2D physics. A convex polygon, whatever its shape, is internally decomposed into as many convex polygons as needed to ensure all collision checks against it are always done on convex polygons (which are faster to check). + +The main difference between a :ref:`ConvexPolygonShape2D` and a :ref:`ConcavePolygonShape2D` is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection. + +Member Function Description +--------------------------- + +.. _class_ConvexPolygonShape2D_set_point_cloud: + +- void **set_point_cloud** **(** :ref:`Vector2Array` point_cloud **)** + +Currently, this method does nothing. + +.. _class_ConvexPolygonShape2D_set_points: + +- void **set_points** **(** :ref:`Vector2Array` points **)** + +Set a list of points in either clockwise or counter clockwise order, forming a convex polygon. + +.. _class_ConvexPolygonShape2D_get_points: + +- :ref:`Vector2Array` **get_points** **(** **)** const + +Return a list of points in either clockwise or counter clockwise order, forming a convex polygon. + + diff --git a/classes/class_cubemap.rst b/classes/class_cubemap.rst new file mode 100644 index 000000000..435faeab1 --- /dev/null +++ b/classes/class_cubemap.rst @@ -0,0 +1,108 @@ +.. _class_CubeMap: + +CubeMap +======= + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_width` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_height` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_rid` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_flags` **(** :ref:`int` flags **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_flags` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_side` **(** :ref:`int` side, :ref:`Image` image **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Image` | :ref:`get_side` **(** :ref:`int` side **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_storage` **(** :ref:`int` mode **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_storage` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_lossy_storage_quality` **(** :ref:`float` quality **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_lossy_storage_quality` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **STORAGE_RAW** = **0** +- **STORAGE_COMPRESS_LOSSY** = **1** +- **STORAGE_COMPRESS_LOSSLESS** = **2** +- **SIDE_LEFT** = **0** +- **SIDE_RIGHT** = **1** +- **SIDE_BOTTOM** = **2** +- **SIDE_TOP** = **3** +- **SIDE_FRONT** = **4** +- **SIDE_BACK** = **5** +- **FLAG_MIPMAPS** = **1** +- **FLAG_REPEAT** = **2** +- **FLAG_FILTER** = **4** +- **FLAGS_DEFAULT** = **7** + +Member Function Description +--------------------------- + +.. _class_CubeMap_get_width: + +- :ref:`int` **get_width** **(** **)** const + +.. _class_CubeMap_get_height: + +- :ref:`int` **get_height** **(** **)** const + +.. _class_CubeMap_get_rid: + +- :ref:`RID` **get_rid** **(** **)** const + +.. _class_CubeMap_set_flags: + +- void **set_flags** **(** :ref:`int` flags **)** + +.. _class_CubeMap_get_flags: + +- :ref:`int` **get_flags** **(** **)** const + +.. _class_CubeMap_set_side: + +- void **set_side** **(** :ref:`int` side, :ref:`Image` image **)** + +.. _class_CubeMap_get_side: + +- :ref:`Image` **get_side** **(** :ref:`int` side **)** const + +.. _class_CubeMap_set_storage: + +- void **set_storage** **(** :ref:`int` mode **)** + +.. _class_CubeMap_get_storage: + +- :ref:`int` **get_storage** **(** **)** const + +.. _class_CubeMap_set_lossy_storage_quality: + +- void **set_lossy_storage_quality** **(** :ref:`float` quality **)** + +.. _class_CubeMap_get_lossy_storage_quality: + +- :ref:`float` **get_lossy_storage_quality** **(** **)** const + + diff --git a/classes/class_curve2d.rst b/classes/class_curve2d.rst new file mode 100644 index 000000000..93a33d23b --- /dev/null +++ b/classes/class_curve2d.rst @@ -0,0 +1,182 @@ +.. _class_Curve2D: + +Curve2D +======= + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Describes a Bezier curve in 2D space. + +Member Functions +---------------- + ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_point_count` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_point` **(** :ref:`Vector2` pos, :ref:`Vector2` in=Vector2(0,0), :ref:`Vector2` out=Vector2(0,0), :ref:`int` atpos=-1 **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_pos` **(** :ref:`int` idx, :ref:`Vector2` pos **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_point_pos` **(** :ref:`int` idx **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_in` **(** :ref:`int` idx, :ref:`Vector2` pos **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_point_in` **(** :ref:`int` idx **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_out` **(** :ref:`int` idx, :ref:`Vector2` pos **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_point_out` **(** :ref:`int` idx **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_point` **(** :ref:`int` idx **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`interpolate` **(** :ref:`int` idx, :ref:`float` t **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`interpolatef` **(** :ref:`float` fofs **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_bake_interval` **(** :ref:`float` distance **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_bake_interval` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_baked_length` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`interpolate_baked` **(** :ref:`float` offset, :ref:`bool` cubic=false **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2Array` | :ref:`get_baked_points` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2Array` | :ref:`tesselate` **(** :ref:`int` max_stages=5, :ref:`float` tolerance_degrees=4 **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +This class describes a Bezier curve in 2D space. It is mainly used to give a shape to a :ref:`Path2D`, but can be manually sampled for other purposes. + +It keeps a cache of precalculated points along the curve, to speed further calculations up. + +Member Function Description +--------------------------- + +.. _class_Curve2D_get_point_count: + +- :ref:`int` **get_point_count** **(** **)** const + +Returns the number of points describing the curve. + +.. _class_Curve2D_add_point: + +- void **add_point** **(** :ref:`Vector2` pos, :ref:`Vector2` in=Vector2(0,0), :ref:`Vector2` out=Vector2(0,0), :ref:`int` atpos=-1 **)** + +Adds a point to a curve, at position "pos", with control points "in" and "out". + +If "atpos" is given, the point is inserted before the point number "atpos", moving that point (and every point after) after the inserted point. If "atpos" is not given, or is an illegal value (atpos <0 or atpos >= :ref:`get_point_count`), the point will be appended at the end of the point list. + +.. _class_Curve2D_set_point_pos: + +- void **set_point_pos** **(** :ref:`int` idx, :ref:`Vector2` pos **)** + +Sets the position for the vertex "idx". If the index is out of bounds, the function sends an error to the console. + +.. _class_Curve2D_get_point_pos: + +- :ref:`Vector2` **get_point_pos** **(** :ref:`int` idx **)** const + +Returns the position of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0). + +.. _class_Curve2D_set_point_in: + +- void **set_point_in** **(** :ref:`int` idx, :ref:`Vector2` pos **)** + +Sets the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console. + +.. _class_Curve2D_get_point_in: + +- :ref:`Vector2` **get_point_in** **(** :ref:`int` idx **)** const + +Returns the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0). + +.. _class_Curve2D_set_point_out: + +- void **set_point_out** **(** :ref:`int` idx, :ref:`Vector2` pos **)** + +Sets the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console. + +.. _class_Curve2D_get_point_out: + +- :ref:`Vector2` **get_point_out** **(** :ref:`int` idx **)** const + +Returns the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0). + +.. _class_Curve2D_remove_point: + +- void **remove_point** **(** :ref:`int` idx **)** + +Deletes the point "idx" from the curve. Sends an error to the console if "idx" is out of bounds. + +.. _class_Curve2D_interpolate: + +- :ref:`Vector2` **interpolate** **(** :ref:`int` idx, :ref:`float` t **)** const + +Returns the position between the vertex "idx" and the vertex "idx"+1, where "t" controls if the point is the first vertex (t = 0.0), the last vertex (t = 1.0), or in between. Values of "t" outside the range (0.0 >= t <=1) give strange, but predictable results. + +If "idx" is out of bounds it is truncated to the first or last vertex, and "t" is ignored. If the curve has no points, the function sends an error to the console, and returns (0, 0). + +.. _class_Curve2D_interpolatef: + +- :ref:`Vector2` **interpolatef** **(** :ref:`float` fofs **)** const + +Returns the position at the vertex "fofs". It calls :ref:`interpolate` using the integer part of fofs as "idx", and its fractional part as "t". + +.. _class_Curve2D_set_bake_interval: + +- void **set_bake_interval** **(** :ref:`float` distance **)** + +Sets the distance in pixels between two adjacent cached points. Changing it forces the cache to be recomputed the next time a xxx_baked_xxx function is called. The less distance, the more points the cache will have, and the more memory it will consume, so use with care. + +.. _class_Curve2D_get_bake_interval: + +- :ref:`float` **get_bake_interval** **(** **)** const + +Returns the distance between two adjacent cached points. + +.. _class_Curve2D_get_baked_length: + +- :ref:`float` **get_baked_length** **(** **)** const + +Returns the total length of the curve, based on the cached points. Given enough density (see :ref:`set_bake_interval`), it should be approximate enough. + +.. _class_Curve2D_interpolate_baked: + +- :ref:`Vector2` **interpolate_baked** **(** :ref:`float` offset, :ref:`bool` cubic=false **)** const + +Returns a point within the curve at position "offset", where "offset" is measured as a pixel distance along the curve. + +To do that, it finds the two cached points where the "offset" lies between, then interpolates the values. This interpolation is cubic if "cubic" is set to true, or linear if set to false. + +Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough). + +.. _class_Curve2D_get_baked_points: + +- :ref:`Vector2Array` **get_baked_points** **(** **)** const + +Returns the cache of points as a :ref:`Vector2Array`. + +.. _class_Curve2D_tesselate: + +- :ref:`Vector2Array` **tesselate** **(** :ref:`int` max_stages=5, :ref:`float` tolerance_degrees=4 **)** const + +Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts. + +This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough. + +"max_stages" controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! + +"tolerance_degrees" controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided. + + diff --git a/classes/class_curve3d.rst b/classes/class_curve3d.rst new file mode 100644 index 000000000..987d22d12 --- /dev/null +++ b/classes/class_curve3d.rst @@ -0,0 +1,208 @@ +.. _class_Curve3D: + +Curve3D +======= + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Describes a Bezier curve in 3D space. + +Member Functions +---------------- + ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_point_count` **(** **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_point` **(** :ref:`Vector3` pos, :ref:`Vector3` in=Vector3(0, 0, 0), :ref:`Vector3` out=Vector3(0, 0, 0), :ref:`int` atpos=-1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_pos` **(** :ref:`int` idx, :ref:`Vector3` pos **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_point_pos` **(** :ref:`int` idx **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_tilt` **(** :ref:`int` idx, :ref:`float` tilt **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_point_tilt` **(** :ref:`int` idx **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_in` **(** :ref:`int` idx, :ref:`Vector3` pos **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_point_in` **(** :ref:`int` idx **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_out` **(** :ref:`int` idx, :ref:`Vector3` pos **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_point_out` **(** :ref:`int` idx **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_point` **(** :ref:`int` idx **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`interpolate` **(** :ref:`int` idx, :ref:`float` t **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`interpolatef` **(** :ref:`float` fofs **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_bake_interval` **(** :ref:`float` distance **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_bake_interval` **(** **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_baked_length` **(** **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`interpolate_baked` **(** :ref:`float` offset, :ref:`bool` cubic=false **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3Array` | :ref:`get_baked_points` **(** **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RealArray` | :ref:`get_baked_tilts` **(** **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3Array` | :ref:`tesselate` **(** :ref:`int` max_stages=5, :ref:`float` tolerance_degrees=4 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +This class describes a Bezier curve in 3D space. It is mainly used to give a shape to a :ref:`Path`, but can be manually sampled for other purposes. + +It keeps a cache of precalculated points along the curve, to speed further calculations up. + +Member Function Description +--------------------------- + +.. _class_Curve3D_get_point_count: + +- :ref:`int` **get_point_count** **(** **)** const + +Returns the number of points describing the curve. + +.. _class_Curve3D_add_point: + +- void **add_point** **(** :ref:`Vector3` pos, :ref:`Vector3` in=Vector3(0, 0, 0), :ref:`Vector3` out=Vector3(0, 0, 0), :ref:`int` atpos=-1 **)** + +Adds a point to a curve, at position "pos", with control points "in" and "out". + +If "atpos" is given, the point is inserted before the point number "atpos", moving that point (and every point after) after the inserted point. If "atpos" is not given, or is an illegal value (atpos <0 or atpos >= :ref:`get_point_count`), the point will be appended at the end of the point list. + +.. _class_Curve3D_set_point_pos: + +- void **set_point_pos** **(** :ref:`int` idx, :ref:`Vector3` pos **)** + +Sets the position for the vertex "idx". If the index is out of bounds, the function sends an error to the console. + +.. _class_Curve3D_get_point_pos: + +- :ref:`Vector3` **get_point_pos** **(** :ref:`int` idx **)** const + +Returns the position of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0). + +.. _class_Curve3D_set_point_tilt: + +- void **set_point_tilt** **(** :ref:`int` idx, :ref:`float` tilt **)** + +Sets the tilt angle in radians for the point "idx". If the index is out of bounds, the function sends an error to the console. + +The tilt controls the rotation along the look-at axis an object travelling the path would have. In the case of a curve controlling a :ref:`PathFollow`, this tilt is an offset over the natural tilt the PathFollow calculates. + +.. _class_Curve3D_get_point_tilt: + +- :ref:`float` **get_point_tilt** **(** :ref:`int` idx **)** const + +Returns the tilt angle in radians for the point "idx". If the index is out of bounds, the function sends an error to the console, and returns 0. + +.. _class_Curve3D_set_point_in: + +- void **set_point_in** **(** :ref:`int` idx, :ref:`Vector3` pos **)** + +Sets the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console. + +.. _class_Curve3D_get_point_in: + +- :ref:`Vector3` **get_point_in** **(** :ref:`int` idx **)** const + +Returns the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0). + +.. _class_Curve3D_set_point_out: + +- void **set_point_out** **(** :ref:`int` idx, :ref:`Vector3` pos **)** + +Sets the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console. + +.. _class_Curve3D_get_point_out: + +- :ref:`Vector3` **get_point_out** **(** :ref:`int` idx **)** const + +Returns the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0). + +.. _class_Curve3D_remove_point: + +- void **remove_point** **(** :ref:`int` idx **)** + +Deletes the point "idx" from the curve. Sends an error to the console if "idx" is out of bounds. + +.. _class_Curve3D_interpolate: + +- :ref:`Vector3` **interpolate** **(** :ref:`int` idx, :ref:`float` t **)** const + +Returns the position between the vertex "idx" and the vertex "idx"+1, where "t" controls if the point is the first vertex (t = 0.0), the last vertex (t = 1.0), or in between. Values of "t" outside the range (0.0 >= t <=1) give strange, but predictable results. + +If "idx" is out of bounds it is truncated to the first or last vertex, and "t" is ignored. If the curve has no points, the function sends an error to the console, and returns (0, 0, 0). + +.. _class_Curve3D_interpolatef: + +- :ref:`Vector3` **interpolatef** **(** :ref:`float` fofs **)** const + +Returns the position at the vertex "fofs". It calls :ref:`interpolate` using the integer part of fofs as "idx", and its fractional part as "t". + +.. _class_Curve3D_set_bake_interval: + +- void **set_bake_interval** **(** :ref:`float` distance **)** + +Sets the distance in 3D units between two adjacent cached points. Changing it forces the cache to be recomputed the next time a xxx_baked_xxx function is called. The less distance, the more points the cache will have, and the more memory it will consume, so use with care. + +.. _class_Curve3D_get_bake_interval: + +- :ref:`float` **get_bake_interval** **(** **)** const + +Returns the distance between two adjacent cached points. + +.. _class_Curve3D_get_baked_length: + +- :ref:`float` **get_baked_length** **(** **)** const + +Returns the total length of the curve, based on the cached points. Given enough density (see :ref:`set_bake_interval`), it should be approximate enough. + +.. _class_Curve3D_interpolate_baked: + +- :ref:`Vector3` **interpolate_baked** **(** :ref:`float` offset, :ref:`bool` cubic=false **)** const + +Returns a point within the curve at position "offset", where "offset" is measured as a distance in 3D units along the curve. + +To do that, it finds the two cached points where the "offset" lies between, then interpolates the values. This interpolation is cubic if "cubic" is set to true, or linear if set to false. + +Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough). + +.. _class_Curve3D_get_baked_points: + +- :ref:`Vector3Array` **get_baked_points** **(** **)** const + +Returns the cache of points as a :ref:`Vector3Array`. + +.. _class_Curve3D_get_baked_tilts: + +- :ref:`RealArray` **get_baked_tilts** **(** **)** const + +Returns the cache of tilts as a :ref:`RealArray`. + +.. _class_Curve3D_tesselate: + +- :ref:`Vector3Array` **tesselate** **(** :ref:`int` max_stages=5, :ref:`float` tolerance_degrees=4 **)** const + +Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts. + +This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough. + +"max_stages" controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! + +"tolerance_degrees" controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided. + + diff --git a/classes/class_dampedspringjoint2d.rst b/classes/class_dampedspringjoint2d.rst new file mode 100644 index 000000000..048c45658 --- /dev/null +++ b/classes/class_dampedspringjoint2d.rst @@ -0,0 +1,94 @@ +.. _class_DampedSpringJoint2D: + +DampedSpringJoint2D +=================== + +Inherits: :ref:`Joint2D` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Damped spring constraint for 2D physics. + +Member Functions +---------------- + ++----------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_length` **(** :ref:`float` length **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_length` **(** **)** const | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_rest_length` **(** :ref:`float` rest_length **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_rest_length` **(** **)** const | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_stiffness` **(** :ref:`float` stiffness **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_stiffness` **(** **)** const | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_damping` **(** :ref:`float` damping **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_damping` **(** **)** const | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Damped spring constraint for 2D physics. This resembles a spring joint that always want to go back to a given length. + +Member Function Description +--------------------------- + +.. _class_DampedSpringJoint2D_set_length: + +- void **set_length** **(** :ref:`float` length **)** + +Set the maximum length of the spring joint. + +.. _class_DampedSpringJoint2D_get_length: + +- :ref:`float` **get_length** **(** **)** const + +Return the maximum length of the spring joint. + +.. _class_DampedSpringJoint2D_set_rest_length: + +- void **set_rest_length** **(** :ref:`float` rest_length **)** + +Set the resting length of the spring joint. The joint will always try to go to back this length when pulled apart. + +.. _class_DampedSpringJoint2D_get_rest_length: + +- :ref:`float` **get_rest_length** **(** **)** const + +Return the resting length of the spring joint. The joint will always try to go to back this length when pulled apart. + +.. _class_DampedSpringJoint2D_set_stiffness: + +- void **set_stiffness** **(** :ref:`float` stiffness **)** + +Set the stiffness of the spring joint. + +.. _class_DampedSpringJoint2D_get_stiffness: + +- :ref:`float` **get_stiffness** **(** **)** const + +Return the stiffness of the spring joint. + +.. _class_DampedSpringJoint2D_set_damping: + +- void **set_damping** **(** :ref:`float` damping **)** + +Set the damping of the spring joint. + +.. _class_DampedSpringJoint2D_get_damping: + +- :ref:`float` **get_damping** **(** **)** const + +Return the damping of the spring joint. + + diff --git a/classes/class_dictionary.rst b/classes/class_dictionary.rst index 5979b2897..be38b389e 100644 --- a/classes/class_dictionary.rst +++ b/classes/class_dictionary.rst @@ -1,8 +1,10 @@ +.. _class_Dictionary: + Dictionary ========== -**Category:** Built-In Types ----------------------------- +Category: Built-In Types +------------------------ Brief Description ----------------- @@ -12,71 +14,82 @@ Dictionary type. Member Functions ---------------- -- void **`clear <#clear>`__** **(** **)** -- `bool `__ **`empty <#empty>`__** **(** **)** -- void **`erase <#erase>`__** **(** var value **)** -- `bool `__ **`has <#has>`__** **(** var value **)** -- `int `__ **`hash <#hash>`__** **(** **)** -- `Array `__ **`keys <#keys>`__** **(** **)** -- `int `__ **`parse\_json <#parse_json>`__** **(** - `String `__ json **)** -- `int `__ **`size <#size>`__** **(** **)** -- `String `__ **`to\_json <#to_json>`__** **(** **)** ++------------------------------+-----------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++------------------------------+-----------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`empty` **(** **)** | ++------------------------------+-----------------------------------------------------------------------------------------------+ +| void | :ref:`erase` **(** var value **)** | ++------------------------------+-----------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has` **(** var value **)** | ++------------------------------+-----------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`hash` **(** **)** | ++------------------------------+-----------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`keys` **(** **)** | ++------------------------------+-----------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`parse_json` **(** :ref:`String` json **)** | ++------------------------------+-----------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`size` **(** **)** | ++------------------------------+-----------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`to_json` **(** **)** | ++------------------------------+-----------------------------------------------------------------------------------------------+ Description ----------- -Dictionary type. Associative container which contains values referenced -by unique keys. Dictionaries are always passed by reference. +Dictionary type. Associative container which contains values referenced by unique keys. Dictionaries are always passed by reference. Member Function Description --------------------------- -clear -~~~~~ +.. _class_Dictionary_clear: -- void **clear** **(** **)** +- void **clear** **(** **)** Clear the dictionary, removing all key/value pairs. -empty -~~~~~ +.. _class_Dictionary_empty: -- `bool `__ **empty** **(** **)** +- :ref:`bool` **empty** **(** **)** Return true if the dictionary is empty. -erase -~~~~~ +.. _class_Dictionary_erase: -- void **erase** **(** var value **)** +- void **erase** **(** var value **)** Erase a dictionary key/value pair by key. -has -~~~ +.. _class_Dictionary_has: -- `bool `__ **has** **(** var value **)** +- :ref:`bool` **has** **(** var value **)** Return true if the dictionary has a given key. -hash -~~~~ +.. _class_Dictionary_hash: -- `int `__ **hash** **(** **)** +- :ref:`int` **hash** **(** **)** Return a hashed integer value representing the dictionary contents. -keys -~~~~ +.. _class_Dictionary_keys: -- `Array `__ **keys** **(** **)** +- :ref:`Array` **keys** **(** **)** Return the list of keys in the dictionary. -size -~~~~ +.. _class_Dictionary_parse_json: + +- :ref:`int` **parse_json** **(** :ref:`String` json **)** + +.. _class_Dictionary_size: + +- :ref:`int` **size** **(** **)** + +Return the size of the dictionary (in pairs). + +.. _class_Dictionary_to_json: + +- :ref:`String` **to_json** **(** **)** -- `int `__ **size** **(** **)** -Return the size of the dictionary (in pairs). \ No newline at end of file diff --git a/classes/class_directionallight.rst b/classes/class_directionallight.rst new file mode 100644 index 000000000..6041e9356 --- /dev/null +++ b/classes/class_directionallight.rst @@ -0,0 +1,65 @@ +.. _class_DirectionalLight: + +DirectionalLight +================ + +Inherits: :ref:`Light` +----------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Directional Light, such as the Sun or the Moon. + +Member Functions +---------------- + ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shadow_mode` **(** :ref:`int` mode **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_shadow_mode` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shadow_param` **(** :ref:`int` param, :ref:`float` value **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_shadow_param` **(** :ref:`int` param **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **SHADOW_ORTHOGONAL** = **0** +- **SHADOW_PERSPECTIVE** = **1** +- **SHADOW_PARALLEL_2_SPLITS** = **2** +- **SHADOW_PARALLEL_4_SPLITS** = **3** +- **SHADOW_PARAM_MAX_DISTANCE** = **0** +- **SHADOW_PARAM_PSSM_SPLIT_WEIGHT** = **1** +- **SHADOW_PARAM_PSSM_ZOFFSET_SCALE** = **2** + +Description +----------- + +A DirectionalLight is a type of :ref:`Light` node that emits light constantly in one direction (the negative z axis of the node). It is used lights with strong intensity that are located far away from the scene to model sunlight or moonlight. The worldpace location of the DirectionalLight transform (origin) is ignored, only the basis is used do determine light direction. + +Member Function Description +--------------------------- + +.. _class_DirectionalLight_set_shadow_mode: + +- void **set_shadow_mode** **(** :ref:`int` mode **)** + +.. _class_DirectionalLight_get_shadow_mode: + +- :ref:`int` **get_shadow_mode** **(** **)** const + +.. _class_DirectionalLight_set_shadow_param: + +- void **set_shadow_param** **(** :ref:`int` param, :ref:`float` value **)** + +.. _class_DirectionalLight_get_shadow_param: + +- :ref:`float` **get_shadow_param** **(** :ref:`int` param **)** const + + diff --git a/classes/class_directory.rst b/classes/class_directory.rst new file mode 100644 index 000000000..ecc9e6d14 --- /dev/null +++ b/classes/class_directory.rst @@ -0,0 +1,127 @@ +.. _class_Directory: + +Directory +========= + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------+----------------------------------------------------------------------------------------------------------------------+ +| Error | :ref:`open` **(** :ref:`String` path **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`list_dir_begin` **(** **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_next` **(** **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`current_is_dir` **(** **)** const | ++------------------------------+----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`list_dir_end` **(** **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_drive_count` **(** **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_drive` **(** :ref:`int` idx **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------+ +| Error | :ref:`change_dir` **(** :ref:`String` todir **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_current_dir` **(** **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------+ +| Error | :ref:`make_dir` **(** :ref:`String` name **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------+ +| Error | :ref:`make_dir_recursive` **(** :ref:`String` name **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`file_exists` **(** :ref:`String` name **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`dir_exists` **(** :ref:`String` name **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_space_left` **(** **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------+ +| Error | :ref:`copy` **(** :ref:`String` from, :ref:`String` to **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------+ +| Error | :ref:`rename` **(** :ref:`String` from, :ref:`String` to **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------+ +| Error | :ref:`remove` **(** :ref:`String` file **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_Directory_open: + +- Error **open** **(** :ref:`String` path **)** + +.. _class_Directory_list_dir_begin: + +- :ref:`bool` **list_dir_begin** **(** **)** + +.. _class_Directory_get_next: + +- :ref:`String` **get_next** **(** **)** + +.. _class_Directory_current_is_dir: + +- :ref:`bool` **current_is_dir** **(** **)** const + +.. _class_Directory_list_dir_end: + +- void **list_dir_end** **(** **)** + +.. _class_Directory_get_drive_count: + +- :ref:`int` **get_drive_count** **(** **)** + +.. _class_Directory_get_drive: + +- :ref:`String` **get_drive** **(** :ref:`int` idx **)** + +.. _class_Directory_change_dir: + +- Error **change_dir** **(** :ref:`String` todir **)** + +.. _class_Directory_get_current_dir: + +- :ref:`String` **get_current_dir** **(** **)** + +.. _class_Directory_make_dir: + +- Error **make_dir** **(** :ref:`String` name **)** + +.. _class_Directory_make_dir_recursive: + +- Error **make_dir_recursive** **(** :ref:`String` name **)** + +.. _class_Directory_file_exists: + +- :ref:`bool` **file_exists** **(** :ref:`String` name **)** + +.. _class_Directory_dir_exists: + +- :ref:`bool` **dir_exists** **(** :ref:`String` name **)** + +.. _class_Directory_get_space_left: + +- :ref:`int` **get_space_left** **(** **)** + +.. _class_Directory_copy: + +- Error **copy** **(** :ref:`String` from, :ref:`String` to **)** + +.. _class_Directory_rename: + +- Error **rename** **(** :ref:`String` from, :ref:`String` to **)** + +.. _class_Directory_remove: + +- Error **remove** **(** :ref:`String` file **)** + + diff --git a/classes/class_editorfiledialog.rst b/classes/class_editorfiledialog.rst new file mode 100644 index 000000000..0d3aef3c4 --- /dev/null +++ b/classes/class_editorfiledialog.rst @@ -0,0 +1,151 @@ +.. _class_EditorFileDialog: + +EditorFileDialog +================ + +Inherits: :ref:`ConfirmationDialog` +------------------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_filters` **(** **)** | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_filter` **(** :ref:`String` filter **)** | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_current_dir` **(** **)** const | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_current_file` **(** **)** const | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_current_path` **(** **)** const | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_current_dir` **(** :ref:`String` dir **)** | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_current_file` **(** :ref:`String` file **)** | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_current_path` **(** :ref:`String` path **)** | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_mode` **(** :ref:`int` mode **)** | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_mode` **(** **)** const | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| :ref:`VBoxContainer` | :ref:`get_vbox` **(** **)** | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_access` **(** :ref:`int` access **)** | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_access` **(** **)** const | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_show_hidden_files` **(** :ref:`bool` show **)** | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_showing_hidden_files` **(** **)** const | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_display_mode` **(** :ref:`int` mode **)** | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_display_mode` **(** **)** const | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`invalidate` **(** **)** | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **files_selected** **(** :ref:`StringArray` paths **)** +- **dir_selected** **(** :ref:`String` dir **)** +- **file_selected** **(** :ref:`String` path **)** + +Numeric Constants +----------------- + +- **MODE_OPEN_FILE** = **0** +- **MODE_OPEN_FILES** = **1** +- **MODE_OPEN_DIR** = **2** +- **MODE_SAVE_FILE** = **3** +- **ACCESS_RESOURCES** = **0** +- **ACCESS_USERDATA** = **1** +- **ACCESS_FILESYSTEM** = **2** + +Member Function Description +--------------------------- + +.. _class_EditorFileDialog_clear_filters: + +- void **clear_filters** **(** **)** + +.. _class_EditorFileDialog_add_filter: + +- void **add_filter** **(** :ref:`String` filter **)** + +.. _class_EditorFileDialog_get_current_dir: + +- :ref:`String` **get_current_dir** **(** **)** const + +.. _class_EditorFileDialog_get_current_file: + +- :ref:`String` **get_current_file** **(** **)** const + +.. _class_EditorFileDialog_get_current_path: + +- :ref:`String` **get_current_path** **(** **)** const + +.. _class_EditorFileDialog_set_current_dir: + +- void **set_current_dir** **(** :ref:`String` dir **)** + +.. _class_EditorFileDialog_set_current_file: + +- void **set_current_file** **(** :ref:`String` file **)** + +.. _class_EditorFileDialog_set_current_path: + +- void **set_current_path** **(** :ref:`String` path **)** + +.. _class_EditorFileDialog_set_mode: + +- void **set_mode** **(** :ref:`int` mode **)** + +.. _class_EditorFileDialog_get_mode: + +- :ref:`int` **get_mode** **(** **)** const + +.. _class_EditorFileDialog_get_vbox: + +- :ref:`VBoxContainer` **get_vbox** **(** **)** + +.. _class_EditorFileDialog_set_access: + +- void **set_access** **(** :ref:`int` access **)** + +.. _class_EditorFileDialog_get_access: + +- :ref:`int` **get_access** **(** **)** const + +.. _class_EditorFileDialog_set_show_hidden_files: + +- void **set_show_hidden_files** **(** :ref:`bool` show **)** + +.. _class_EditorFileDialog_is_showing_hidden_files: + +- :ref:`bool` **is_showing_hidden_files** **(** **)** const + +.. _class_EditorFileDialog_set_display_mode: + +- void **set_display_mode** **(** :ref:`int` mode **)** + +.. _class_EditorFileDialog_get_display_mode: + +- :ref:`int` **get_display_mode** **(** **)** const + +.. _class_EditorFileDialog_invalidate: + +- void **invalidate** **(** **)** + + diff --git a/classes/class_editorimportplugin.rst b/classes/class_editorimportplugin.rst new file mode 100644 index 000000000..be6e2c0a7 --- /dev/null +++ b/classes/class_editorimportplugin.rst @@ -0,0 +1,55 @@ +.. _class_EditorImportPlugin: + +EditorImportPlugin +================== + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RawArray` | :ref:`custom_export` **(** :ref:`String` path **)** virtual | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_name` **(** **)** virtual | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_visible_name` **(** **)** virtual | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`import` **(** :ref:`String` path, ResourceImportMetaData from **)** virtual | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`import_dialog` **(** :ref:`String` from **)** virtual | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_EditorImportPlugin_custom_export: + +- :ref:`RawArray` **custom_export** **(** :ref:`String` path **)** virtual + +.. _class_EditorImportPlugin_get_name: + +- :ref:`String` **get_name** **(** **)** virtual + +.. _class_EditorImportPlugin_get_visible_name: + +- :ref:`String` **get_visible_name** **(** **)** virtual + +.. _class_EditorImportPlugin_import: + +- :ref:`int` **import** **(** :ref:`String` path, ResourceImportMetaData from **)** virtual + +.. _class_EditorImportPlugin_import_dialog: + +- void **import_dialog** **(** :ref:`String` from **)** virtual + + diff --git a/classes/class_editorplugin.rst b/classes/class_editorplugin.rst new file mode 100644 index 000000000..79819001a --- /dev/null +++ b/classes/class_editorplugin.rst @@ -0,0 +1,131 @@ +.. _class_EditorPlugin: + +EditorPlugin +============ + +Inherits: :ref:`Node` +--------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`apply_changes` **(** **)** virtual | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** virtual | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`edit` **(** :ref:`Object` object **)** virtual | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`forward_input_event` **(** :ref:`InputEvent` event **)** virtual | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`forward_spatial_input_event` **(** :ref:`Camera` camera, :ref:`InputEvent` event **)** virtual | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_breakpoints` **(** **)** virtual | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_name` **(** **)** virtual | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`get_state` **(** **)** virtual | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`handles` **(** :ref:`Object` object **)** virtual | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_main_screen` **(** **)** virtual | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`make_visible` **(** :ref:`bool` visible **)** virtual | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_state` **(** :ref:`Dictionary` state **)** virtual | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_undo_redo` **(** **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_custom_control` **(** :ref:`int` container, :ref:`Object` control **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_custom_type` **(** :ref:`String` type, :ref:`String` base, :ref:`Script` script, :ref:`Texture` icon **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_custom_type` **(** :ref:`String` type **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **CONTAINER_TOOLBAR** = **0** +- **CONTAINER_SPATIAL_EDITOR_MENU** = **1** +- **CONTAINER_SPATIAL_EDITOR_SIDE** = **2** +- **CONTAINER_SPATIAL_EDITOR_BOTTOM** = **3** +- **CONTAINER_CANVAS_EDITOR_MENU** = **4** +- **CONTAINER_CANVAS_EDITOR_SIDE** = **5** + +Member Function Description +--------------------------- + +.. _class_EditorPlugin_apply_changes: + +- void **apply_changes** **(** **)** virtual + +.. _class_EditorPlugin_clear: + +- void **clear** **(** **)** virtual + +.. _class_EditorPlugin_edit: + +- void **edit** **(** :ref:`Object` object **)** virtual + +.. _class_EditorPlugin_forward_input_event: + +- :ref:`bool` **forward_input_event** **(** :ref:`InputEvent` event **)** virtual + +.. _class_EditorPlugin_forward_spatial_input_event: + +- :ref:`bool` **forward_spatial_input_event** **(** :ref:`Camera` camera, :ref:`InputEvent` event **)** virtual + +.. _class_EditorPlugin_get_breakpoints: + +- :ref:`StringArray` **get_breakpoints** **(** **)** virtual + +.. _class_EditorPlugin_get_name: + +- :ref:`String` **get_name** **(** **)** virtual + +.. _class_EditorPlugin_get_state: + +- :ref:`Dictionary` **get_state** **(** **)** virtual + +.. _class_EditorPlugin_handles: + +- :ref:`bool` **handles** **(** :ref:`Object` object **)** virtual + +.. _class_EditorPlugin_has_main_screen: + +- :ref:`bool` **has_main_screen** **(** **)** virtual + +.. _class_EditorPlugin_make_visible: + +- void **make_visible** **(** :ref:`bool` visible **)** virtual + +.. _class_EditorPlugin_set_state: + +- void **set_state** **(** :ref:`Dictionary` state **)** virtual + +.. _class_EditorPlugin_get_undo_redo: + +- :ref:`Object` **get_undo_redo** **(** **)** + +.. _class_EditorPlugin_add_custom_control: + +- void **add_custom_control** **(** :ref:`int` container, :ref:`Object` control **)** + +.. _class_EditorPlugin_add_custom_type: + +- void **add_custom_type** **(** :ref:`String` type, :ref:`String` base, :ref:`Script` script, :ref:`Texture` icon **)** + +.. _class_EditorPlugin_remove_custom_type: + +- void **remove_custom_type** **(** :ref:`String` type **)** + + diff --git a/classes/class_editorscenepostimport.rst b/classes/class_editorscenepostimport.rst new file mode 100644 index 000000000..03caa7172 --- /dev/null +++ b/classes/class_editorscenepostimport.rst @@ -0,0 +1,31 @@ +.. _class_EditorScenePostImport: + +EditorScenePostImport +===================== + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++-------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`post_import` **(** :ref:`Object` scene **)** virtual | ++-------+---------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_EditorScenePostImport_post_import: + +- void **post_import** **(** :ref:`Object` scene **)** virtual + + diff --git a/classes/class_editorscript.rst b/classes/class_editorscript.rst new file mode 100644 index 000000000..702205764 --- /dev/null +++ b/classes/class_editorscript.rst @@ -0,0 +1,43 @@ +.. _class_EditorScript: + +EditorScript +============ + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------+-------------------------------------------------------------------------------------------------------+ +| void | :ref:`_run` **(** **)** virtual | ++------------------------------+-------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_root_node` **(** :ref:`Object` node **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_scene` **(** **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_EditorScript__run: + +- void **_run** **(** **)** virtual + +.. _class_EditorScript_add_root_node: + +- void **add_root_node** **(** :ref:`Object` node **)** + +.. _class_EditorScript_get_scene: + +- :ref:`Object` **get_scene** **(** **)** + + diff --git a/classes/class_environment.rst b/classes/class_environment.rst new file mode 100644 index 000000000..b3f2d9f9b --- /dev/null +++ b/classes/class_environment.rst @@ -0,0 +1,135 @@ +.. _class_Environment: + +Environment +=========== + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_background` **(** :ref:`int` bgmode **)** | ++--------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_background` **(** **)** const | ++--------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_background_param` **(** :ref:`int` param, var value **)** | ++--------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`get_background_param` **(** :ref:`int` param **)** const | ++--------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_enable_fx` **(** :ref:`int` effect, :ref:`bool` enabled **)** | ++--------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_fx_enabled` **(** :ref:`int` effect **)** const | ++--------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`fx_set_param` **(** :ref:`int` param, var value **)** | ++--------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`fx_get_param` **(** :ref:`int` param **)** const | ++--------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **BG_KEEP** = **0** +- **BG_DEFAULT_COLOR** = **1** +- **BG_COLOR** = **2** +- **BG_TEXTURE** = **3** +- **BG_CUBEMAP** = **4** +- **BG_CANVAS** = **5** +- **BG_MAX** = **6** +- **BG_PARAM_CANVAS_MAX_LAYER** = **0** +- **BG_PARAM_COLOR** = **1** +- **BG_PARAM_TEXTURE** = **2** +- **BG_PARAM_CUBEMAP** = **3** +- **BG_PARAM_ENERGY** = **4** +- **BG_PARAM_GLOW** = **6** +- **BG_PARAM_MAX** = **7** +- **FX_AMBIENT_LIGHT** = **0** +- **FX_FXAA** = **1** +- **FX_GLOW** = **2** +- **FX_DOF_BLUR** = **3** +- **FX_HDR** = **4** +- **FX_FOG** = **5** +- **FX_BCS** = **6** +- **FX_SRGB** = **7** +- **FX_MAX** = **8** +- **FX_BLUR_BLEND_MODE_ADDITIVE** = **0** +- **FX_BLUR_BLEND_MODE_SCREEN** = **1** +- **FX_BLUR_BLEND_MODE_SOFTLIGHT** = **2** +- **FX_HDR_TONE_MAPPER_LINEAR** = **0** +- **FX_HDR_TONE_MAPPER_LOG** = **1** +- **FX_HDR_TONE_MAPPER_REINHARDT** = **2** +- **FX_HDR_TONE_MAPPER_REINHARDT_AUTOWHITE** = **3** +- **FX_PARAM_AMBIENT_LIGHT_COLOR** = **0** +- **FX_PARAM_AMBIENT_LIGHT_ENERGY** = **1** +- **FX_PARAM_GLOW_BLUR_PASSES** = **2** +- **FX_PARAM_GLOW_BLUR_SCALE** = **3** +- **FX_PARAM_GLOW_BLUR_STRENGTH** = **4** +- **FX_PARAM_GLOW_BLUR_BLEND_MODE** = **5** +- **FX_PARAM_GLOW_BLOOM** = **6** +- **FX_PARAM_GLOW_BLOOM_TRESHOLD** = **7** +- **FX_PARAM_DOF_BLUR_PASSES** = **8** +- **FX_PARAM_DOF_BLUR_BEGIN** = **9** +- **FX_PARAM_DOF_BLUR_RANGE** = **10** +- **FX_PARAM_HDR_TONEMAPPER** = **11** +- **FX_PARAM_HDR_EXPOSURE** = **12** +- **FX_PARAM_HDR_WHITE** = **13** +- **FX_PARAM_HDR_GLOW_TRESHOLD** = **14** +- **FX_PARAM_HDR_GLOW_SCALE** = **15** +- **FX_PARAM_HDR_MIN_LUMINANCE** = **16** +- **FX_PARAM_HDR_MAX_LUMINANCE** = **17** +- **FX_PARAM_HDR_EXPOSURE_ADJUST_SPEED** = **18** +- **FX_PARAM_FOG_BEGIN** = **19** +- **FX_PARAM_FOG_ATTENUATION** = **22** +- **FX_PARAM_FOG_BEGIN_COLOR** = **20** +- **FX_PARAM_FOG_END_COLOR** = **21** +- **FX_PARAM_FOG_BG** = **23** +- **FX_PARAM_BCS_BRIGHTNESS** = **24** +- **FX_PARAM_BCS_CONTRAST** = **25** +- **FX_PARAM_BCS_SATURATION** = **26** +- **FX_PARAM_MAX** = **27** + +Member Function Description +--------------------------- + +.. _class_Environment_set_background: + +- void **set_background** **(** :ref:`int` bgmode **)** + +.. _class_Environment_get_background: + +- :ref:`int` **get_background** **(** **)** const + +.. _class_Environment_set_background_param: + +- void **set_background_param** **(** :ref:`int` param, var value **)** + +.. _class_Environment_get_background_param: + +- void **get_background_param** **(** :ref:`int` param **)** const + +.. _class_Environment_set_enable_fx: + +- void **set_enable_fx** **(** :ref:`int` effect, :ref:`bool` enabled **)** + +.. _class_Environment_is_fx_enabled: + +- :ref:`bool` **is_fx_enabled** **(** :ref:`int` effect **)** const + +.. _class_Environment_fx_set_param: + +- void **fx_set_param** **(** :ref:`int` param, var value **)** + +.. _class_Environment_fx_get_param: + +- void **fx_get_param** **(** :ref:`int` param **)** const + + diff --git a/classes/class_eventplayer.rst b/classes/class_eventplayer.rst new file mode 100644 index 000000000..11cb77684 --- /dev/null +++ b/classes/class_eventplayer.rst @@ -0,0 +1,252 @@ +.. _class_EventPlayer: + +EventPlayer +=========== + +Inherits: :ref:`Node` +--------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Class for event stream playback. + +Member Functions +---------------- + ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_stream` **(** :ref:`EventStream` stream **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`EventStream` | :ref:`get_stream` **(** **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`play` **(** **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`stop` **(** **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_playing` **(** **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_paused` **(** :ref:`bool` paused **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_paused` **(** **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_loop` **(** :ref:`bool` enabled **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_loop` **(** **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_volume` **(** :ref:`float` volume **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_volume` **(** **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_pitch_scale` **(** :ref:`float` pitch_scale **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_pitch_scale` **(** **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_tempo_scale` **(** :ref:`float` tempo_scale **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_tempo_scale` **(** **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_volume_db` **(** :ref:`float` db **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_volume_db` **(** **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_stream_name` **(** **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_loop_count` **(** **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_pos` **(** **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`seek_pos` **(** :ref:`float` time **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_length` **(** **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_autoplay` **(** :ref:`bool` enabled **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_autoplay` **(** **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_channel_volume` **(** :ref:`int` channel, :ref:`float` channel_volume **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_channel_volume` **(** :ref:`int` channel **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_channel_last_note_time` **(** :ref:`int` channel **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Class for event stream playback. Event streams are music expressed as a series of events (note on, note off, instrument change...), as opposed to audio streams, which are just audio data. Examples of event-based streams are MIDI files, or MOD music. + +Currently, only MOD, S3M, IT, and XM music is supported. + +Member Function Description +--------------------------- + +.. _class_EventPlayer_set_stream: + +- void **set_stream** **(** :ref:`EventStream` stream **)** + +Set the :ref:`EventStream` this player will play. + +.. _class_EventPlayer_get_stream: + +- :ref:`EventStream` **get_stream** **(** **)** const + +Return the currently assigned stream. + +.. _class_EventPlayer_play: + +- void **play** **(** **)** + +Play the currently assigned stream. + +.. _class_EventPlayer_stop: + +- void **stop** **(** **)** + +Stop playing. + +.. _class_EventPlayer_is_playing: + +- :ref:`bool` **is_playing** **(** **)** const + +Return whether this player is playing. + +.. _class_EventPlayer_set_paused: + +- void **set_paused** **(** :ref:`bool` paused **)** + +Pause stream playback. + +.. _class_EventPlayer_is_paused: + +- :ref:`bool` **is_paused** **(** **)** const + +Return whether the playback is currently paused. + +.. _class_EventPlayer_set_loop: + +- void **set_loop** **(** :ref:`bool` enabled **)** + +Set whether the stream will be restarted at the end. + +.. _class_EventPlayer_has_loop: + +- :ref:`bool` **has_loop** **(** **)** const + +Return whether this player will be restart the playback at the end. + +.. _class_EventPlayer_set_volume: + +- void **set_volume** **(** :ref:`float` volume **)** + +Set the playback volume for this player. This is a float between 0.0 (silent) and 1.0 (full volume). Values over 1.0 may amplify sound even more, but may introduce distortion. Negative values may just invert the output waveform, which produces no audible difference. + +The effect of these special values uiltimately depends on the low-level implementation of the file format being played. + +.. _class_EventPlayer_get_volume: + +- :ref:`float` **get_volume** **(** **)** const + +Return the playback volume for this player. + +.. _class_EventPlayer_set_pitch_scale: + +- void **set_pitch_scale** **(** :ref:`float` pitch_scale **)** + +Set the pitch multiplier for all sounds coming from this stream. A value of 2.0 shifts all pitches one octave up, and a value of 0.5 shifts pitches one octave down. + +.. _class_EventPlayer_get_pitch_scale: + +- :ref:`float` **get_pitch_scale** **(** **)** const + +Return the pitch scale factor for this player. + +.. _class_EventPlayer_set_tempo_scale: + +- void **set_tempo_scale** **(** :ref:`float` tempo_scale **)** + +Set the tempo multiplier. This allows to slow down or speed up the music, without affecting its pitch. + +.. _class_EventPlayer_get_tempo_scale: + +- :ref:`float` **get_tempo_scale** **(** **)** const + +Return the tempo multiplier. + +.. _class_EventPlayer_set_volume_db: + +- void **set_volume_db** **(** :ref:`float` db **)** + +Set the playback volume for this player, in decibels. This is a float between -80.0 (silent) and 0.0 (full volume). Values under -79.0 get truncated to -80, but values over 0.0 do not, so the warnings for overamplifying (see :ref:`set_volume`) still apply. + +.. _class_EventPlayer_get_volume_db: + +- :ref:`float` **get_volume_db** **(** **)** const + +Return the playback volume for this player, in decibels. + +.. _class_EventPlayer_get_stream_name: + +- :ref:`String` **get_stream_name** **(** **)** const + +Return the name of the currently assigned stream. This is not the file name, but a field inside the file. If no stream is assigned, if returns "". + +.. _class_EventPlayer_get_loop_count: + +- :ref:`int` **get_loop_count** **(** **)** const + +Return the number of times the playback has looped. + +.. _class_EventPlayer_get_pos: + +- :ref:`float` **get_pos** **(** **)** const + +Return the playback position. May be in seconds, but depends on the stream type. + +.. _class_EventPlayer_seek_pos: + +- void **seek_pos** **(** :ref:`float` time **)** + +Set the playback position. May be in seconds, but depends on the stream type. + +.. _class_EventPlayer_get_length: + +- :ref:`float` **get_length** **(** **)** const + +Return the song length. May be in seconds, but depends on the stream type. + +.. _class_EventPlayer_set_autoplay: + +- void **set_autoplay** **(** :ref:`bool` enabled **)** + +Set whether this player will start playing as soon as it enters the scene tree. + +.. _class_EventPlayer_has_autoplay: + +- :ref:`bool` **has_autoplay** **(** **)** const + +Return whether this player will start playing as soon as it enters the scene tree. + +.. _class_EventPlayer_set_channel_volume: + +- void **set_channel_volume** **(** :ref:`int` channel, :ref:`float` channel_volume **)** + +Set the volume scale for an individual channel of the stream, with the same value range as :ref:`methid set_volume`. The channel number depends on the stream format. For example, MIDIs range from 0 to 15, and MODs from 0 to 63. + +Many stream formats are multichannel, so this allows to affect only a part of the music. + +.. _class_EventPlayer_get_channel_volume: + +- :ref:`float` **get_channel_volume** **(** :ref:`int` channel **)** const + +Return the volume scale for an individual channel of the stream. + +.. _class_EventPlayer_get_channel_last_note_time: + +- :ref:`float` **get_channel_last_note_time** **(** :ref:`int` channel **)** const + +Return the time at which the last note of a given channel in the stream plays. + + diff --git a/classes/class_eventstream.rst b/classes/class_eventstream.rst new file mode 100644 index 000000000..6701c35b6 --- /dev/null +++ b/classes/class_eventstream.rst @@ -0,0 +1,23 @@ +.. _class_EventStream: + +EventStream +=========== + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Base class for all event-based stream drivers. + +Description +----------- + +Base class for all event-based stream drivers. Event streams are music expressed as a series of events (note on, note off, instrument change...), as opposed to audio streams, which are just audio data. Examples of event-based streams are MIDI files, of MOD music. + +This class exposes no methods. + diff --git a/classes/class_eventstreamchibi.rst b/classes/class_eventstreamchibi.rst new file mode 100644 index 000000000..2a95c2762 --- /dev/null +++ b/classes/class_eventstreamchibi.rst @@ -0,0 +1,31 @@ +.. _class_EventStreamChibi: + +EventStreamChibi +================ + +Inherits: :ref:`EventStream` +----------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Driver for MOD playback. + +Description +----------- + +This driver plays MOD music. MOD music, as all event-based streams, is a music format defined by note events ocurring at defined moments, instead of a stream of audio samples. + +Currently, this driver supports the MOD, S3M, IT, and XM formats. + +This class exposes no methods. + +This class can return its playback positon in seconds, but does not allow to set it, failing with only a console warning. + +This class can not return its song length, returning 1.0 when queried. + +This class does not limit its volume settings, allowing for overflow/distortion and wave inversion. + diff --git a/classes/class_file.rst b/classes/class_file.rst new file mode 100644 index 000000000..15c7c22bb --- /dev/null +++ b/classes/class_file.rst @@ -0,0 +1,267 @@ +.. _class_File: + +File +==== + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`open_encrypted` **(** :ref:`String` path, :ref:`int` mode_flags, :ref:`RawArray` key **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`open_encrypted_with_pass` **(** :ref:`String` path, :ref:`int` mode_flags, :ref:`String` pass **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`open` **(** :ref:`String` path, :ref:`int` flags **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`close` **(** **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_open` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`seek` **(** :ref:`int` pos **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`seek_end` **(** :ref:`int` pos=0 **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_pos` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_len` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`eof_reached` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_8` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_16` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_32` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_64` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_float` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_double` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_real` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RawArray` | :ref:`get_buffer` **(** :ref:`int` len **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_line` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_as_text` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_endian_swap` **(** **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_endian_swap` **(** :ref:`bool` enable **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Error | :ref:`get_error` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`get_var` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_csv_line` **(** :ref:`String` delim="," **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`store_8` **(** :ref:`int` value **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`store_16` **(** :ref:`int` value **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`store_32` **(** :ref:`int` value **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`store_64` **(** :ref:`int` value **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`store_float` **(** :ref:`float` value **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`store_double` **(** :ref:`float` value **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`store_real` **(** :ref:`float` value **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`store_buffer` **(** :ref:`RawArray` buffer **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`store_line` **(** :ref:`String` line **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`store_string` **(** :ref:`String` string **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`store_var` **(** var value **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`store_pascal_string` **(** :ref:`String` string **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_pascal_string` **(** **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`file_exists` **(** :ref:`String` path **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **READ** = **1** +- **WRITE** = **2** +- **READ_WRITE** = **3** +- **WRITE_READ** = **7** + +Member Function Description +--------------------------- + +.. _class_File_open_encrypted: + +- :ref:`int` **open_encrypted** **(** :ref:`String` path, :ref:`int` mode_flags, :ref:`RawArray` key **)** + +.. _class_File_open_encrypted_with_pass: + +- :ref:`int` **open_encrypted_with_pass** **(** :ref:`String` path, :ref:`int` mode_flags, :ref:`String` pass **)** + +.. _class_File_open: + +- :ref:`int` **open** **(** :ref:`String` path, :ref:`int` flags **)** + +.. _class_File_close: + +- void **close** **(** **)** + +.. _class_File_is_open: + +- :ref:`bool` **is_open** **(** **)** const + +.. _class_File_seek: + +- void **seek** **(** :ref:`int` pos **)** + +.. _class_File_seek_end: + +- void **seek_end** **(** :ref:`int` pos=0 **)** + +.. _class_File_get_pos: + +- :ref:`int` **get_pos** **(** **)** const + +.. _class_File_get_len: + +- :ref:`int` **get_len** **(** **)** const + +.. _class_File_eof_reached: + +- :ref:`bool` **eof_reached** **(** **)** const + +.. _class_File_get_8: + +- :ref:`int` **get_8** **(** **)** const + +.. _class_File_get_16: + +- :ref:`int` **get_16** **(** **)** const + +.. _class_File_get_32: + +- :ref:`int` **get_32** **(** **)** const + +.. _class_File_get_64: + +- :ref:`int` **get_64** **(** **)** const + +.. _class_File_get_float: + +- :ref:`float` **get_float** **(** **)** const + +.. _class_File_get_double: + +- :ref:`float` **get_double** **(** **)** const + +.. _class_File_get_real: + +- :ref:`float` **get_real** **(** **)** const + +.. _class_File_get_buffer: + +- :ref:`RawArray` **get_buffer** **(** :ref:`int` len **)** const + +.. _class_File_get_line: + +- :ref:`String` **get_line** **(** **)** const + +.. _class_File_get_as_text: + +- :ref:`String` **get_as_text** **(** **)** const + +.. _class_File_get_endian_swap: + +- :ref:`bool` **get_endian_swap** **(** **)** + +.. _class_File_set_endian_swap: + +- void **set_endian_swap** **(** :ref:`bool` enable **)** + +.. _class_File_get_error: + +- Error **get_error** **(** **)** const + +.. _class_File_get_var: + +- void **get_var** **(** **)** const + +.. _class_File_get_csv_line: + +- :ref:`StringArray` **get_csv_line** **(** :ref:`String` delim="," **)** const + +.. _class_File_store_8: + +- void **store_8** **(** :ref:`int` value **)** + +.. _class_File_store_16: + +- void **store_16** **(** :ref:`int` value **)** + +.. _class_File_store_32: + +- void **store_32** **(** :ref:`int` value **)** + +.. _class_File_store_64: + +- void **store_64** **(** :ref:`int` value **)** + +.. _class_File_store_float: + +- void **store_float** **(** :ref:`float` value **)** + +.. _class_File_store_double: + +- void **store_double** **(** :ref:`float` value **)** + +.. _class_File_store_real: + +- void **store_real** **(** :ref:`float` value **)** + +.. _class_File_store_buffer: + +- void **store_buffer** **(** :ref:`RawArray` buffer **)** + +.. _class_File_store_line: + +- void **store_line** **(** :ref:`String` line **)** + +.. _class_File_store_string: + +- void **store_string** **(** :ref:`String` string **)** + +.. _class_File_store_var: + +- void **store_var** **(** var value **)** + +.. _class_File_store_pascal_string: + +- void **store_pascal_string** **(** :ref:`String` string **)** + +.. _class_File_get_pascal_string: + +- :ref:`String` **get_pascal_string** **(** **)** + +.. _class_File_file_exists: + +- :ref:`bool` **file_exists** **(** :ref:`String` path **)** const + + diff --git a/classes/class_filedialog.rst b/classes/class_filedialog.rst new file mode 100644 index 000000000..7918ec9b9 --- /dev/null +++ b/classes/class_filedialog.rst @@ -0,0 +1,158 @@ +.. _class_FileDialog: + +FileDialog +========== + +Inherits: :ref:`ConfirmationDialog` +------------------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Dialog for selecting files or directories in the filesystem. + +Member Functions +---------------- + ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_filters` **(** **)** | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_filter` **(** :ref:`String` filter **)** | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_current_dir` **(** **)** const | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_current_file` **(** **)** const | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_current_path` **(** **)** const | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_current_dir` **(** :ref:`String` dir **)** | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_current_file` **(** :ref:`String` file **)** | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_current_path` **(** :ref:`String` path **)** | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_mode` **(** :ref:`int` mode **)** | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_mode` **(** **)** const | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| :ref:`VBoxContainer` | :ref:`get_vbox` **(** **)** | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_access` **(** :ref:`int` access **)** | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_access` **(** **)** const | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_show_hidden_files` **(** :ref:`bool` show **)** | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_showing_hidden_files` **(** **)** const | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`invalidate` **(** **)** | ++--------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **files_selected** **(** :ref:`StringArray` paths **)** +- **dir_selected** **(** :ref:`String` dir **)** +- **file_selected** **(** :ref:`String` path **)** + +Numeric Constants +----------------- + +- **MODE_OPEN_FILE** = **0** --- The dialog allows the selection of one, and only one file. +- **MODE_OPEN_FILES** = **1** --- The dialog allows the selection of multiple files. +- **MODE_OPEN_DIR** = **2** --- The dialog functions as a folder selector, disallowing the selection of any file. +- **MODE_SAVE_FILE** = **3** --- The dialog will warn when a file exists. +- **ACCESS_RESOURCES** = **0** +- **ACCESS_USERDATA** = **1** +- **ACCESS_FILESYSTEM** = **2** + +Description +----------- + +FileDialog is a preset dialog used to choose files and directories in the filesystem. It supports filter masks. + +Member Function Description +--------------------------- + +.. _class_FileDialog_clear_filters: + +- void **clear_filters** **(** **)** + +Clear all the added filters in the dialog. + +.. _class_FileDialog_add_filter: + +- void **add_filter** **(** :ref:`String` filter **)** + +Add a custom filter. Filter format is: "mask ; description", example (C++): dialog->add_filter("*.png ; PNG Images"); + +.. _class_FileDialog_get_current_dir: + +- :ref:`String` **get_current_dir** **(** **)** const + +Get the current working directory of the file dialog. + +.. _class_FileDialog_get_current_file: + +- :ref:`String` **get_current_file** **(** **)** const + +Get the current selected file of the file dialog (empty if none). + +.. _class_FileDialog_get_current_path: + +- :ref:`String` **get_current_path** **(** **)** const + +Get the current selected path (directory and file) of the file dialog (empty if none). + +.. _class_FileDialog_set_current_dir: + +- void **set_current_dir** **(** :ref:`String` dir **)** + +.. _class_FileDialog_set_current_file: + +- void **set_current_file** **(** :ref:`String` file **)** + +.. _class_FileDialog_set_current_path: + +- void **set_current_path** **(** :ref:`String` path **)** + +.. _class_FileDialog_set_mode: + +- void **set_mode** **(** :ref:`int` mode **)** + +Set the file dialog mode from the MODE_* enum. + +.. _class_FileDialog_get_mode: + +- :ref:`int` **get_mode** **(** **)** const + +Get the file dialog mode from the MODE_* enum. + +.. _class_FileDialog_get_vbox: + +- :ref:`VBoxContainer` **get_vbox** **(** **)** + +.. _class_FileDialog_set_access: + +- void **set_access** **(** :ref:`int` access **)** + +.. _class_FileDialog_get_access: + +- :ref:`int` **get_access** **(** **)** const + +.. _class_FileDialog_set_show_hidden_files: + +- void **set_show_hidden_files** **(** :ref:`bool` show **)** + +.. _class_FileDialog_is_showing_hidden_files: + +- :ref:`bool` **is_showing_hidden_files** **(** **)** const + +.. _class_FileDialog_invalidate: + +- void **invalidate** **(** **)** + + diff --git a/classes/class_fixedmaterial.rst b/classes/class_fixedmaterial.rst new file mode 100644 index 000000000..647db3a88 --- /dev/null +++ b/classes/class_fixedmaterial.rst @@ -0,0 +1,155 @@ +.. _class_FixedMaterial: + +FixedMaterial +============= + +Inherits: :ref:`Material` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Simple Material with a fixed parameter set. + +Member Functions +---------------- + ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_parameter` **(** :ref:`int` param, var value **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`get_parameter` **(** :ref:`int` param **)** const | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_texture` **(** :ref:`int` param, :ref:`Texture` texture **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_texture` **(** :ref:`int` param **)** const | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_texcoord_mode` **(** :ref:`int` param, :ref:`int` mode **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_texcoord_mode` **(** :ref:`int` param **)** const | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_fixed_flag` **(** :ref:`int` flag, :ref:`bool` value **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_fixed_flag` **(** :ref:`int` flag **)** const | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_uv_transform` **(** :ref:`Transform` transform **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`get_uv_transform` **(** **)** const | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_light_shader` **(** :ref:`int` shader **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_light_shader` **(** **)** const | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_size` **(** :ref:`float` size **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_point_size` **(** **)** const | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **PARAM_DIFFUSE** = **0** --- Diffuse Lighting (light scattered from surface). +- **PARAM_DETAIL** = **1** --- Detail Layer for diffuse lighting. +- **PARAM_SPECULAR** = **2** --- Specular Lighting (light reflected from the surface). +- **PARAM_EMISSION** = **3** --- Emission Lighting (light emitted from the surface). +- **PARAM_SPECULAR_EXP** = **4** --- Specular Exponent (size of the specular dot). +- **PARAM_GLOW** = **5** --- Glow (Visible emitted scattered light). +- **PARAM_NORMAL** = **6** --- Normal Map (irregularity map). +- **PARAM_SHADE_PARAM** = **7** +- **PARAM_MAX** = **8** --- Maximum amount of parameters. +- **TEXCOORD_SPHERE** = **3** +- **TEXCOORD_UV** = **0** --- Read texture coordinates from the UV array. +- **TEXCOORD_UV_TRANSFORM** = **1** --- Read texture coordinates from the UV array and transform them by uv_xform. +- **TEXCOORD_UV2** = **2** --- Read texture coordinates from the UV2 array. +- **FLAG_USE_ALPHA** = **0** +- **FLAG_USE_COLOR_ARRAY** = **1** +- **FLAG_USE_POINT_SIZE** = **2** +- **FLAG_DISCARD_ALPHA** = **3** +- **LIGHT_SHADER_LAMBERT** = **0** +- **LIGHT_SHADER_WRAP** = **1** +- **LIGHT_SHADER_VELVET** = **2** +- **LIGHT_SHADER_TOON** = **3** + +Description +----------- + +FixedMaterial is a simple type of material :ref:`Resource`, which contains a fixed amount of paramters. It is the only type of material supported in fixed-pipeline devices and APIs. It is also an often a better alternative to :ref:`ShaderMaterial` for most simple use cases. + +Member Function Description +--------------------------- + +.. _class_FixedMaterial_set_parameter: + +- void **set_parameter** **(** :ref:`int` param, var value **)** + +Set a parameter, parameters are defined in the PARAM_* enum. The type of each parameter may change, so it's best to check the enum. + +.. _class_FixedMaterial_get_parameter: + +- void **get_parameter** **(** :ref:`int` param **)** const + +Return a parameter, parameters are defined in the PARAM_* enum. The type of each parameter may change, so it's best to check the enum. + +.. _class_FixedMaterial_set_texture: + +- void **set_texture** **(** :ref:`int` param, :ref:`Texture` texture **)** + +Set a texture. Textures change parameters per texel and are mapped to the model depending on the texcoord mode (see :ref:`set_texcoord_mode`). + +.. _class_FixedMaterial_get_texture: + +- :ref:`Texture` **get_texture** **(** :ref:`int` param **)** const + +Return a texture. Textures change parameters per texel and are mapped to the model depending on the texcoord mode (see :ref:`set_texcoord_mode`). + +.. _class_FixedMaterial_set_texcoord_mode: + +- void **set_texcoord_mode** **(** :ref:`int` param, :ref:`int` mode **)** + +Set the texture coordinate mode. Each texture param (from the PARAM_* enum) has one. It defines how the textures are mapped to the object. + +.. _class_FixedMaterial_get_texcoord_mode: + +- :ref:`int` **get_texcoord_mode** **(** :ref:`int` param **)** const + +Return the texture coordinate mode. Each texture param (from the PARAM_* enum) has one. It defines how the textures are mapped to the object. + +.. _class_FixedMaterial_set_fixed_flag: + +- void **set_fixed_flag** **(** :ref:`int` flag, :ref:`bool` value **)** + +.. _class_FixedMaterial_get_fixed_flag: + +- :ref:`bool` **get_fixed_flag** **(** :ref:`int` flag **)** const + +.. _class_FixedMaterial_set_uv_transform: + +- void **set_uv_transform** **(** :ref:`Transform` transform **)** + +Sets a special transform used to post-transform UV coordinates of the uv_xfrom tecoord mode: TEXCOORD_UV_TRANSFORM. + +.. _class_FixedMaterial_get_uv_transform: + +- :ref:`Transform` **get_uv_transform** **(** **)** const + +Returns the special transform used to post-transform UV coordinates of the uv_xfrom tecoord mode: TEXCOORD_UV_TRANSFORM. + +.. _class_FixedMaterial_set_light_shader: + +- void **set_light_shader** **(** :ref:`int` shader **)** + +.. _class_FixedMaterial_get_light_shader: + +- :ref:`int` **get_light_shader** **(** **)** const + +.. _class_FixedMaterial_set_point_size: + +- void **set_point_size** **(** :ref:`float` size **)** + +.. _class_FixedMaterial_get_point_size: + +- :ref:`float` **get_point_size** **(** **)** const + + diff --git a/classes/class_float.rst b/classes/class_float.rst new file mode 100644 index 000000000..d0d70371a --- /dev/null +++ b/classes/class_float.rst @@ -0,0 +1,40 @@ +.. _class_float: + +float +===== + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------+--------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`float` **(** :ref:`bool` from **)** | ++----------------------------+--------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`float` **(** :ref:`int` from **)** | ++----------------------------+--------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`float` **(** :ref:`String` from **)** | ++----------------------------+--------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_float_float: + +- :ref:`float` **float** **(** :ref:`bool` from **)** + +.. _class_float_float: + +- :ref:`float` **float** **(** :ref:`int` from **)** + +.. _class_float_float: + +- :ref:`float` **float** **(** :ref:`String` from **)** + + diff --git a/classes/class_font.rst b/classes/class_font.rst new file mode 100644 index 000000000..7a07e4061 --- /dev/null +++ b/classes/class_font.rst @@ -0,0 +1,184 @@ +.. _class_Font: + +Font +==== + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Internationalized font and text drawing support. + +Member Functions +---------------- + ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`create_from_fnt` **(** :ref:`String` path **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_height` **(** :ref:`float` px **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_height` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_ascent` **(** :ref:`float` px **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_ascent` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_descent` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_kerning_pair` **(** :ref:`int` char_a, :ref:`int` char_b, :ref:`int` kerning **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_kerning_pair` **(** :ref:`int` char_a, :ref:`int` char_b **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_texture` **(** :ref:`Texture` texture **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_char` **(** :ref:`int` character, :ref:`int` texture, :ref:`Rect2` rect, :ref:`Vector2` align=Vector2(0,0), :ref:`float` advance=-1 **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_texture_count` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_texture` **(** :ref:`int` idx **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_char_size` **(** :ref:`int` char, :ref:`int` next=0 **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_string_size` **(** :ref:`String` string **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_distance_field_hint` **(** :ref:`bool` enable **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_distance_field_hint` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` string, :ref:`Color` modulate=Color(1,1,1,1), :ref:`int` clip_w=-1 **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`draw_char` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`int` char, :ref:`int` next=-1, :ref:`Color` modulate=Color(1,1,1,1) **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_fallback` **(** :ref:`Object` fallback **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_fallback` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Font contains an unicode compatible character set, as well as the ability to draw it with variable width, ascent, descent and kerning. For creating fonts from TTF files (or other font formats), see the editor support for fonts. TODO check wikipedia for graph of ascent/baseline/descent/height/etc. + +Member Function Description +--------------------------- + +.. _class_Font_create_from_fnt: + +- :ref:`int` **create_from_fnt** **(** :ref:`String` path **)** + +.. _class_Font_set_height: + +- void **set_height** **(** :ref:`float` px **)** + +Set the total font height (ascent plus descent) in pixels. + +.. _class_Font_get_height: + +- :ref:`float` **get_height** **(** **)** const + +Return the total font height (ascent plus descent) in pixels. + +.. _class_Font_set_ascent: + +- void **set_ascent** **(** :ref:`float` px **)** + +Set the font ascent (number of pixels above the baseline). + +.. _class_Font_get_ascent: + +- :ref:`float` **get_ascent** **(** **)** const + +Return the font ascent (number of pixels above the baseline). + +.. _class_Font_get_descent: + +- :ref:`float` **get_descent** **(** **)** const + +Return the font descent (number of pixels below the baseline). + +.. _class_Font_add_kerning_pair: + +- void **add_kerning_pair** **(** :ref:`int` char_a, :ref:`int` char_b, :ref:`int` kerning **)** + +Add a kerning pair to the :ref:`Font` as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character. + +.. _class_Font_get_kerning_pair: + +- :ref:`int` **get_kerning_pair** **(** :ref:`int` char_a, :ref:`int` char_b **)** const + +Return a kerning pair as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character. + +.. _class_Font_add_texture: + +- void **add_texture** **(** :ref:`Texture` texture **)** + +Add a texture to the :ref:`Font`. + +.. _class_Font_add_char: + +- void **add_char** **(** :ref:`int` character, :ref:`int` texture, :ref:`Rect2` rect, :ref:`Vector2` align=Vector2(0,0), :ref:`float` advance=-1 **)** + +Add a character to the font, where "character" is the unicode value, "texture" is the texture index, "rect" is the region in the texture (in pixels!), "align" is the (optional) alignment for the character and "advance" is the (optional) advance. + +.. _class_Font_get_texture_count: + +- :ref:`int` **get_texture_count** **(** **)** const + +.. _class_Font_get_texture: + +- :ref:`Texture` **get_texture** **(** :ref:`int` idx **)** const + +.. _class_Font_get_char_size: + +- :ref:`Vector2` **get_char_size** **(** :ref:`int` char, :ref:`int` next=0 **)** const + +Return the size of a character, optionally taking kerning into account if the next character is provided. + +.. _class_Font_get_string_size: + +- :ref:`Vector2` **get_string_size** **(** :ref:`String` string **)** const + +Return the size of a string, taking kerning and advance into account. + +.. _class_Font_set_distance_field_hint: + +- void **set_distance_field_hint** **(** :ref:`bool` enable **)** + +.. _class_Font_is_distance_field_hint: + +- :ref:`bool` **is_distance_field_hint** **(** **)** const + +.. _class_Font_clear: + +- void **clear** **(** **)** + +Clear all the font data. + +.. _class_Font_draw: + +- void **draw** **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` string, :ref:`Color` modulate=Color(1,1,1,1), :ref:`int` clip_w=-1 **)** const + +Draw "string" into a canvas item using the font at a given "pos" position, with "modulate" color, and optionally clipping the width. "pos" specifies te baseline, not the top. To draw from the top, *ascent* must be added to the Y axis. + +.. _class_Font_draw_char: + +- :ref:`float` **draw_char** **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`int` char, :ref:`int` next=-1, :ref:`Color` modulate=Color(1,1,1,1) **)** const + +Draw character "char" into a canvas item using the font at a given "pos" position, with "modulate" color, and optionally kerning if "next" is apassed. clipping the width. "pos" specifies te baseline, not the top. To draw from the top, *ascent* must be added to the Y axis. The width used by the character is returned, making this function useful for drawing strings character by character. + +.. _class_Font_set_fallback: + +- void **set_fallback** **(** :ref:`Object` fallback **)** + +.. _class_Font_get_fallback: + +- :ref:`Object` **get_fallback** **(** **)** const + + diff --git a/classes/class_funcref.rst b/classes/class_funcref.rst new file mode 100644 index 000000000..c91ac03d4 --- /dev/null +++ b/classes/class_funcref.rst @@ -0,0 +1,43 @@ +.. _class_FuncRef: + +FuncRef +======= + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`call_func` **(** var arg0=NULL, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL, var arg5=NULL, var arg6=NULL, var arg7=NULL, var arg8=NULL, var arg9=NULL **)** | ++-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_instance` **(** :ref:`Object` instance **)** | ++-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_function` **(** :ref:`String` name **)** | ++-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_FuncRef_call_func: + +- void **call_func** **(** var arg0=NULL, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL, var arg5=NULL, var arg6=NULL, var arg7=NULL, var arg8=NULL, var arg9=NULL **)** + +.. _class_FuncRef_set_instance: + +- void **set_instance** **(** :ref:`Object` instance **)** + +.. _class_FuncRef_set_function: + +- void **set_function** **(** :ref:`String` name **)** + + diff --git a/classes/class_gdfunctionstate.rst b/classes/class_gdfunctionstate.rst new file mode 100644 index 000000000..17ca36691 --- /dev/null +++ b/classes/class_gdfunctionstate.rst @@ -0,0 +1,37 @@ +.. _class_GDFunctionState: + +GDFunctionState +=============== + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------+------------------------------------------------------------------------+ +| Variant | :ref:`resume` **(** var arg=NULL **)** | ++--------------------------+------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_valid` **(** **)** const | ++--------------------------+------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_GDFunctionState_resume: + +- Variant **resume** **(** var arg=NULL **)** + +.. _class_GDFunctionState_is_valid: + +- :ref:`bool` **is_valid** **(** **)** const + + diff --git a/classes/class_gdnativeclass.rst b/classes/class_gdnativeclass.rst new file mode 100644 index 000000000..329f19548 --- /dev/null +++ b/classes/class_gdnativeclass.rst @@ -0,0 +1,31 @@ +.. _class_GDNativeClass: + +GDNativeClass +============= + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++-------+--------------------------------------------------+ +| void | :ref:`new` **(** **)** | ++-------+--------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_GDNativeClass_new: + +- void **new** **(** **)** + + diff --git a/classes/class_gdscript.rst b/classes/class_gdscript.rst new file mode 100644 index 000000000..b9f53ec68 --- /dev/null +++ b/classes/class_gdscript.rst @@ -0,0 +1,37 @@ +.. _class_GDScript: + +GDScript +======== + +Inherits: :ref:`Script` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------------+-----------------------------------------------------------------------------+ +| void | :ref:`new` **(** **)** | ++----------------------------------+-----------------------------------------------------------------------------+ +| :ref:`RawArray` | :ref:`get_as_byte_code` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_GDScript_new: + +- void **new** **(** **)** + +.. _class_GDScript_get_as_byte_code: + +- :ref:`RawArray` **get_as_byte_code** **(** **)** const + + diff --git a/classes/class_generic6dofjoint.rst b/classes/class_generic6dofjoint.rst new file mode 100644 index 000000000..885153550 --- /dev/null +++ b/classes/class_generic6dofjoint.rst @@ -0,0 +1,120 @@ +.. _class_Generic6DOFJoint: + +Generic6DOFJoint +================ + +Inherits: :ref:`Joint` +----------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_param_x` **(** :ref:`int` param, :ref:`float` value **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_param_x` **(** :ref:`int` param **)** const | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_param_y` **(** :ref:`int` param, :ref:`float` value **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_param_y` **(** :ref:`int` param **)** const | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_param_z` **(** :ref:`int` param, :ref:`float` value **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_param_z` **(** :ref:`int` param **)** const | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_flag_x` **(** :ref:`int` flag, :ref:`bool` value **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_flag_x` **(** :ref:`int` flag **)** const | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_flag_y` **(** :ref:`int` flag, :ref:`bool` value **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_flag_y` **(** :ref:`int` flag **)** const | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_flag_z` **(** :ref:`int` flag, :ref:`bool` value **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_flag_z` **(** :ref:`int` flag **)** const | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **PARAM_LINEAR_LOWER_LIMIT** = **0** +- **PARAM_LINEAR_UPPER_LIMIT** = **1** +- **PARAM_LINEAR_LIMIT_SOFTNESS** = **2** +- **PARAM_LINEAR_RESTITUTION** = **3** +- **PARAM_LINEAR_DAMPING** = **4** +- **PARAM_ANGULAR_LOWER_LIMIT** = **5** +- **PARAM_ANGULAR_UPPER_LIMIT** = **6** +- **PARAM_ANGULAR_LIMIT_SOFTNESS** = **7** +- **PARAM_ANGULAR_DAMPING** = **8** +- **PARAM_ANGULAR_RESTITUTION** = **9** +- **PARAM_ANGULAR_FORCE_LIMIT** = **10** +- **PARAM_ANGULAR_ERP** = **11** +- **PARAM_ANGULAR_MOTOR_TARGET_VELOCITY** = **12** +- **PARAM_ANGULAR_MOTOR_FORCE_LIMIT** = **13** +- **PARAM_MAX** = **14** +- **FLAG_ENABLE_LINEAR_LIMIT** = **0** +- **FLAG_ENABLE_ANGULAR_LIMIT** = **1** +- **FLAG_ENABLE_MOTOR** = **2** +- **FLAG_MAX** = **3** + +Member Function Description +--------------------------- + +.. _class_Generic6DOFJoint_set_param_x: + +- void **set_param_x** **(** :ref:`int` param, :ref:`float` value **)** + +.. _class_Generic6DOFJoint_get_param_x: + +- :ref:`float` **get_param_x** **(** :ref:`int` param **)** const + +.. _class_Generic6DOFJoint_set_param_y: + +- void **set_param_y** **(** :ref:`int` param, :ref:`float` value **)** + +.. _class_Generic6DOFJoint_get_param_y: + +- :ref:`float` **get_param_y** **(** :ref:`int` param **)** const + +.. _class_Generic6DOFJoint_set_param_z: + +- void **set_param_z** **(** :ref:`int` param, :ref:`float` value **)** + +.. _class_Generic6DOFJoint_get_param_z: + +- :ref:`float` **get_param_z** **(** :ref:`int` param **)** const + +.. _class_Generic6DOFJoint_set_flag_x: + +- void **set_flag_x** **(** :ref:`int` flag, :ref:`bool` value **)** + +.. _class_Generic6DOFJoint_get_flag_x: + +- :ref:`bool` **get_flag_x** **(** :ref:`int` flag **)** const + +.. _class_Generic6DOFJoint_set_flag_y: + +- void **set_flag_y** **(** :ref:`int` flag, :ref:`bool` value **)** + +.. _class_Generic6DOFJoint_get_flag_y: + +- :ref:`bool` **get_flag_y** **(** :ref:`int` flag **)** const + +.. _class_Generic6DOFJoint_set_flag_z: + +- void **set_flag_z** **(** :ref:`int` flag, :ref:`bool` value **)** + +.. _class_Generic6DOFJoint_get_flag_z: + +- :ref:`bool` **get_flag_z** **(** :ref:`int` flag **)** const + + diff --git a/classes/class_geometry.rst b/classes/class_geometry.rst new file mode 100644 index 000000000..b57018b29 --- /dev/null +++ b/classes/class_geometry.rst @@ -0,0 +1,127 @@ +.. _class_Geometry: + +Geometry +======== + +Inherits: :ref:`Object` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`build_box_planes` **(** :ref:`Vector3` extents **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`build_cylinder_planes` **(** :ref:`float` radius, :ref:`float` height, :ref:`int` sides, :ref:`int` axis=2 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`build_capsule_planes` **(** :ref:`float` radius, :ref:`float` height, :ref:`int` sides, :ref:`int` lats, :ref:`int` axis=2 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`segment_intersects_circle` **(** :ref:`Vector2` segment_from, :ref:`Vector2` segment_to, :ref:`Vector2` circle_pos, :ref:`float` circle_radius **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`segment_intersects_segment_2d` **(** :ref:`Vector2` from_a, :ref:`Vector2` to_a, :ref:`Vector2` from_b, :ref:`Vector2` to_b **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2Array` | :ref:`get_closest_points_between_segments_2d` **(** :ref:`Vector2` p1, :ref:`Vector2` q1, :ref:`Vector2` p2, :ref:`Vector2` q2 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3Array` | :ref:`get_closest_points_between_segments` **(** :ref:`Vector3` p1, :ref:`Vector3` p2, :ref:`Vector3` q1, :ref:`Vector3` q2 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_closest_point_to_segment` **(** :ref:`Vector3` point, :ref:`Vector3` s1, :ref:`Vector3` s2 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_uv84_normal_bit` **(** :ref:`Vector3` normal **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`ray_intersects_triangle` **(** :ref:`Vector3` from, :ref:`Vector3` dir, :ref:`Vector3` a, :ref:`Vector3` b, :ref:`Vector3` c **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`segment_intersects_triangle` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Vector3` a, :ref:`Vector3` b, :ref:`Vector3` c **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3Array` | :ref:`segment_intersects_sphere` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Vector3` spos, :ref:`float` sradius **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3Array` | :ref:`segment_intersects_cylinder` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`float` height, :ref:`float` radius **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3Array` | :ref:`segment_intersects_convex` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Array` planes **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`point_is_inside_triangle` **(** :ref:`Vector2` point, :ref:`Vector2` a, :ref:`Vector2` b, :ref:`Vector2` c **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`IntArray` | :ref:`triangulate_polygon` **(** :ref:`Vector2Array` polygon **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`make_atlas` **(** :ref:`Vector2Array` sizes **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_Geometry_build_box_planes: + +- :ref:`Array` **build_box_planes** **(** :ref:`Vector3` extents **)** + +.. _class_Geometry_build_cylinder_planes: + +- :ref:`Array` **build_cylinder_planes** **(** :ref:`float` radius, :ref:`float` height, :ref:`int` sides, :ref:`int` axis=2 **)** + +.. _class_Geometry_build_capsule_planes: + +- :ref:`Array` **build_capsule_planes** **(** :ref:`float` radius, :ref:`float` height, :ref:`int` sides, :ref:`int` lats, :ref:`int` axis=2 **)** + +.. _class_Geometry_segment_intersects_circle: + +- :ref:`float` **segment_intersects_circle** **(** :ref:`Vector2` segment_from, :ref:`Vector2` segment_to, :ref:`Vector2` circle_pos, :ref:`float` circle_radius **)** + +.. _class_Geometry_segment_intersects_segment_2d: + +- void **segment_intersects_segment_2d** **(** :ref:`Vector2` from_a, :ref:`Vector2` to_a, :ref:`Vector2` from_b, :ref:`Vector2` to_b **)** + +.. _class_Geometry_get_closest_points_between_segments_2d: + +- :ref:`Vector2Array` **get_closest_points_between_segments_2d** **(** :ref:`Vector2` p1, :ref:`Vector2` q1, :ref:`Vector2` p2, :ref:`Vector2` q2 **)** + +.. _class_Geometry_get_closest_points_between_segments: + +- :ref:`Vector3Array` **get_closest_points_between_segments** **(** :ref:`Vector3` p1, :ref:`Vector3` p2, :ref:`Vector3` q1, :ref:`Vector3` q2 **)** + +.. _class_Geometry_get_closest_point_to_segment: + +- :ref:`Vector3` **get_closest_point_to_segment** **(** :ref:`Vector3` point, :ref:`Vector3` s1, :ref:`Vector3` s2 **)** + +.. _class_Geometry_get_uv84_normal_bit: + +- :ref:`int` **get_uv84_normal_bit** **(** :ref:`Vector3` normal **)** + +.. _class_Geometry_ray_intersects_triangle: + +- void **ray_intersects_triangle** **(** :ref:`Vector3` from, :ref:`Vector3` dir, :ref:`Vector3` a, :ref:`Vector3` b, :ref:`Vector3` c **)** + +.. _class_Geometry_segment_intersects_triangle: + +- void **segment_intersects_triangle** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Vector3` a, :ref:`Vector3` b, :ref:`Vector3` c **)** + +.. _class_Geometry_segment_intersects_sphere: + +- :ref:`Vector3Array` **segment_intersects_sphere** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Vector3` spos, :ref:`float` sradius **)** + +.. _class_Geometry_segment_intersects_cylinder: + +- :ref:`Vector3Array` **segment_intersects_cylinder** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`float` height, :ref:`float` radius **)** + +.. _class_Geometry_segment_intersects_convex: + +- :ref:`Vector3Array` **segment_intersects_convex** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Array` planes **)** + +.. _class_Geometry_point_is_inside_triangle: + +- :ref:`bool` **point_is_inside_triangle** **(** :ref:`Vector2` point, :ref:`Vector2` a, :ref:`Vector2` b, :ref:`Vector2` c **)** const + +.. _class_Geometry_triangulate_polygon: + +- :ref:`IntArray` **triangulate_polygon** **(** :ref:`Vector2Array` polygon **)** + +.. _class_Geometry_make_atlas: + +- :ref:`Dictionary` **make_atlas** **(** :ref:`Vector2Array` sizes **)** + + diff --git a/classes/class_geometryinstance.rst b/classes/class_geometryinstance.rst new file mode 100644 index 000000000..f60f1abe0 --- /dev/null +++ b/classes/class_geometryinstance.rst @@ -0,0 +1,118 @@ +.. _class_GeometryInstance: + +GeometryInstance +================ + +Inherits: :ref:`VisualInstance` +----------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Base node for geometry based visual instances. + +Member Functions +---------------- + ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_material_override` **(** :ref:`Object` material **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_material_override` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_flag` **(** :ref:`int` flag, :ref:`bool` value **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_flag` **(** :ref:`int` flag **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_draw_range_begin` **(** :ref:`float` mode **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_draw_range_begin` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_draw_range_end` **(** :ref:`float` mode **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_draw_range_end` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_baked_light_texture_id` **(** :ref:`int` id **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_baked_light_texture_id` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_extra_cull_margin` **(** :ref:`float` margin **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_extra_cull_margin` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **FLAG_VISIBLE** = **0** +- **FLAG_CAST_SHADOW** = **3** +- **FLAG_RECEIVE_SHADOWS** = **4** +- **FLAG_BILLBOARD** = **1** +- **FLAG_BILLBOARD_FIX_Y** = **2** +- **FLAG_DEPH_SCALE** = **5** +- **FLAG_VISIBLE_IN_ALL_ROOMS** = **6** +- **FLAG_MAX** = **8** + +Description +----------- + +Base node for geometry based visual instances. Shares some common functionality like visibility and custom materials. + +Member Function Description +--------------------------- + +.. _class_GeometryInstance_set_material_override: + +- void **set_material_override** **(** :ref:`Object` material **)** + +Set the material override for the whole geometry. + +.. _class_GeometryInstance_get_material_override: + +- :ref:`Object` **get_material_override** **(** **)** const + +Return the material override for the whole geometry. + +.. _class_GeometryInstance_set_flag: + +- void **set_flag** **(** :ref:`int` flag, :ref:`bool` value **)** + +.. _class_GeometryInstance_get_flag: + +- :ref:`bool` **get_flag** **(** :ref:`int` flag **)** const + +.. _class_GeometryInstance_set_draw_range_begin: + +- void **set_draw_range_begin** **(** :ref:`float` mode **)** + +.. _class_GeometryInstance_get_draw_range_begin: + +- :ref:`float` **get_draw_range_begin** **(** **)** const + +.. _class_GeometryInstance_set_draw_range_end: + +- void **set_draw_range_end** **(** :ref:`float` mode **)** + +.. _class_GeometryInstance_get_draw_range_end: + +- :ref:`float` **get_draw_range_end** **(** **)** const + +.. _class_GeometryInstance_set_baked_light_texture_id: + +- void **set_baked_light_texture_id** **(** :ref:`int` id **)** + +.. _class_GeometryInstance_get_baked_light_texture_id: + +- :ref:`int` **get_baked_light_texture_id** **(** **)** const + +.. _class_GeometryInstance_set_extra_cull_margin: + +- void **set_extra_cull_margin** **(** :ref:`float` margin **)** + +.. _class_GeometryInstance_get_extra_cull_margin: + +- :ref:`float` **get_extra_cull_margin** **(** **)** const + + diff --git a/classes/class_globals.rst b/classes/class_globals.rst new file mode 100644 index 000000000..50808d5f8 --- /dev/null +++ b/classes/class_globals.rst @@ -0,0 +1,124 @@ +.. _class_Globals: + +Globals +======= + +Inherits: :ref:`Object` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Contains global variables accessible from everywhere. + +Member Functions +---------------- + ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has` **(** :ref:`String` name **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_order` **(** :ref:`String` name, :ref:`int` pos **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_order` **(** :ref:`String` name **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_persisting` **(** :ref:`String` name, :ref:`bool` enable **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_persisting` **(** :ref:`String` name **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** :ref:`String` name **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`localize_path` **(** :ref:`String` path **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`globalize_path` **(** :ref:`String` path **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`save` **(** **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_singleton` **(** :ref:`String` name **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_singleton` **(** :ref:`String` name **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`load_resource_pack` **(** :ref:`String` pack **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`save_custom` **(** :ref:`String` file **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Contains global variables accessible from everywhere. Use the normal :ref:`Object` API, such as "Globals.get(variable)", "Globals.set(variable,value)" or "Globals.has(variable)" to access them. Variables stored in engine.cfg are also loaded into globals, making this object very useful for reading custom game configuration options. + +Member Function Description +--------------------------- + +.. _class_Globals_has: + +- :ref:`bool` **has** **(** :ref:`String` name **)** const + +Return true if a configuration value is present. + +.. _class_Globals_set_order: + +- void **set_order** **(** :ref:`String` name, :ref:`int` pos **)** + +Set the order of a configuration value (influences when saved to the config file). + +.. _class_Globals_get_order: + +- :ref:`int` **get_order** **(** :ref:`String` name **)** const + +Return the order of a configuration value (influences when saved to the config file). + +.. _class_Globals_set_persisting: + +- void **set_persisting** **(** :ref:`String` name, :ref:`bool` enable **)** + +If set to true, this value can be saved to the configuration file. This is useful for editors. + +.. _class_Globals_is_persisting: + +- :ref:`bool` **is_persisting** **(** :ref:`String` name **)** const + +If returns true, this value can be saved to the configuration file. This is useful for editors. + +.. _class_Globals_clear: + +- void **clear** **(** :ref:`String` name **)** + +Clear the whole configuration (not recommended, may break things). + +.. _class_Globals_localize_path: + +- :ref:`String` **localize_path** **(** :ref:`String` path **)** const + +Convert a path to a localized path (res:// path). + +.. _class_Globals_globalize_path: + +- :ref:`String` **globalize_path** **(** :ref:`String` path **)** const + +Convert a localized path (res://) to a full native OS path. + +.. _class_Globals_save: + +- :ref:`int` **save** **(** **)** + +.. _class_Globals_has_singleton: + +- :ref:`bool` **has_singleton** **(** :ref:`String` name **)** const + +.. _class_Globals_get_singleton: + +- :ref:`Object` **get_singleton** **(** :ref:`String` name **)** const + +.. _class_Globals_load_resource_pack: + +- :ref:`bool` **load_resource_pack** **(** :ref:`String` pack **)** + +.. _class_Globals_save_custom: + +- :ref:`int` **save_custom** **(** :ref:`String` file **)** + + diff --git a/classes/class_graphedit.rst b/classes/class_graphedit.rst new file mode 100644 index 000000000..03c49671b --- /dev/null +++ b/classes/class_graphedit.rst @@ -0,0 +1,109 @@ +.. _class_GraphEdit: + +GraphEdit +========= + +Inherits: :ref:`Control` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +GraphEdit is an area capable of showing various GraphNodes. It manages connection events between them. + +Member Functions +---------------- + ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Error | :ref:`connect_node` **(** :ref:`String` from, :ref:`int` from_port, :ref:`String` to, :ref:`int` to_port **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_node_connected` **(** :ref:`String` from, :ref:`int` from_port, :ref:`String` to, :ref:`int` to_port **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`disconnect_node` **(** :ref:`String` from, :ref:`int` from_port, :ref:`String` to, :ref:`int` to_port **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_connection_list` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_scroll_ofs` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_zoom` **(** :ref:`float` p_zoom **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_zoom` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_right_disconnects` **(** :ref:`bool` enable **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_right_disconnects_enabled` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **delete_nodes_request** **(** **)** +- **duplicate_nodes_request** **(** **)** +- **popup_request** **(** :ref:`Vector2` p_position **)** +- **_begin_node_move** **(** **)** +- **disconnection_request** **(** :ref:`String` from, :ref:`int` from_slot, :ref:`String` to, :ref:`int` to_slot **)** +- **connection_request** **(** :ref:`String` from, :ref:`int` from_slot, :ref:`String` to, :ref:`int` to_slot **)** +- **_end_node_move** **(** **)** + +Description +----------- + +GraphEdit manages the showing of GraphNodes it contains, as well as connections an disconnections between them. Signals are sent for each of these two events. Disconnection between GraphNodes slots is disabled by default. + +It is greatly advised to enable low processor usage mode :ref:`OS.set_low_processor_usage_mode()` when using GraphEdits. + +Member Function Description +--------------------------- + +.. _class_GraphEdit_connect_node: + +- Error **connect_node** **(** :ref:`String` from, :ref:`int` from_port, :ref:`String` to, :ref:`int` to_port **)** + +Create a connection between 'from_port' slot of 'from' GraphNode and 'to_port' slot of 'to' GraphNode. If the connection already exists, no connection is created. + +.. _class_GraphEdit_is_node_connected: + +- :ref:`bool` **is_node_connected** **(** :ref:`String` from, :ref:`int` from_port, :ref:`String` to, :ref:`int` to_port **)** + +Return true if the 'from_port' slot of 'from' GraphNode is connected to the 'to_port' slot of 'to' GraphNode. + +.. _class_GraphEdit_disconnect_node: + +- void **disconnect_node** **(** :ref:`String` from, :ref:`int` from_port, :ref:`String` to, :ref:`int` to_port **)** + +Remove the connection between 'from_port' slot of 'from' GraphNode and 'to_port' slot of 'to' GraphNode, if connection exists. + +.. _class_GraphEdit_get_connection_list: + +- :ref:`Array` **get_connection_list** **(** **)** const + +Return an Array containing the list of connections. A connection consists in a structure of the form {from_slot: 0, from: "GraphNode name 0", to_slot: 1, to: "GraphNode name 1" } + +.. _class_GraphEdit_get_scroll_ofs: + +- :ref:`Vector2` **get_scroll_ofs** **(** **)** const + +.. _class_GraphEdit_set_zoom: + +- void **set_zoom** **(** :ref:`float` p_zoom **)** + +.. _class_GraphEdit_get_zoom: + +- :ref:`float` **get_zoom** **(** **)** const + +.. _class_GraphEdit_set_right_disconnects: + +- void **set_right_disconnects** **(** :ref:`bool` enable **)** + +Enable the disconnection of existing connections in the visual GraphEdit by left-clicking a connection and releasing into the void. + +.. _class_GraphEdit_is_right_disconnects_enabled: + +- :ref:`bool` **is_right_disconnects_enabled** **(** **)** const + +Return true is the disconnection of connections is enable in the visual GraphEdit. False otherwise. + + diff --git a/classes/class_graphnode.rst b/classes/class_graphnode.rst new file mode 100644 index 000000000..8e4fe0375 --- /dev/null +++ b/classes/class_graphnode.rst @@ -0,0 +1,222 @@ +.. _class_GraphNode: + +GraphNode +========= + +Inherits: :ref:`Container` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +A GraphNode is a container with several input and output slots allowing connections between GraphNodes. Slots can have different, incompatible types. + +Member Functions +---------------- + ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_title` **(** :ref:`String` title **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_title` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_slot` **(** :ref:`int` idx, :ref:`bool` enable_left, :ref:`int` type_left, :ref:`Color` color_left, :ref:`bool` enable_right, :ref:`int` type_right, :ref:`Color` color_right **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_slot` **(** :ref:`int` idx **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_all_slots` **(** **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_slot_enabled_left` **(** :ref:`int` idx **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_slot_type_left` **(** :ref:`int` idx **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_slot_color_left` **(** :ref:`int` idx **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_slot_enabled_right` **(** :ref:`int` idx **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_slot_type_right` **(** :ref:`int` idx **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_slot_color_right` **(** :ref:`int` idx **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_offset` **(** :ref:`Vector2` offset **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_offset` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_connection_output_count` **(** **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_connection_input_count` **(** **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_connection_output_pos` **(** :ref:`int` idx **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_connection_output_type` **(** :ref:`int` idx **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_connection_output_color` **(** :ref:`int` idx **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_connection_input_pos` **(** :ref:`int` idx **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_connection_input_type` **(** :ref:`int` idx **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_connection_input_color` **(** :ref:`int` idx **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_show_close_button` **(** :ref:`bool` show **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_close_button_visible` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **raise_request** **(** **)** +- **close_request** **(** **)** +- **dragged** **(** :ref:`Vector2` from, :ref:`Vector2` to **)** +- **offset_changed** **(** **)** + +Description +----------- + +A GraphNode is a container defined by a title. It can have 1 or more input and output slots, which can be enabled (shown) or disabled (not shown) and have different (incompatible) types. Colors can also be assigned to slots. A tuple of input and output slots is defined for each GUI element included in the GraphNode. Input and output connections are left and right slots, but only enabled slots are counted as connections. + +Member Function Description +--------------------------- + +.. _class_GraphNode_set_title: + +- void **set_title** **(** :ref:`String` title **)** + +Set the title of the GraphNode. + +.. _class_GraphNode_get_title: + +- :ref:`String` **get_title** **(** **)** const + +Return the title of the GraphNode. + +.. _class_GraphNode_set_slot: + +- void **set_slot** **(** :ref:`int` idx, :ref:`bool` enable_left, :ref:`int` type_left, :ref:`Color` color_left, :ref:`bool` enable_right, :ref:`int` type_right, :ref:`Color` color_right **)** + +Set the tuple of input/output slots defined by 'idx' ID. 'left' slots are input, 'right' are output. 'type' is an integer defining the type of the slot. Refer to description for the compatibility between slot types. + +.. _class_GraphNode_clear_slot: + +- void **clear_slot** **(** :ref:`int` idx **)** + +Disable input and ouput slot whose index is 'idx'. + +.. _class_GraphNode_clear_all_slots: + +- void **clear_all_slots** **(** **)** + +Disable all input and output slots of the GraphNode. + +.. _class_GraphNode_is_slot_enabled_left: + +- :ref:`bool` **is_slot_enabled_left** **(** :ref:`int` idx **)** const + +Return true if left (input) slot 'idx' is enabled. False otherwise. + +.. _class_GraphNode_get_slot_type_left: + +- :ref:`int` **get_slot_type_left** **(** :ref:`int` idx **)** const + +Return the (integer) type of left (input) 'idx' slot. + +.. _class_GraphNode_get_slot_color_left: + +- :ref:`Color` **get_slot_color_left** **(** :ref:`int` idx **)** const + +Return the color set to 'idx' left (input) slot. + +.. _class_GraphNode_is_slot_enabled_right: + +- :ref:`bool` **is_slot_enabled_right** **(** :ref:`int` idx **)** const + +Return true if right (output) slot 'idx' is enabled. False otherwise. + +.. _class_GraphNode_get_slot_type_right: + +- :ref:`int` **get_slot_type_right** **(** :ref:`int` idx **)** const + +Return the (integer) type of right (output) 'idx' slot. + +.. _class_GraphNode_get_slot_color_right: + +- :ref:`Color` **get_slot_color_right** **(** :ref:`int` idx **)** const + +Return the color set to 'idx' right (output) slot. + +.. _class_GraphNode_set_offset: + +- void **set_offset** **(** :ref:`Vector2` offset **)** + +Set the offset of the GraphNode. + +.. _class_GraphNode_get_offset: + +- :ref:`Vector2` **get_offset** **(** **)** const + +Return the offset of the GraphNode. + +.. _class_GraphNode_get_connection_output_count: + +- :ref:`int` **get_connection_output_count** **(** **)** + +Return the number of enabled output slots (connections) of the GraphNode. + +.. _class_GraphNode_get_connection_input_count: + +- :ref:`int` **get_connection_input_count** **(** **)** + +Return the number of enabled input slots (connections) to the GraphNode. + +.. _class_GraphNode_get_connection_output_pos: + +- :ref:`Vector2` **get_connection_output_pos** **(** :ref:`int` idx **)** + +Return the position of the output connection 'idx'. + +.. _class_GraphNode_get_connection_output_type: + +- :ref:`int` **get_connection_output_type** **(** :ref:`int` idx **)** + +Return the type of the output connection 'idx'. + +.. _class_GraphNode_get_connection_output_color: + +- :ref:`Color` **get_connection_output_color** **(** :ref:`int` idx **)** + +Return the color of the output connection 'idx'. + +.. _class_GraphNode_get_connection_input_pos: + +- :ref:`Vector2` **get_connection_input_pos** **(** :ref:`int` idx **)** + +Return the position of the input connection 'idx'. + +.. _class_GraphNode_get_connection_input_type: + +- :ref:`int` **get_connection_input_type** **(** :ref:`int` idx **)** + +Return the type of the input connection 'idx'. + +.. _class_GraphNode_get_connection_input_color: + +- :ref:`Color` **get_connection_input_color** **(** :ref:`int` idx **)** + +Return the color of the input connection 'idx'. + +.. _class_GraphNode_set_show_close_button: + +- void **set_show_close_button** **(** :ref:`bool` show **)** + +Show the close button on the GraphNode if 'show' is true (disabled by default). If enabled, a connection on the signal close_request is needed for the close button to work. + +.. _class_GraphNode_is_close_button_visible: + +- :ref:`bool` **is_close_button_visible** **(** **)** const + +Returns true if the close button is shown. False otherwise. + + diff --git a/classes/class_gridcontainer.rst b/classes/class_gridcontainer.rst new file mode 100644 index 000000000..9090c7827 --- /dev/null +++ b/classes/class_gridcontainer.rst @@ -0,0 +1,37 @@ +.. _class_GridContainer: + +GridContainer +============= + +Inherits: :ref:`Container` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------+-------------------------------------------------------------------------------------------------+ +| void | :ref:`set_columns` **(** :ref:`int` columns **)** | ++------------------------+-------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_columns` **(** **)** const | ++------------------------+-------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_GridContainer_set_columns: + +- void **set_columns** **(** :ref:`int` columns **)** + +.. _class_GridContainer_get_columns: + +- :ref:`int` **get_columns** **(** **)** const + + diff --git a/classes/class_gridmap.rst b/classes/class_gridmap.rst new file mode 100644 index 000000000..790e57b3b --- /dev/null +++ b/classes/class_gridmap.rst @@ -0,0 +1,240 @@ +.. _class_GridMap: + +GridMap +======= + +Inherits: :ref:`Spatial` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_theme` **(** :ref:`MeshLibrary` theme **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`MeshLibrary` | :ref:`get_theme` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_bake` **(** :ref:`bool` enable **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_baking_enabled` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_cell_size` **(** :ref:`float` size **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_cell_size` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_octant_size` **(** :ref:`int` size **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_octant_size` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_cell_item` **(** :ref:`int` x, :ref:`int` y, :ref:`int` z, :ref:`int` item, :ref:`int` orientation=0 **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_cell_item` **(** :ref:`int` x, :ref:`int` y, :ref:`int` z **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_cell_item_orientation` **(** :ref:`int` x, :ref:`int` y, :ref:`int` z **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`resource_changed` **(** :ref:`Object` resource **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_center_x` **(** :ref:`bool` enable **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_center_x` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_center_y` **(** :ref:`bool` enable **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_center_y` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_center_z` **(** :ref:`bool` enable **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_center_z` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_clip` **(** :ref:`bool` enabled, :ref:`bool` clipabove=true, :ref:`int` floor=0, :ref:`int` axis=0 **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`create_area` **(** :ref:`int` id, :ref:`AABB` area **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`AABB` | :ref:`area_get_bounds` **(** :ref:`int` area **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_set_exterior_portal` **(** :ref:`int` area, :ref:`bool` enable **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_set_name` **(** :ref:`int` area, :ref:`String` name **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`area_get_name` **(** :ref:`int` area **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`area_is_exterior_portal` **(** :ref:`int` area **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_set_portal_disable_distance` **(** :ref:`int` area, :ref:`float` distance **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`area_get_portal_disable_distance` **(** :ref:`int` area **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_set_portal_disable_color` **(** :ref:`int` area, :ref:`Color` color **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`area_get_portal_disable_color` **(** :ref:`int` area **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`erase_area` **(** :ref:`int` area **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_unused_area_id` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`bake_geometry` **(** **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_use_baked_light` **(** :ref:`bool` use **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_using_baked_light` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **INVALID_CELL_ITEM** = **-1** + +Member Function Description +--------------------------- + +.. _class_GridMap_set_theme: + +- void **set_theme** **(** :ref:`MeshLibrary` theme **)** + +.. _class_GridMap_get_theme: + +- :ref:`MeshLibrary` **get_theme** **(** **)** const + +.. _class_GridMap_set_bake: + +- void **set_bake** **(** :ref:`bool` enable **)** + +.. _class_GridMap_is_baking_enabled: + +- :ref:`bool` **is_baking_enabled** **(** **)** const + +.. _class_GridMap_set_cell_size: + +- void **set_cell_size** **(** :ref:`float` size **)** + +.. _class_GridMap_get_cell_size: + +- :ref:`float` **get_cell_size** **(** **)** const + +.. _class_GridMap_set_octant_size: + +- void **set_octant_size** **(** :ref:`int` size **)** + +.. _class_GridMap_get_octant_size: + +- :ref:`int` **get_octant_size** **(** **)** const + +.. _class_GridMap_set_cell_item: + +- void **set_cell_item** **(** :ref:`int` x, :ref:`int` y, :ref:`int` z, :ref:`int` item, :ref:`int` orientation=0 **)** + +.. _class_GridMap_get_cell_item: + +- :ref:`int` **get_cell_item** **(** :ref:`int` x, :ref:`int` y, :ref:`int` z **)** const + +.. _class_GridMap_get_cell_item_orientation: + +- :ref:`int` **get_cell_item_orientation** **(** :ref:`int` x, :ref:`int` y, :ref:`int` z **)** const + +.. _class_GridMap_resource_changed: + +- void **resource_changed** **(** :ref:`Object` resource **)** + +.. _class_GridMap_set_center_x: + +- void **set_center_x** **(** :ref:`bool` enable **)** + +.. _class_GridMap_get_center_x: + +- :ref:`bool` **get_center_x** **(** **)** const + +.. _class_GridMap_set_center_y: + +- void **set_center_y** **(** :ref:`bool` enable **)** + +.. _class_GridMap_get_center_y: + +- :ref:`bool` **get_center_y** **(** **)** const + +.. _class_GridMap_set_center_z: + +- void **set_center_z** **(** :ref:`bool` enable **)** + +.. _class_GridMap_get_center_z: + +- :ref:`bool` **get_center_z** **(** **)** const + +.. _class_GridMap_set_clip: + +- void **set_clip** **(** :ref:`bool` enabled, :ref:`bool` clipabove=true, :ref:`int` floor=0, :ref:`int` axis=0 **)** + +.. _class_GridMap_create_area: + +- :ref:`int` **create_area** **(** :ref:`int` id, :ref:`AABB` area **)** + +.. _class_GridMap_area_get_bounds: + +- :ref:`AABB` **area_get_bounds** **(** :ref:`int` area **)** const + +.. _class_GridMap_area_set_exterior_portal: + +- void **area_set_exterior_portal** **(** :ref:`int` area, :ref:`bool` enable **)** + +.. _class_GridMap_area_set_name: + +- void **area_set_name** **(** :ref:`int` area, :ref:`String` name **)** + +.. _class_GridMap_area_get_name: + +- :ref:`String` **area_get_name** **(** :ref:`int` area **)** const + +.. _class_GridMap_area_is_exterior_portal: + +- :ref:`bool` **area_is_exterior_portal** **(** :ref:`int` area **)** const + +.. _class_GridMap_area_set_portal_disable_distance: + +- void **area_set_portal_disable_distance** **(** :ref:`int` area, :ref:`float` distance **)** + +.. _class_GridMap_area_get_portal_disable_distance: + +- :ref:`float` **area_get_portal_disable_distance** **(** :ref:`int` area **)** const + +.. _class_GridMap_area_set_portal_disable_color: + +- void **area_set_portal_disable_color** **(** :ref:`int` area, :ref:`Color` color **)** + +.. _class_GridMap_area_get_portal_disable_color: + +- :ref:`Color` **area_get_portal_disable_color** **(** :ref:`int` area **)** const + +.. _class_GridMap_erase_area: + +- void **erase_area** **(** :ref:`int` area **)** + +.. _class_GridMap_get_unused_area_id: + +- :ref:`int` **get_unused_area_id** **(** **)** const + +.. _class_GridMap_bake_geometry: + +- void **bake_geometry** **(** **)** + +.. _class_GridMap_set_use_baked_light: + +- void **set_use_baked_light** **(** :ref:`bool` use **)** + +.. _class_GridMap_is_using_baked_light: + +- :ref:`bool` **is_using_baked_light** **(** **)** const + +.. _class_GridMap_clear: + +- void **clear** **(** **)** + + diff --git a/classes/class_groovejoint2d.rst b/classes/class_groovejoint2d.rst new file mode 100644 index 000000000..432df2c62 --- /dev/null +++ b/classes/class_groovejoint2d.rst @@ -0,0 +1,62 @@ +.. _class_GrooveJoint2D: + +GrooveJoint2D +============= + +Inherits: :ref:`Joint2D` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Groove constraint for 2D physics. + +Member Functions +---------------- + ++----------------------------+------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_length` **(** :ref:`float` length **)** | ++----------------------------+------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_length` **(** **)** const | ++----------------------------+------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_initial_offset` **(** :ref:`float` offset **)** | ++----------------------------+------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_initial_offset` **(** **)** const | ++----------------------------+------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Groove constraint for 2D physics. This is useful for making a body "slide" through a segment placed in another. + +Member Function Description +--------------------------- + +.. _class_GrooveJoint2D_set_length: + +- void **set_length** **(** :ref:`float` length **)** + +Set the length of the groove. + +.. _class_GrooveJoint2D_get_length: + +- :ref:`float` **get_length** **(** **)** const + +Return the length of the groove. + +.. _class_GrooveJoint2D_set_initial_offset: + +- void **set_initial_offset** **(** :ref:`float` offset **)** + +Set the initial offset of the groove on body A. + +.. _class_GrooveJoint2D_get_initial_offset: + +- :ref:`float` **get_initial_offset** **(** **)** const + +Set the final offset of the groove on body A. + + diff --git a/classes/class_hboxcontainer.rst b/classes/class_hboxcontainer.rst new file mode 100644 index 000000000..3a769c641 --- /dev/null +++ b/classes/class_hboxcontainer.rst @@ -0,0 +1,21 @@ +.. _class_HBoxContainer: + +HBoxContainer +============= + +Inherits: :ref:`BoxContainer` +------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Horizontal box container. + +Description +----------- + +Horizontal box container. See :ref:`BoxContainer`. + diff --git a/classes/class_hbuttonarray.rst b/classes/class_hbuttonarray.rst new file mode 100644 index 000000000..78830897c --- /dev/null +++ b/classes/class_hbuttonarray.rst @@ -0,0 +1,21 @@ +.. _class_HButtonArray: + +HButtonArray +============ + +Inherits: :ref:`ButtonArray` +----------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Horizontal button array. + +Description +----------- + +Horizontal button array. See :ref:`ButtonArray`. + diff --git a/classes/class_hingejoint.rst b/classes/class_hingejoint.rst new file mode 100644 index 000000000..9d737ce0a --- /dev/null +++ b/classes/class_hingejoint.rst @@ -0,0 +1,65 @@ +.. _class_HingeJoint: + +HingeJoint +========== + +Inherits: :ref:`Joint` +----------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_param` **(** :ref:`int` param, :ref:`float` value **)** | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_param` **(** :ref:`int` param **)** const | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_flag` **(** :ref:`int` flag, :ref:`bool` enabled **)** | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_flag` **(** :ref:`int` flag **)** const | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **PARAM_BIAS** = **0** +- **PARAM_LIMIT_UPPER** = **1** +- **PARAM_LIMIT_LOWER** = **2** +- **PARAM_LIMIT_BIAS** = **3** +- **PARAM_LIMIT_SOFTNESS** = **4** +- **PARAM_LIMIT_RELAXATION** = **5** +- **PARAM_MOTOR_TARGET_VELOCITY** = **6** +- **PARAM_MOTOR_MAX_IMPULSE** = **7** +- **PARAM_MAX** = **8** +- **FLAG_USE_LIMIT** = **0** +- **FLAG_ENABLE_MOTOR** = **1** +- **FLAG_MAX** = **2** + +Member Function Description +--------------------------- + +.. _class_HingeJoint_set_param: + +- void **set_param** **(** :ref:`int` param, :ref:`float` value **)** + +.. _class_HingeJoint_get_param: + +- :ref:`float` **get_param** **(** :ref:`int` param **)** const + +.. _class_HingeJoint_set_flag: + +- void **set_flag** **(** :ref:`int` flag, :ref:`bool` enabled **)** + +.. _class_HingeJoint_get_flag: + +- :ref:`bool` **get_flag** **(** :ref:`int` flag **)** const + + diff --git a/classes/class_hscrollbar.rst b/classes/class_hscrollbar.rst new file mode 100644 index 000000000..32257ec6f --- /dev/null +++ b/classes/class_hscrollbar.rst @@ -0,0 +1,21 @@ +.. _class_HScrollBar: + +HScrollBar +========== + +Inherits: :ref:`ScrollBar` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Horizontal scroll bar. + +Description +----------- + +Horizontal scroll bar. See :ref:`ScrollBar`. This one goes from left (min) to right (max). + diff --git a/classes/class_hseparator.rst b/classes/class_hseparator.rst new file mode 100644 index 000000000..a3d756962 --- /dev/null +++ b/classes/class_hseparator.rst @@ -0,0 +1,21 @@ +.. _class_HSeparator: + +HSeparator +========== + +Inherits: :ref:`Separator` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Horizontal separator. + +Description +----------- + +Horizontal separator. See :ref:`Separator`. It is used to separate objects vertiacally, though (but it looks horizontal!). + diff --git a/classes/class_hslider.rst b/classes/class_hslider.rst new file mode 100644 index 000000000..a54f5f0a8 --- /dev/null +++ b/classes/class_hslider.rst @@ -0,0 +1,21 @@ +.. _class_HSlider: + +HSlider +======= + +Inherits: :ref:`Slider` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Horizontal slider. + +Description +----------- + +Horizontal slider. See :ref:`Slider`. This one goes from left (min) to right (max). + diff --git a/classes/class_hsplitcontainer.rst b/classes/class_hsplitcontainer.rst new file mode 100644 index 000000000..17f6a3268 --- /dev/null +++ b/classes/class_hsplitcontainer.rst @@ -0,0 +1,21 @@ +.. _class_HSplitContainer: + +HSplitContainer +=============== + +Inherits: :ref:`SplitContainer` +----------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Horizontal split container. + +Description +----------- + +Horizontal split container. See :ref:`SplitContainer`. This goes from left to right. + diff --git a/classes/class_httpclient.rst b/classes/class_httpclient.rst new file mode 100644 index 000000000..da59c3479 --- /dev/null +++ b/classes/class_httpclient.rst @@ -0,0 +1,271 @@ +.. _class_HTTPClient: + +HTTPClient +========== + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Error | :ref:`connect` **(** :ref:`String` host, :ref:`int` port, :ref:`bool` use_ssl=false, :ref:`bool` verify_host=true **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_connection` **(** :ref:`StreamPeer` connection **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`request` **(** :ref:`int` method, :ref:`String` url, :ref:`StringArray` headers, :ref:`String` body="" **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`send_body_text` **(** :ref:`String` body **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`send_body_data` **(** :ref:`RawArray` body **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`close` **(** **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_response` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_response_chunked` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_response_code` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_response_headers` **(** **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`get_response_headers_as_dictionary` **(** **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_response_body_length` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RawArray` | :ref:`read_response_body_chunk` **(** **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_read_chunk_size` **(** :ref:`int` bytes **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_blocking_mode` **(** :ref:`bool` enabled **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_blocking_mode_enabled` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_status` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Error | :ref:`poll` **(** **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`query_string_from_dict` **(** :ref:`Dictionary` fields **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **METHOD_GET** = **0** +- **METHOD_HEAD** = **1** +- **METHOD_POST** = **2** +- **METHOD_PUT** = **3** +- **METHOD_DELETE** = **4** +- **METHOD_OPTIONS** = **5** +- **METHOD_TRACE** = **6** +- **METHOD_CONNECT** = **7** +- **METHOD_MAX** = **8** +- **STATUS_DISCONNECTED** = **0** +- **STATUS_RESOLVING** = **1** +- **STATUS_CANT_RESOLVE** = **2** +- **STATUS_CONNECTING** = **3** +- **STATUS_CANT_CONNECT** = **4** +- **STATUS_CONNECTED** = **5** +- **STATUS_REQUESTING** = **6** +- **STATUS_BODY** = **7** +- **STATUS_CONNECTION_ERROR** = **8** +- **STATUS_SSL_HANDSHAKE_ERROR** = **9** +- **RESPONSE_CONTINUE** = **100** +- **RESPONSE_SWITCHING_PROTOCOLS** = **101** +- **RESPONSE_PROCESSING** = **102** +- **RESPONSE_OK** = **200** +- **RESPONSE_CREATED** = **201** +- **RESPONSE_ACCEPTED** = **202** +- **RESPONSE_NON_AUTHORITATIVE_INFORMATION** = **203** +- **RESPONSE_NO_CONTENT** = **204** +- **RESPONSE_RESET_CONTENT** = **205** +- **RESPONSE_PARTIAL_CONTENT** = **206** +- **RESPONSE_MULTI_STATUS** = **207** +- **RESPONSE_IM_USED** = **226** +- **RESPONSE_MULTIPLE_CHOICES** = **300** +- **RESPONSE_MOVED_PERMANENTLY** = **301** +- **RESPONSE_FOUND** = **302** +- **RESPONSE_SEE_OTHER** = **303** +- **RESPONSE_NOT_MODIFIED** = **304** +- **RESPONSE_USE_PROXY** = **305** +- **RESPONSE_TEMPORARY_REDIRECT** = **307** +- **RESPONSE_BAD_REQUEST** = **400** +- **RESPONSE_UNAUTHORIZED** = **401** +- **RESPONSE_PAYMENT_REQUIRED** = **402** +- **RESPONSE_FORBIDDEN** = **403** +- **RESPONSE_NOT_FOUND** = **404** +- **RESPONSE_METHOD_NOT_ALLOWED** = **405** +- **RESPONSE_NOT_ACCEPTABLE** = **406** +- **RESPONSE_PROXY_AUTHENTICATION_REQUIRED** = **407** +- **RESPONSE_REQUEST_TIMEOUT** = **408** +- **RESPONSE_CONFLICT** = **409** +- **RESPONSE_GONE** = **410** +- **RESPONSE_LENGTH_REQUIRED** = **411** +- **RESPONSE_PRECONDITION_FAILED** = **412** +- **RESPONSE_REQUEST_ENTITY_TOO_LARGE** = **413** +- **RESPONSE_REQUEST_URI_TOO_LONG** = **414** +- **RESPONSE_UNSUPPORTED_MEDIA_TYPE** = **415** +- **RESPONSE_REQUESTED_RANGE_NOT_SATISFIABLE** = **416** +- **RESPONSE_EXPECTATION_FAILED** = **417** +- **RESPONSE_UNPROCESSABLE_ENTITY** = **422** +- **RESPONSE_LOCKED** = **423** +- **RESPONSE_FAILED_DEPENDENCY** = **424** +- **RESPONSE_UPGRADE_REQUIRED** = **426** +- **RESPONSE_INTERNAL_SERVER_ERROR** = **500** +- **RESPONSE_NOT_IMPLEMENTED** = **501** +- **RESPONSE_BAD_GATEWAY** = **502** +- **RESPONSE_SERVICE_UNAVAILABLE** = **503** +- **RESPONSE_GATEWAY_TIMEOUT** = **504** +- **RESPONSE_HTTP_VERSION_NOT_SUPPORTED** = **505** +- **RESPONSE_INSUFFICIENT_STORAGE** = **507** +- **RESPONSE_NOT_EXTENDED** = **510** + +Member Function Description +--------------------------- + +.. _class_HTTPClient_connect: + +- Error **connect** **(** :ref:`String` host, :ref:`int` port, :ref:`bool` use_ssl=false, :ref:`bool` verify_host=true **)** + +Connect to a host. This needs to be done before any requests are sent. + +The host should not have http:// prepended but will strip the protocol identifier if provided. + + + +verify_host will check the SSL identity of the host if set to true. + +.. _class_HTTPClient_set_connection: + +- void **set_connection** **(** :ref:`StreamPeer` connection **)** + +.. _class_HTTPClient_request: + +- :ref:`int` **request** **(** :ref:`int` method, :ref:`String` url, :ref:`StringArray` headers, :ref:`String` body="" **)** + +Sends a request to the connected host. The url is the what is normally behind the hostname, i.e: + +http://somehost.com/index.php + +url would be "index.php" + + + +Headers are HTTP request headers + + + +To create a POST request with query strings to push to the server, do: + +var fields = {"username" : "user", + + "password" : "pass"} + +var queryString = httpClient.query_string_from_dict(fields) + +var headers = :ref:`"Content-Type: application/x-www-form-urlencoded", + + "Content-Length: " + str(queryString.length())` + +var result = httpClient.request(httpClient.METHOD_POST, "index.php", headers, queryString) + +.. _class_HTTPClient_send_body_text: + +- :ref:`int` **send_body_text** **(** :ref:`String` body **)** + +Stub function + +.. _class_HTTPClient_send_body_data: + +- :ref:`int` **send_body_data** **(** :ref:`RawArray` body **)** + +Stub function + +.. _class_HTTPClient_close: + +- void **close** **(** **)** + +.. _class_HTTPClient_has_response: + +- :ref:`bool` **has_response** **(** **)** const + +.. _class_HTTPClient_is_response_chunked: + +- :ref:`bool` **is_response_chunked** **(** **)** const + +.. _class_HTTPClient_get_response_code: + +- :ref:`int` **get_response_code** **(** **)** const + +.. _class_HTTPClient_get_response_headers: + +- :ref:`StringArray` **get_response_headers** **(** **)** + +.. _class_HTTPClient_get_response_headers_as_dictionary: + +- :ref:`Dictionary` **get_response_headers_as_dictionary** **(** **)** + +.. _class_HTTPClient_get_response_body_length: + +- :ref:`int` **get_response_body_length** **(** **)** const + +.. _class_HTTPClient_read_response_body_chunk: + +- :ref:`RawArray` **read_response_body_chunk** **(** **)** + +.. _class_HTTPClient_set_read_chunk_size: + +- void **set_read_chunk_size** **(** :ref:`int` bytes **)** + +Sets the size of the buffer used and maximum bytes to read per iteration + +.. _class_HTTPClient_set_blocking_mode: + +- void **set_blocking_mode** **(** :ref:`bool` enabled **)** + +If set to true, execute will wait until all data is read from the response. + +.. _class_HTTPClient_is_blocking_mode_enabled: + +- :ref:`bool` **is_blocking_mode_enabled** **(** **)** const + +.. _class_HTTPClient_get_status: + +- :ref:`int` **get_status** **(** **)** const + +Returns a status string like STATUS_REQUESTING. Need to call :ref:`poll` in order to get status updates. + +.. _class_HTTPClient_poll: + +- Error **poll** **(** **)** + +This needs to be called in order to have any request processed. Check results with :ref:`get_status` + +.. _class_HTTPClient_query_string_from_dict: + +- :ref:`String` **query_string_from_dict** **(** :ref:`Dictionary` fields **)** + +Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary. + + + +var fields = {"username": "user", "password": "pass"} + +String queryString = httpClient.query_string_from_dict(fields) + + + +returns:= "username=user&password=pass" + + diff --git a/classes/class_image.rst b/classes/class_image.rst new file mode 100644 index 000000000..3a5c18666 --- /dev/null +++ b/classes/class_image.rst @@ -0,0 +1,174 @@ +.. _class_Image: + +Image +===== + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + +Image datatype. + +Member Functions +---------------- + ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`blit_rect` **(** :ref:`Image` src, :ref:`Rect2` src_rect, :ref:`Vector2` dest=0 **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`brush_transfer` **(** :ref:`Image` src, :ref:`Image` brush, :ref:`Vector2` pos=0 **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Image` | :ref:`brushed` **(** :ref:`Image` src, :ref:`Image` brush, :ref:`Vector2` pos=0 **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Image` | :ref:`compressed` **(** :ref:`int` format=0 **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Image` | :ref:`converted` **(** :ref:`int` format=0 **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Image` | :ref:`decompressed` **(** **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`empty` **(** **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RawArray` | :ref:`get_data` **(** **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_format` **(** **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_height` **(** **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_pixel` **(** :ref:`int` x, :ref:`int` y, :ref:`int` mipmap_level=0 **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Image` | :ref:`get_rect` **(** :ref:`Rect2` area=0 **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`get_used_rect` **(** **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_width` **(** **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`load` **(** :ref:`String` path=0 **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`put_pixel` **(** :ref:`int` x, :ref:`int` y, :ref:`Color` color, :ref:`int` mipmap_level=0 **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Image` | :ref:`resized` **(** :ref:`int` x, :ref:`int` y, :ref:`int` interpolation=1 **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`save_png` **(** :ref:`String` path=0 **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Image` | :ref:`Image` **(** :ref:`int` width, :ref:`int` height, :ref:`bool` mipmaps, :ref:`int` format **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **COMPRESS_BC** = **0** +- **COMPRESS_PVRTC2** = **1** +- **COMPRESS_PVRTC4** = **2** +- **COMPRESS_ETC** = **3** +- **FORMAT_GRAYSCALE** = **0** +- **FORMAT_INTENSITY** = **1** +- **FORMAT_GRAYSCALE_ALPHA** = **2** +- **FORMAT_RGB** = **3** +- **FORMAT_RGBA** = **4** +- **FORMAT_INDEXED** = **5** +- **FORMAT_INDEXED_ALPHA** = **6** +- **FORMAT_YUV_422** = **7** +- **FORMAT_YUV_444** = **8** +- **FORMAT_BC1** = **9** +- **FORMAT_BC2** = **10** +- **FORMAT_BC3** = **11** +- **FORMAT_BC4** = **12** +- **FORMAT_BC5** = **13** +- **FORMAT_PVRTC2** = **14** +- **FORMAT_PVRTC2_ALPHA** = **15** +- **FORMAT_PVRTC4** = **16** +- **FORMAT_PVRTC4_ALPHA** = **17** +- **FORMAT_ETC** = **18** +- **FORMAT_ATC** = **19** +- **FORMAT_ATC_ALPHA_EXPLICIT** = **20** +- **FORMAT_ATC_ALPHA_INTERPOLATED** = **21** +- **FORMAT_CUSTOM** = **22** + +Description +----------- + +Built in native image datatype. Contains image data, which can be converted to a texture, and several functions to interact with it. + +Member Function Description +--------------------------- + +.. _class_Image_blit_rect: + +- void **blit_rect** **(** :ref:`Image` src, :ref:`Rect2` src_rect, :ref:`Vector2` dest=0 **)** + +.. _class_Image_brush_transfer: + +- void **brush_transfer** **(** :ref:`Image` src, :ref:`Image` brush, :ref:`Vector2` pos=0 **)** + +.. _class_Image_brushed: + +- :ref:`Image` **brushed** **(** :ref:`Image` src, :ref:`Image` brush, :ref:`Vector2` pos=0 **)** + +.. _class_Image_compressed: + +- :ref:`Image` **compressed** **(** :ref:`int` format=0 **)** + +.. _class_Image_converted: + +- :ref:`Image` **converted** **(** :ref:`int` format=0 **)** + +.. _class_Image_decompressed: + +- :ref:`Image` **decompressed** **(** **)** + +.. _class_Image_empty: + +- :ref:`bool` **empty** **(** **)** + +.. _class_Image_get_data: + +- :ref:`RawArray` **get_data** **(** **)** + +.. _class_Image_get_format: + +- :ref:`int` **get_format** **(** **)** + +.. _class_Image_get_height: + +- :ref:`int` **get_height** **(** **)** + +.. _class_Image_get_pixel: + +- :ref:`Color` **get_pixel** **(** :ref:`int` x, :ref:`int` y, :ref:`int` mipmap_level=0 **)** + +.. _class_Image_get_rect: + +- :ref:`Image` **get_rect** **(** :ref:`Rect2` area=0 **)** + +.. _class_Image_get_used_rect: + +- :ref:`Rect2` **get_used_rect** **(** **)** + +.. _class_Image_get_width: + +- :ref:`int` **get_width** **(** **)** + +.. _class_Image_load: + +- :ref:`int` **load** **(** :ref:`String` path=0 **)** + +.. _class_Image_put_pixel: + +- void **put_pixel** **(** :ref:`int` x, :ref:`int` y, :ref:`Color` color, :ref:`int` mipmap_level=0 **)** + +.. _class_Image_resized: + +- :ref:`Image` **resized** **(** :ref:`int` x, :ref:`int` y, :ref:`int` interpolation=1 **)** + +.. _class_Image_save_png: + +- :ref:`int` **save_png** **(** :ref:`String` path=0 **)** + +.. _class_Image_Image: + +- :ref:`Image` **Image** **(** :ref:`int` width, :ref:`int` height, :ref:`bool` mipmaps, :ref:`int` format **)** + +Create an empty image of a specific size and format. + + diff --git a/classes/class_imagetexture.rst b/classes/class_imagetexture.rst new file mode 100644 index 000000000..01ae93f18 --- /dev/null +++ b/classes/class_imagetexture.rst @@ -0,0 +1,122 @@ +.. _class_ImageTexture: + +ImageTexture +============ + +Inherits: :ref:`Texture` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`create` **(** :ref:`int` width, :ref:`int` height, :ref:`int` format, :ref:`int` flags=7 **)** | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`create_from_image` **(** :ref:`Image` image, :ref:`int` flags=7 **)** | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_format` **(** **)** const | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`load` **(** :ref:`String` path **)** | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_data` **(** :ref:`Image` image **)** | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Image` | :ref:`get_data` **(** **)** const | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_storage` **(** :ref:`int` mode **)** | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_storage` **(** **)** const | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_lossy_storage_quality` **(** :ref:`float` quality **)** | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_lossy_storage_quality` **(** **)** const | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`fix_alpha_edges` **(** **)** | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`premultiply_alpha` **(** **)** | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`normal_to_xy` **(** **)** | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shrink_x2_and_keep_size` **(** **)** | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_size_override` **(** :ref:`Vector2` size **)** | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **STORAGE_RAW** = **0** +- **STORAGE_COMPRESS_LOSSY** = **1** +- **STORAGE_COMPRESS_LOSSLESS** = **2** + +Member Function Description +--------------------------- + +.. _class_ImageTexture_create: + +- void **create** **(** :ref:`int` width, :ref:`int` height, :ref:`int` format, :ref:`int` flags=7 **)** + +.. _class_ImageTexture_create_from_image: + +- void **create_from_image** **(** :ref:`Image` image, :ref:`int` flags=7 **)** + +.. _class_ImageTexture_get_format: + +- :ref:`int` **get_format** **(** **)** const + +.. _class_ImageTexture_load: + +- void **load** **(** :ref:`String` path **)** + +.. _class_ImageTexture_set_data: + +- void **set_data** **(** :ref:`Image` image **)** + +.. _class_ImageTexture_get_data: + +- :ref:`Image` **get_data** **(** **)** const + +.. _class_ImageTexture_set_storage: + +- void **set_storage** **(** :ref:`int` mode **)** + +.. _class_ImageTexture_get_storage: + +- :ref:`int` **get_storage** **(** **)** const + +.. _class_ImageTexture_set_lossy_storage_quality: + +- void **set_lossy_storage_quality** **(** :ref:`float` quality **)** + +.. _class_ImageTexture_get_lossy_storage_quality: + +- :ref:`float` **get_lossy_storage_quality** **(** **)** const + +.. _class_ImageTexture_fix_alpha_edges: + +- void **fix_alpha_edges** **(** **)** + +.. _class_ImageTexture_premultiply_alpha: + +- void **premultiply_alpha** **(** **)** + +.. _class_ImageTexture_normal_to_xy: + +- void **normal_to_xy** **(** **)** + +.. _class_ImageTexture_shrink_x2_and_keep_size: + +- void **shrink_x2_and_keep_size** **(** **)** + +.. _class_ImageTexture_set_size_override: + +- void **set_size_override** **(** :ref:`Vector2` size **)** + + diff --git a/classes/class_immediategeometry.rst b/classes/class_immediategeometry.rst new file mode 100644 index 000000000..93ad3d425 --- /dev/null +++ b/classes/class_immediategeometry.rst @@ -0,0 +1,85 @@ +.. _class_ImmediateGeometry: + +ImmediateGeometry +================= + +Inherits: :ref:`GeometryInstance` +--------------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`begin` **(** :ref:`int` primitive, :ref:`Texture` texture **)** | ++-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_normal` **(** :ref:`Vector3` normal **)** | ++-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_tangent` **(** :ref:`Plane` tangent **)** | ++-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_color` **(** :ref:`Color` color **)** | ++-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_uv` **(** :ref:`Vector2` uv **)** | ++-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_uv2` **(** :ref:`Vector2` uv **)** | ++-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_vertex` **(** :ref:`Vector3` pos **)** | ++-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_sphere` **(** :ref:`int` lats, :ref:`int` lons, :ref:`float` radius **)** | ++-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`end` **(** **)** | ++-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_ImmediateGeometry_begin: + +- void **begin** **(** :ref:`int` primitive, :ref:`Texture` texture **)** + +.. _class_ImmediateGeometry_set_normal: + +- void **set_normal** **(** :ref:`Vector3` normal **)** + +.. _class_ImmediateGeometry_set_tangent: + +- void **set_tangent** **(** :ref:`Plane` tangent **)** + +.. _class_ImmediateGeometry_set_color: + +- void **set_color** **(** :ref:`Color` color **)** + +.. _class_ImmediateGeometry_set_uv: + +- void **set_uv** **(** :ref:`Vector2` uv **)** + +.. _class_ImmediateGeometry_set_uv2: + +- void **set_uv2** **(** :ref:`Vector2` uv **)** + +.. _class_ImmediateGeometry_add_vertex: + +- void **add_vertex** **(** :ref:`Vector3` pos **)** + +.. _class_ImmediateGeometry_add_sphere: + +- void **add_sphere** **(** :ref:`int` lats, :ref:`int` lons, :ref:`float` radius **)** + +.. _class_ImmediateGeometry_end: + +- void **end** **(** **)** + +.. _class_ImmediateGeometry_clear: + +- void **clear** **(** **)** + + diff --git a/classes/class_input.rst b/classes/class_input.rst new file mode 100644 index 000000000..d2e502f56 --- /dev/null +++ b/classes/class_input.rst @@ -0,0 +1,165 @@ +.. _class_Input: + +Input +===== + +Inherits: :ref:`Object` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_key_pressed` **(** :ref:`int` scancode **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_mouse_button_pressed` **(** :ref:`int` button **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_joy_button_pressed` **(** :ref:`int` device, :ref:`int` button **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action_pressed` **(** :ref:`String` action **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_joy_mapping` **(** :ref:`String` mapping, :ref:`bool` update_existing=false **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_joy_mapping` **(** :ref:`String` guid **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_joy_known` **(** :ref:`int` device **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_joy_axis` **(** :ref:`int` device, :ref:`int` axis **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_joy_name` **(** :ref:`int` device **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_joy_guid` **(** :ref:`int` device **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_accelerometer` **(** **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_mouse_speed` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_mouse_button_mask` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_mouse_mode` **(** :ref:`int` mode **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_mouse_mode` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`warp_mouse_pos` **(** :ref:`Vector2` to **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`action_press` **(** :ref:`String` action **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`action_release` **(** :ref:`String` action **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_custom_mouse_cursor` **(** :ref:`Texture` image, :ref:`Vector2` hotspot=Vector2(0,0) **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **joy_connection_changed** **(** :ref:`int` index, :ref:`bool` connected **)** + +Numeric Constants +----------------- + +- **MOUSE_MODE_VISIBLE** = **0** +- **MOUSE_MODE_HIDDEN** = **1** +- **MOUSE_MODE_CAPTURED** = **2** + +Member Function Description +--------------------------- + +.. _class_Input_is_key_pressed: + +- :ref:`bool` **is_key_pressed** **(** :ref:`int` scancode **)** + +.. _class_Input_is_mouse_button_pressed: + +- :ref:`bool` **is_mouse_button_pressed** **(** :ref:`int` button **)** + +.. _class_Input_is_joy_button_pressed: + +- :ref:`bool` **is_joy_button_pressed** **(** :ref:`int` device, :ref:`int` button **)** + +Returns if the joystick button at the given index is currently pressed. (see JOY_* constans in :ref:`@Global Scope`) + +.. _class_Input_is_action_pressed: + +- :ref:`bool` **is_action_pressed** **(** :ref:`String` action **)** + +.. _class_Input_add_joy_mapping: + +- void **add_joy_mapping** **(** :ref:`String` mapping, :ref:`bool` update_existing=false **)** + +Add a new mapping entry (in SDL2 format) to the mapping database. Optionally update already connected devices. + +.. _class_Input_remove_joy_mapping: + +- void **remove_joy_mapping** **(** :ref:`String` guid **)** + +Removes all mappings from the internal db that match the given uid. + +.. _class_Input_is_joy_known: + +- :ref:`bool` **is_joy_known** **(** :ref:`int` device **)** + +Returns if the specified device is known by the system. This means that it sets all button and axis indices exactly as defined in the JOY_* constants (see :ref:`@Global Scope`). Unknown joysticks are not expected to match these constants, but you can still retrieve events from them. + +.. _class_Input_get_joy_axis: + +- :ref:`float` **get_joy_axis** **(** :ref:`int` device, :ref:`int` axis **)** + +Returns the current value of the joystick axis at given index (see JOY_* constants in :ref:`@Global Scope`) + +.. _class_Input_get_joy_name: + +- :ref:`String` **get_joy_name** **(** :ref:`int` device **)** + +Returns the name of the joystick at the specified device index + +.. _class_Input_get_joy_guid: + +- :ref:`String` **get_joy_guid** **(** :ref:`int` device **)** const + +Returns a SDL2 compatible device guid on platforms that use gamepad remapping. Returns "Default Gamepad" otherwise. + +.. _class_Input_get_accelerometer: + +- :ref:`Vector3` **get_accelerometer** **(** **)** + +.. _class_Input_get_mouse_speed: + +- :ref:`Vector2` **get_mouse_speed** **(** **)** const + +.. _class_Input_get_mouse_button_mask: + +- :ref:`int` **get_mouse_button_mask** **(** **)** const + +.. _class_Input_set_mouse_mode: + +- void **set_mouse_mode** **(** :ref:`int` mode **)** + +.. _class_Input_get_mouse_mode: + +- :ref:`int` **get_mouse_mode** **(** **)** const + +.. _class_Input_warp_mouse_pos: + +- void **warp_mouse_pos** **(** :ref:`Vector2` to **)** + +.. _class_Input_action_press: + +- void **action_press** **(** :ref:`String` action **)** + +.. _class_Input_action_release: + +- void **action_release** **(** :ref:`String` action **)** + +.. _class_Input_set_custom_mouse_cursor: + +- void **set_custom_mouse_cursor** **(** :ref:`Texture` image, :ref:`Vector2` hotspot=Vector2(0,0) **)** + + diff --git a/classes/class_inputdefault.rst b/classes/class_inputdefault.rst new file mode 100644 index 000000000..fa7a9bbf7 --- /dev/null +++ b/classes/class_inputdefault.rst @@ -0,0 +1,16 @@ +.. _class_InputDefault: + +InputDefault +============ + +Inherits: :ref:`Input` +----------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + diff --git a/classes/class_inputevent.rst b/classes/class_inputevent.rst new file mode 100644 index 000000000..e29682dcd --- /dev/null +++ b/classes/class_inputevent.rst @@ -0,0 +1,89 @@ +.. _class_InputEvent: + +InputEvent +========== + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + +Built-in input event data. + +Member Functions +---------------- + ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action` **(** :ref:`String` action **)** | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action_pressed` **(** :ref:`String` is_action_pressed **)** | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action_released` **(** :ref:`String` is_action_released **)** | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_echo` **(** **)** | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_pressed` **(** **)** | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_as_action` **(** :ref:`String` action, :ref:`bool` pressed **)** | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + +Member Variables +---------------- + +- :ref:`int` **type** +- :ref:`int` **device** +- :ref:`int` **ID** + +Numeric Constants +----------------- + +- **NONE** = **0** --- Empty input event. +- **KEY** = **1** --- Key event. +- **MOUSE_MOTION** = **2** --- Mouse motion event. +- **MOUSE_BUTTON** = **3** --- Mouse button event. +- **JOYSTICK_MOTION** = **4** --- Jostick motion event. +- **JOYSTICK_BUTTON** = **5** --- Joystick button event. +- **SCREEN_TOUCH** = **6** +- **SCREEN_DRAG** = **7** +- **ACTION** = **8** + +Description +----------- + +Built-in input event data. InputEvent is a built-in engine datatype, given that it's passed around and used so much. Depending on it's type, the members contained can be different, so read the documentation well!. Input events can also represent actions (editable from the project settings). + +Member Function Description +--------------------------- + +.. _class_InputEvent_is_action: + +- :ref:`bool` **is_action** **(** :ref:`String` action **)** + +Return if this input event matches a pre-defined action, no matter the type. + +.. _class_InputEvent_is_action_pressed: + +- :ref:`bool` **is_action_pressed** **(** :ref:`String` is_action_pressed **)** + +.. _class_InputEvent_is_action_released: + +- :ref:`bool` **is_action_released** **(** :ref:`String` is_action_released **)** + +.. _class_InputEvent_is_echo: + +- :ref:`bool` **is_echo** **(** **)** + +Return if this input event is an echo event (usually for key events). + +.. _class_InputEvent_is_pressed: + +- :ref:`bool` **is_pressed** **(** **)** + +Return if this input event is pressed (for key, mouse, joy button or screen press events). + +.. _class_InputEvent_set_as_action: + +- void **set_as_action** **(** :ref:`String` action, :ref:`bool` pressed **)** + + diff --git a/classes/class_inputeventaction.rst b/classes/class_inputeventaction.rst new file mode 100644 index 000000000..3f2a1e05c --- /dev/null +++ b/classes/class_inputeventaction.rst @@ -0,0 +1,78 @@ +.. _class_InputEventAction: + +InputEventAction +================ + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action` **(** :ref:`String` action **)** | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action_pressed` **(** :ref:`String` is_action_pressed **)** | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action_released` **(** :ref:`String` is_action_released **)** | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_echo` **(** **)** | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_pressed` **(** **)** | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_as_action` **(** :ref:`String` action, :ref:`bool` pressed **)** | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Variables +---------------- + +- :ref:`int` **type** +- :ref:`int` **device** +- :ref:`int` **ID** + +Numeric Constants +----------------- + +- **NONE** = **0** +- **KEY** = **1** +- **MOUSE_MOTION** = **2** +- **MOUSE_BUTTON** = **3** +- **JOYSTICK_MOTION** = **4** +- **JOYSTICK_BUTTON** = **5** +- **SCREEN_TOUCH** = **6** +- **SCREEN_DRAG** = **7** +- **ACTION** = **8** + +Member Function Description +--------------------------- + +.. _class_InputEventAction_is_action: + +- :ref:`bool` **is_action** **(** :ref:`String` action **)** + +.. _class_InputEventAction_is_action_pressed: + +- :ref:`bool` **is_action_pressed** **(** :ref:`String` is_action_pressed **)** + +.. _class_InputEventAction_is_action_released: + +- :ref:`bool` **is_action_released** **(** :ref:`String` is_action_released **)** + +.. _class_InputEventAction_is_echo: + +- :ref:`bool` **is_echo** **(** **)** + +.. _class_InputEventAction_is_pressed: + +- :ref:`bool` **is_pressed** **(** **)** + +.. _class_InputEventAction_set_as_action: + +- void **set_as_action** **(** :ref:`String` action, :ref:`bool` pressed **)** + + diff --git a/classes/class_inputeventjoybutton.rst b/classes/class_inputeventjoybutton.rst new file mode 100644 index 000000000..be6f62cb4 --- /dev/null +++ b/classes/class_inputeventjoybutton.rst @@ -0,0 +1,81 @@ +.. _class_InputEventJoyButton: + +InputEventJoyButton +=================== + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action` **(** :ref:`String` action **)** | ++--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action_pressed` **(** :ref:`String` is_action_pressed **)** | ++--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action_released` **(** :ref:`String` is_action_released **)** | ++--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_echo` **(** **)** | ++--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_pressed` **(** **)** | ++--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_as_action` **(** :ref:`String` action, :ref:`bool` pressed **)** | ++--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Variables +---------------- + +- :ref:`int` **type** +- :ref:`int` **device** +- :ref:`int` **ID** +- :ref:`int` **button_index** +- :ref:`bool` **pressed** +- :ref:`float` **pressure** + +Numeric Constants +----------------- + +- **NONE** = **0** +- **KEY** = **1** +- **MOUSE_MOTION** = **2** +- **MOUSE_BUTTON** = **3** +- **JOYSTICK_MOTION** = **4** +- **JOYSTICK_BUTTON** = **5** +- **SCREEN_TOUCH** = **6** +- **SCREEN_DRAG** = **7** +- **ACTION** = **8** + +Member Function Description +--------------------------- + +.. _class_InputEventJoyButton_is_action: + +- :ref:`bool` **is_action** **(** :ref:`String` action **)** + +.. _class_InputEventJoyButton_is_action_pressed: + +- :ref:`bool` **is_action_pressed** **(** :ref:`String` is_action_pressed **)** + +.. _class_InputEventJoyButton_is_action_released: + +- :ref:`bool` **is_action_released** **(** :ref:`String` is_action_released **)** + +.. _class_InputEventJoyButton_is_echo: + +- :ref:`bool` **is_echo** **(** **)** + +.. _class_InputEventJoyButton_is_pressed: + +- :ref:`bool` **is_pressed** **(** **)** + +.. _class_InputEventJoyButton_set_as_action: + +- void **set_as_action** **(** :ref:`String` action, :ref:`bool` pressed **)** + + diff --git a/classes/class_inputeventjoymotion.rst b/classes/class_inputeventjoymotion.rst new file mode 100644 index 000000000..8308fb194 --- /dev/null +++ b/classes/class_inputeventjoymotion.rst @@ -0,0 +1,80 @@ +.. _class_InputEventJoyMotion: + +InputEventJoyMotion +=================== + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action` **(** :ref:`String` action **)** | ++--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action_pressed` **(** :ref:`String` is_action_pressed **)** | ++--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action_released` **(** :ref:`String` is_action_released **)** | ++--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_echo` **(** **)** | ++--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_pressed` **(** **)** | ++--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_as_action` **(** :ref:`String` action, :ref:`bool` pressed **)** | ++--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Variables +---------------- + +- :ref:`int` **type** +- :ref:`int` **device** +- :ref:`int` **ID** +- :ref:`int` **axis** +- :ref:`float` **value** + +Numeric Constants +----------------- + +- **NONE** = **0** +- **KEY** = **1** +- **MOUSE_MOTION** = **2** +- **MOUSE_BUTTON** = **3** +- **JOYSTICK_MOTION** = **4** +- **JOYSTICK_BUTTON** = **5** +- **SCREEN_TOUCH** = **6** +- **SCREEN_DRAG** = **7** +- **ACTION** = **8** + +Member Function Description +--------------------------- + +.. _class_InputEventJoyMotion_is_action: + +- :ref:`bool` **is_action** **(** :ref:`String` action **)** + +.. _class_InputEventJoyMotion_is_action_pressed: + +- :ref:`bool` **is_action_pressed** **(** :ref:`String` is_action_pressed **)** + +.. _class_InputEventJoyMotion_is_action_released: + +- :ref:`bool` **is_action_released** **(** :ref:`String` is_action_released **)** + +.. _class_InputEventJoyMotion_is_echo: + +- :ref:`bool` **is_echo** **(** **)** + +.. _class_InputEventJoyMotion_is_pressed: + +- :ref:`bool` **is_pressed** **(** **)** + +.. _class_InputEventJoyMotion_set_as_action: + +- void **set_as_action** **(** :ref:`String` action, :ref:`bool` pressed **)** + + diff --git a/classes/class_inputeventkey.rst b/classes/class_inputeventkey.rst new file mode 100644 index 000000000..8c5946c45 --- /dev/null +++ b/classes/class_inputeventkey.rst @@ -0,0 +1,86 @@ +.. _class_InputEventKey: + +InputEventKey +============= + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action` **(** :ref:`String` action **)** | ++--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action_pressed` **(** :ref:`String` is_action_pressed **)** | ++--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action_released` **(** :ref:`String` is_action_released **)** | ++--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_echo` **(** **)** | ++--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_pressed` **(** **)** | ++--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_as_action` **(** :ref:`String` action, :ref:`bool` pressed **)** | ++--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Variables +---------------- + +- :ref:`int` **type** +- :ref:`int` **device** +- :ref:`int` **ID** +- :ref:`bool` **shift** +- :ref:`bool` **alt** +- :ref:`bool` **control** +- :ref:`bool` **meta** +- :ref:`bool` **pressed** +- :ref:`bool` **echo** +- :ref:`int` **scancode** +- :ref:`int` **unicode** + +Numeric Constants +----------------- + +- **NONE** = **0** +- **KEY** = **1** +- **MOUSE_MOTION** = **2** +- **MOUSE_BUTTON** = **3** +- **JOYSTICK_MOTION** = **4** +- **JOYSTICK_BUTTON** = **5** +- **SCREEN_TOUCH** = **6** +- **SCREEN_DRAG** = **7** +- **ACTION** = **8** + +Member Function Description +--------------------------- + +.. _class_InputEventKey_is_action: + +- :ref:`bool` **is_action** **(** :ref:`String` action **)** + +.. _class_InputEventKey_is_action_pressed: + +- :ref:`bool` **is_action_pressed** **(** :ref:`String` is_action_pressed **)** + +.. _class_InputEventKey_is_action_released: + +- :ref:`bool` **is_action_released** **(** :ref:`String` is_action_released **)** + +.. _class_InputEventKey_is_echo: + +- :ref:`bool` **is_echo** **(** **)** + +.. _class_InputEventKey_is_pressed: + +- :ref:`bool` **is_pressed** **(** **)** + +.. _class_InputEventKey_set_as_action: + +- void **set_as_action** **(** :ref:`String` action, :ref:`bool` pressed **)** + + diff --git a/classes/class_inputeventmousebutton.rst b/classes/class_inputeventmousebutton.rst new file mode 100644 index 000000000..e72e169f6 --- /dev/null +++ b/classes/class_inputeventmousebutton.rst @@ -0,0 +1,92 @@ +.. _class_InputEventMouseButton: + +InputEventMouseButton +===================== + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action` **(** :ref:`String` action **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action_pressed` **(** :ref:`String` is_action_pressed **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action_released` **(** :ref:`String` is_action_released **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_echo` **(** **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_pressed` **(** **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_as_action` **(** :ref:`String` action, :ref:`bool` pressed **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Variables +---------------- + +- :ref:`int` **type** +- :ref:`int` **device** +- :ref:`int` **ID** +- :ref:`bool` **shift** +- :ref:`bool` **alt** +- :ref:`bool` **control** +- :ref:`bool` **meta** +- :ref:`int` **button_mask** +- :ref:`int` **x** +- :ref:`int` **y** +- :ref:`Vector2` **pos** +- :ref:`int` **global_x** +- :ref:`int` **global_y** +- :ref:`Vector2` **global_pos** +- :ref:`int` **button_index** +- :ref:`bool` **pressed** +- :ref:`bool` **doubleclick** + +Numeric Constants +----------------- + +- **NONE** = **0** +- **KEY** = **1** +- **MOUSE_MOTION** = **2** +- **MOUSE_BUTTON** = **3** +- **JOYSTICK_MOTION** = **4** +- **JOYSTICK_BUTTON** = **5** +- **SCREEN_TOUCH** = **6** +- **SCREEN_DRAG** = **7** +- **ACTION** = **8** + +Member Function Description +--------------------------- + +.. _class_InputEventMouseButton_is_action: + +- :ref:`bool` **is_action** **(** :ref:`String` action **)** + +.. _class_InputEventMouseButton_is_action_pressed: + +- :ref:`bool` **is_action_pressed** **(** :ref:`String` is_action_pressed **)** + +.. _class_InputEventMouseButton_is_action_released: + +- :ref:`bool` **is_action_released** **(** :ref:`String` is_action_released **)** + +.. _class_InputEventMouseButton_is_echo: + +- :ref:`bool` **is_echo** **(** **)** + +.. _class_InputEventMouseButton_is_pressed: + +- :ref:`bool` **is_pressed** **(** **)** + +.. _class_InputEventMouseButton_set_as_action: + +- void **set_as_action** **(** :ref:`String` action, :ref:`bool` pressed **)** + + diff --git a/classes/class_inputeventmousemotion.rst b/classes/class_inputeventmousemotion.rst new file mode 100644 index 000000000..d95d5ccd1 --- /dev/null +++ b/classes/class_inputeventmousemotion.rst @@ -0,0 +1,95 @@ +.. _class_InputEventMouseMotion: + +InputEventMouseMotion +===================== + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action` **(** :ref:`String` action **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action_pressed` **(** :ref:`String` is_action_pressed **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action_released` **(** :ref:`String` is_action_released **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_echo` **(** **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_pressed` **(** **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_as_action` **(** :ref:`String` action, :ref:`bool` pressed **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Variables +---------------- + +- :ref:`int` **type** +- :ref:`int` **device** +- :ref:`int` **ID** +- :ref:`bool` **shift** +- :ref:`bool` **alt** +- :ref:`bool` **control** +- :ref:`bool` **meta** +- :ref:`int` **button_mask** +- :ref:`int` **x** +- :ref:`int` **y** +- :ref:`Vector2` **pos** +- :ref:`int` **global_x** +- :ref:`int` **global_y** +- :ref:`Vector2` **global_pos** +- :ref:`int` **relative_x** +- :ref:`int` **relative_y** +- :ref:`Vector2` **relative_pos** +- :ref:`float` **speed_x** +- :ref:`float` **speed_y** +- :ref:`Vector2` **speed** + +Numeric Constants +----------------- + +- **NONE** = **0** +- **KEY** = **1** +- **MOUSE_MOTION** = **2** +- **MOUSE_BUTTON** = **3** +- **JOYSTICK_MOTION** = **4** +- **JOYSTICK_BUTTON** = **5** +- **SCREEN_TOUCH** = **6** +- **SCREEN_DRAG** = **7** +- **ACTION** = **8** + +Member Function Description +--------------------------- + +.. _class_InputEventMouseMotion_is_action: + +- :ref:`bool` **is_action** **(** :ref:`String` action **)** + +.. _class_InputEventMouseMotion_is_action_pressed: + +- :ref:`bool` **is_action_pressed** **(** :ref:`String` is_action_pressed **)** + +.. _class_InputEventMouseMotion_is_action_released: + +- :ref:`bool` **is_action_released** **(** :ref:`String` is_action_released **)** + +.. _class_InputEventMouseMotion_is_echo: + +- :ref:`bool` **is_echo** **(** **)** + +.. _class_InputEventMouseMotion_is_pressed: + +- :ref:`bool` **is_pressed** **(** **)** + +.. _class_InputEventMouseMotion_set_as_action: + +- void **set_as_action** **(** :ref:`String` action, :ref:`bool` pressed **)** + + diff --git a/classes/class_inputeventscreendrag.rst b/classes/class_inputeventscreendrag.rst new file mode 100644 index 000000000..c6b67d200 --- /dev/null +++ b/classes/class_inputeventscreendrag.rst @@ -0,0 +1,88 @@ +.. _class_InputEventScreenDrag: + +InputEventScreenDrag +==================== + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action` **(** :ref:`String` action **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action_pressed` **(** :ref:`String` is_action_pressed **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action_released` **(** :ref:`String` is_action_released **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_echo` **(** **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_pressed` **(** **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_as_action` **(** :ref:`String` action, :ref:`bool` pressed **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Variables +---------------- + +- :ref:`int` **type** +- :ref:`int` **device** +- :ref:`int` **ID** +- :ref:`int` **index** +- :ref:`float` **x** +- :ref:`float` **y** +- :ref:`Vector2` **pos** +- :ref:`float` **relative_x** +- :ref:`float` **relative_y** +- :ref:`Vector2` **relative_pos** +- :ref:`float` **speed_x** +- :ref:`float` **speed_y** +- :ref:`Vector2` **speed** + +Numeric Constants +----------------- + +- **NONE** = **0** +- **KEY** = **1** +- **MOUSE_MOTION** = **2** +- **MOUSE_BUTTON** = **3** +- **JOYSTICK_MOTION** = **4** +- **JOYSTICK_BUTTON** = **5** +- **SCREEN_TOUCH** = **6** +- **SCREEN_DRAG** = **7** +- **ACTION** = **8** + +Member Function Description +--------------------------- + +.. _class_InputEventScreenDrag_is_action: + +- :ref:`bool` **is_action** **(** :ref:`String` action **)** + +.. _class_InputEventScreenDrag_is_action_pressed: + +- :ref:`bool` **is_action_pressed** **(** :ref:`String` is_action_pressed **)** + +.. _class_InputEventScreenDrag_is_action_released: + +- :ref:`bool` **is_action_released** **(** :ref:`String` is_action_released **)** + +.. _class_InputEventScreenDrag_is_echo: + +- :ref:`bool` **is_echo** **(** **)** + +.. _class_InputEventScreenDrag_is_pressed: + +- :ref:`bool` **is_pressed** **(** **)** + +.. _class_InputEventScreenDrag_set_as_action: + +- void **set_as_action** **(** :ref:`String` action, :ref:`bool` pressed **)** + + diff --git a/classes/class_inputeventscreentouch.rst b/classes/class_inputeventscreentouch.rst new file mode 100644 index 000000000..bc9d05dd5 --- /dev/null +++ b/classes/class_inputeventscreentouch.rst @@ -0,0 +1,83 @@ +.. _class_InputEventScreenTouch: + +InputEventScreenTouch +===================== + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action` **(** :ref:`String` action **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action_pressed` **(** :ref:`String` is_action_pressed **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action_released` **(** :ref:`String` is_action_released **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_echo` **(** **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_pressed` **(** **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_as_action` **(** :ref:`String` action, :ref:`bool` pressed **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Variables +---------------- + +- :ref:`int` **type** +- :ref:`int` **device** +- :ref:`int` **ID** +- :ref:`int` **index** +- :ref:`float` **x** +- :ref:`float` **y** +- :ref:`Vector2` **pos** +- :ref:`bool` **pressed** + +Numeric Constants +----------------- + +- **NONE** = **0** +- **KEY** = **1** +- **MOUSE_MOTION** = **2** +- **MOUSE_BUTTON** = **3** +- **JOYSTICK_MOTION** = **4** +- **JOYSTICK_BUTTON** = **5** +- **SCREEN_TOUCH** = **6** +- **SCREEN_DRAG** = **7** +- **ACTION** = **8** + +Member Function Description +--------------------------- + +.. _class_InputEventScreenTouch_is_action: + +- :ref:`bool` **is_action** **(** :ref:`String` action **)** + +.. _class_InputEventScreenTouch_is_action_pressed: + +- :ref:`bool` **is_action_pressed** **(** :ref:`String` is_action_pressed **)** + +.. _class_InputEventScreenTouch_is_action_released: + +- :ref:`bool` **is_action_released** **(** :ref:`String` is_action_released **)** + +.. _class_InputEventScreenTouch_is_echo: + +- :ref:`bool` **is_echo** **(** **)** + +.. _class_InputEventScreenTouch_is_pressed: + +- :ref:`bool` **is_pressed** **(** **)** + +.. _class_InputEventScreenTouch_set_as_action: + +- void **set_as_action** **(** :ref:`String` action, :ref:`bool` pressed **)** + + diff --git a/classes/class_inputmap.rst b/classes/class_inputmap.rst new file mode 100644 index 000000000..5690bca5c --- /dev/null +++ b/classes/class_inputmap.rst @@ -0,0 +1,96 @@ +.. _class_InputMap: + +InputMap +======== + +Inherits: :ref:`Object` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Singleton that manages actions. + +Member Functions +---------------- + ++------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_action` **(** :ref:`String` action **)** const | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_action_id` **(** :ref:`String` action **)** const | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_action_from_id` **(** :ref:`int` id **)** const | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_action` **(** :ref:`String` action **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`erase_action` **(** :ref:`String` action **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`action_add_event` **(** :ref:`String` action, :ref:`InputEvent` event **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`action_has_event` **(** :ref:`String` action, :ref:`InputEvent` event **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`action_erase_event` **(** :ref:`String` action, :ref:`InputEvent` event **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_action_list` **(** :ref:`String` action **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`event_is_action` **(** :ref:`InputEvent` event, :ref:`String` action **)** const | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`load_from_globals` **(** **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Singleton that manages actions. InputMap has a list of the actions used in InputEvent, which can be modified. + +Member Function Description +--------------------------- + +.. _class_InputMap_has_action: + +- :ref:`bool` **has_action** **(** :ref:`String` action **)** const + +.. _class_InputMap_get_action_id: + +- :ref:`int` **get_action_id** **(** :ref:`String` action **)** const + +.. _class_InputMap_get_action_from_id: + +- :ref:`String` **get_action_from_id** **(** :ref:`int` id **)** const + +.. _class_InputMap_add_action: + +- void **add_action** **(** :ref:`String` action **)** + +.. _class_InputMap_erase_action: + +- void **erase_action** **(** :ref:`String` action **)** + +.. _class_InputMap_action_add_event: + +- void **action_add_event** **(** :ref:`String` action, :ref:`InputEvent` event **)** + +.. _class_InputMap_action_has_event: + +- :ref:`bool` **action_has_event** **(** :ref:`String` action, :ref:`InputEvent` event **)** + +.. _class_InputMap_action_erase_event: + +- void **action_erase_event** **(** :ref:`String` action, :ref:`InputEvent` event **)** + +.. _class_InputMap_get_action_list: + +- :ref:`Array` **get_action_list** **(** :ref:`String` action **)** + +.. _class_InputMap_event_is_action: + +- :ref:`bool` **event_is_action** **(** :ref:`InputEvent` event, :ref:`String` action **)** const + +.. _class_InputMap_load_from_globals: + +- void **load_from_globals** **(** **)** + + diff --git a/classes/class_instanceplaceholder.rst b/classes/class_instanceplaceholder.rst new file mode 100644 index 000000000..e8a732fc3 --- /dev/null +++ b/classes/class_instanceplaceholder.rst @@ -0,0 +1,37 @@ +.. _class_InstancePlaceholder: + +InstancePlaceholder +=================== + +Inherits: :ref:`Node` +--------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`replace_by_instance` **(** :ref:`PackedScene` custom_scene=NULL **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_instance_path` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_InstancePlaceholder_replace_by_instance: + +- void **replace_by_instance** **(** :ref:`PackedScene` custom_scene=NULL **)** + +.. _class_InstancePlaceholder_get_instance_path: + +- :ref:`String` **get_instance_path** **(** **)** const + + diff --git a/classes/class_int.rst b/classes/class_int.rst new file mode 100644 index 000000000..0ce147770 --- /dev/null +++ b/classes/class_int.rst @@ -0,0 +1,45 @@ +.. _class_int: + +int +=== + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + +Integer built-in type. + +Member Functions +---------------- + ++------------------------+--------------------------------------------------------------------------+ +| :ref:`int` | :ref:`int` **(** :ref:`bool` from **)** | ++------------------------+--------------------------------------------------------------------------+ +| :ref:`int` | :ref:`int` **(** :ref:`float` from **)** | ++------------------------+--------------------------------------------------------------------------+ +| :ref:`int` | :ref:`int` **(** :ref:`String` from **)** | ++------------------------+--------------------------------------------------------------------------+ + +Description +----------- + +Integer built-in type. + +Member Function Description +--------------------------- + +.. _class_int_int: + +- :ref:`int` **int** **(** :ref:`bool` from **)** + +.. _class_int_int: + +- :ref:`int` **int** **(** :ref:`float` from **)** + +.. _class_int_int: + +- :ref:`int` **int** **(** :ref:`String` from **)** + + diff --git a/classes/class_intarray.rst b/classes/class_intarray.rst new file mode 100644 index 000000000..a2a84293b --- /dev/null +++ b/classes/class_intarray.rst @@ -0,0 +1,67 @@ +.. _class_IntArray: + +IntArray +======== + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + +Integer Array. + +Member Functions +---------------- + ++----------------------------------+-------------------------------------------------------------------------------------------------------+ +| void | :ref:`push_back` **(** :ref:`int` integer **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------+ +| void | :ref:`resize` **(** :ref:`int` idx **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------+ +| void | :ref:`set` **(** :ref:`int` idx, :ref:`int` integer **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`size` **(** **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------+ +| :ref:`IntArray` | :ref:`IntArray` **(** :ref:`Array` from **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Integer Array. Array of integers. Can only contain integers. Optimized for memory usage, can't fragment the memory. + +Member Function Description +--------------------------- + +.. _class_IntArray_push_back: + +- void **push_back** **(** :ref:`int` integer **)** + +Append a value to the array. + +.. _class_IntArray_resize: + +- void **resize** **(** :ref:`int` idx **)** + +Resize the array. + +.. _class_IntArray_set: + +- void **set** **(** :ref:`int` idx, :ref:`int` integer **)** + +Set an index in the array. + +.. _class_IntArray_size: + +- :ref:`int` **size** **(** **)** + +Return the array size. + +.. _class_IntArray_IntArray: + +- :ref:`IntArray` **IntArray** **(** :ref:`Array` from **)** + +Create from a generic array. + + diff --git a/classes/class_interpolatedcamera.rst b/classes/class_interpolatedcamera.rst new file mode 100644 index 000000000..90b392a62 --- /dev/null +++ b/classes/class_interpolatedcamera.rst @@ -0,0 +1,67 @@ +.. _class_InterpolatedCamera: + +InterpolatedCamera +================== + +Inherits: :ref:`Camera` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_target_path` **(** :ref:`NodePath` target_path **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`NodePath` | :ref:`get_target_path` **(** **)** const | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_target` **(** :ref:`Camera` target **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_speed` **(** :ref:`float` speed **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_speed` **(** **)** const | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_interpolation_enabled` **(** :ref:`bool` target_path **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_interpolation_enabled` **(** **)** const | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_InterpolatedCamera_set_target_path: + +- void **set_target_path** **(** :ref:`NodePath` target_path **)** + +.. _class_InterpolatedCamera_get_target_path: + +- :ref:`NodePath` **get_target_path** **(** **)** const + +.. _class_InterpolatedCamera_set_target: + +- void **set_target** **(** :ref:`Camera` target **)** + +.. _class_InterpolatedCamera_set_speed: + +- void **set_speed** **(** :ref:`float` speed **)** + +.. _class_InterpolatedCamera_get_speed: + +- :ref:`float` **get_speed** **(** **)** const + +.. _class_InterpolatedCamera_set_interpolation_enabled: + +- void **set_interpolation_enabled** **(** :ref:`bool` target_path **)** + +.. _class_InterpolatedCamera_is_interpolation_enabled: + +- :ref:`bool` **is_interpolation_enabled** **(** **)** const + + diff --git a/classes/class_ip.rst b/classes/class_ip.rst new file mode 100644 index 000000000..339269209 --- /dev/null +++ b/classes/class_ip.rst @@ -0,0 +1,86 @@ +.. _class_IP: + +IP +== + +Inherits: :ref:`Object` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +IP Protocol support functions. + +Member Functions +---------------- + ++------------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`resolve_hostname` **(** :ref:`String` host **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`resolve_hostname_queue_item` **(** :ref:`String` host **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_resolve_item_status` **(** :ref:`int` id **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_resolve_item_address` **(** :ref:`int` id **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`erase_resolve_item` **(** :ref:`int` id **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_local_addresses` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **RESOLVER_STATUS_NONE** = **0** +- **RESOLVER_STATUS_WAITING** = **1** +- **RESOLVER_STATUS_DONE** = **2** +- **RESOLVER_STATUS_ERROR** = **3** +- **RESOLVER_MAX_QUERIES** = **32** +- **RESOLVER_INVALID_ID** = **-1** + +Description +----------- + +IP contains some support functions for the IPv4 protocol. TCP/IP support is in different classes (see :ref:`TCP_Client`, :ref:`TCP_Server`). IP provides hostname resolution support, both blocking and threaded. + +Member Function Description +--------------------------- + +.. _class_IP_resolve_hostname: + +- :ref:`String` **resolve_hostname** **(** :ref:`String` host **)** + +Resolve a given hostname, blocking. Resolved hostname is returned as an IP. + +.. _class_IP_resolve_hostname_queue_item: + +- :ref:`int` **resolve_hostname_queue_item** **(** :ref:`String` host **)** + +Create a queue item for resolving a given hostname. The queue ID is returned, or RESOLVER_INVALID_ID on error. + +.. _class_IP_get_resolve_item_status: + +- :ref:`int` **get_resolve_item_status** **(** :ref:`int` id **)** const + +Return the status of hostname queued for resolving, given it's queue ID. Returned status can be any of the RESOLVER_STATUS_* enumeration. + +.. _class_IP_get_resolve_item_address: + +- :ref:`String` **get_resolve_item_address** **(** :ref:`int` id **)** const + +Return a resolved item address, or an empty string if an error happened or resolution didn't happen yet (see :ref:`get_resolve_item_status`). + +.. _class_IP_erase_resolve_item: + +- void **erase_resolve_item** **(** :ref:`int` id **)** + +Erase a queue ID, removing it from the queue if needed. This should be used after a queue is completed to free it and enable more queries to happen. + +.. _class_IP_get_local_addresses: + +- :ref:`Array` **get_local_addresses** **(** **)** const + + diff --git a/classes/class_ip_unix.rst b/classes/class_ip_unix.rst new file mode 100644 index 000000000..0d0c107aa --- /dev/null +++ b/classes/class_ip_unix.rst @@ -0,0 +1,16 @@ +.. _class_IP_Unix: + +IP_Unix +======= + +Inherits: :ref:`IP` +----------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + diff --git a/classes/class_itemlist.rst b/classes/class_itemlist.rst new file mode 100644 index 000000000..4084ad8e5 --- /dev/null +++ b/classes/class_itemlist.rst @@ -0,0 +1,256 @@ +.. _class_ItemList: + +ItemList +======== + +Inherits: :ref:`Control` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_item` **(** :ref:`String` text, :ref:`Texture` icon=Object(), :ref:`bool` selectable=true **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_icon_item` **(** :ref:`Texture` icon, :ref:`bool` selectable=true **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_text` **(** :ref:`int` idx, :ref:`String` text **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_item_text` **(** :ref:`int` idx **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_icon` **(** :ref:`int` idx, :ref:`Texture` icon **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_item_icon` **(** :ref:`int` idx **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_selectable` **(** :ref:`int` idx, :ref:`bool` selectable **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_item_selectable` **(** :ref:`int` idx **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_disabled` **(** :ref:`int` idx, :ref:`bool` disabled **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_item_disabled` **(** :ref:`int` idx **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_metadata` **(** :ref:`int` idx, var metadata **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`get_item_metadata` **(** :ref:`int` idx **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_custom_bg_color` **(** :ref:`int` idx, :ref:`Color` custom_bg_color **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_item_custom_bg_color` **(** :ref:`int` idx **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_tooltip` **(** :ref:`int` idx, :ref:`String` tooltip **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_item_tooltip` **(** :ref:`int` idx **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`select` **(** :ref:`int` idx, :ref:`bool` single=true **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`unselect` **(** :ref:`int` idx **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_selected` **(** :ref:`int` idx **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_item_count` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_item` **(** :ref:`int` idx **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`sort_items_by_text` **(** **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_fixed_column_width` **(** :ref:`int` width **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_fixed_column_width` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_max_text_lines` **(** :ref:`int` lines **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_max_text_lines` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_max_columns` **(** :ref:`int` amount **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_max_columns` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_select_mode` **(** :ref:`int` mode **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_select_mode` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_icon_mode` **(** :ref:`int` mode **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_icon_mode` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_min_icon_size` **(** :ref:`Vector2` size **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_min_icon_size` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`ensure_current_is_visible` **(** **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **item_activated** **(** :ref:`int` index **)** +- **multi_selected** **(** :ref:`int` index, :ref:`bool` selected **)** +- **item_selected** **(** :ref:`int` index **)** + +Numeric Constants +----------------- + +- **ICON_MODE_TOP** = **0** +- **ICON_MODE_LEFT** = **1** +- **SELECT_SINGLE** = **0** +- **SELECT_MULTI** = **1** + +Member Function Description +--------------------------- + +.. _class_ItemList_add_item: + +- void **add_item** **(** :ref:`String` text, :ref:`Texture` icon=Object(), :ref:`bool` selectable=true **)** + +.. _class_ItemList_add_icon_item: + +- void **add_icon_item** **(** :ref:`Texture` icon, :ref:`bool` selectable=true **)** + +.. _class_ItemList_set_item_text: + +- void **set_item_text** **(** :ref:`int` idx, :ref:`String` text **)** + +.. _class_ItemList_get_item_text: + +- :ref:`String` **get_item_text** **(** :ref:`int` idx **)** const + +.. _class_ItemList_set_item_icon: + +- void **set_item_icon** **(** :ref:`int` idx, :ref:`Texture` icon **)** + +.. _class_ItemList_get_item_icon: + +- :ref:`Texture` **get_item_icon** **(** :ref:`int` idx **)** const + +.. _class_ItemList_set_item_selectable: + +- void **set_item_selectable** **(** :ref:`int` idx, :ref:`bool` selectable **)** + +.. _class_ItemList_is_item_selectable: + +- :ref:`bool` **is_item_selectable** **(** :ref:`int` idx **)** const + +.. _class_ItemList_set_item_disabled: + +- void **set_item_disabled** **(** :ref:`int` idx, :ref:`bool` disabled **)** + +.. _class_ItemList_is_item_disabled: + +- :ref:`bool` **is_item_disabled** **(** :ref:`int` idx **)** const + +.. _class_ItemList_set_item_metadata: + +- void **set_item_metadata** **(** :ref:`int` idx, var metadata **)** + +.. _class_ItemList_get_item_metadata: + +- void **get_item_metadata** **(** :ref:`int` idx **)** const + +.. _class_ItemList_set_item_custom_bg_color: + +- void **set_item_custom_bg_color** **(** :ref:`int` idx, :ref:`Color` custom_bg_color **)** + +.. _class_ItemList_get_item_custom_bg_color: + +- :ref:`Color` **get_item_custom_bg_color** **(** :ref:`int` idx **)** const + +.. _class_ItemList_set_item_tooltip: + +- void **set_item_tooltip** **(** :ref:`int` idx, :ref:`String` tooltip **)** + +.. _class_ItemList_get_item_tooltip: + +- :ref:`String` **get_item_tooltip** **(** :ref:`int` idx **)** const + +.. _class_ItemList_select: + +- void **select** **(** :ref:`int` idx, :ref:`bool` single=true **)** + +.. _class_ItemList_unselect: + +- void **unselect** **(** :ref:`int` idx **)** + +.. _class_ItemList_is_selected: + +- :ref:`bool` **is_selected** **(** :ref:`int` idx **)** const + +.. _class_ItemList_get_item_count: + +- :ref:`int` **get_item_count** **(** **)** const + +.. _class_ItemList_remove_item: + +- void **remove_item** **(** :ref:`int` idx **)** + +.. _class_ItemList_clear: + +- void **clear** **(** **)** + +.. _class_ItemList_sort_items_by_text: + +- void **sort_items_by_text** **(** **)** + +.. _class_ItemList_set_fixed_column_width: + +- void **set_fixed_column_width** **(** :ref:`int` width **)** + +.. _class_ItemList_get_fixed_column_width: + +- :ref:`int` **get_fixed_column_width** **(** **)** const + +.. _class_ItemList_set_max_text_lines: + +- void **set_max_text_lines** **(** :ref:`int` lines **)** + +.. _class_ItemList_get_max_text_lines: + +- :ref:`int` **get_max_text_lines** **(** **)** const + +.. _class_ItemList_set_max_columns: + +- void **set_max_columns** **(** :ref:`int` amount **)** + +.. _class_ItemList_get_max_columns: + +- :ref:`int` **get_max_columns** **(** **)** const + +.. _class_ItemList_set_select_mode: + +- void **set_select_mode** **(** :ref:`int` mode **)** + +.. _class_ItemList_get_select_mode: + +- :ref:`int` **get_select_mode** **(** **)** const + +.. _class_ItemList_set_icon_mode: + +- void **set_icon_mode** **(** :ref:`int` mode **)** + +.. _class_ItemList_get_icon_mode: + +- :ref:`int` **get_icon_mode** **(** **)** const + +.. _class_ItemList_set_min_icon_size: + +- void **set_min_icon_size** **(** :ref:`Vector2` size **)** + +.. _class_ItemList_get_min_icon_size: + +- :ref:`Vector2` **get_min_icon_size** **(** **)** const + +.. _class_ItemList_ensure_current_is_visible: + +- void **ensure_current_is_visible** **(** **)** + + diff --git a/classes/class_joint.rst b/classes/class_joint.rst new file mode 100644 index 000000000..b59d4016f --- /dev/null +++ b/classes/class_joint.rst @@ -0,0 +1,73 @@ +.. _class_Joint: + +Joint +===== + +Inherits: :ref:`Spatial` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_node_a` **(** :ref:`NodePath` node **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`NodePath` | :ref:`get_node_a` **(** **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_node_b` **(** :ref:`NodePath` node **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`NodePath` | :ref:`get_node_b` **(** **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_solver_priority` **(** :ref:`int` priority **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_solver_priority` **(** **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_exclude_nodes_from_collision` **(** :ref:`bool` enable **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_exclude_nodes_from_collision` **(** **)** const | ++----------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_Joint_set_node_a: + +- void **set_node_a** **(** :ref:`NodePath` node **)** + +.. _class_Joint_get_node_a: + +- :ref:`NodePath` **get_node_a** **(** **)** const + +.. _class_Joint_set_node_b: + +- void **set_node_b** **(** :ref:`NodePath` node **)** + +.. _class_Joint_get_node_b: + +- :ref:`NodePath` **get_node_b** **(** **)** const + +.. _class_Joint_set_solver_priority: + +- void **set_solver_priority** **(** :ref:`int` priority **)** + +.. _class_Joint_get_solver_priority: + +- :ref:`int` **get_solver_priority** **(** **)** const + +.. _class_Joint_set_exclude_nodes_from_collision: + +- void **set_exclude_nodes_from_collision** **(** :ref:`bool` enable **)** + +.. _class_Joint_get_exclude_nodes_from_collision: + +- :ref:`bool` **get_exclude_nodes_from_collision** **(** **)** const + + diff --git a/classes/class_joint2d.rst b/classes/class_joint2d.rst new file mode 100644 index 000000000..5285d3916 --- /dev/null +++ b/classes/class_joint2d.rst @@ -0,0 +1,86 @@ +.. _class_Joint2D: + +Joint2D +======= + +Inherits: :ref:`Node2D` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Base node for all joint constraints in 2D phyisics. + +Member Functions +---------------- + ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_node_a` **(** :ref:`NodePath` node **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`NodePath` | :ref:`get_node_a` **(** **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_node_b` **(** :ref:`NodePath` node **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`NodePath` | :ref:`get_node_b` **(** **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_bias` **(** :ref:`float` bias **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_bias` **(** **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_exclude_nodes_from_collision` **(** :ref:`bool` enable **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_exclude_nodes_from_collision` **(** **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Base node for all joint constraints in 2D phyisics. Joints take 2 bodies and apply a custom constraint. + +Member Function Description +--------------------------- + +.. _class_Joint2D_set_node_a: + +- void **set_node_a** **(** :ref:`NodePath` node **)** + +Set the path to the A node for the joint. Must be of type :ref:`PhysicsBody2D`. + +.. _class_Joint2D_get_node_a: + +- :ref:`NodePath` **get_node_a** **(** **)** const + +Return the path to the A node for the joint. + +.. _class_Joint2D_set_node_b: + +- void **set_node_b** **(** :ref:`NodePath` node **)** + +Set the path to the B node for the joint. Must be of type :ref:`PhysicsBody2D`. + +.. _class_Joint2D_get_node_b: + +- :ref:`NodePath` **get_node_b** **(** **)** const + +Return the path to the B node for the joint. + +.. _class_Joint2D_set_bias: + +- void **set_bias** **(** :ref:`float` bias **)** + +.. _class_Joint2D_get_bias: + +- :ref:`float` **get_bias** **(** **)** const + +.. _class_Joint2D_set_exclude_nodes_from_collision: + +- void **set_exclude_nodes_from_collision** **(** :ref:`bool` enable **)** + +.. _class_Joint2D_get_exclude_nodes_from_collision: + +- :ref:`bool` **get_exclude_nodes_from_collision** **(** **)** const + + diff --git a/classes/class_kinematicbody.rst b/classes/class_kinematicbody.rst new file mode 100644 index 000000000..fb42eae6c --- /dev/null +++ b/classes/class_kinematicbody.rst @@ -0,0 +1,141 @@ +.. _class_KinematicBody: + +KinematicBody +============= + +Inherits: :ref:`PhysicsBody` +----------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`move` **(** :ref:`Vector3` rel_vec **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`move_to` **(** :ref:`Vector3` position **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`can_teleport_to` **(** :ref:`Vector3` position **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_colliding` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_collision_pos` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_collision_normal` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_collider_velocity` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_collider` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_collider_shape` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collide_with_static_bodies` **(** :ref:`bool` enable **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`can_collide_with_static_bodies` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collide_with_kinematic_bodies` **(** :ref:`bool` enable **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`can_collide_with_kinematic_bodies` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collide_with_rigid_bodies` **(** :ref:`bool` enable **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`can_collide_with_rigid_bodies` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collide_with_character_bodies` **(** :ref:`bool` enable **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`can_collide_with_character_bodies` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_margin` **(** :ref:`float` pixels **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_collision_margin` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_KinematicBody_move: + +- :ref:`Vector3` **move** **(** :ref:`Vector3` rel_vec **)** + +.. _class_KinematicBody_move_to: + +- :ref:`Vector3` **move_to** **(** :ref:`Vector3` position **)** + +.. _class_KinematicBody_can_teleport_to: + +- :ref:`bool` **can_teleport_to** **(** :ref:`Vector3` position **)** + +Returns whether the KinematicBody can be teleported to the destination given as an argument, checking all collision shapes of the body against potential colliders at the destination. + +.. _class_KinematicBody_is_colliding: + +- :ref:`bool` **is_colliding** **(** **)** const + +.. _class_KinematicBody_get_collision_pos: + +- :ref:`Vector3` **get_collision_pos** **(** **)** const + +.. _class_KinematicBody_get_collision_normal: + +- :ref:`Vector3` **get_collision_normal** **(** **)** const + +.. _class_KinematicBody_get_collider_velocity: + +- :ref:`Vector3` **get_collider_velocity** **(** **)** const + +.. _class_KinematicBody_get_collider: + +- :ref:`Object` **get_collider** **(** **)** const + +.. _class_KinematicBody_get_collider_shape: + +- :ref:`int` **get_collider_shape** **(** **)** const + +.. _class_KinematicBody_set_collide_with_static_bodies: + +- void **set_collide_with_static_bodies** **(** :ref:`bool` enable **)** + +.. _class_KinematicBody_can_collide_with_static_bodies: + +- :ref:`bool` **can_collide_with_static_bodies** **(** **)** const + +.. _class_KinematicBody_set_collide_with_kinematic_bodies: + +- void **set_collide_with_kinematic_bodies** **(** :ref:`bool` enable **)** + +.. _class_KinematicBody_can_collide_with_kinematic_bodies: + +- :ref:`bool` **can_collide_with_kinematic_bodies** **(** **)** const + +.. _class_KinematicBody_set_collide_with_rigid_bodies: + +- void **set_collide_with_rigid_bodies** **(** :ref:`bool` enable **)** + +.. _class_KinematicBody_can_collide_with_rigid_bodies: + +- :ref:`bool` **can_collide_with_rigid_bodies** **(** **)** const + +.. _class_KinematicBody_set_collide_with_character_bodies: + +- void **set_collide_with_character_bodies** **(** :ref:`bool` enable **)** + +.. _class_KinematicBody_can_collide_with_character_bodies: + +- :ref:`bool` **can_collide_with_character_bodies** **(** **)** const + +.. _class_KinematicBody_set_collision_margin: + +- void **set_collision_margin** **(** :ref:`float` pixels **)** + +.. _class_KinematicBody_get_collision_margin: + +- :ref:`float` **get_collision_margin** **(** **)** const + + diff --git a/classes/class_kinematicbody2d.rst b/classes/class_kinematicbody2d.rst new file mode 100644 index 000000000..443acb801 --- /dev/null +++ b/classes/class_kinematicbody2d.rst @@ -0,0 +1,146 @@ +.. _class_KinematicBody2D: + +KinematicBody2D +=============== + +Inherits: :ref:`PhysicsBody2D` +--------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Kinematic body 2D node. + +Member Functions +---------------- + ++--------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`move` **(** :ref:`Vector2` rel_vec **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`move_to` **(** :ref:`Vector2` position **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`test_move` **(** :ref:`Vector2` rel_vec **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_travel` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`revert_motion` **(** **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_colliding` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_collision_pos` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_collision_normal` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_collider_velocity` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_collider` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_collider_shape` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| Variant | :ref:`get_collider_metadata` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_margin` **(** :ref:`float` pixels **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_collision_margin` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all (to other types of bodies, such a character or a rigid body, these are the same as a static body). They have however, two main uses: + +Simulated Motion: When these bodies are moved manually, either from code or from an AnimationPlayer (with process mode set to fixed), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). + +Kinematic Characters: KinematicBody2D also has an api for moving objects (the :ref:`move` method) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics. + +Member Function Description +--------------------------- + +.. _class_KinematicBody2D_move: + +- :ref:`Vector2` **move** **(** :ref:`Vector2` rel_vec **)** + +Move the body in the given direction, stopping if there is an obstacle. + +.. _class_KinematicBody2D_move_to: + +- :ref:`Vector2` **move_to** **(** :ref:`Vector2` position **)** + +Move the body to the given position. This is not a teleport, and the body will stop if there is an obstacle. + +.. _class_KinematicBody2D_test_move: + +- :ref:`bool` **test_move** **(** :ref:`Vector2` rel_vec **)** + +Return true if there would be a collision if the body moved in the given direction. + +.. _class_KinematicBody2D_get_travel: + +- :ref:`Vector2` **get_travel** **(** **)** const + +Return the last movement done by the body. + +.. _class_KinematicBody2D_revert_motion: + +- void **revert_motion** **(** **)** + +Undo the last movement done by the body. + +.. _class_KinematicBody2D_is_colliding: + +- :ref:`bool` **is_colliding** **(** **)** const + +Return whether the body is colliding with another. + +.. _class_KinematicBody2D_get_collision_pos: + +- :ref:`Vector2` **get_collision_pos** **(** **)** const + +Return the point in space where the body is touching another. If there is no collision, this method will return (0,0), so collisions must be checked first with :ref:`is_colliding`. + +.. _class_KinematicBody2D_get_collision_normal: + +- :ref:`Vector2` **get_collision_normal** **(** **)** const + +Return the normal of the surface the body collided with. This is useful to implement sliding along a surface. + +.. _class_KinematicBody2D_get_collider_velocity: + +- :ref:`Vector2` **get_collider_velocity** **(** **)** const + +Return the velocity of the body that collided with this one. + +.. _class_KinematicBody2D_get_collider: + +- :ref:`Object` **get_collider** **(** **)** const + +Return the body that collided with this one. + +.. _class_KinematicBody2D_get_collider_shape: + +- :ref:`int` **get_collider_shape** **(** **)** const + +Return the shape index from the body that collided with this one. If there is no collision, this method will return 0, so collisions must be checked first with :ref:`is_colliding`. + +.. _class_KinematicBody2D_get_collider_metadata: + +- Variant **get_collider_metadata** **(** **)** const + +Return the metadata of the shape that collided with this body. If there is no collision, it will return 0, so collisions must be checked first with :ref:`is_colliding`. Aditionally, this metadata can not be set with :ref:`Object.set_meta`, it must be set with :ref:`Physics2DServer.body_set_shape_metadata`. + +.. _class_KinematicBody2D_set_collision_margin: + +- void **set_collision_margin** **(** :ref:`float` pixels **)** + +Set the collision margin for this object. A collision margin is an amount (in pixels) that all shapes will grow when computing collisions, to account for numerical imprecision. + +.. _class_KinematicBody2D_get_collision_margin: + +- :ref:`float` **get_collision_margin** **(** **)** const + +Return the collision margin for this object. + + diff --git a/classes/class_label.rst b/classes/class_label.rst new file mode 100644 index 000000000..539cb24f7 --- /dev/null +++ b/classes/class_label.rst @@ -0,0 +1,226 @@ +.. _class_Label: + +Label +===== + +Inherits: :ref:`Control` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Control that displays formatted text. + +Member Functions +---------------- + ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_align` **(** :ref:`int` align **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_align` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_valign` **(** :ref:`int` valign **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_valign` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_text` **(** :ref:`String` text **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_text` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_autowrap` **(** :ref:`bool` enable **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_autowrap` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_clip_text` **(** :ref:`bool` enable **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_clipping_text` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_uppercase` **(** :ref:`bool` enable **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_uppercase` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_line_height` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_line_count` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_total_character_count` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_visible_characters` **(** :ref:`int` amount **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_visible_characters` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_percent_visible` **(** :ref:`float` percent_visible **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_percent_visible` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_lines_skipped` **(** :ref:`int` lines_skipped **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_lines_skipped` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_max_lines_visible` **(** :ref:`int` lines_visible **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_max_lines_visible` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **ALIGN_LEFT** = **0** --- Align rows to the left (default). +- **ALIGN_CENTER** = **1** --- Align rows centered. +- **ALIGN_RIGHT** = **2** --- Align rows to the right (default). +- **ALIGN_FILL** = **3** --- Expand row whitespaces to fit the width. +- **VALIGN_TOP** = **0** --- Align the whole text to the top. +- **VALIGN_CENTER** = **1** --- Align the whole text to the center. +- **VALIGN_BOTTOM** = **2** --- Align the whole text to the bottom. +- **VALIGN_FILL** = **3** --- Align the whole text by spreading the rows. + +Description +----------- + +Label is a control that displays formatted text, optionally autowrapping it to the :ref:`Control` area. It inherits from range to be able to scroll wrapped text vertically. + +Member Function Description +--------------------------- + +.. _class_Label_set_align: + +- void **set_align** **(** :ref:`int` align **)** + +Sets the alignment mode to any of the ALIGN_* enumeration values. + +.. _class_Label_get_align: + +- :ref:`int` **get_align** **(** **)** const + +Return the alignment mode (any of the ALIGN_* enumeration values). + +.. _class_Label_set_valign: + +- void **set_valign** **(** :ref:`int` valign **)** + +Sets the vertical alignment mode to any of the VALIGN_* enumeration values. + +.. _class_Label_get_valign: + +- :ref:`int` **get_valign** **(** **)** const + +Return the vertical alignment mode (any of the VALIGN_* enumeration values). + +.. _class_Label_set_text: + +- void **set_text** **(** :ref:`String` text **)** + +Set the label text. Text can contain newlines. + +.. _class_Label_get_text: + +- :ref:`String` **get_text** **(** **)** const + +Return the label text. Text can contain newlines. + +.. _class_Label_set_autowrap: + +- void **set_autowrap** **(** :ref:`bool` enable **)** + +Set *autowrap* mode. When enabled, autowrap will fit text to the control width, breaking sentences when they exceed the available horizontal space. When disabled, the label minimum width becomes the width of the longest row, and the minimum height large enough to fit all rows. + +.. _class_Label_has_autowrap: + +- :ref:`bool` **has_autowrap** **(** **)** const + +Return the state of the *autowrap* mode (see :ref:`set_autowrap`). + +.. _class_Label_set_clip_text: + +- void **set_clip_text** **(** :ref:`bool` enable **)** + +Cuts off the rest of the text if it is too wide. + +.. _class_Label_is_clipping_text: + +- :ref:`bool` **is_clipping_text** **(** **)** const + +Return true if text would be cut off if it is too wide. + +.. _class_Label_set_uppercase: + +- void **set_uppercase** **(** :ref:`bool` enable **)** + +Display text in all capitals. + +.. _class_Label_is_uppercase: + +- :ref:`bool` **is_uppercase** **(** **)** const + +Return true if text is displayed in all capitals. + +.. _class_Label_get_line_height: + +- :ref:`int` **get_line_height** **(** **)** const + +Return the height of a line. + +.. _class_Label_get_line_count: + +- :ref:`int` **get_line_count** **(** **)** const + +Return the amount of lines. + +.. _class_Label_get_total_character_count: + +- :ref:`int` **get_total_character_count** **(** **)** const + +Return the total length of the text. + +.. _class_Label_set_visible_characters: + +- void **set_visible_characters** **(** :ref:`int` amount **)** + +Restricts the number of characters to display. Set to -1 to disable. + +.. _class_Label_get_visible_characters: + +- :ref:`int` **get_visible_characters** **(** **)** const + +Return the restricted number of characters to display. Returns -1 if unrestricted. + +.. _class_Label_set_percent_visible: + +- void **set_percent_visible** **(** :ref:`float` percent_visible **)** + +Restricts the number of characters to display (as a percentage of the total text). + +.. _class_Label_get_percent_visible: + +- :ref:`float` **get_percent_visible** **(** **)** const + +Return the restricted number of characters to display (as a percentage of the total text). + +.. _class_Label_set_lines_skipped: + +- void **set_lines_skipped** **(** :ref:`int` lines_skipped **)** + +Sets the number of lines to skip before displaying. Useful for scrolling text. + +.. _class_Label_get_lines_skipped: + +- :ref:`int` **get_lines_skipped** **(** **)** const + +Return the the number of lines to skipped before displaying. + +.. _class_Label_set_max_lines_visible: + +- void **set_max_lines_visible** **(** :ref:`int` lines_visible **)** + +Restricts the number of lines to display. Set to -1 to disable. + +.. _class_Label_get_max_lines_visible: + +- :ref:`int` **get_max_lines_visible** **(** **)** const + +Return the restricted number of lines to display. Returns -1 if unrestricted. + + diff --git a/classes/class_largetexture.rst b/classes/class_largetexture.rst new file mode 100644 index 000000000..3388bd554 --- /dev/null +++ b/classes/class_largetexture.rst @@ -0,0 +1,73 @@ +.. _class_LargeTexture: + +LargeTexture +============ + +Inherits: :ref:`Texture` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`add_piece` **(** :ref:`Vector2` ofs, :ref:`Texture` texture **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_piece_offset` **(** :ref:`int` idx, :ref:`Vector2` ofs **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_piece_texture` **(** :ref:`int` idx, :ref:`Texture` texture **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_size` **(** :ref:`Vector2` size **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_piece_count` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_piece_offset` **(** :ref:`int` idx **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_piece_texture` **(** :ref:`int` idx **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_LargeTexture_add_piece: + +- :ref:`int` **add_piece** **(** :ref:`Vector2` ofs, :ref:`Texture` texture **)** + +.. _class_LargeTexture_set_piece_offset: + +- void **set_piece_offset** **(** :ref:`int` idx, :ref:`Vector2` ofs **)** + +.. _class_LargeTexture_set_piece_texture: + +- void **set_piece_texture** **(** :ref:`int` idx, :ref:`Texture` texture **)** + +.. _class_LargeTexture_set_size: + +- void **set_size** **(** :ref:`Vector2` size **)** + +.. _class_LargeTexture_clear: + +- void **clear** **(** **)** + +.. _class_LargeTexture_get_piece_count: + +- :ref:`int` **get_piece_count** **(** **)** const + +.. _class_LargeTexture_get_piece_offset: + +- :ref:`Vector2` **get_piece_offset** **(** :ref:`int` idx **)** const + +.. _class_LargeTexture_get_piece_texture: + +- :ref:`Texture` **get_piece_texture** **(** :ref:`int` idx **)** const + + diff --git a/classes/class_light.rst b/classes/class_light.rst new file mode 100644 index 000000000..f200c5b67 --- /dev/null +++ b/classes/class_light.rst @@ -0,0 +1,143 @@ +.. _class_Light: + +Light +===== + +Inherits: :ref:`VisualInstance` +----------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Provides a base class for different kinds of light nodes. + +Member Functions +---------------- + ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_parameter` **(** :ref:`int` variable, :ref:`float` value **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_parameter` **(** :ref:`int` variable **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_color` **(** :ref:`int` color, :ref:`Color` value **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_color` **(** :ref:`int` color **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_project_shadows` **(** :ref:`bool` enable **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_project_shadows` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_projector` **(** :ref:`Texture` projector **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_projector` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_operator` **(** :ref:`int` operator **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_operator` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_bake_mode` **(** :ref:`int` bake_mode **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_bake_mode` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_enabled` **(** :ref:`bool` enabled **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_enabled` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_editor_only` **(** :ref:`bool` editor_only **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_editor_only` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **PARAM_RADIUS** = **2** +- **PARAM_ENERGY** = **3** +- **PARAM_ATTENUATION** = **4** +- **PARAM_SPOT_ANGLE** = **1** +- **PARAM_SPOT_ATTENUATION** = **0** +- **PARAM_SHADOW_DARKENING** = **5** +- **PARAM_SHADOW_Z_OFFSET** = **6** +- **COLOR_DIFFUSE** = **0** +- **COLOR_SPECULAR** = **1** +- **BAKE_MODE_DISABLED** = **0** +- **BAKE_MODE_INDIRECT** = **1** +- **BAKE_MODE_INDIRECT_AND_SHADOWS** = **2** +- **BAKE_MODE_FULL** = **3** + +Description +----------- + +Light is the abstract base class for light nodes, so it shouldn't be used directly (It can't be instanced). Other types of light nodes inherit from it. Light contains the common variables and parameters used for lighting. + +Member Function Description +--------------------------- + +.. _class_Light_set_parameter: + +- void **set_parameter** **(** :ref:`int` variable, :ref:`float` value **)** + +.. _class_Light_get_parameter: + +- :ref:`float` **get_parameter** **(** :ref:`int` variable **)** const + +.. _class_Light_set_color: + +- void **set_color** **(** :ref:`int` color, :ref:`Color` value **)** + +.. _class_Light_get_color: + +- :ref:`Color` **get_color** **(** :ref:`int` color **)** const + +.. _class_Light_set_project_shadows: + +- void **set_project_shadows** **(** :ref:`bool` enable **)** + +.. _class_Light_has_project_shadows: + +- :ref:`bool` **has_project_shadows** **(** **)** const + +.. _class_Light_set_projector: + +- void **set_projector** **(** :ref:`Texture` projector **)** + +.. _class_Light_get_projector: + +- :ref:`Texture` **get_projector** **(** **)** const + +.. _class_Light_set_operator: + +- void **set_operator** **(** :ref:`int` operator **)** + +.. _class_Light_get_operator: + +- :ref:`int` **get_operator** **(** **)** const + +.. _class_Light_set_bake_mode: + +- void **set_bake_mode** **(** :ref:`int` bake_mode **)** + +.. _class_Light_get_bake_mode: + +- :ref:`int` **get_bake_mode** **(** **)** const + +.. _class_Light_set_enabled: + +- void **set_enabled** **(** :ref:`bool` enabled **)** + +.. _class_Light_is_enabled: + +- :ref:`bool` **is_enabled** **(** **)** const + +.. _class_Light_set_editor_only: + +- void **set_editor_only** **(** :ref:`bool` editor_only **)** + +.. _class_Light_is_editor_only: + +- :ref:`bool` **is_editor_only** **(** **)** const + + diff --git a/classes/class_light2d.rst b/classes/class_light2d.rst new file mode 100644 index 000000000..78f818f3b --- /dev/null +++ b/classes/class_light2d.rst @@ -0,0 +1,249 @@ +.. _class_Light2D: + +Light2D +======= + +Inherits: :ref:`Node2D` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_enabled` **(** :ref:`bool` enabled **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_enabled` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_texture` **(** :ref:`Object` texture **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_texture` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_texture_offset` **(** :ref:`Vector2` texture_offset **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_texture_offset` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_color` **(** :ref:`Color` color **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_color` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_height` **(** :ref:`float` height **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_height` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_energy` **(** :ref:`float` energy **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_energy` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_texture_scale` **(** :ref:`float` texture_scale **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_texture_scale` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_z_range_min` **(** :ref:`int` z **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_z_range_min` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_z_range_max` **(** :ref:`int` z **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_z_range_max` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_layer_range_min` **(** :ref:`int` layer **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_layer_range_min` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_layer_range_max` **(** :ref:`int` layer **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_layer_range_max` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_mask` **(** :ref:`int` item_mask **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_item_mask` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_shadow_mask` **(** :ref:`int` item_shadow_mask **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_item_shadow_mask` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_mode` **(** :ref:`int` mode **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_mode` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shadow_enabled` **(** :ref:`bool` enabled **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_shadow_enabled` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shadow_buffer_size` **(** :ref:`int` size **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_shadow_buffer_size` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shadow_esm_multiplier` **(** :ref:`float` multiplier **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_shadow_esm_multiplier` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shadow_color` **(** :ref:`Color` shadow_color **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_shadow_color` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **MODE_ADD** = **0** +- **MODE_SUB** = **1** +- **MODE_MIX** = **2** +- **MODE_MASK** = **3** + +Member Function Description +--------------------------- + +.. _class_Light2D_set_enabled: + +- void **set_enabled** **(** :ref:`bool` enabled **)** + +.. _class_Light2D_is_enabled: + +- :ref:`bool` **is_enabled** **(** **)** const + +.. _class_Light2D_set_texture: + +- void **set_texture** **(** :ref:`Object` texture **)** + +.. _class_Light2D_get_texture: + +- :ref:`Object` **get_texture** **(** **)** const + +.. _class_Light2D_set_texture_offset: + +- void **set_texture_offset** **(** :ref:`Vector2` texture_offset **)** + +.. _class_Light2D_get_texture_offset: + +- :ref:`Vector2` **get_texture_offset** **(** **)** const + +.. _class_Light2D_set_color: + +- void **set_color** **(** :ref:`Color` color **)** + +.. _class_Light2D_get_color: + +- :ref:`Color` **get_color** **(** **)** const + +.. _class_Light2D_set_height: + +- void **set_height** **(** :ref:`float` height **)** + +.. _class_Light2D_get_height: + +- :ref:`float` **get_height** **(** **)** const + +.. _class_Light2D_set_energy: + +- void **set_energy** **(** :ref:`float` energy **)** + +.. _class_Light2D_get_energy: + +- :ref:`float` **get_energy** **(** **)** const + +.. _class_Light2D_set_texture_scale: + +- void **set_texture_scale** **(** :ref:`float` texture_scale **)** + +.. _class_Light2D_get_texture_scale: + +- :ref:`float` **get_texture_scale** **(** **)** const + +.. _class_Light2D_set_z_range_min: + +- void **set_z_range_min** **(** :ref:`int` z **)** + +.. _class_Light2D_get_z_range_min: + +- :ref:`int` **get_z_range_min** **(** **)** const + +.. _class_Light2D_set_z_range_max: + +- void **set_z_range_max** **(** :ref:`int` z **)** + +.. _class_Light2D_get_z_range_max: + +- :ref:`int` **get_z_range_max** **(** **)** const + +.. _class_Light2D_set_layer_range_min: + +- void **set_layer_range_min** **(** :ref:`int` layer **)** + +.. _class_Light2D_get_layer_range_min: + +- :ref:`int` **get_layer_range_min** **(** **)** const + +.. _class_Light2D_set_layer_range_max: + +- void **set_layer_range_max** **(** :ref:`int` layer **)** + +.. _class_Light2D_get_layer_range_max: + +- :ref:`int` **get_layer_range_max** **(** **)** const + +.. _class_Light2D_set_item_mask: + +- void **set_item_mask** **(** :ref:`int` item_mask **)** + +.. _class_Light2D_get_item_mask: + +- :ref:`int` **get_item_mask** **(** **)** const + +.. _class_Light2D_set_item_shadow_mask: + +- void **set_item_shadow_mask** **(** :ref:`int` item_shadow_mask **)** + +.. _class_Light2D_get_item_shadow_mask: + +- :ref:`int` **get_item_shadow_mask** **(** **)** const + +.. _class_Light2D_set_mode: + +- void **set_mode** **(** :ref:`int` mode **)** + +.. _class_Light2D_get_mode: + +- :ref:`int` **get_mode** **(** **)** const + +.. _class_Light2D_set_shadow_enabled: + +- void **set_shadow_enabled** **(** :ref:`bool` enabled **)** + +.. _class_Light2D_is_shadow_enabled: + +- :ref:`bool` **is_shadow_enabled** **(** **)** const + +.. _class_Light2D_set_shadow_buffer_size: + +- void **set_shadow_buffer_size** **(** :ref:`int` size **)** + +.. _class_Light2D_get_shadow_buffer_size: + +- :ref:`int` **get_shadow_buffer_size** **(** **)** const + +.. _class_Light2D_set_shadow_esm_multiplier: + +- void **set_shadow_esm_multiplier** **(** :ref:`float` multiplier **)** + +.. _class_Light2D_get_shadow_esm_multiplier: + +- :ref:`float` **get_shadow_esm_multiplier** **(** **)** const + +.. _class_Light2D_set_shadow_color: + +- void **set_shadow_color** **(** :ref:`Color` shadow_color **)** + +.. _class_Light2D_get_shadow_color: + +- :ref:`Color` **get_shadow_color** **(** **)** const + + diff --git a/classes/class_lightoccluder2d.rst b/classes/class_lightoccluder2d.rst new file mode 100644 index 000000000..e261e1758 --- /dev/null +++ b/classes/class_lightoccluder2d.rst @@ -0,0 +1,49 @@ +.. _class_LightOccluder2D: + +LightOccluder2D +=============== + +Inherits: :ref:`Node2D` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_occluder_polygon` **(** :ref:`OccluderPolygon2D` polygon **)** | ++----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`OccluderPolygon2D` | :ref:`get_occluder_polygon` **(** **)** const | ++----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_occluder_light_mask` **(** :ref:`int` mask **)** | ++----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_occluder_light_mask` **(** **)** const | ++----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_LightOccluder2D_set_occluder_polygon: + +- void **set_occluder_polygon** **(** :ref:`OccluderPolygon2D` polygon **)** + +.. _class_LightOccluder2D_get_occluder_polygon: + +- :ref:`OccluderPolygon2D` **get_occluder_polygon** **(** **)** const + +.. _class_LightOccluder2D_set_occluder_light_mask: + +- void **set_occluder_light_mask** **(** :ref:`int` mask **)** + +.. _class_LightOccluder2D_get_occluder_light_mask: + +- :ref:`int` **get_occluder_light_mask** **(** **)** const + + diff --git a/classes/class_lineedit.rst b/classes/class_lineedit.rst new file mode 100644 index 000000000..291757fe7 --- /dev/null +++ b/classes/class_lineedit.rst @@ -0,0 +1,166 @@ +.. _class_LineEdit: + +LineEdit +======== + +Inherits: :ref:`Control` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Control that provides single line string editing. + +Member Functions +---------------- + ++------------------------------+--------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_align` **(** :ref:`int` align **)** | ++------------------------------+--------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_align` **(** **)** const | ++------------------------------+--------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++------------------------------+--------------------------------------------------------------------------------------------------------------+ +| void | :ref:`select_all` **(** **)** | ++------------------------------+--------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_text` **(** :ref:`String` text **)** | ++------------------------------+--------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_text` **(** **)** const | ++------------------------------+--------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_cursor_pos` **(** :ref:`int` pos **)** | ++------------------------------+--------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_cursor_pos` **(** **)** const | ++------------------------------+--------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_max_length` **(** :ref:`int` chars **)** | ++------------------------------+--------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_max_length` **(** **)** const | ++------------------------------+--------------------------------------------------------------------------------------------------------------+ +| void | :ref:`append_at_cursor` **(** :ref:`String` text **)** | ++------------------------------+--------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_editable` **(** :ref:`bool` enabled **)** | ++------------------------------+--------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_editable` **(** **)** const | ++------------------------------+--------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_secret` **(** :ref:`bool` enabled **)** | ++------------------------------+--------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_secret` **(** **)** const | ++------------------------------+--------------------------------------------------------------------------------------------------------------+ +| void | :ref:`select` **(** :ref:`int` from=0, :ref:`int` to=-1 **)** | ++------------------------------+--------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **text_entered** **(** :ref:`String` text **)** +- **text_changed** **(** :ref:`String` text **)** + +Numeric Constants +----------------- + +- **ALIGN_LEFT** = **0** +- **ALIGN_CENTER** = **1** +- **ALIGN_RIGHT** = **2** +- **ALIGN_FILL** = **3** + +Description +----------- + +LineEdit provides a single line string editor, used for text fields. + +Member Function Description +--------------------------- + +.. _class_LineEdit_set_align: + +- void **set_align** **(** :ref:`int` align **)** + +.. _class_LineEdit_get_align: + +- :ref:`int` **get_align** **(** **)** const + +.. _class_LineEdit_clear: + +- void **clear** **(** **)** + +Clear the :ref:`LineEdit` text. + +.. _class_LineEdit_select_all: + +- void **select_all** **(** **)** + +Select the whole string. + +.. _class_LineEdit_set_text: + +- void **set_text** **(** :ref:`String` text **)** + +Set the text in the :ref:`LineEdit`, clearing the existing one and the selection. + +.. _class_LineEdit_get_text: + +- :ref:`String` **get_text** **(** **)** const + +Return the text in the :ref:`LineEdit`. + +.. _class_LineEdit_set_cursor_pos: + +- void **set_cursor_pos** **(** :ref:`int` pos **)** + +Set the cursor position inside the :ref:`LineEdit`, causing it to scroll if needed. + +.. _class_LineEdit_get_cursor_pos: + +- :ref:`int` **get_cursor_pos** **(** **)** const + +Return the cursor position inside the :ref:`LineEdit`. + +.. _class_LineEdit_set_max_length: + +- void **set_max_length** **(** :ref:`int` chars **)** + +Set the maximum amount of characters the :ref:`LineEdit` can edit, and cropping existing text in case it exceeds that limit. Setting 0 removes the limit. + +.. _class_LineEdit_get_max_length: + +- :ref:`int` **get_max_length** **(** **)** const + +Return the maximum amount of characters the :ref:`LineEdit` can edit. If 0 is returned, no limit exists. + +.. _class_LineEdit_append_at_cursor: + +- void **append_at_cursor** **(** :ref:`String` text **)** + +Append text at cursor, scrolling the :ref:`LineEdit` when needed. + +.. _class_LineEdit_set_editable: + +- void **set_editable** **(** :ref:`bool` enabled **)** + +Set the *editable* status of the :ref:`LineEdit`. When disabled, existing text can't be modified and new text can't be added. + +.. _class_LineEdit_is_editable: + +- :ref:`bool` **is_editable** **(** **)** const + +Return the *editable* status of the :ref:`LineEdit` (see :ref:`set_editable`). + +.. _class_LineEdit_set_secret: + +- void **set_secret** **(** :ref:`bool` enabled **)** + +Set the *secret* status of the :ref:`LineEdit`. When enabled, every character is displayed as "*". + +.. _class_LineEdit_is_secret: + +- :ref:`bool` **is_secret** **(** **)** const + +Return the *secret* status of the :ref:`LineEdit` (see :ref:`set_secret`). + +.. _class_LineEdit_select: + +- void **select** **(** :ref:`int` from=0, :ref:`int` to=-1 **)** + + diff --git a/classes/class_lineshape2d.rst b/classes/class_lineshape2d.rst new file mode 100644 index 000000000..b34126f36 --- /dev/null +++ b/classes/class_lineshape2d.rst @@ -0,0 +1,62 @@ +.. _class_LineShape2D: + +LineShape2D +=========== + +Inherits: :ref:`Shape2D` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Line shape for 2D collision objects. + +Member Functions +---------------- + ++--------------------------------+----------------------------------------------------------------------------------------------------+ +| void | :ref:`set_normal` **(** :ref:`Vector2` normal **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_normal` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------+ +| void | :ref:`set_d` **(** :ref:`float` d **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_d` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------+ + +Description +----------- + +Line shape for 2D collision objects. It works like a 2D plane and will not allow any body to go to the negative side. Not recommended for rigid bodies, and usually not recommended for static bodies either because it forces checks against it on every frame. + +Member Function Description +--------------------------- + +.. _class_LineShape2D_set_normal: + +- void **set_normal** **(** :ref:`Vector2` normal **)** + +Set the line normal. + +.. _class_LineShape2D_get_normal: + +- :ref:`Vector2` **get_normal** **(** **)** const + +Return the line normal. + +.. _class_LineShape2D_set_d: + +- void **set_d** **(** :ref:`float` d **)** + +Set the line distance from the origin. + +.. _class_LineShape2D_get_d: + +- :ref:`float` **get_d** **(** **)** const + +Return the line distance from the origin. + + diff --git a/classes/class_list.rst b/classes/class_list.rst new file mode 100644 index 000000000..a18ebd8d8 --- /dev/null +++ b/classes/class_list.rst @@ -0,0 +1,185 @@ + +| | | | | ++--+-------+--+-------+ ++ **@** | [@GDScript](class_@gdscript) | | [ParallaxBackground](class_parallaxbackground) | ++ | [@Global Scope](class_@global scope) | | [ParallaxLayer](class_parallaxlayer) | ++ **A** | [AABB](class_aabb) | | [ParticleAttractor2D](class_particleattractor2d) | ++ | [AcceptDialog](class_acceptdialog) | | [Particles](class_particles) | ++ | [AnimatedSprite](class_animatedsprite) | | [Particles2D](class_particles2d) | ++ | [AnimatedSprite3D](class_animatedsprite3d) | | [Patch9Frame](class_patch9frame) | ++ | [Animation](class_animation) | | [Path](class_path) | ++ | [AnimationPlayer](class_animationplayer) | | [Path2D](class_path2d) | ++ | [AnimationTreePlayer](class_animationtreeplayer) | | [PathFollow](class_pathfollow) | ++ | [Area](class_area) | | [PathFollow2D](class_pathfollow2d) | ++ | [Area2D](class_area2d) | | [PathRemap](class_pathremap) | ++ | [Array](class_array) | | [Performance](class_performance) | ++ | [AtlasTexture](class_atlastexture) | | [Physics2DDirectBodyState](class_physics2ddirectbodystate) | ++ | [AudioServer](class_audioserver) | | [Physics2DDirectBodyStateSW](class_physics2ddirectbodystatesw) | ++ | [AudioServerSW](class_audioserversw) | | [Physics2DDirectSpaceState](class_physics2ddirectspacestate) | ++ | [AudioStream](class_audiostream) | | [Physics2DServer](class_physics2dserver) | ++ | [AudioStreamMPC](class_audiostreammpc) | | [Physics2DServerSW](class_physics2dserversw) | ++ | [AudioStreamOGGVorbis](class_audiostreamoggvorbis) | | [Physics2DShapeQueryParameters](class_physics2dshapequeryparameters) | ++ | [AudioStreamOpus](class_audiostreamopus) | | [Physics2DShapeQueryResult](class_physics2dshapequeryresult) | ++ | [AudioStreamPlayback](class_audiostreamplayback) | | [Physics2DTestMotionResult](class_physics2dtestmotionresult) | ++ | [AudioStreamSpeex](class_audiostreamspeex) | | [PhysicsBody](class_physicsbody) | ++ **B** | [BackBufferCopy](class_backbuffercopy) | | [PhysicsBody2D](class_physicsbody2d) | ++ | [BakedLight](class_bakedlight) | | [PhysicsDirectBodyState](class_physicsdirectbodystate) | ++ | [BakedLightInstance](class_bakedlightinstance) | | [PhysicsDirectBodyStateSW](class_physicsdirectbodystatesw) | ++ | [BakedLightSampler](class_bakedlightsampler) | | [PhysicsDirectSpaceState](class_physicsdirectspacestate) | ++ | [BaseButton](class_basebutton) | | [PhysicsServer](class_physicsserver) | ++ | [BitMap](class_bitmap) | | [PhysicsServerSW](class_physicsserversw) | ++ | [BoneAttachment](class_boneattachment) | | [PhysicsShapeQueryParameters](class_physicsshapequeryparameters) | ++ | [BoxContainer](class_boxcontainer) | | [PhysicsShapeQueryResult](class_physicsshapequeryresult) | ++ | [BoxShape](class_boxshape) | | [PinJoint](class_pinjoint) | ++ | [Button](class_button) | | [PinJoint2D](class_pinjoint2d) | ++ | [ButtonArray](class_buttonarray) | | [Plane](class_plane) | ++ | [ButtonGroup](class_buttongroup) | | [PlaneShape](class_planeshape) | ++ **C** | [Camera](class_camera) | | [Polygon2D](class_polygon2d) | ++ | [Camera2D](class_camera2d) | | [PolygonPathFinder](class_polygonpathfinder) | ++ | [CanvasItem](class_canvasitem) | | [Popup](class_popup) | ++ | [CanvasItemMaterial](class_canvasitemmaterial) | | [PopupDialog](class_popupdialog) | ++ | [CanvasItemShader](class_canvasitemshader) | | [PopupMenu](class_popupmenu) | ++ | [CanvasItemShaderGraph](class_canvasitemshadergraph) | | [PopupPanel](class_popuppanel) | ++ | [CanvasLayer](class_canvaslayer) | | [Portal](class_portal) | ++ | [CanvasModulate](class_canvasmodulate) | | [Position2D](class_position2d) | ++ | [CapsuleShape](class_capsuleshape) | | [Position3D](class_position3d) | ++ | [CapsuleShape2D](class_capsuleshape2d) | | [ProgressBar](class_progressbar) | ++ | [CenterContainer](class_centercontainer) | | [ProximityGroup](class_proximitygroup) | ++ | [CheckBox](class_checkbox) | **Q** | [Quad](class_quad) | ++ | [CheckButton](class_checkbutton) | | [Quat](class_quat) | ++ | [CircleShape2D](class_circleshape2d) | **R** | [RID](class_rid) | ++ | [CollisionObject](class_collisionobject) | | [Range](class_range) | ++ | [CollisionObject2D](class_collisionobject2d) | | [RawArray](class_rawarray) | ++ | [CollisionPolygon](class_collisionpolygon) | | [RayCast](class_raycast) | ++ | [CollisionPolygon2D](class_collisionpolygon2d) | | [RayCast2D](class_raycast2d) | ++ | [CollisionShape](class_collisionshape) | | [RayShape](class_rayshape) | ++ | [CollisionShape2D](class_collisionshape2d) | | [RayShape2D](class_rayshape2d) | ++ | [Color](class_color) | | [RealArray](class_realarray) | ++ | [ColorArray](class_colorarray) | | [Rect2](class_rect2) | ++ | [ColorPicker](class_colorpicker) | | [RectangleShape2D](class_rectangleshape2d) | ++ | [ColorPickerButton](class_colorpickerbutton) | | [Reference](class_reference) | ++ | [ColorRamp](class_colorramp) | | [ReferenceFrame](class_referenceframe) | ++ | [ConcavePolygonShape](class_concavepolygonshape) | | [RegEx](class_regex) | ++ | [ConcavePolygonShape2D](class_concavepolygonshape2d) | | [RemoteTransform2D](class_remotetransform2d) | ++ | [ConeTwistJoint](class_conetwistjoint) | | [RenderTargetTexture](class_rendertargettexture) | ++ | [ConfigFile](class_configfile) | | [Resource](class_resource) | ++ | [ConfirmationDialog](class_confirmationdialog) | | [ResourceImportMetadata](class_resourceimportmetadata) | ++ | [Container](class_container) | | [ResourceInteractiveLoader](class_resourceinteractiveloader) | ++ | [Control](class_control) | | [ResourceLoader](class_resourceloader) | ++ | [ConvexPolygonShape](class_convexpolygonshape) | | [ResourcePreloader](class_resourcepreloader) | ++ | [ConvexPolygonShape2D](class_convexpolygonshape2d) | | [ResourceSaver](class_resourcesaver) | ++ | [CubeMap](class_cubemap) | | [RichTextLabel](class_richtextlabel) | ++ | [Curve2D](class_curve2d) | | [RigidBody](class_rigidbody) | ++ | [Curve3D](class_curve3d) | | [RigidBody2D](class_rigidbody2d) | ++ **D** | [DampedSpringJoint2D](class_dampedspringjoint2d) | | [Room](class_room) | ++ | [Dictionary](class_dictionary) | | [RoomBounds](class_roombounds) | ++ | [DirectionalLight](class_directionallight) | **S** | [Sample](class_sample) | ++ | [Directory](class_directory) | | [SampleLibrary](class_samplelibrary) | ++ **E** | [EditorFileDialog](class_editorfiledialog) | | [SamplePlayer](class_sampleplayer) | ++ | [EditorImportPlugin](class_editorimportplugin) | | [SamplePlayer2D](class_sampleplayer2d) | ++ | [EditorPlugin](class_editorplugin) | | [SceneState](class_scenestate) | ++ | [EditorScenePostImport](class_editorscenepostimport) | | [SceneTree](class_scenetree) | ++ | [EditorScript](class_editorscript) | | [Script](class_script) | ++ | [Environment](class_environment) | | [ScrollBar](class_scrollbar) | ++ | [EventPlayer](class_eventplayer) | | [ScrollContainer](class_scrollcontainer) | ++ | [EventStream](class_eventstream) | | [SegmentShape2D](class_segmentshape2d) | ++ | [EventStreamChibi](class_eventstreamchibi) | | [Semaphore](class_semaphore) | ++ **F** | [File](class_file) | | [Separator](class_separator) | ++ | [FileDialog](class_filedialog) | | [Shader](class_shader) | ++ | [FixedMaterial](class_fixedmaterial) | | [ShaderGraph](class_shadergraph) | ++ | [Font](class_font) | | [ShaderMaterial](class_shadermaterial) | ++ | [FuncRef](class_funcref) | | [Shape](class_shape) | ++ **G** | [GDFunctionState](class_gdfunctionstate) | | [Shape2D](class_shape2d) | ++ | [GDNativeClass](class_gdnativeclass) | | [Skeleton](class_skeleton) | ++ | [GDScript](class_gdscript) | | [Slider](class_slider) | ++ | [Generic6DOFJoint](class_generic6dofjoint) | | [SliderJoint](class_sliderjoint) | ++ | [Geometry](class_geometry) | | [SoundPlayer2D](class_soundplayer2d) | ++ | [GeometryInstance](class_geometryinstance) | | [SoundRoomParams](class_soundroomparams) | ++ | [Globals](class_globals) | | [Spatial](class_spatial) | ++ | [GraphEdit](class_graphedit) | | [SpatialPlayer](class_spatialplayer) | ++ | [GraphNode](class_graphnode) | | [SpatialSamplePlayer](class_spatialsampleplayer) | ++ | [GridContainer](class_gridcontainer) | | [SpatialSound2DServer](class_spatialsound2dserver) | ++ | [GridMap](class_gridmap) | | [SpatialSound2DServerSW](class_spatialsound2dserversw) | ++ | [GrooveJoint2D](class_groovejoint2d) | | [SpatialSoundServer](class_spatialsoundserver) | ++ **H** | [HBoxContainer](class_hboxcontainer) | | [SpatialSoundServerSW](class_spatialsoundserversw) | ++ | [HButtonArray](class_hbuttonarray) | | [SpatialStreamPlayer](class_spatialstreamplayer) | ++ | [HScrollBar](class_hscrollbar) | | [SphereShape](class_sphereshape) | ++ | [HSeparator](class_hseparator) | | [SpinBox](class_spinbox) | ++ | [HSlider](class_hslider) | | [SplitContainer](class_splitcontainer) | ++ | [HSplitContainer](class_hsplitcontainer) | | [SpotLight](class_spotlight) | ++ | [HTTPClient](class_httpclient) | | [Sprite](class_sprite) | ++ | [HingeJoint](class_hingejoint) | | [Sprite3D](class_sprite3d) | ++ **I** | [IP](class_ip) | | [SpriteBase3D](class_spritebase3d) | ++ | [IP_Unix](class_ip_unix) | | [SpriteFrames](class_spriteframes) | ++ | [Image](class_image) | | [StaticBody](class_staticbody) | ++ | [ImageTexture](class_imagetexture) | | [StaticBody2D](class_staticbody2d) | ++ | [ImmediateGeometry](class_immediategeometry) | | [StreamPeer](class_streampeer) | ++ | [Input](class_input) | | [StreamPeerSSL](class_streampeerssl) | ++ | [InputDefault](class_inputdefault) | | [StreamPeerTCP](class_streampeertcp) | ++ | [InputEvent](class_inputevent) | | [StreamPlayer](class_streamplayer) | ++ | [InputEventAction](class_inputeventaction) | | [String](class_string) | ++ | [InputEventJoyButton](class_inputeventjoybutton) | | [StringArray](class_stringarray) | ++ | [InputEventJoyMotion](class_inputeventjoymotion) | | [StyleBox](class_stylebox) | ++ | [InputEventKey](class_inputeventkey) | | [StyleBoxEmpty](class_styleboxempty) | ++ | [InputEventMouseButton](class_inputeventmousebutton) | | [StyleBoxFlat](class_styleboxflat) | ++ | [InputEventMouseMotion](class_inputeventmousemotion) | | [StyleBoxImageMask](class_styleboximagemask) | ++ | [InputEventScreenDrag](class_inputeventscreendrag) | | [StyleBoxTexture](class_styleboxtexture) | ++ | [InputEventScreenTouch](class_inputeventscreentouch) | | [SurfaceTool](class_surfacetool) | ++ | [InputMap](class_inputmap) | **T** | [TCP_Server](class_tcp_server) | ++ | [InstancePlaceholder](class_instanceplaceholder) | | [TabContainer](class_tabcontainer) | ++ | [IntArray](class_intarray) | | [Tabs](class_tabs) | ++ | [InterpolatedCamera](class_interpolatedcamera) | | [TestCube](class_testcube) | ++ | [ItemList](class_itemlist) | | [TextEdit](class_textedit) | ++ **J** | [Joint](class_joint) | | [Texture](class_texture) | ++ | [Joint2D](class_joint2d) | | [TextureButton](class_texturebutton) | ++ **K** | [KinematicBody](class_kinematicbody) | | [TextureFrame](class_textureframe) | ++ | [KinematicBody2D](class_kinematicbody2d) | | [TextureProgress](class_textureprogress) | ++ **L** | [Label](class_label) | | [Theme](class_theme) | ++ | [LargeTexture](class_largetexture) | | [Thread](class_thread) | ++ | [Light](class_light) | | [TileMap](class_tilemap) | ++ | [Light2D](class_light2d) | | [TileSet](class_tileset) | ++ | [LightOccluder2D](class_lightoccluder2d) | | [Timer](class_timer) | ++ | [LineEdit](class_lineedit) | | [ToolButton](class_toolbutton) | ++ | [LineShape2D](class_lineshape2d) | | [TouchScreenButton](class_touchscreenbutton) | ++ **M** | [MainLoop](class_mainloop) | | [Transform](class_transform) | ++ | [MarginContainer](class_margincontainer) | | [Translation](class_translation) | ++ | [Marshalls](class_marshalls) | | [TranslationServer](class_translationserver) | ++ | [Material](class_material) | | [Tree](class_tree) | ++ | [MaterialShader](class_materialshader) | | [TreeItem](class_treeitem) | ++ | [MaterialShaderGraph](class_materialshadergraph) | | [Tween](class_tween) | ++ | [Matrix3](class_matrix3) | **U** | [UndoRedo](class_undoredo) | ++ | [Matrix32](class_matrix32) | **V** | [VBoxContainer](class_vboxcontainer) | ++ | [MenuButton](class_menubutton) | | [VButtonArray](class_vbuttonarray) | ++ | [Mesh](class_mesh) | | [VScrollBar](class_vscrollbar) | ++ | [MeshDataTool](class_meshdatatool) | | [VSeparator](class_vseparator) | ++ | [MeshInstance](class_meshinstance) | | [VSlider](class_vslider) | ++ | [MeshLibrary](class_meshlibrary) | | [VSplitContainer](class_vsplitcontainer) | ++ | [MultiMesh](class_multimesh) | | [Vector2](class_vector2) | ++ | [MultiMeshInstance](class_multimeshinstance) | | [Vector2Array](class_vector2array) | ++ | [Mutex](class_mutex) | | [Vector3](class_vector3) | ++ **N** | [Navigation](class_navigation) | | [Vector3Array](class_vector3array) | ++ | [Navigation2D](class_navigation2d) | | [VehicleBody](class_vehiclebody) | ++ | [NavigationMesh](class_navigationmesh) | | [VehicleWheel](class_vehiclewheel) | ++ | [NavigationMeshInstance](class_navigationmeshinstance) | | [VideoPlayer](class_videoplayer) | ++ | [NavigationPolygon](class_navigationpolygon) | | [VideoStream](class_videostream) | ++ | [NavigationPolygonInstance](class_navigationpolygoninstance) | | [VideoStreamTheora](class_videostreamtheora) | ++ | [Nil](class_nil) | | [Viewport](class_viewport) | ++ | [Node](class_node) | | [ViewportSprite](class_viewportsprite) | ++ | [Node2D](class_node2d) | | [VisibilityEnabler](class_visibilityenabler) | ++ | [NodePath](class_nodepath) | | [VisibilityEnabler2D](class_visibilityenabler2d) | ++ **O** | [OS](class_os) | | [VisibilityNotifier](class_visibilitynotifier) | ++ | [Object](class_object) | | [VisibilityNotifier2D](class_visibilitynotifier2d) | ++ | [OccluderPolygon2D](class_occluderpolygon2d) | | [VisualInstance](class_visualinstance) | ++ | [OmniLight](class_omnilight) | | [VisualServer](class_visualserver) | ++ | [OptionButton](class_optionbutton) | **W** | [WeakRef](class_weakref) | ++ **P** | [PCKPacker](class_pckpacker) | | [WindowDialog](class_windowdialog) | ++ | [PHashTranslation](class_phashtranslation) | | [World](class_world) | ++ | [PackedDataContainer](class_packeddatacontainer) | | [World2D](class_world2d) | ++ | [PackedDataContainerRef](class_packeddatacontainerref) | | [WorldEnvironment](class_worldenvironment) | ++ | [PackedScene](class_packedscene) | **X** | [XMLParser](class_xmlparser) | ++ | [PacketPeer](class_packetpeer) | **Y** | [YSort](class_ysort) | ++ | [PacketPeerStream](class_packetpeerstream) | **b** | [bool](class_bool) | ++ | [PacketPeerUDP](class_packetpeerudp) | **f** | [float](class_float) | ++ | [Panel](class_panel) | **i** | [int](class_int) | ++ | [PanelContainer](class_panelcontainer) | +--+-------+--+-------+ diff --git a/classes/class_mainloop.rst b/classes/class_mainloop.rst new file mode 100644 index 000000000..3455c5c04 --- /dev/null +++ b/classes/class_mainloop.rst @@ -0,0 +1,113 @@ +.. _class_MainLoop: + +MainLoop +======== + +Inherits: :ref:`Object` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Main loop is the abstract main loop base class. + +Member Functions +---------------- + ++--------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_finalize` **(** **)** virtual | ++--------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_idle` **(** :ref:`float` delta **)** virtual | ++--------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_initialize` **(** **)** virtual | ++--------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_input_event` **(** :ref:`InputEvent` ev **)** virtual | ++--------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_input_text` **(** :ref:`String` text **)** virtual | ++--------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_iteration` **(** :ref:`float` delta **)** virtual | ++--------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`input_event` **(** :ref:`InputEvent` ev **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`input_text` **(** :ref:`String` text **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`init` **(** **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`iteration` **(** :ref:`float` delta **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`idle` **(** :ref:`float` delta **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`finish` **(** **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **NOTIFICATION_WM_MOUSE_ENTER** = **3** +- **NOTIFICATION_WM_MOUSE_EXIT** = **4** +- **NOTIFICATION_WM_FOCUS_IN** = **5** +- **NOTIFICATION_WM_FOCUS_OUT** = **6** +- **NOTIFICATION_WM_QUIT_REQUEST** = **7** +- **NOTIFICATION_WM_UNFOCUS_REQUEST** = **8** +- **NOTIFICATION_OS_MEMORY_WARNING** = **9** + +Description +----------- + +Main loop is the abstract main loop base class. All other main loop classes are derived from it. Upon application start, a :ref:`MainLoop` has to be provided to OS, else the application will exit. This happens automatically (and a :ref:`SceneMainLoop` is created), unless a main :ref:`Script` is supplied, which may or not create and return a :ref:`MainLoop`. + +Member Function Description +--------------------------- + +.. _class_MainLoop__finalize: + +- void **_finalize** **(** **)** virtual + +.. _class_MainLoop__idle: + +- void **_idle** **(** :ref:`float` delta **)** virtual + +.. _class_MainLoop__initialize: + +- void **_initialize** **(** **)** virtual + +.. _class_MainLoop__input_event: + +- void **_input_event** **(** :ref:`InputEvent` ev **)** virtual + +.. _class_MainLoop__input_text: + +- void **_input_text** **(** :ref:`String` text **)** virtual + +.. _class_MainLoop__iteration: + +- void **_iteration** **(** :ref:`float` delta **)** virtual + +.. _class_MainLoop_input_event: + +- void **input_event** **(** :ref:`InputEvent` ev **)** + +.. _class_MainLoop_input_text: + +- void **input_text** **(** :ref:`String` text **)** + +.. _class_MainLoop_init: + +- void **init** **(** **)** + +.. _class_MainLoop_iteration: + +- :ref:`bool` **iteration** **(** :ref:`float` delta **)** + +.. _class_MainLoop_idle: + +- :ref:`bool` **idle** **(** :ref:`float` delta **)** + +.. _class_MainLoop_finish: + +- void **finish** **(** **)** + + diff --git a/classes/class_margincontainer.rst b/classes/class_margincontainer.rst new file mode 100644 index 000000000..233a17252 --- /dev/null +++ b/classes/class_margincontainer.rst @@ -0,0 +1,21 @@ +.. _class_MarginContainer: + +MarginContainer +=============== + +Inherits: :ref:`Container` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Simple margin container. + +Description +----------- + +Simple margin container. Adds a left margin to anything contained. + diff --git a/classes/class_marshalls.rst b/classes/class_marshalls.rst new file mode 100644 index 000000000..b0fab3cb4 --- /dev/null +++ b/classes/class_marshalls.rst @@ -0,0 +1,61 @@ +.. _class_Marshalls: + +Marshalls +========= + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------------+------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`variant_to_base64` **(** var variant **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------+ +| Variant | :ref:`base64_to_variant` **(** :ref:`String` base64_str **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`raw_to_base64` **(** :ref:`RawArray` array **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------+ +| :ref:`RawArray` | :ref:`base64_to_raw` **(** :ref:`String` base64_str **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`utf8_to_base64` **(** :ref:`String` utf8_str **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`base64_to_utf8` **(** :ref:`String` base64_str **)** | ++----------------------------------+------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_Marshalls_variant_to_base64: + +- :ref:`String` **variant_to_base64** **(** var variant **)** + +.. _class_Marshalls_base64_to_variant: + +- Variant **base64_to_variant** **(** :ref:`String` base64_str **)** + +.. _class_Marshalls_raw_to_base64: + +- :ref:`String` **raw_to_base64** **(** :ref:`RawArray` array **)** + +.. _class_Marshalls_base64_to_raw: + +- :ref:`RawArray` **base64_to_raw** **(** :ref:`String` base64_str **)** + +.. _class_Marshalls_utf8_to_base64: + +- :ref:`String` **utf8_to_base64** **(** :ref:`String` utf8_str **)** + +.. _class_Marshalls_base64_to_utf8: + +- :ref:`String` **base64_to_utf8** **(** :ref:`String` base64_str **)** + + diff --git a/classes/class_material.rst b/classes/class_material.rst new file mode 100644 index 000000000..05af04eba --- /dev/null +++ b/classes/class_material.rst @@ -0,0 +1,111 @@ +.. _class_Material: + +Material +======== + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Abstract base :ref:`Resource` for coloring and shading geometry. + +Member Functions +---------------- + ++----------------------------+-------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_flag` **(** :ref:`int` flag, :ref:`bool` enable **)** | ++----------------------------+-------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_flag` **(** :ref:`int` flag **)** const | ++----------------------------+-------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_blend_mode` **(** :ref:`int` mode **)** | ++----------------------------+-------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_blend_mode` **(** **)** const | ++----------------------------+-------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_line_width` **(** :ref:`float` width **)** | ++----------------------------+-------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_line_width` **(** **)** const | ++----------------------------+-------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_depth_draw_mode` **(** :ref:`int` mode **)** | ++----------------------------+-------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_depth_draw_mode` **(** **)** const | ++----------------------------+-------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **FLAG_VISIBLE** = **0** --- Geometry is visible when this flag is enabled (default). +- **FLAG_DOUBLE_SIDED** = **1** --- Both front facing and back facing triangles are rendered when this flag is enabled. +- **FLAG_INVERT_FACES** = **2** --- Front facing and back facing order is swapped when this flag is enabled. +- **FLAG_UNSHADED** = **3** --- Shading (lighting) is disabled when this flag is enabled. +- **FLAG_ONTOP** = **4** +- **FLAG_LIGHTMAP_ON_UV2** = **5** +- **FLAG_COLOR_ARRAY_SRGB** = **6** +- **FLAG_MAX** = **7** --- Maximum amount of flags. +- **DEPTH_DRAW_ALWAYS** = **0** +- **DEPTH_DRAW_OPAQUE_ONLY** = **1** +- **DEPTH_DRAW_OPAQUE_PRE_PASS_ALPHA** = **2** +- **DEPTH_DRAW_NEVER** = **3** +- **BLEND_MODE_MIX** = **0** --- Use the regular alpha blending equation (source and dest colors are faded) (default). +- **BLEND_MODE_ADD** = **1** --- Use additive blending equation, often used for particle effects such as fire or light decals. +- **BLEND_MODE_SUB** = **2** --- Use substractive blending equation, often used for some smoke effects or types of glass. +- **BLEND_MODE_MUL** = **3** +- **BLEND_MODE_PREMULT_ALPHA** = **4** + +Description +----------- + +Material is a base :ref:`Resource` used for coloring and shading geometry. All materials inherit from it and almost all :ref:`VisualInstance` derived nodes carry a Material. A few flags and parameters are shared between all material types and are configured here. + +Member Function Description +--------------------------- + +.. _class_Material_set_flag: + +- void **set_flag** **(** :ref:`int` flag, :ref:`bool` enable **)** + +Set a :ref:`Material` flag, which toggles on or off a behavior when rendering. See enumeration FLAG_* for a list. + +.. _class_Material_get_flag: + +- :ref:`bool` **get_flag** **(** :ref:`int` flag **)** const + +Return a :ref:`Material` flag, which toggles on or off a behavior when rendering. See enumeration FLAG_* for a list. + +.. _class_Material_set_blend_mode: + +- void **set_blend_mode** **(** :ref:`int` mode **)** + +Set blend mode for the material, which can be one of BLEND_MODE_MIX (default), BLEND_MODE_ADD, BLEND_MODE_SUB. Keep in mind that only BLEND_MODE_MIX ensures that the material *may* be opaque, any other blend mode will render with alpha blending enabled in raster-based :ref:`VisualServer` implementations. + +.. _class_Material_get_blend_mode: + +- :ref:`int` **get_blend_mode** **(** **)** const + +Return blend mode for the material, which can be one of BLEND_MODE_MIX (default), BLEND_MODE_ADD, BLEND_MODE_SUB. Keep in mind that only BLEND_MODE_MIX ensures that the material *may* be opaque, any other blend mode will render with alpha blending enabled in raster-based :ref:`VisualServer` implementations. + +.. _class_Material_set_line_width: + +- void **set_line_width** **(** :ref:`float` width **)** + +Set the line width for geometry drawn with FLAG_WIREFRAME enabled, or LINE primitives. Note that not all hardware or VisualServer backends support this (like DirectX). + +.. _class_Material_get_line_width: + +- :ref:`float` **get_line_width** **(** **)** const + +Return the line width for geometry drawn with FLAG_WIREFRAME enabled, or LINE primitives. Note that not all hardware or VisualServer backends support this (like DirectX). + +.. _class_Material_set_depth_draw_mode: + +- void **set_depth_draw_mode** **(** :ref:`int` mode **)** + +.. _class_Material_get_depth_draw_mode: + +- :ref:`int` **get_depth_draw_mode** **(** **)** const + + diff --git a/classes/class_materialshader.rst b/classes/class_materialshader.rst new file mode 100644 index 000000000..89972bed1 --- /dev/null +++ b/classes/class_materialshader.rst @@ -0,0 +1,16 @@ +.. _class_MaterialShader: + +MaterialShader +============== + +Inherits: :ref:`Shader` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + diff --git a/classes/class_materialshadergraph.rst b/classes/class_materialshadergraph.rst new file mode 100644 index 000000000..0e73ec84a --- /dev/null +++ b/classes/class_materialshadergraph.rst @@ -0,0 +1,16 @@ +.. _class_MaterialShaderGraph: + +MaterialShaderGraph +=================== + +Inherits: :ref:`ShaderGraph` +----------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + diff --git a/classes/class_matrix3.rst b/classes/class_matrix3.rst new file mode 100644 index 000000000..cfce192c1 --- /dev/null +++ b/classes/class_matrix3.rst @@ -0,0 +1,166 @@ +.. _class_Matrix3: + +Matrix3 +======= + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + +3x3 matrix datatype. + +Member Functions +---------------- + ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`determinant` **(** **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_euler` **(** **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_orthogonal_index` **(** **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_scale` **(** **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix3` | :ref:`inverse` **(** **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix3` | :ref:`orthonormalized` **(** **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix3` | :ref:`rotated` **(** :ref:`Vector3` axis, :ref:`float` phi **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix3` | :ref:`scaled` **(** :ref:`Vector3` scale **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`tdotx` **(** :ref:`Vector3` with **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`tdoty` **(** :ref:`Vector3` with **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`tdotz` **(** :ref:`Vector3` with **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix3` | :ref:`transposed` **(** **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`xform` **(** :ref:`Vector3` v **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`xform_inv` **(** :ref:`Vector3` v **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix3` | :ref:`Matrix3` **(** :ref:`Vector3` x_axis, :ref:`Vector3` y_axis, :ref:`Vector3` z_axis **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix3` | :ref:`Matrix3` **(** :ref:`Vector3` axis, :ref:`float` phi **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix3` | :ref:`Matrix3` **(** :ref:`Quat` from **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Variables +---------------- + +- :ref:`Vector3` **x** +- :ref:`Vector3` **y** +- :ref:`Vector3` **z** + +Description +----------- + +3x3 matrix used for 3D rotation and scale. Contains 3 vector fields x,y and z. Can also be accessed as array of 3D vectors. Almost always used as orthogonal basis for a :ref:`Transform`. + +Member Function Description +--------------------------- + +.. _class_Matrix3_determinant: + +- :ref:`float` **determinant** **(** **)** + +Return the determinant of the matrix. + +.. _class_Matrix3_get_euler: + +- :ref:`Vector3` **get_euler** **(** **)** + +Return euler angles from the matrix. + +.. _class_Matrix3_get_orthogonal_index: + +- :ref:`int` **get_orthogonal_index** **(** **)** + +.. _class_Matrix3_get_scale: + +- :ref:`Vector3` **get_scale** **(** **)** + +.. _class_Matrix3_inverse: + +- :ref:`Matrix3` **inverse** **(** **)** + +Return the affine inverse of the matrix. + +.. _class_Matrix3_orthonormalized: + +- :ref:`Matrix3` **orthonormalized** **(** **)** + +Return the orthonormalized version of the matrix (useful to call from time to time to avoid rounding error). + +.. _class_Matrix3_rotated: + +- :ref:`Matrix3` **rotated** **(** :ref:`Vector3` axis, :ref:`float` phi **)** + +Return the rotated version of the matrix, by a given axis and angle. + +.. _class_Matrix3_scaled: + +- :ref:`Matrix3` **scaled** **(** :ref:`Vector3` scale **)** + +Return the scaled version of the matrix, by a 3D scale. + +.. _class_Matrix3_tdotx: + +- :ref:`float` **tdotx** **(** :ref:`Vector3` with **)** + +Transposed dot product with the x axis of the matrix. + +.. _class_Matrix3_tdoty: + +- :ref:`float` **tdoty** **(** :ref:`Vector3` with **)** + +Transposed dot product with the y axis of the matrix. + +.. _class_Matrix3_tdotz: + +- :ref:`float` **tdotz** **(** :ref:`Vector3` with **)** + +Transposed dot product with the z axis of the matrix. + +.. _class_Matrix3_transposed: + +- :ref:`Matrix3` **transposed** **(** **)** + +Return the transposed version of the matrix. + +.. _class_Matrix3_xform: + +- :ref:`Vector3` **xform** **(** :ref:`Vector3` v **)** + +Return a vector transformed by the matrix and return it. + +.. _class_Matrix3_xform_inv: + +- :ref:`Vector3` **xform_inv** **(** :ref:`Vector3` v **)** + +Return a vector transformed by the transposed matrix and return it. + +.. _class_Matrix3_Matrix3: + +- :ref:`Matrix3` **Matrix3** **(** :ref:`Vector3` x_axis, :ref:`Vector3` y_axis, :ref:`Vector3` z_axis **)** + +Create a matrix from 3 axis vectors. + +.. _class_Matrix3_Matrix3: + +- :ref:`Matrix3` **Matrix3** **(** :ref:`Vector3` axis, :ref:`float` phi **)** + +Create a matrix from an axis vector and an angle. + +.. _class_Matrix3_Matrix3: + +- :ref:`Matrix3` **Matrix3** **(** :ref:`Quat` from **)** + +Create a matrix from a quaternion. + + diff --git a/classes/class_matrix32.rst b/classes/class_matrix32.rst new file mode 100644 index 000000000..b62ac48a4 --- /dev/null +++ b/classes/class_matrix32.rst @@ -0,0 +1,136 @@ +.. _class_Matrix32: + +Matrix32 +======== + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + +3x2 Matrix for 2D transforms. + +Member Functions +---------------- + ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`affine_inverse` **(** **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`basis_xform` **(** var v **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`basis_xform_inv` **(** var v **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_origin` **(** **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_rotation` **(** **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_scale` **(** **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`interpolate_with` **(** :ref:`Matrix32` m, :ref:`float` c **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`inverse` **(** **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`orthonormalized` **(** **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`rotated` **(** :ref:`float` phi **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`scaled` **(** :ref:`Vector2` scale **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`translated` **(** :ref:`Vector2` offset **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`xform` **(** var v **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`xform_inv` **(** var v **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`Matrix32` **(** :ref:`float` rot, :ref:`Vector2` pos **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`Matrix32` **(** :ref:`Vector2` x_axis, :ref:`Vector2` y_axis, :ref:`Vector2` origin **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`Matrix32` **(** :ref:`Transform` from **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Variables +---------------- + +- :ref:`Vector2` **x** +- :ref:`Vector2` **y** +- :ref:`Vector2` **o** + +Description +----------- + +3x2 Matrix for 2D transforms. + +Member Function Description +--------------------------- + +.. _class_Matrix32_affine_inverse: + +- :ref:`Matrix32` **affine_inverse** **(** **)** + +.. _class_Matrix32_basis_xform: + +- :ref:`Matrix32` **basis_xform** **(** var v **)** + +.. _class_Matrix32_basis_xform_inv: + +- :ref:`Matrix32` **basis_xform_inv** **(** var v **)** + +.. _class_Matrix32_get_origin: + +- :ref:`Vector2` **get_origin** **(** **)** + +.. _class_Matrix32_get_rotation: + +- :ref:`float` **get_rotation** **(** **)** + +.. _class_Matrix32_get_scale: + +- :ref:`Vector2` **get_scale** **(** **)** + +.. _class_Matrix32_interpolate_with: + +- :ref:`Matrix32` **interpolate_with** **(** :ref:`Matrix32` m, :ref:`float` c **)** + +.. _class_Matrix32_inverse: + +- :ref:`Matrix32` **inverse** **(** **)** + +.. _class_Matrix32_orthonormalized: + +- :ref:`Matrix32` **orthonormalized** **(** **)** + +.. _class_Matrix32_rotated: + +- :ref:`Matrix32` **rotated** **(** :ref:`float` phi **)** + +.. _class_Matrix32_scaled: + +- :ref:`Matrix32` **scaled** **(** :ref:`Vector2` scale **)** + +.. _class_Matrix32_translated: + +- :ref:`Matrix32` **translated** **(** :ref:`Vector2` offset **)** + +.. _class_Matrix32_xform: + +- :ref:`Matrix32` **xform** **(** var v **)** + +.. _class_Matrix32_xform_inv: + +- :ref:`Matrix32` **xform_inv** **(** var v **)** + +.. _class_Matrix32_Matrix32: + +- :ref:`Matrix32` **Matrix32** **(** :ref:`float` rot, :ref:`Vector2` pos **)** + +.. _class_Matrix32_Matrix32: + +- :ref:`Matrix32` **Matrix32** **(** :ref:`Vector2` x_axis, :ref:`Vector2` y_axis, :ref:`Vector2` origin **)** + +.. _class_Matrix32_Matrix32: + +- :ref:`Matrix32` **Matrix32** **(** :ref:`Transform` from **)** + + diff --git a/classes/class_menubutton.rst b/classes/class_menubutton.rst new file mode 100644 index 000000000..08d363e1c --- /dev/null +++ b/classes/class_menubutton.rst @@ -0,0 +1,43 @@ +.. _class_MenuButton: + +MenuButton +========== + +Inherits: :ref:`Button` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Special button that brings up a :ref:`PopupMenu` when clicked. + +Member Functions +---------------- + ++------------------------------------+-----------------------------------------------------------+ +| :ref:`PopupMenu` | :ref:`get_popup` **(** **)** | ++------------------------------------+-----------------------------------------------------------+ + +Signals +------- + +- **about_to_show** **(** **)** + +Description +----------- + +Special button that brings up a :ref:`PopupMenu` when clicked. That's pretty much all it does, as it's just a helper class when bulding GUIs. + +Member Function Description +--------------------------- + +.. _class_MenuButton_get_popup: + +- :ref:`PopupMenu` **get_popup** **(** **)** + +Return the :ref:`PopupMenu` contained in this button. + + diff --git a/classes/class_mesh.rst b/classes/class_mesh.rst new file mode 100644 index 000000000..524c2403c --- /dev/null +++ b/classes/class_mesh.rst @@ -0,0 +1,209 @@ +.. _class_Mesh: + +Mesh +==== + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +A :ref:`Resource` that contains vertex-array based geometry. + +Member Functions +---------------- + ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_morph_target` **(** :ref:`String` name **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_morph_target_count` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_morph_target_name` **(** :ref:`int` index **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_morph_targets` **(** **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_morph_target_mode` **(** :ref:`int` mode **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_morph_target_mode` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_surface` **(** :ref:`int` primitive, :ref:`Array` arrays, :ref:`Array` morph_arrays=Array(), :ref:`bool` alphasort=false **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_surface_count` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`surface_remove` **(** :ref:`int` surf_idx **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`surface_get_array_len` **(** :ref:`int` surf_idx **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`surface_get_array_index_len` **(** :ref:`int` surf_idx **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`surface_get_format` **(** :ref:`int` surf_idx **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`surface_get_primitive_type` **(** :ref:`int` surf_idx **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`surface_set_material` **(** :ref:`int` surf_idx, :ref:`Material` material **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Material` | :ref:`surface_get_material` **(** :ref:`int` surf_idx **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`surface_set_name` **(** :ref:`int` surf_idx, :ref:`String` name **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`surface_get_name` **(** :ref:`int` surf_idx **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`center_geometry` **(** **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`regen_normalmaps` **(** **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_custom_aabb` **(** :ref:`AABB` aabb **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`AABB` | :ref:`get_custom_aabb` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **NO_INDEX_ARRAY** = **-1** --- Default value used for index_array_len when no indices are present. +- **ARRAY_WEIGHTS_SIZE** = **4** --- Amount of weights/bone indices per vertex (always 4). +- **ARRAY_VERTEX** = **0** --- Vertex array (array of :ref:`Vector3`() vertices). +- **ARRAY_NORMAL** = **1** --- Normal array (array of :ref:`Vector3`() normals). +- **ARRAY_TANGENT** = **2** --- Tangent array, array of groups of 4 floats. first 3 floats determine the tangent, and the last the binormal direction as -1 or 1. +- **ARRAY_COLOR** = **3** --- Vertex array (array of :ref:`Color`() colors). +- **ARRAY_TEX_UV** = **4** --- UV array (array of :ref:`Vector3`() UVs or float array of groups of 2 floats (u,v)). +- **ARRAY_TEX_UV2** = **5** --- Second UV array (array of :ref:`Vector3`() UVs or float array of groups of 2 floats (u,v)). +- **ARRAY_BONES** = **6** --- Array of bone indices, as a float array. Each element in groups of 4 floats. +- **ARRAY_WEIGHTS** = **7** --- Array of bone weights, as a float array. Each element in groups of 4 floats. +- **ARRAY_INDEX** = **8** --- Array of integers, used as indices referencing vertices. No index can be beyond the vertex array size. +- **ARRAY_FORMAT_VERTEX** = **1** --- Array format will include vertices (mandatory). +- **ARRAY_FORMAT_NORMAL** = **2** --- Array format will include normals +- **ARRAY_FORMAT_TANGENT** = **4** --- Array format will include tangents +- **ARRAY_FORMAT_COLOR** = **8** --- Array format will include a color array. +- **ARRAY_FORMAT_TEX_UV** = **16** --- Array format will include UVs. +- **ARRAY_FORMAT_TEX_UV2** = **32** --- Array format will include another set of UVs. +- **ARRAY_FORMAT_BONES** = **64** --- Array format will include bone indices. +- **ARRAY_FORMAT_WEIGHTS** = **128** --- Array format will include bone weights. +- **ARRAY_FORMAT_INDEX** = **256** --- Index array will be used. +- **PRIMITIVE_POINTS** = **0** --- Render array as points (one vertex equals one point). +- **PRIMITIVE_LINES** = **1** --- Render array as lines (every two vertices a line is created). +- **PRIMITIVE_LINE_STRIP** = **2** --- Render array as line strip. +- **PRIMITIVE_LINE_LOOP** = **3** --- Render array as line loop (like line strip, but closed). +- **PRIMITIVE_TRIANGLES** = **4** --- Render array as triangles (every three vertices a triangle is created). +- **PRIMITIVE_TRIANGLE_STRIP** = **5** --- Render array as triangle strips. +- **PRIMITIVE_TRIANGLE_FAN** = **6** --- Render array as triangle fans. + +Description +----------- + +Mesh is a type of :ref:`Resource` that contains vertex-array based geometry, divided in *surfaces*. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is prefered to a single surface, because objects created in 3D editing software commonly contain multiple materials. + +Member Function Description +--------------------------- + +.. _class_Mesh_add_morph_target: + +- void **add_morph_target** **(** :ref:`String` name **)** + +.. _class_Mesh_get_morph_target_count: + +- :ref:`int` **get_morph_target_count** **(** **)** const + +.. _class_Mesh_get_morph_target_name: + +- :ref:`String` **get_morph_target_name** **(** :ref:`int` index **)** const + +.. _class_Mesh_clear_morph_targets: + +- void **clear_morph_targets** **(** **)** + +.. _class_Mesh_set_morph_target_mode: + +- void **set_morph_target_mode** **(** :ref:`int` mode **)** + +.. _class_Mesh_get_morph_target_mode: + +- :ref:`int` **get_morph_target_mode** **(** **)** const + +.. _class_Mesh_add_surface: + +- void **add_surface** **(** :ref:`int` primitive, :ref:`Array` arrays, :ref:`Array` morph_arrays=Array(), :ref:`bool` alphasort=false **)** + +Create a new surface (:ref:`get_surface_count` that will become surf_idx for this. + +Surfaces are created to be rendered using a "primitive", which may be PRIMITIVE_POINTS, PRIMITIVE_LINES, PRIMITIVE_LINE_STRIP, PRIMITIVE_LINE_LOOP, PRIMITIVE_TRIANGLES, PRIMITIVE_TRIANGLE_STRIP, PRIMITIVE_TRIANGLE_FAN. (As a note, when using indices, it is recommended to only use just points, lines or triangles). + +The format of a surface determines which arrays it will allocate and hold, so "format" is a combination of ARRAY_FORMAT_* mask constants ORed together. ARRAY_FORMAT_VERTEX must be always present. "array_len" determines the amount of vertices in the array (not primitives!). if ARRAY_FORMAT_INDEX is in the format mask, then it means that an index array will be allocated and "index_array_len" must be passed. + +.. _class_Mesh_get_surface_count: + +- :ref:`int` **get_surface_count** **(** **)** const + +Return the amount of surfaces that the :ref:`Mesh` holds. + +.. _class_Mesh_surface_remove: + +- void **surface_remove** **(** :ref:`int` surf_idx **)** + +Remove a surface at position surf_idx, shifting greater surfaces one surf_idx slot down. + +.. _class_Mesh_surface_get_array_len: + +- :ref:`int` **surface_get_array_len** **(** :ref:`int` surf_idx **)** const + +Return the length in vertices of the vertex array in the requested surface (see :ref:`add_surface`). + +.. _class_Mesh_surface_get_array_index_len: + +- :ref:`int` **surface_get_array_index_len** **(** :ref:`int` surf_idx **)** const + +Return the length in indices of the index array in the requested surface (see :ref:`add_surface`). + +.. _class_Mesh_surface_get_format: + +- :ref:`int` **surface_get_format** **(** :ref:`int` surf_idx **)** const + +Return the format mask of the requested surface (see :ref:`add_surface`). + +.. _class_Mesh_surface_get_primitive_type: + +- :ref:`int` **surface_get_primitive_type** **(** :ref:`int` surf_idx **)** const + +Return the primitive type of the requested surface (see :ref:`add_surface`). + +.. _class_Mesh_surface_set_material: + +- void **surface_set_material** **(** :ref:`int` surf_idx, :ref:`Material` material **)** + +Set a :ref:`Material` for a given surface. Surface will be rendered using this material. + +.. _class_Mesh_surface_get_material: + +- :ref:`Material` **surface_get_material** **(** :ref:`int` surf_idx **)** const + +Return a :ref:`Material` in a given surface. Surface is rendered using this material. + +.. _class_Mesh_surface_set_name: + +- void **surface_set_name** **(** :ref:`int` surf_idx, :ref:`String` name **)** + +.. _class_Mesh_surface_get_name: + +- :ref:`String` **surface_get_name** **(** :ref:`int` surf_idx **)** const + +.. _class_Mesh_center_geometry: + +- void **center_geometry** **(** **)** + +.. _class_Mesh_regen_normalmaps: + +- void **regen_normalmaps** **(** **)** + +.. _class_Mesh_set_custom_aabb: + +- void **set_custom_aabb** **(** :ref:`AABB` aabb **)** + +.. _class_Mesh_get_custom_aabb: + +- :ref:`AABB` **get_custom_aabb** **(** **)** const + + diff --git a/classes/class_meshdatatool.rst b/classes/class_meshdatatool.rst new file mode 100644 index 000000000..c55628cd7 --- /dev/null +++ b/classes/class_meshdatatool.rst @@ -0,0 +1,253 @@ +.. _class_MeshDataTool: + +MeshDataTool +============ + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`create_from_surface` **(** :ref:`Object` mesh, :ref:`int` surface **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`commit_to_surface` **(** :ref:`Object` mesh **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_format` **(** **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_vertex_count` **(** **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_edge_count` **(** **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_face_count` **(** **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_vertex` **(** :ref:`int` idx, :ref:`Vector3` vertex **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_vertex` **(** :ref:`int` idx **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_vertex_normal` **(** :ref:`int` idx, :ref:`Vector3` normal **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_vertex_normal` **(** :ref:`int` idx **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_vertex_tangent` **(** :ref:`int` idx, :ref:`Plane` tangent **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Plane` | :ref:`get_vertex_tangent` **(** :ref:`int` idx **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_vertex_uv` **(** :ref:`int` idx, :ref:`Vector2` uv **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_vertex_uv` **(** :ref:`int` idx **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_vertex_uv2` **(** :ref:`int` idx, :ref:`Vector2` uv2 **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_vertex_uv2` **(** :ref:`int` idx **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_vertex_color` **(** :ref:`int` idx, :ref:`Color` color **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_vertex_color` **(** :ref:`int` idx **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_vertex_bones` **(** :ref:`int` idx, :ref:`IntArray` bones **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`IntArray` | :ref:`get_vertex_bones` **(** :ref:`int` idx **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_vertex_weights` **(** :ref:`int` idx, :ref:`RealArray` weights **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RealArray` | :ref:`get_vertex_weights` **(** :ref:`int` idx **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_vertex_meta` **(** :ref:`int` idx, var meta **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`get_vertex_meta` **(** :ref:`int` idx **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`IntArray` | :ref:`get_vertex_edges` **(** :ref:`int` idx **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`IntArray` | :ref:`get_vertex_faces` **(** :ref:`int` idx **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_edge_vertex` **(** :ref:`int` idx, :ref:`int` vertex **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`IntArray` | :ref:`get_edge_faces` **(** :ref:`int` idx **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_edge_meta` **(** :ref:`int` idx, var meta **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`get_edge_meta` **(** :ref:`int` idx **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_face_vertex` **(** :ref:`int` idx, :ref:`int` vertex **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_face_edge` **(** :ref:`int` idx, :ref:`int` edge **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_face_meta` **(** :ref:`int` idx, var meta **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`get_face_meta` **(** :ref:`int` idx **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_face_normal` **(** :ref:`int` idx **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_material` **(** :ref:`Material` material **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_material` **(** **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_MeshDataTool_clear: + +- void **clear** **(** **)** + +.. _class_MeshDataTool_create_from_surface: + +- :ref:`int` **create_from_surface** **(** :ref:`Object` mesh, :ref:`int` surface **)** + +.. _class_MeshDataTool_commit_to_surface: + +- :ref:`int` **commit_to_surface** **(** :ref:`Object` mesh **)** + +.. _class_MeshDataTool_get_format: + +- :ref:`int` **get_format** **(** **)** const + +.. _class_MeshDataTool_get_vertex_count: + +- :ref:`int` **get_vertex_count** **(** **)** const + +.. _class_MeshDataTool_get_edge_count: + +- :ref:`int` **get_edge_count** **(** **)** const + +.. _class_MeshDataTool_get_face_count: + +- :ref:`int` **get_face_count** **(** **)** const + +.. _class_MeshDataTool_set_vertex: + +- void **set_vertex** **(** :ref:`int` idx, :ref:`Vector3` vertex **)** + +.. _class_MeshDataTool_get_vertex: + +- :ref:`Vector3` **get_vertex** **(** :ref:`int` idx **)** const + +.. _class_MeshDataTool_set_vertex_normal: + +- void **set_vertex_normal** **(** :ref:`int` idx, :ref:`Vector3` normal **)** + +.. _class_MeshDataTool_get_vertex_normal: + +- :ref:`Vector3` **get_vertex_normal** **(** :ref:`int` idx **)** const + +.. _class_MeshDataTool_set_vertex_tangent: + +- void **set_vertex_tangent** **(** :ref:`int` idx, :ref:`Plane` tangent **)** + +.. _class_MeshDataTool_get_vertex_tangent: + +- :ref:`Plane` **get_vertex_tangent** **(** :ref:`int` idx **)** const + +.. _class_MeshDataTool_set_vertex_uv: + +- void **set_vertex_uv** **(** :ref:`int` idx, :ref:`Vector2` uv **)** + +.. _class_MeshDataTool_get_vertex_uv: + +- :ref:`Vector2` **get_vertex_uv** **(** :ref:`int` idx **)** const + +.. _class_MeshDataTool_set_vertex_uv2: + +- void **set_vertex_uv2** **(** :ref:`int` idx, :ref:`Vector2` uv2 **)** + +.. _class_MeshDataTool_get_vertex_uv2: + +- :ref:`Vector2` **get_vertex_uv2** **(** :ref:`int` idx **)** const + +.. _class_MeshDataTool_set_vertex_color: + +- void **set_vertex_color** **(** :ref:`int` idx, :ref:`Color` color **)** + +.. _class_MeshDataTool_get_vertex_color: + +- :ref:`Color` **get_vertex_color** **(** :ref:`int` idx **)** const + +.. _class_MeshDataTool_set_vertex_bones: + +- void **set_vertex_bones** **(** :ref:`int` idx, :ref:`IntArray` bones **)** + +.. _class_MeshDataTool_get_vertex_bones: + +- :ref:`IntArray` **get_vertex_bones** **(** :ref:`int` idx **)** const + +.. _class_MeshDataTool_set_vertex_weights: + +- void **set_vertex_weights** **(** :ref:`int` idx, :ref:`RealArray` weights **)** + +.. _class_MeshDataTool_get_vertex_weights: + +- :ref:`RealArray` **get_vertex_weights** **(** :ref:`int` idx **)** const + +.. _class_MeshDataTool_set_vertex_meta: + +- void **set_vertex_meta** **(** :ref:`int` idx, var meta **)** + +.. _class_MeshDataTool_get_vertex_meta: + +- void **get_vertex_meta** **(** :ref:`int` idx **)** const + +.. _class_MeshDataTool_get_vertex_edges: + +- :ref:`IntArray` **get_vertex_edges** **(** :ref:`int` idx **)** const + +.. _class_MeshDataTool_get_vertex_faces: + +- :ref:`IntArray` **get_vertex_faces** **(** :ref:`int` idx **)** const + +.. _class_MeshDataTool_get_edge_vertex: + +- :ref:`int` **get_edge_vertex** **(** :ref:`int` idx, :ref:`int` vertex **)** const + +.. _class_MeshDataTool_get_edge_faces: + +- :ref:`IntArray` **get_edge_faces** **(** :ref:`int` idx **)** const + +.. _class_MeshDataTool_set_edge_meta: + +- void **set_edge_meta** **(** :ref:`int` idx, var meta **)** + +.. _class_MeshDataTool_get_edge_meta: + +- void **get_edge_meta** **(** :ref:`int` idx **)** const + +.. _class_MeshDataTool_get_face_vertex: + +- :ref:`int` **get_face_vertex** **(** :ref:`int` idx, :ref:`int` vertex **)** const + +.. _class_MeshDataTool_get_face_edge: + +- :ref:`int` **get_face_edge** **(** :ref:`int` idx, :ref:`int` edge **)** const + +.. _class_MeshDataTool_set_face_meta: + +- void **set_face_meta** **(** :ref:`int` idx, var meta **)** + +.. _class_MeshDataTool_get_face_meta: + +- void **get_face_meta** **(** :ref:`int` idx **)** const + +.. _class_MeshDataTool_get_face_normal: + +- :ref:`Vector3` **get_face_normal** **(** :ref:`int` idx **)** const + +.. _class_MeshDataTool_set_material: + +- void **set_material** **(** :ref:`Material` material **)** + +.. _class_MeshDataTool_get_material: + +- :ref:`Object` **get_material** **(** **)** const + + diff --git a/classes/class_meshinstance.rst b/classes/class_meshinstance.rst new file mode 100644 index 000000000..2520397db --- /dev/null +++ b/classes/class_meshinstance.rst @@ -0,0 +1,80 @@ +.. _class_MeshInstance: + +MeshInstance +============ + +Inherits: :ref:`GeometryInstance` +--------------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Node that instances meshes into a :ref:`Scenario`. + +Member Functions +---------------- + ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_mesh` **(** :ref:`Mesh` mesh **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Mesh` | :ref:`get_mesh` **(** **)** const | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_skeleton_path` **(** :ref:`NodePath` skeleton_path **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`NodePath` | :ref:`get_skeleton_path` **(** **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`AABB` | :ref:`get_aabb` **(** **)** const | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`create_trimesh_collision` **(** **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`create_convex_collision` **(** **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +MeshInstance is a :ref:`Node` that takes a :ref:`Mesh` resource and adds it to the current :ref:`Scenario` by creating an instance of it. This is the class most often used to get 3D geometry rendered and can be used to instance a sigle :ref:`Mesh` in many places. This allows to reuse geometry and save on resources. When a :ref:`Mesh` has to be instanced more than thousands of times at close proximity, consider using a :ref:`MultiMesh` in a :ref:`MultiMeshInstance` instead. + +Member Function Description +--------------------------- + +.. _class_MeshInstance_set_mesh: + +- void **set_mesh** **(** :ref:`Mesh` mesh **)** + +Set the :ref:`Mesh` resource for the instance. + +.. _class_MeshInstance_get_mesh: + +- :ref:`Mesh` **get_mesh** **(** **)** const + +Return the current :ref:`Mesh` resource for the instance. + +.. _class_MeshInstance_set_skeleton_path: + +- void **set_skeleton_path** **(** :ref:`NodePath` skeleton_path **)** + +.. _class_MeshInstance_get_skeleton_path: + +- :ref:`NodePath` **get_skeleton_path** **(** **)** + +.. _class_MeshInstance_get_aabb: + +- :ref:`AABB` **get_aabb** **(** **)** const + +Return the AABB of the mesh, in local coordinates. + +.. _class_MeshInstance_create_trimesh_collision: + +- void **create_trimesh_collision** **(** **)** + +This helper creates a :ref:`StaticBody` child :ref:`Node` using the mesh geometry as collision. It's mainly used for testing. + +.. _class_MeshInstance_create_convex_collision: + +- void **create_convex_collision** **(** **)** + + diff --git a/classes/class_meshlibrary.rst b/classes/class_meshlibrary.rst new file mode 100644 index 000000000..c8cc16d03 --- /dev/null +++ b/classes/class_meshlibrary.rst @@ -0,0 +1,114 @@ +.. _class_MeshLibrary: + +MeshLibrary +=========== + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Library of meshes. + +Member Functions +---------------- + ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`create_item` **(** :ref:`int` id **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_name` **(** :ref:`int` id, :ref:`String` name **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_mesh` **(** :ref:`int` id, :ref:`Mesh` mesh **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_shape` **(** :ref:`int` id, :ref:`Shape` shape **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_item_name` **(** :ref:`int` id **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Mesh` | :ref:`get_item_mesh` **(** :ref:`int` id **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Shape` | :ref:`get_item_shape` **(** :ref:`int` id **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_item` **(** :ref:`int` id **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`IntArray` | :ref:`get_item_list` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_last_unused_item_id` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Library of meshes. Contains a list of :ref:`Mesh` resources, each with name and ID. Useful for GridMap or painting Terrain. + +Member Function Description +--------------------------- + +.. _class_MeshLibrary_create_item: + +- void **create_item** **(** :ref:`int` id **)** + +Create a new item in the library, supplied an id. + +.. _class_MeshLibrary_set_item_name: + +- void **set_item_name** **(** :ref:`int` id, :ref:`String` name **)** + +Set the name of the item. + +.. _class_MeshLibrary_set_item_mesh: + +- void **set_item_mesh** **(** :ref:`int` id, :ref:`Mesh` mesh **)** + +Set the mesh of the item. + +.. _class_MeshLibrary_set_item_shape: + +- void **set_item_shape** **(** :ref:`int` id, :ref:`Shape` shape **)** + +.. _class_MeshLibrary_get_item_name: + +- :ref:`String` **get_item_name** **(** :ref:`int` id **)** const + +Return the name of the item. + +.. _class_MeshLibrary_get_item_mesh: + +- :ref:`Mesh` **get_item_mesh** **(** :ref:`int` id **)** const + +Return the mesh of the item. + +.. _class_MeshLibrary_get_item_shape: + +- :ref:`Shape` **get_item_shape** **(** :ref:`int` id **)** const + +.. _class_MeshLibrary_remove_item: + +- void **remove_item** **(** :ref:`int` id **)** + +Remove the item. + +.. _class_MeshLibrary_clear: + +- void **clear** **(** **)** + +Clear the library. + +.. _class_MeshLibrary_get_item_list: + +- :ref:`IntArray` **get_item_list** **(** **)** const + +Return the list of items. + +.. _class_MeshLibrary_get_last_unused_item_id: + +- :ref:`int` **get_last_unused_item_id** **(** **)** const + +Get an unused id for a new item. + + diff --git a/classes/class_multimesh.rst b/classes/class_multimesh.rst new file mode 100644 index 000000000..fdffa8954 --- /dev/null +++ b/classes/class_multimesh.rst @@ -0,0 +1,124 @@ +.. _class_MultiMesh: + +MultiMesh +========= + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Provides high perfomance mesh instancing. + +Member Functions +---------------- + ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_mesh` **(** :ref:`Mesh` mesh **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Mesh` | :ref:`get_mesh` **(** **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_instance_count` **(** :ref:`int` count **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_instance_count` **(** **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_instance_transform` **(** :ref:`int` instance, :ref:`Transform` transform **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`get_instance_transform` **(** :ref:`int` instance **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_instance_color` **(** :ref:`int` instance, :ref:`Color` color **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_instance_color` **(** :ref:`int` instance **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_aabb` **(** :ref:`AABB` visibility_aabb **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`AABB` | :ref:`get_aabb` **(** **)** const | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`generate_aabb` **(** **)** | ++------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +MultiMesh provides low level mesh instancing. If the amount of :ref:`Mesh` instances needed goes from hundreds to thousands (and most need to be visible at close proximity) creating such a large amount of :ref:`MeshInstance` nodes may affect performance by using too much CPU or video memory. + +For this case a MultiMesh becomes very useful, as it can draw thousands of instances with little API overhead. + +As a drawback, if the instances are too far away of each other, performance may be reduced as every sigle instance will always rendered (they are spatially indexed as one, for the whole object). + +Since instances may have any behavior, the AABB used for visibility must be provided by the user, or generated with :ref:`generate_aabb`. + +Member Function Description +--------------------------- + +.. _class_MultiMesh_set_mesh: + +- void **set_mesh** **(** :ref:`Mesh` mesh **)** + +Set the :ref:`Mesh` resource to be drawn in multiple instances. + +.. _class_MultiMesh_get_mesh: + +- :ref:`Mesh` **get_mesh** **(** **)** const + +Return the :ref:`Mesh` resource drawn as multiple instances. + +.. _class_MultiMesh_set_instance_count: + +- void **set_instance_count** **(** :ref:`int` count **)** + +Set the amount of instnces that is going to be drawn. Changing this number will erase all the existing instance transform and color data. + +.. _class_MultiMesh_get_instance_count: + +- :ref:`int` **get_instance_count** **(** **)** const + +Return the amount of instnces that is going to be drawn. + +.. _class_MultiMesh_set_instance_transform: + +- void **set_instance_transform** **(** :ref:`int` instance, :ref:`Transform` transform **)** + +Set the transform for a specific instance. + +.. _class_MultiMesh_get_instance_transform: + +- :ref:`Transform` **get_instance_transform** **(** :ref:`int` instance **)** const + +Return the transform of a specific instance. + +.. _class_MultiMesh_set_instance_color: + +- void **set_instance_color** **(** :ref:`int` instance, :ref:`Color` color **)** + +Set the color of a specific instance. + +.. _class_MultiMesh_get_instance_color: + +- :ref:`Color` **get_instance_color** **(** :ref:`int` instance **)** const + +Get the color of a specific instance. + +.. _class_MultiMesh_set_aabb: + +- void **set_aabb** **(** :ref:`AABB` visibility_aabb **)** + +Set the visibility AABB. If not provided, MultiMesh will not be visible. + +.. _class_MultiMesh_get_aabb: + +- :ref:`AABB` **get_aabb** **(** **)** const + +Return the visibility AABB. + +.. _class_MultiMesh_generate_aabb: + +- void **generate_aabb** **(** **)** + +Generate a new visibility AABB, using mesh AABB and instance transforms. Since instance information is stored in the :ref:`VisualServer`, this function is VERY SLOW and must NOT be used often. + + diff --git a/classes/class_multimeshinstance.rst b/classes/class_multimeshinstance.rst new file mode 100644 index 000000000..53e202dae --- /dev/null +++ b/classes/class_multimeshinstance.rst @@ -0,0 +1,46 @@ +.. _class_MultiMeshInstance: + +MultiMeshInstance +================= + +Inherits: :ref:`GeometryInstance` +--------------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Node that instances a :ref:`MultiMesh`. + +Member Functions +---------------- + ++------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_multimesh` **(** :ref:`Object` multimesh **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_multimesh` **(** **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +MultiMeshInstance is a :ref:`Node` that takes a :ref:`MultiMesh` resource and adds it to the current :ref:`Scenario` by creating an instance of it (yes, this is an instance of instances). + +Member Function Description +--------------------------- + +.. _class_MultiMeshInstance_set_multimesh: + +- void **set_multimesh** **(** :ref:`Object` multimesh **)** + +Set the :ref:`MultiMesh` to be instance. + +.. _class_MultiMeshInstance_get_multimesh: + +- :ref:`Object` **get_multimesh** **(** **)** const + +Return the :ref:`MultiMesh` that is used for instancing. + + diff --git a/classes/class_mutex.rst b/classes/class_mutex.rst new file mode 100644 index 000000000..097f45506 --- /dev/null +++ b/classes/class_mutex.rst @@ -0,0 +1,43 @@ +.. _class_Mutex: + +Mutex +===== + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------+----------------------------------------------------+ +| void | :ref:`lock` **(** **)** | ++--------+----------------------------------------------------+ +| Error | :ref:`try_lock` **(** **)** | ++--------+----------------------------------------------------+ +| void | :ref:`unlock` **(** **)** | ++--------+----------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_Mutex_lock: + +- void **lock** **(** **)** + +.. _class_Mutex_try_lock: + +- Error **try_lock** **(** **)** + +.. _class_Mutex_unlock: + +- void **unlock** **(** **)** + + diff --git a/classes/class_navigation.rst b/classes/class_navigation.rst new file mode 100644 index 000000000..d12ef3819 --- /dev/null +++ b/classes/class_navigation.rst @@ -0,0 +1,85 @@ +.. _class_Navigation: + +Navigation +========== + +Inherits: :ref:`Spatial` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`navmesh_create` **(** :ref:`NavigationMesh` mesh, :ref:`Transform` xform, :ref:`Object` owner=NULL **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`navmesh_set_transform` **(** :ref:`int` id, :ref:`Transform` xform **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`navmesh_remove` **(** :ref:`int` id **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3Array` | :ref:`get_simple_path` **(** :ref:`Vector3` start, :ref:`Vector3` end, :ref:`bool` optimize=true **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_closest_point_to_segment` **(** :ref:`Vector3` start, :ref:`Vector3` end, :ref:`bool` use_collision=false **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_closest_point` **(** :ref:`Vector3` to_point **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_closest_point_normal` **(** :ref:`Vector3` to_point **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_closest_point_owner` **(** :ref:`Vector3` to_point **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_up_vector` **(** :ref:`Vector3` up **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_up_vector` **(** **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_Navigation_navmesh_create: + +- :ref:`int` **navmesh_create** **(** :ref:`NavigationMesh` mesh, :ref:`Transform` xform, :ref:`Object` owner=NULL **)** + +.. _class_Navigation_navmesh_set_transform: + +- void **navmesh_set_transform** **(** :ref:`int` id, :ref:`Transform` xform **)** + +.. _class_Navigation_navmesh_remove: + +- void **navmesh_remove** **(** :ref:`int` id **)** + +.. _class_Navigation_get_simple_path: + +- :ref:`Vector3Array` **get_simple_path** **(** :ref:`Vector3` start, :ref:`Vector3` end, :ref:`bool` optimize=true **)** + +.. _class_Navigation_get_closest_point_to_segment: + +- :ref:`Vector3` **get_closest_point_to_segment** **(** :ref:`Vector3` start, :ref:`Vector3` end, :ref:`bool` use_collision=false **)** + +.. _class_Navigation_get_closest_point: + +- :ref:`Vector3` **get_closest_point** **(** :ref:`Vector3` to_point **)** + +.. _class_Navigation_get_closest_point_normal: + +- :ref:`Vector3` **get_closest_point_normal** **(** :ref:`Vector3` to_point **)** + +.. _class_Navigation_get_closest_point_owner: + +- :ref:`Object` **get_closest_point_owner** **(** :ref:`Vector3` to_point **)** + +.. _class_Navigation_set_up_vector: + +- void **set_up_vector** **(** :ref:`Vector3` up **)** + +.. _class_Navigation_get_up_vector: + +- :ref:`Vector3` **get_up_vector** **(** **)** const + + diff --git a/classes/class_navigation2d.rst b/classes/class_navigation2d.rst new file mode 100644 index 000000000..e3dc9acaf --- /dev/null +++ b/classes/class_navigation2d.rst @@ -0,0 +1,61 @@ +.. _class_Navigation2D: + +Navigation2D +============ + +Inherits: :ref:`Node2D` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`navpoly_create` **(** :ref:`NavigationPolygon` mesh, :ref:`Matrix32` xform, :ref:`Object` owner=NULL **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`navpoly_set_transform` **(** :ref:`int` id, :ref:`Matrix32` xform **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`navpoly_remove` **(** :ref:`int` id **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2Array` | :ref:`get_simple_path` **(** :ref:`Vector2` start, :ref:`Vector2` end, :ref:`bool` optimize=true **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_closest_point` **(** :ref:`Vector2` to_point **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_closest_point_owner` **(** :ref:`Vector2` to_point **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_Navigation2D_navpoly_create: + +- :ref:`int` **navpoly_create** **(** :ref:`NavigationPolygon` mesh, :ref:`Matrix32` xform, :ref:`Object` owner=NULL **)** + +.. _class_Navigation2D_navpoly_set_transform: + +- void **navpoly_set_transform** **(** :ref:`int` id, :ref:`Matrix32` xform **)** + +.. _class_Navigation2D_navpoly_remove: + +- void **navpoly_remove** **(** :ref:`int` id **)** + +.. _class_Navigation2D_get_simple_path: + +- :ref:`Vector2Array` **get_simple_path** **(** :ref:`Vector2` start, :ref:`Vector2` end, :ref:`bool` optimize=true **)** + +.. _class_Navigation2D_get_closest_point: + +- :ref:`Vector2` **get_closest_point** **(** :ref:`Vector2` to_point **)** + +.. _class_Navigation2D_get_closest_point_owner: + +- :ref:`Object` **get_closest_point_owner** **(** :ref:`Vector2` to_point **)** + + diff --git a/classes/class_navigationmesh.rst b/classes/class_navigationmesh.rst new file mode 100644 index 000000000..fa4b89314 --- /dev/null +++ b/classes/class_navigationmesh.rst @@ -0,0 +1,61 @@ +.. _class_NavigationMesh: + +NavigationMesh +============== + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_vertices` **(** :ref:`Vector3Array` vertices **)** | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3Array` | :ref:`get_vertices` **(** **)** const | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_polygon` **(** :ref:`IntArray` polygon **)** | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_polygon_count` **(** **)** const | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| :ref:`IntArray` | :ref:`get_polygon` **(** :ref:`int` idx **)** | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_polygons` **(** **)** | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_NavigationMesh_set_vertices: + +- void **set_vertices** **(** :ref:`Vector3Array` vertices **)** + +.. _class_NavigationMesh_get_vertices: + +- :ref:`Vector3Array` **get_vertices** **(** **)** const + +.. _class_NavigationMesh_add_polygon: + +- void **add_polygon** **(** :ref:`IntArray` polygon **)** + +.. _class_NavigationMesh_get_polygon_count: + +- :ref:`int` **get_polygon_count** **(** **)** const + +.. _class_NavigationMesh_get_polygon: + +- :ref:`IntArray` **get_polygon** **(** :ref:`int` idx **)** + +.. _class_NavigationMesh_clear_polygons: + +- void **clear_polygons** **(** **)** + + diff --git a/classes/class_navigationmeshinstance.rst b/classes/class_navigationmeshinstance.rst new file mode 100644 index 000000000..39b3a66bf --- /dev/null +++ b/classes/class_navigationmeshinstance.rst @@ -0,0 +1,49 @@ +.. _class_NavigationMeshInstance: + +NavigationMeshInstance +====================== + +Inherits: :ref:`Spatial` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_navigation_mesh` **(** :ref:`Object` navmesh **)** | ++------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_navigation_mesh` **(** **)** const | ++------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_enabled` **(** :ref:`bool` enabled **)** | ++------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_enabled` **(** **)** const | ++------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_NavigationMeshInstance_set_navigation_mesh: + +- void **set_navigation_mesh** **(** :ref:`Object` navmesh **)** + +.. _class_NavigationMeshInstance_get_navigation_mesh: + +- :ref:`Object` **get_navigation_mesh** **(** **)** const + +.. _class_NavigationMeshInstance_set_enabled: + +- void **set_enabled** **(** :ref:`bool` enabled **)** + +.. _class_NavigationMeshInstance_is_enabled: + +- :ref:`bool` **is_enabled** **(** **)** const + + diff --git a/classes/class_navigationpolygon.rst b/classes/class_navigationpolygon.rst new file mode 100644 index 000000000..22311462e --- /dev/null +++ b/classes/class_navigationpolygon.rst @@ -0,0 +1,109 @@ +.. _class_NavigationPolygon: + +NavigationPolygon +================= + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_vertices` **(** :ref:`Vector2Array` vertices **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2Array` | :ref:`get_vertices` **(** **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_polygon` **(** :ref:`IntArray` polygon **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_polygon_count` **(** **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`IntArray` | :ref:`get_polygon` **(** :ref:`int` idx **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_polygons` **(** **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_outline` **(** :ref:`Vector2Array` outline **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_outline_at_index` **(** :ref:`Vector2Array` outline, :ref:`int` index **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_outline_count` **(** **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_outline` **(** :ref:`int` idx, :ref:`Vector2Array` outline **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2Array` | :ref:`get_outline` **(** :ref:`int` idx **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_outline` **(** :ref:`int` idx **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_outlines` **(** **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`make_polygons_from_outlines` **(** **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_NavigationPolygon_set_vertices: + +- void **set_vertices** **(** :ref:`Vector2Array` vertices **)** + +.. _class_NavigationPolygon_get_vertices: + +- :ref:`Vector2Array` **get_vertices** **(** **)** const + +.. _class_NavigationPolygon_add_polygon: + +- void **add_polygon** **(** :ref:`IntArray` polygon **)** + +.. _class_NavigationPolygon_get_polygon_count: + +- :ref:`int` **get_polygon_count** **(** **)** const + +.. _class_NavigationPolygon_get_polygon: + +- :ref:`IntArray` **get_polygon** **(** :ref:`int` idx **)** + +.. _class_NavigationPolygon_clear_polygons: + +- void **clear_polygons** **(** **)** + +.. _class_NavigationPolygon_add_outline: + +- void **add_outline** **(** :ref:`Vector2Array` outline **)** + +.. _class_NavigationPolygon_add_outline_at_index: + +- void **add_outline_at_index** **(** :ref:`Vector2Array` outline, :ref:`int` index **)** + +.. _class_NavigationPolygon_get_outline_count: + +- :ref:`int` **get_outline_count** **(** **)** const + +.. _class_NavigationPolygon_set_outline: + +- void **set_outline** **(** :ref:`int` idx, :ref:`Vector2Array` outline **)** + +.. _class_NavigationPolygon_get_outline: + +- :ref:`Vector2Array` **get_outline** **(** :ref:`int` idx **)** const + +.. _class_NavigationPolygon_remove_outline: + +- void **remove_outline** **(** :ref:`int` idx **)** + +.. _class_NavigationPolygon_clear_outlines: + +- void **clear_outlines** **(** **)** + +.. _class_NavigationPolygon_make_polygons_from_outlines: + +- void **make_polygons_from_outlines** **(** **)** + + diff --git a/classes/class_navigationpolygoninstance.rst b/classes/class_navigationpolygoninstance.rst new file mode 100644 index 000000000..20943ef2e --- /dev/null +++ b/classes/class_navigationpolygoninstance.rst @@ -0,0 +1,49 @@ +.. _class_NavigationPolygonInstance: + +NavigationPolygonInstance +========================= + +Inherits: :ref:`Node2D` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_navigation_polygon` **(** :ref:`Object` navpoly **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_navigation_polygon` **(** **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_enabled` **(** :ref:`bool` enabled **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_enabled` **(** **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_NavigationPolygonInstance_set_navigation_polygon: + +- void **set_navigation_polygon** **(** :ref:`Object` navpoly **)** + +.. _class_NavigationPolygonInstance_get_navigation_polygon: + +- :ref:`Object` **get_navigation_polygon** **(** **)** const + +.. _class_NavigationPolygonInstance_set_enabled: + +- void **set_enabled** **(** :ref:`bool` enabled **)** + +.. _class_NavigationPolygonInstance_is_enabled: + +- :ref:`bool` **is_enabled** **(** **)** const + + diff --git a/classes/class_nil.rst b/classes/class_nil.rst new file mode 100644 index 000000000..fcbe58fad --- /dev/null +++ b/classes/class_nil.rst @@ -0,0 +1,190 @@ +.. _class_Nil: + +Nil +=== + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + + + +Member Functions +---------------- + ++-------+--------------------------------------------------------------------------------------+ +| void | :ref:`Nil` **(** :ref:`bool` from **)** | ++-------+--------------------------------------------------------------------------------------+ +| void | :ref:`Nil` **(** :ref:`int` from **)** | ++-------+--------------------------------------------------------------------------------------+ +| void | :ref:`Nil` **(** :ref:`float` from **)** | ++-------+--------------------------------------------------------------------------------------+ +| void | :ref:`Nil` **(** :ref:`String` from **)** | ++-------+--------------------------------------------------------------------------------------+ +| void | :ref:`Nil` **(** :ref:`Vector2` from **)** | ++-------+--------------------------------------------------------------------------------------+ +| void | :ref:`Nil` **(** :ref:`Rect2` from **)** | ++-------+--------------------------------------------------------------------------------------+ +| void | :ref:`Nil` **(** :ref:`Vector3` from **)** | ++-------+--------------------------------------------------------------------------------------+ +| void | :ref:`Nil` **(** :ref:`Matrix32` from **)** | ++-------+--------------------------------------------------------------------------------------+ +| void | :ref:`Nil` **(** :ref:`Plane` from **)** | ++-------+--------------------------------------------------------------------------------------+ +| void | :ref:`Nil` **(** :ref:`Quat` from **)** | ++-------+--------------------------------------------------------------------------------------+ +| void | :ref:`Nil` **(** :ref:`AABB` from **)** | ++-------+--------------------------------------------------------------------------------------+ +| void | :ref:`Nil` **(** :ref:`Matrix3` from **)** | ++-------+--------------------------------------------------------------------------------------+ +| void | :ref:`Nil` **(** :ref:`Transform` from **)** | ++-------+--------------------------------------------------------------------------------------+ +| void | :ref:`Nil` **(** :ref:`Color` from **)** | ++-------+--------------------------------------------------------------------------------------+ +| void | :ref:`Nil` **(** :ref:`Image` from **)** | ++-------+--------------------------------------------------------------------------------------+ +| void | :ref:`Nil` **(** :ref:`NodePath` from **)** | ++-------+--------------------------------------------------------------------------------------+ +| void | :ref:`Nil` **(** :ref:`RID` from **)** | ++-------+--------------------------------------------------------------------------------------+ +| void | :ref:`Nil` **(** :ref:`Object` from **)** | ++-------+--------------------------------------------------------------------------------------+ +| void | :ref:`Nil` **(** :ref:`InputEvent` from **)** | ++-------+--------------------------------------------------------------------------------------+ +| void | :ref:`Nil` **(** :ref:`Dictionary` from **)** | ++-------+--------------------------------------------------------------------------------------+ +| void | :ref:`Nil` **(** :ref:`Array` from **)** | ++-------+--------------------------------------------------------------------------------------+ +| void | :ref:`Nil` **(** :ref:`RawArray` from **)** | ++-------+--------------------------------------------------------------------------------------+ +| void | :ref:`Nil` **(** :ref:`IntArray` from **)** | ++-------+--------------------------------------------------------------------------------------+ +| void | :ref:`Nil` **(** :ref:`RealArray` from **)** | ++-------+--------------------------------------------------------------------------------------+ +| void | :ref:`Nil` **(** :ref:`StringArray` from **)** | ++-------+--------------------------------------------------------------------------------------+ +| void | :ref:`Nil` **(** :ref:`Vector2Array` from **)** | ++-------+--------------------------------------------------------------------------------------+ +| void | :ref:`Nil` **(** :ref:`Vector3Array` from **)** | ++-------+--------------------------------------------------------------------------------------+ +| void | :ref:`Nil` **(** :ref:`ColorArray` from **)** | ++-------+--------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_Nil_Nil: + +- void **Nil** **(** :ref:`bool` from **)** + +.. _class_Nil_Nil: + +- void **Nil** **(** :ref:`int` from **)** + +.. _class_Nil_Nil: + +- void **Nil** **(** :ref:`float` from **)** + +.. _class_Nil_Nil: + +- void **Nil** **(** :ref:`String` from **)** + +.. _class_Nil_Nil: + +- void **Nil** **(** :ref:`Vector2` from **)** + +.. _class_Nil_Nil: + +- void **Nil** **(** :ref:`Rect2` from **)** + +.. _class_Nil_Nil: + +- void **Nil** **(** :ref:`Vector3` from **)** + +.. _class_Nil_Nil: + +- void **Nil** **(** :ref:`Matrix32` from **)** + +.. _class_Nil_Nil: + +- void **Nil** **(** :ref:`Plane` from **)** + +.. _class_Nil_Nil: + +- void **Nil** **(** :ref:`Quat` from **)** + +.. _class_Nil_Nil: + +- void **Nil** **(** :ref:`AABB` from **)** + +.. _class_Nil_Nil: + +- void **Nil** **(** :ref:`Matrix3` from **)** + +.. _class_Nil_Nil: + +- void **Nil** **(** :ref:`Transform` from **)** + +.. _class_Nil_Nil: + +- void **Nil** **(** :ref:`Color` from **)** + +.. _class_Nil_Nil: + +- void **Nil** **(** :ref:`Image` from **)** + +.. _class_Nil_Nil: + +- void **Nil** **(** :ref:`NodePath` from **)** + +.. _class_Nil_Nil: + +- void **Nil** **(** :ref:`RID` from **)** + +.. _class_Nil_Nil: + +- void **Nil** **(** :ref:`Object` from **)** + +.. _class_Nil_Nil: + +- void **Nil** **(** :ref:`InputEvent` from **)** + +.. _class_Nil_Nil: + +- void **Nil** **(** :ref:`Dictionary` from **)** + +.. _class_Nil_Nil: + +- void **Nil** **(** :ref:`Array` from **)** + +.. _class_Nil_Nil: + +- void **Nil** **(** :ref:`RawArray` from **)** + +.. _class_Nil_Nil: + +- void **Nil** **(** :ref:`IntArray` from **)** + +.. _class_Nil_Nil: + +- void **Nil** **(** :ref:`RealArray` from **)** + +.. _class_Nil_Nil: + +- void **Nil** **(** :ref:`StringArray` from **)** + +.. _class_Nil_Nil: + +- void **Nil** **(** :ref:`Vector2Array` from **)** + +.. _class_Nil_Nil: + +- void **Nil** **(** :ref:`Vector3Array` from **)** + +.. _class_Nil_Nil: + +- void **Nil** **(** :ref:`ColorArray` from **)** + + diff --git a/classes/class_node.rst b/classes/class_node.rst new file mode 100644 index 000000000..ed3054110 --- /dev/null +++ b/classes/class_node.rst @@ -0,0 +1,573 @@ +.. _class_Node: + +Node +==== + +Inherits: :ref:`Object` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Base class for all the "Scene" elements. + +Member Functions +---------------- + ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_enter_tree` **(** **)** virtual | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_exit_tree` **(** **)** virtual | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_fixed_process` **(** :ref:`float` delta **)** virtual | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_input` **(** :ref:`InputEvent` event **)** virtual | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_process` **(** :ref:`float` delta **)** virtual | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_ready` **(** **)** virtual | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_unhandled_input` **(** :ref:`InputEvent` event **)** virtual | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_unhandled_key_input` **(** :ref:`InputEvent` key_event **)** virtual | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_name` **(** :ref:`String` name **)** | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_name` **(** **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_child` **(** :ref:`Node` node, :ref:`bool` legible_unique_name=false **)** | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_child` **(** :ref:`Node` node **)** | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_child_count` **(** **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_children` **(** **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Node` | :ref:`get_child` **(** :ref:`int` idx **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_node` **(** :ref:`NodePath` path **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Node` | :ref:`get_node` **(** :ref:`NodePath` path **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Parent | :ref:`get_parent` **(** **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Node` | :ref:`find_node` **(** :ref:`String` mask, :ref:`bool` recursive=true, :ref:`bool` owned=true **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_node_and_resource` **(** :ref:`NodePath` path **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_node_and_resource` **(** :ref:`NodePath` path **)** | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_inside_tree` **(** **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_a_parent_of` **(** :ref:`Node` node **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_greater_than` **(** :ref:`Node` node **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`NodePath` | :ref:`get_path` **(** **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`NodePath` | :ref:`get_path_to` **(** :ref:`Node` node **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_to_group` **(** :ref:`String` group, :ref:`bool` persistent=false **)** | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_from_group` **(** :ref:`String` group **)** | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_in_group` **(** :ref:`String` group **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`move_child` **(** :ref:`Node` child_node, :ref:`int` to_pos **)** | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_groups` **(** **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`raise` **(** **)** | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_owner` **(** :ref:`Node` owner **)** | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Node` | :ref:`get_owner` **(** **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_and_skip` **(** **)** | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_index` **(** **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`print_tree` **(** **)** | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_filename` **(** :ref:`String` filename **)** | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_filename` **(** **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`propagate_notification` **(** :ref:`int` what **)** | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_fixed_process` **(** :ref:`bool` enable **)** | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_fixed_process_delta_time` **(** **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_fixed_processing` **(** **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_process` **(** :ref:`bool` enable **)** | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_process_delta_time` **(** **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_processing` **(** **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_process_input` **(** :ref:`bool` enable **)** | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_processing_input` **(** **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_process_unhandled_input` **(** :ref:`bool` enable **)** | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_processing_unhandled_input` **(** **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_process_unhandled_key_input` **(** :ref:`bool` enable **)** | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_processing_unhandled_key_input` **(** **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_pause_mode` **(** :ref:`int` mode **)** | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_pause_mode` **(** **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`can_process` **(** **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`print_stray_nodes` **(** **)** | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_position_in_parent` **(** **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`SceneTree` | :ref:`get_tree` **(** **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Node` | :ref:`duplicate` **(** :ref:`bool` use_instancing=false **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`replace_by` **(** :ref:`Node` node, :ref:`bool` keep_data=false **)** | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_scene_instance_load_placeholder` **(** :ref:`bool` load_placeholder **)** | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_scene_instance_load_placeholder` **(** **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_viewport` **(** **)** const | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`queue_free` **(** **)** | ++------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **renamed** **(** **)** +- **enter_tree** **(** **)** +- **exit_tree** **(** **)** + +Numeric Constants +----------------- + +- **NOTIFICATION_ENTER_TREE** = **10** +- **NOTIFICATION_EXIT_TREE** = **11** +- **NOTIFICATION_MOVED_IN_PARENT** = **12** +- **NOTIFICATION_READY** = **13** +- **NOTIFICATION_FIXED_PROCESS** = **16** +- **NOTIFICATION_PROCESS** = **17** --- Notification received every frame when the process flag is set (see :ref:`set_process`). +- **NOTIFICATION_PARENTED** = **18** --- Notification received when a node is set as a child of another node. Note that this doesn't mean that a node entered the Scene Tree. +- **NOTIFICATION_UNPARENTED** = **19** --- Notification received when a node is unparented (parent removed it from the list of children). +- **NOTIFICATION_PAUSED** = **14** +- **NOTIFICATION_UNPAUSED** = **15** +- **NOTIFICATION_INSTANCED** = **20** +- **PAUSE_MODE_INHERIT** = **0** +- **PAUSE_MODE_STOP** = **1** +- **PAUSE_MODE_PROCESS** = **2** + +Description +----------- + +Nodes can be set as children of other nodes, resulting in a tree arrangement. Any tree of nodes is called a "Scene". + +Scenes can be saved to disk, and then instanced into other scenes. This allows for very high flexibility in the architecture and data model of the projects. + +:ref:`SceneMainLoop` contains the "active" tree of nodes, and a node becomes active (receinving NOTIFICATION_ENTER_SCENE) when added to that tree. + +A node can contain any number of nodes as a children (but there is only one tree root) with the requirement that no two childrens with the same name can exist. + +Nodes can, optionally, be added to groups. This makes it easy to reach a number of nodes from the code (for example an "enemies" group). + +Nodes can be set to "process" state, so they constantly receive a callback requesting them to process (do anything). Normal processing (:ref:`_process`) happens as fast as possible and is dependent on the frame rate, so the processing time delta is variable. Fixed processing (:ref:`_fixed_process`) happens a fixed amount of times per second (by default 60) and is useful to link itself to the physics. + +Nodes can also process input events. When set, the :ref:`_input` function will be called with every input that the program receives. Since this is usually too overkill (unless used for simple projects), an :ref:`_unhandled_input` function is called when the input was not handled by anyone else (usually, GUI :ref:`Control` nodes). + +To keep track of the scene hieararchy (specially when instancing scenes into scenes) an "owner" can be set to a node. This keeps track of who instanced what. This is mostly useful when writing editors and tools, though. + +Finally, when a node is freed, it will free all its children nodes too. + +Member Function Description +--------------------------- + +.. _class_Node__enter_tree: + +- void **_enter_tree** **(** **)** virtual + +.. _class_Node__exit_tree: + +- void **_exit_tree** **(** **)** virtual + +.. _class_Node__fixed_process: + +- void **_fixed_process** **(** :ref:`float` delta **)** virtual + +Called for fixed processing (synced to the physics). + +.. _class_Node__input: + +- void **_input** **(** :ref:`InputEvent` event **)** virtual + +Called when any input happens (also must enable with :ref:`set_process_input` or the property). + +.. _class_Node__process: + +- void **_process** **(** :ref:`float` delta **)** virtual + +Called for processing. This is called every frame, with the delta time from the previous frame. + +.. _class_Node__ready: + +- void **_ready** **(** **)** virtual + +Called when ready (entered scene and children entered too). + +.. _class_Node__unhandled_input: + +- void **_unhandled_input** **(** :ref:`InputEvent` event **)** virtual + +Called when any input happens that was not handled by something else (also must enable with :ref:`set_process_unhandled_input` or the property). + +.. _class_Node__unhandled_key_input: + +- void **_unhandled_key_input** **(** :ref:`InputEvent` key_event **)** virtual + +Called when any key input happens that was not handled by something else. + +.. _class_Node_set_name: + +- void **set_name** **(** :ref:`String` name **)** + +Set the name of the :ref:`Node`. Name must be unique within parent, and setting an already existing name will cause for the node to be automatically renamed. + +.. _class_Node_get_name: + +- :ref:`String` **get_name** **(** **)** const + +Return the name of the :ref:`Node`. Name is be unique within parent. + +.. _class_Node_add_child: + +- void **add_child** **(** :ref:`Node` node, :ref:`bool` legible_unique_name=false **)** + +Add a child :ref:`Node`. Nodes can have as many children as they want, but every child must have a unique name. Children nodes are automatically deleted when the parent node is deleted, so deleting a whole scene is performed by deleting its topmost node. + +The optional boolean argument enforces creating child node with human-readable names, based on the name of node being instanced instead of its type only. + +.. _class_Node_remove_child: + +- void **remove_child** **(** :ref:`Node` node **)** + +Remove a child :ref:`Node`. Node is NOT deleted and will have to be deleted manually. + +.. _class_Node_get_child_count: + +- :ref:`int` **get_child_count** **(** **)** const + +Return the amount of children nodes. + +.. _class_Node_get_children: + +- :ref:`Array` **get_children** **(** **)** const + +.. _class_Node_get_child: + +- :ref:`Node` **get_child** **(** :ref:`int` idx **)** const + +Return a children node by it's index (see :ref:`get_child_count`). This method is often used for iterating all children of a node. + +.. _class_Node_has_node: + +- :ref:`bool` **has_node** **(** :ref:`NodePath` path **)** const + +.. _class_Node_get_node: + +- :ref:`Node` **get_node** **(** :ref:`NodePath` path **)** const + +Fetch a node. NodePath must be valid (or else error will occur) and can be either the path to child node, a relative path (from the current node to another node), or an absolute path to a node. + +Note: fetching absolute paths only works when the node is inside the scene tree (see :ref:`is_inside_scene`). Examples. Assume your current node is Character and following tree: + + + + root/ + + root/Character + + root/Character/Sword + + root/Character/Backpack/Dagger + + root/MyGame + + root/Swamp/Alligator + + root/Swamp/Mosquito + + root/Swamp/Goblin + + + + Possible paths are: + + - get_node("Sword") + + - get_node("Backpack/Dagger") + + - get_node("../Swamp/Alligator") + + - get_node("/root/MyGame") + +.. _class_Node_get_parent: + +- Parent **get_parent** **(** **)** const + +Return the parent :ref:`Node` of the current :ref:`Node`, or an empty Object if the node lacks a parent. + +.. _class_Node_find_node: + +- :ref:`Node` **find_node** **(** :ref:`String` mask, :ref:`bool` recursive=true, :ref:`bool` owned=true **)** const + +.. _class_Node_has_node_and_resource: + +- :ref:`bool` **has_node_and_resource** **(** :ref:`NodePath` path **)** const + +.. _class_Node_get_node_and_resource: + +- :ref:`Array` **get_node_and_resource** **(** :ref:`NodePath` path **)** + +.. _class_Node_is_inside_tree: + +- :ref:`bool` **is_inside_tree** **(** **)** const + +.. _class_Node_is_a_parent_of: + +- :ref:`bool` **is_a_parent_of** **(** :ref:`Node` node **)** const + +Return *true* if the "node" argument is a direct or indirect child of the current node, otherwise return *false*. + +.. _class_Node_is_greater_than: + +- :ref:`bool` **is_greater_than** **(** :ref:`Node` node **)** const + +Return *true* if "node" occurs later in the scene hierarchy than the current node, otherwise return *false*. + +.. _class_Node_get_path: + +- :ref:`NodePath` **get_path** **(** **)** const + +Return the absolute path of the current node. This only works if the curent node is inside the scene tree (see :ref:`is_inside_scene`). + +.. _class_Node_get_path_to: + +- :ref:`NodePath` **get_path_to** **(** :ref:`Node` node **)** const + +Return the relative path from the current node to the specified node in "node" argument. Both nodes must be in the same scene, or else the function will fail. + +.. _class_Node_add_to_group: + +- void **add_to_group** **(** :ref:`String` group, :ref:`bool` persistent=false **)** + +Add a node to a group. Groups are helpers to name and organize group of nodes, like for example: "Enemies", "Collectables", etc. A :ref:`Node` can be in any number of groups. Nodes can be assigned a group at any time, but will not be added to it until they are inside the scene tree (see :ref:`is_inside_scene`). + +.. _class_Node_remove_from_group: + +- void **remove_from_group** **(** :ref:`String` group **)** + +Remove a node from a group. + +.. _class_Node_is_in_group: + +- :ref:`bool` **is_in_group** **(** :ref:`String` group **)** const + +.. _class_Node_move_child: + +- void **move_child** **(** :ref:`Node` child_node, :ref:`int` to_pos **)** + +Move a child node to a different position (order) amongst the other children. Since calls, signals, etc are performed by tree order, changing the order of chilren nodes may be useful. + +.. _class_Node_get_groups: + +- :ref:`Array` **get_groups** **(** **)** const + +.. _class_Node_raise: + +- void **raise** **(** **)** + +Move this node to the top of the array of nodes of the parent node. This is often useful on GUIs (:ref:`Control`), because their order of drawing fully depends on their order in the tree. + +.. _class_Node_set_owner: + +- void **set_owner** **(** :ref:`Node` owner **)** + +Set the node owner. A node can have any other node as owner (as long as a valid parent, grandparent, etc ascending in the tree). When saving a node (using SceneSaver) all the nodes it owns will be saved with it. This allows to create complex SceneTrees, with instancing and subinstancing. + +.. _class_Node_get_owner: + +- :ref:`Node` **get_owner** **(** **)** const + +Get the node owner (see :ref:`set_node_owner`). + +.. _class_Node_remove_and_skip: + +- void **remove_and_skip** **(** **)** + +Remove a node and set all its children as childrens of the parent node (if exists). All even subscriptions that pass by the removed node will be unsubscribed. + +.. _class_Node_get_index: + +- :ref:`int` **get_index** **(** **)** const + +Get the node index in the parent (assuming it has a parent). + +.. _class_Node_print_tree: + +- void **print_tree** **(** **)** + +Print the screne to stdout. Used mainly for debugging purposes. + +.. _class_Node_set_filename: + +- void **set_filename** **(** :ref:`String` filename **)** + +A node can contain a filename. This filename should not be changed by the user, unless writing editors and tools. When a scene is instanced from a file, it topmost node contains the filename from where it was loaded. + +.. _class_Node_get_filename: + +- :ref:`String` **get_filename** **(** **)** const + +Return a filename that may be containedA node can contained by the node. When a scene is instanced from a file, it topmost node contains the filename from where it was loaded (see :ref:`set_filename`). + +.. _class_Node_propagate_notification: + +- void **propagate_notification** **(** :ref:`int` what **)** + +Notify the current node and all its chldren recursively by calling notification() in all of them. + +.. _class_Node_set_fixed_process: + +- void **set_fixed_process** **(** :ref:`bool` enable **)** + +Enables or disables node fixed framerate processing. When a node is being processed, it will receive a NOTIFICATION_PROCESS at a fixed (usually 60fps, check :ref:`OS` to change that) interval (and the :ref:`_fixed_process` callback will be called if exists). It is common to check how much time was elapsed since the previous frame by calling :ref:`get_fixed_process_time`. + +.. _class_Node_get_fixed_process_delta_time: + +- :ref:`float` **get_fixed_process_delta_time** **(** **)** const + +Return the time elapsed since the last fixed frame. This is always the same in fixed proecssing unless the frames per second is changed in :ref:`OS`. + +.. _class_Node_is_fixed_processing: + +- :ref:`bool` **is_fixed_processing** **(** **)** const + +Return true if fixed processing is enabled (see :ref:`set_fixed_process`). + +.. _class_Node_set_process: + +- void **set_process** **(** :ref:`bool` enable **)** + +Enables or disables node processing. When a node is being processed, it will receive a NOTIFICATION_PROCESS on every drawn frame (and the :ref:`_process` callback will be called if exists). It is common to check how much time was elapsed since the previous frame by calling :ref:`get_process_time`. + +.. _class_Node_get_process_delta_time: + +- :ref:`float` **get_process_delta_time** **(** **)** const + +Return the time elapsed (in seconds) since the last process callback. This is almost always different each time. + +.. _class_Node_is_processing: + +- :ref:`bool` **is_processing** **(** **)** const + +Return whether processing is enabled in the current node (see :ref:`set_process`). + +.. _class_Node_set_process_input: + +- void **set_process_input** **(** :ref:`bool` enable **)** + +Enable input processing for node. This is not requiered for GUI controls! It hooks up the node to receive all input (see :ref:`_input`). + +.. _class_Node_is_processing_input: + +- :ref:`bool` **is_processing_input** **(** **)** const + +Return true if the node is processing input (see :ref:`set_process_input`). + +.. _class_Node_set_process_unhandled_input: + +- void **set_process_unhandled_input** **(** :ref:`bool` enable **)** + +Enable unhandled input processing for node. This is not requiered for GUI controls! It hooks up the node to receive all input that was not previously handled before (usually by a :ref:`Control`). (see :ref:`_unhandled_input`). + +.. _class_Node_is_processing_unhandled_input: + +- :ref:`bool` **is_processing_unhandled_input** **(** **)** const + +Return true if the node is processing unhandled input (see :ref:`set_process_unhandled_input`). + +.. _class_Node_set_process_unhandled_key_input: + +- void **set_process_unhandled_key_input** **(** :ref:`bool` enable **)** + +.. _class_Node_is_processing_unhandled_key_input: + +- :ref:`bool` **is_processing_unhandled_key_input** **(** **)** const + +.. _class_Node_set_pause_mode: + +- void **set_pause_mode** **(** :ref:`int` mode **)** + +.. _class_Node_get_pause_mode: + +- :ref:`int` **get_pause_mode** **(** **)** const + +.. _class_Node_can_process: + +- :ref:`bool` **can_process** **(** **)** const + +Return true if the node can process. + +.. _class_Node_print_stray_nodes: + +- void **print_stray_nodes** **(** **)** + +.. _class_Node_get_position_in_parent: + +- :ref:`int` **get_position_in_parent** **(** **)** const + +.. _class_Node_get_tree: + +- :ref:`SceneTree` **get_tree** **(** **)** const + +.. _class_Node_duplicate: + +- :ref:`Node` **duplicate** **(** :ref:`bool` use_instancing=false **)** const + +.. _class_Node_replace_by: + +- void **replace_by** **(** :ref:`Node` node, :ref:`bool` keep_data=false **)** + +Replace a node in a scene by a given one. Subscriptions that pass through this node will be lost. + +.. _class_Node_set_scene_instance_load_placeholder: + +- void **set_scene_instance_load_placeholder** **(** :ref:`bool` load_placeholder **)** + +.. _class_Node_get_scene_instance_load_placeholder: + +- :ref:`bool` **get_scene_instance_load_placeholder** **(** **)** const + +.. _class_Node_get_viewport: + +- :ref:`Object` **get_viewport** **(** **)** const + +.. _class_Node_queue_free: + +- void **queue_free** **(** **)** + + diff --git a/classes/class_node2d.rst b/classes/class_node2d.rst new file mode 100644 index 000000000..98a2084f1 --- /dev/null +++ b/classes/class_node2d.rst @@ -0,0 +1,188 @@ +.. _class_Node2D: + +Node2D +====== + +Inherits: :ref:`CanvasItem` +--------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Base node for 2D system. + +Member Functions +---------------- + ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_pos` **(** :ref:`Vector2` pos **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_rot` **(** :ref:`float` rot **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_scale` **(** :ref:`Vector2` scale **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_pos` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_rot` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_scale` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`rotate` **(** :ref:`float` radians **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`move_local_x` **(** :ref:`float` delta, :ref:`bool` scaled=false **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`move_local_y` **(** :ref:`float` delta, :ref:`bool` scaled=false **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`translate` **(** :ref:`Vector2` offset **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_translate` **(** :ref:`Vector2` offset **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`scale` **(** :ref:`Vector2` ratio **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_global_pos` **(** :ref:`Vector2` pos **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_global_pos` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_transform` **(** :ref:`Matrix32` xform **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_global_transform` **(** :ref:`Matrix32` xform **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`look_at` **(** :ref:`Vector2` point **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_angle_to` **(** :ref:`Vector2` point **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_z` **(** :ref:`int` z **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_z` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_z_as_relative` **(** :ref:`bool` enable **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_z_relative` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`edit_set_pivot` **(** :ref:`Vector2` pivot **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`get_relative_transform_to_parent` **(** :ref:`Object` parent **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Base node for 2D system. Node2D contains a position, rotation and scale, which is used to position and animate. It can alternatively be used with a custom 2D transform (:ref:`Matrix32`). A tree of Node2Ds allows complex hierachies for animation and positioning. + +Member Function Description +--------------------------- + +.. _class_Node2D_set_pos: + +- void **set_pos** **(** :ref:`Vector2` pos **)** + +Set the position of the 2d node. + +.. _class_Node2D_set_rot: + +- void **set_rot** **(** :ref:`float` rot **)** + +Set the rotation of the 2d node. + +.. _class_Node2D_set_scale: + +- void **set_scale** **(** :ref:`Vector2` scale **)** + +Set the scale of the 2d node. + +.. _class_Node2D_get_pos: + +- :ref:`Vector2` **get_pos** **(** **)** const + +Return the position of the 2D node. + +.. _class_Node2D_get_rot: + +- :ref:`float` **get_rot** **(** **)** const + +Return the rotation of the 2D node. + +.. _class_Node2D_get_scale: + +- :ref:`Vector2` **get_scale** **(** **)** const + +Return the scale of the 2D node. + +.. _class_Node2D_rotate: + +- void **rotate** **(** :ref:`float` radians **)** + +.. _class_Node2D_move_local_x: + +- void **move_local_x** **(** :ref:`float` delta, :ref:`bool` scaled=false **)** + +.. _class_Node2D_move_local_y: + +- void **move_local_y** **(** :ref:`float` delta, :ref:`bool` scaled=false **)** + +.. _class_Node2D_translate: + +- void **translate** **(** :ref:`Vector2` offset **)** + +.. _class_Node2D_global_translate: + +- void **global_translate** **(** :ref:`Vector2` offset **)** + +.. _class_Node2D_scale: + +- void **scale** **(** :ref:`Vector2` ratio **)** + +.. _class_Node2D_set_global_pos: + +- void **set_global_pos** **(** :ref:`Vector2` pos **)** + +.. _class_Node2D_get_global_pos: + +- :ref:`Vector2` **get_global_pos** **(** **)** const + +Return the global position of the 2D node. + +.. _class_Node2D_set_transform: + +- void **set_transform** **(** :ref:`Matrix32` xform **)** + +.. _class_Node2D_set_global_transform: + +- void **set_global_transform** **(** :ref:`Matrix32` xform **)** + +.. _class_Node2D_look_at: + +- void **look_at** **(** :ref:`Vector2` point **)** + +.. _class_Node2D_get_angle_to: + +- :ref:`float` **get_angle_to** **(** :ref:`Vector2` point **)** const + +.. _class_Node2D_set_z: + +- void **set_z** **(** :ref:`int` z **)** + +.. _class_Node2D_get_z: + +- :ref:`int` **get_z** **(** **)** const + +.. _class_Node2D_set_z_as_relative: + +- void **set_z_as_relative** **(** :ref:`bool` enable **)** + +.. _class_Node2D_is_z_relative: + +- :ref:`bool` **is_z_relative** **(** **)** const + +.. _class_Node2D_edit_set_pivot: + +- void **edit_set_pivot** **(** :ref:`Vector2` pivot **)** + +.. _class_Node2D_get_relative_transform_to_parent: + +- :ref:`Matrix32` **get_relative_transform_to_parent** **(** :ref:`Object` parent **)** const + + diff --git a/classes/class_nodepath.rst b/classes/class_nodepath.rst new file mode 100644 index 000000000..5935e998e --- /dev/null +++ b/classes/class_nodepath.rst @@ -0,0 +1,89 @@ +.. _class_NodePath: + +NodePath +======== + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + +Built-in type optimized for path traversing. + +Member Functions +---------------- + ++----------------------------------+-----------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_name` **(** :ref:`int` idx **)** | ++----------------------------------+-----------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_name_count` **(** **)** | ++----------------------------------+-----------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_property` **(** **)** | ++----------------------------------+-----------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_subname` **(** :ref:`int` idx **)** | ++----------------------------------+-----------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_subname_count` **(** **)** | ++----------------------------------+-----------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_absolute` **(** **)** | ++----------------------------------+-----------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_empty` **(** **)** | ++----------------------------------+-----------------------------------------------------------------------------------------+ +| :ref:`NodePath` | :ref:`NodePath` **(** :ref:`String` from **)** | ++----------------------------------+-----------------------------------------------------------------------------------------+ + +Description +----------- + +Built-in type optimized for path traversing. A Node path is an optimized compiled path used for traversing the scene tree. It references nodes and can reference properties in that node, or even reference properties inside the resources of the node. + +Member Function Description +--------------------------- + +.. _class_NodePath_get_name: + +- :ref:`String` **get_name** **(** :ref:`int` idx **)** + +Return a path level name. + +.. _class_NodePath_get_name_count: + +- :ref:`int` **get_name_count** **(** **)** + +Return the path level count. + +.. _class_NodePath_get_property: + +- :ref:`String` **get_property** **(** **)** + +Return the property associated (empty if none). + +.. _class_NodePath_get_subname: + +- :ref:`String` **get_subname** **(** :ref:`int` idx **)** + +Return the subname level name. + +.. _class_NodePath_get_subname_count: + +- :ref:`int` **get_subname_count** **(** **)** + +Return the subname count. + +.. _class_NodePath_is_absolute: + +- :ref:`bool` **is_absolute** **(** **)** + +Return true if the node path is absolute (not relative). + +.. _class_NodePath_is_empty: + +- :ref:`bool` **is_empty** **(** **)** + +Return true if the node path is empty. + +.. _class_NodePath_NodePath: + +- :ref:`NodePath` **NodePath** **(** :ref:`String` from **)** + + diff --git a/classes/class_object.rst b/classes/class_object.rst new file mode 100644 index 000000000..8d13eb3fa --- /dev/null +++ b/classes/class_object.rst @@ -0,0 +1,351 @@ +.. _class_Object: + +Object +====== + +Category: Core +-------------- + +Brief Description +----------------- + +Base class for all non built-in types. + +Member Functions +---------------- + ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_get` **(** :ref:`String` property **)** virtual | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`_get_property_list` **(** **)** virtual | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_init` **(** **)** virtual | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_notification` **(** :ref:`int` what **)** virtual | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_set` **(** :ref:`String` property, var value **)** virtual | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`free` **(** **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_type` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_type` **(** :ref:`String` type **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set` **(** :ref:`String` property, var value **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`get` **(** :ref:`String` property **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_property_list` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_method_list` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`notification` **(** :ref:`int` what, :ref:`bool` reversed=false **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_instance_ID` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_script` **(** :ref:`Script` script **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Script` | :ref:`get_script` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_meta` **(** :ref:`String` name, var value **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`get_meta` **(** :ref:`String` name **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_meta` **(** :ref:`String` name **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_meta_list` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_user_signal` **(** :ref:`String` signal, :ref:`Array` arguments=Array() **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_user_signal` **(** :ref:`String` signal **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`emit_signal` **(** :ref:`String` signal, var arg0=NULL, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`call` **(** :ref:`String` method, var arg0=NULL, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL, var arg5=NULL, var arg6=NULL, var arg7=NULL, var arg8=NULL, var arg9=NULL **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`call_deferred` **(** :ref:`String` method, var arg0=NULL, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Variant | :ref:`callv` **(** :ref:`String` method, :ref:`Array` arg_array **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_method` **(** :ref:`String` method **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_signal_list` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_signal_connection_list` **(** :ref:`String` signal **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`connect` **(** :ref:`String` signal, :ref:`Object` target, :ref:`String` method, :ref:`Array` binds=Array(), :ref:`int` flags=0 **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`disconnect` **(** :ref:`String` signal, :ref:`Object` target, :ref:`String` method **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_connected` **(** :ref:`String` signal, :ref:`Object` target, :ref:`String` method **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_block_signals` **(** :ref:`bool` enable **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_blocking_signals` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_message_translation` **(** :ref:`bool` enable **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`can_translate_messages` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`property_list_changed_notify` **(** **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`XL_MESSAGE` **(** :ref:`String` message **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`tr` **(** :ref:`String` message **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_queued_for_deletion` **(** **)** const | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **script_changed** **(** **)** + +Numeric Constants +----------------- + +- **NOTIFICATION_POSTINITIALIZE** = **0** --- Called right when the object is initialized. Not available in script. +- **NOTIFICATION_PREDELETE** = **1** --- Called before the object is about to be deleted. +- **CONNECT_DEFERRED** = **1** --- Connect a signal in deferred mode. This way, signal emissions are stored in a queue, then set on idle time. +- **CONNECT_PERSIST** = **2** --- Persisting connections are saved when the object is serialized to file. +- **CONNECT_ONESHOT** = **4** --- One short connections disconnect themselves after emission. + +Description +----------- + +Base class for all non built-in types. Everything not a built-in type starts the inheritance chain from this class. + +Objects do not manage memory, if inheriting from one the object will most likely have to be deleted manually (call the :ref:`free` function from the script or delete from C++). + +Some derivates add memory management, such as :ref:`Reference` (which keps a reference count and deletes itself automatically when no longer referenced) and :ref:`Node`, which deletes the children tree when deleted. + +Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in :ref:`_get_property_list` and handled in :ref:`_get` and :ref:`_set`. However, scripting languages and C++ have simper means to export them. + +Objects also receive notifications (:ref:`_notification`). Notifications are a simple way to notify the object about simple events, so they can all be handled together. + +Member Function Description +--------------------------- + +.. _class_Object__get: + +- void **_get** **(** :ref:`String` property **)** virtual + +Return a property, return null if the property does not exist. + +.. _class_Object__get_property_list: + +- :ref:`Array` **_get_property_list** **(** **)** virtual + +Return the property list, array of dictionaries, dictionaries must countain: name:String, type:int (see TYPE_* enum in globals) and optionally: hint:int (see PROPERTY_HINT_* in globals), hint_string:String, usage:int (see PROPERTY_USAGE_* in globals). + +.. _class_Object__init: + +- void **_init** **(** **)** virtual + +.. _class_Object__notification: + +- void **_notification** **(** :ref:`int` what **)** virtual + +Notification request, the notification id is received. + +.. _class_Object__set: + +- void **_set** **(** :ref:`String` property, var value **)** virtual + +Set a property. Return true if the property was found. + +.. _class_Object_free: + +- void **free** **(** **)** + +.. _class_Object_get_type: + +- :ref:`String` **get_type** **(** **)** const + +Return the type of the object as a string. + +.. _class_Object_is_type: + +- :ref:`bool` **is_type** **(** :ref:`String` type **)** const + +Check the type of the obeject against a string (including inheritance). + +.. _class_Object_set: + +- void **set** **(** :ref:`String` property, var value **)** + +Set property into the object. + +.. _class_Object_get: + +- void **get** **(** :ref:`String` property **)** const + +Get a property from the object. + +.. _class_Object_get_property_list: + +- :ref:`Array` **get_property_list** **(** **)** const + +Return the list of properties as an array of dictionaries, dictionaries countain: name:String, type:int (see TYPE_* enum in globals) and optionally: hint:int (see PROPERTY_HINT_* in globals), hint_string:String, usage:int (see PROPERTY_USAGE_* in globals). + +.. _class_Object_get_method_list: + +- :ref:`Array` **get_method_list** **(** **)** const + +.. _class_Object_notification: + +- void **notification** **(** :ref:`int` what, :ref:`bool` reversed=false **)** + +Notify the object of something. + +.. _class_Object_get_instance_ID: + +- :ref:`int` **get_instance_ID** **(** **)** const + +Return the instance ID. All objects have a unique instance ID. + +.. _class_Object_set_script: + +- void **set_script** **(** :ref:`Script` script **)** + +Set a script into the object, scripts extend the object functionality. + +.. _class_Object_get_script: + +- :ref:`Script` **get_script** **(** **)** const + +Return the object script (or null if it doesn't have one). + +.. _class_Object_set_meta: + +- void **set_meta** **(** :ref:`String` name, var value **)** + +Set a metadata into the object. Medatada is serialized. Metadata can be *anything*. + +.. _class_Object_get_meta: + +- void **get_meta** **(** :ref:`String` name **)** const + +Return a metadata from the object. + +.. _class_Object_has_meta: + +- :ref:`bool` **has_meta** **(** :ref:`String` name **)** const + +Return true if a metadata is found with the requested name. + +.. _class_Object_get_meta_list: + +- :ref:`StringArray` **get_meta_list** **(** **)** const + +Return the list of metadatas in the object. + +.. _class_Object_add_user_signal: + +- void **add_user_signal** **(** :ref:`String` signal, :ref:`Array` arguments=Array() **)** + +Add a user signal (can be added anytime). Arguments are optional, but can be added as an array of dictionaries, each containing "name" and "type" (from :ref:`@Global Scope` TYPE_*). + +.. _class_Object_has_user_signal: + +- :ref:`bool` **has_user_signal** **(** :ref:`String` signal **)** const + +.. _class_Object_emit_signal: + +- void **emit_signal** **(** :ref:`String` signal, var arg0=NULL, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL **)** + +Emit a signal. Arguments are passed in an array. + +.. _class_Object_call: + +- void **call** **(** :ref:`String` method, var arg0=NULL, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL, var arg5=NULL, var arg6=NULL, var arg7=NULL, var arg8=NULL, var arg9=NULL **)** + +Call a function in the object, result is returned. + +.. _class_Object_call_deferred: + +- void **call_deferred** **(** :ref:`String` method, var arg0=NULL, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL **)** + +Create and store a function in the object. The call will take place on idle time. + +.. _class_Object_callv: + +- Variant **callv** **(** :ref:`String` method, :ref:`Array` arg_array **)** + +.. _class_Object_has_method: + +- :ref:`bool` **has_method** **(** :ref:`String` method **)** const + +.. _class_Object_get_signal_list: + +- :ref:`Array` **get_signal_list** **(** **)** const + +Return the list of signals as an array of dictionaries. + +.. _class_Object_get_signal_connection_list: + +- :ref:`Array` **get_signal_connection_list** **(** :ref:`String` signal **)** const + +.. _class_Object_connect: + +- :ref:`int` **connect** **(** :ref:`String` signal, :ref:`Object` target, :ref:`String` method, :ref:`Array` binds=Array(), :ref:`int` flags=0 **)** + +Connect a signal to a method at a target (member function). Binds are optional and are passed as extra arguments to the call. Flags specify optional deferred or one shot connections, see enum CONNECT_*. A signal can only be connected once to a method, and it will throw an error if already connected. If you want to avoid this, use :ref:`is_connected` to check. + +.. _class_Object_disconnect: + +- void **disconnect** **(** :ref:`String` signal, :ref:`Object` target, :ref:`String` method **)** + +Disconnect a signal from a method. + +.. _class_Object_is_connected: + +- :ref:`bool` **is_connected** **(** :ref:`String` signal, :ref:`Object` target, :ref:`String` method **)** const + +Return true if a connection exists for a given signal and target/method. + +.. _class_Object_set_block_signals: + +- void **set_block_signals** **(** :ref:`bool` enable **)** + +If set to true, signal emission is blocked. + +.. _class_Object_is_blocking_signals: + +- :ref:`bool` **is_blocking_signals** **(** **)** const + +Return true if signal emission blocking is enabled. + +.. _class_Object_set_message_translation: + +- void **set_message_translation** **(** :ref:`bool` enable **)** + +Set true if this object can translate strings (in calls to tr() ). Default is true. + +.. _class_Object_can_translate_messages: + +- :ref:`bool` **can_translate_messages** **(** **)** const + +Return true if this object can translate strings. + +.. _class_Object_property_list_changed_notify: + +- void **property_list_changed_notify** **(** **)** + +.. _class_Object_XL_MESSAGE: + +- :ref:`String` **XL_MESSAGE** **(** :ref:`String` message **)** const + +Deprecated, will go away. + +.. _class_Object_tr: + +- :ref:`String` **tr** **(** :ref:`String` message **)** const + +Translate a message. Only works in message translation is enabled (which is by default). See :ref:`set_message_translation`. + +.. _class_Object_is_queued_for_deletion: + +- :ref:`bool` **is_queued_for_deletion** **(** **)** const + + diff --git a/classes/class_occluderpolygon2d.rst b/classes/class_occluderpolygon2d.rst new file mode 100644 index 000000000..e9d5b7f5c --- /dev/null +++ b/classes/class_occluderpolygon2d.rst @@ -0,0 +1,68 @@ +.. _class_OccluderPolygon2D: + +OccluderPolygon2D +================= + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_closed` **(** :ref:`bool` closed **)** | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_closed` **(** **)** const | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_cull_mode` **(** :ref:`int` cull_mode **)** | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_cull_mode` **(** **)** const | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_polygon` **(** :ref:`Vector2Array` polygon **)** | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2Array` | :ref:`get_polygon` **(** **)** const | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **CULL_DISABLED** = **0** +- **CULL_CLOCKWISE** = **1** +- **CULL_COUNTER_CLOCKWISE** = **2** + +Member Function Description +--------------------------- + +.. _class_OccluderPolygon2D_set_closed: + +- void **set_closed** **(** :ref:`bool` closed **)** + +.. _class_OccluderPolygon2D_is_closed: + +- :ref:`bool` **is_closed** **(** **)** const + +.. _class_OccluderPolygon2D_set_cull_mode: + +- void **set_cull_mode** **(** :ref:`int` cull_mode **)** + +.. _class_OccluderPolygon2D_get_cull_mode: + +- :ref:`int` **get_cull_mode** **(** **)** const + +.. _class_OccluderPolygon2D_set_polygon: + +- void **set_polygon** **(** :ref:`Vector2Array` polygon **)** + +.. _class_OccluderPolygon2D_get_polygon: + +- :ref:`Vector2Array` **get_polygon** **(** **)** const + + diff --git a/classes/class_omnilight.rst b/classes/class_omnilight.rst new file mode 100644 index 000000000..155877208 --- /dev/null +++ b/classes/class_omnilight.rst @@ -0,0 +1,21 @@ +.. _class_OmniLight: + +OmniLight +========= + +Inherits: :ref:`Light` +----------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +OmniDirectional Light, such as a lightbulb or a candle. + +Description +----------- + +An OmniDirectional light is a type of :ref:`Light` node that emits lights in all directions. The light is attenuated through the distance and this attenuation can be configured by changing the energy, radius and attenuation parameters of :ref:`Light`. TODO: Image of an omnilight. + diff --git a/classes/class_optionbutton.rst b/classes/class_optionbutton.rst new file mode 100644 index 000000000..33b38d412 --- /dev/null +++ b/classes/class_optionbutton.rst @@ -0,0 +1,181 @@ +.. _class_OptionButton: + +OptionButton +============ + +Inherits: :ref:`Button` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Button control that provides selectable options when pressed. + +Member Functions +---------------- + ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_item` **(** :ref:`String` label, :ref:`int` id=-1 **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_icon_item` **(** :ref:`Texture` texture, :ref:`String` label, :ref:`int` id **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_text` **(** :ref:`int` idx, :ref:`String` text **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_icon` **(** :ref:`int` idx, :ref:`Texture` texture **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_disabled` **(** :ref:`int` idx, :ref:`bool` disabled **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_ID` **(** :ref:`int` idx, :ref:`int` id **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_metadata` **(** :ref:`int` idx, var metadata **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_item_text` **(** :ref:`int` idx **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_item_icon` **(** :ref:`int` idx **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_item_ID` **(** :ref:`int` idx **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`get_item_metadata` **(** :ref:`int` idx **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_item_disabled` **(** :ref:`int` idx **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_item_count` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_separator` **(** **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`select` **(** :ref:`int` idx **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_selected` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_selected_ID` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`get_selected_metadata` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_item` **(** :ref:`int` idx **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **item_selected** **(** :ref:`int` ID **)** + +Description +----------- + +OptionButton is a type button that provides a selectable list of items when pressed. The item selected becomes the "current" item and is displayed as the button text. + +Member Function Description +--------------------------- + +.. _class_OptionButton_add_item: + +- void **add_item** **(** :ref:`String` label, :ref:`int` id=-1 **)** + +Add an item, with text "label" and (optionally) id. If no "id" is passed, "id" becomes the item index. New items are appended at the end. + +.. _class_OptionButton_add_icon_item: + +- void **add_icon_item** **(** :ref:`Texture` texture, :ref:`String` label, :ref:`int` id **)** + +Add an item, with a "texture" icon, text "label" and (optionally) id. If no "id" is passed, "id" becomes the item index. New items are appended at the end. + +.. _class_OptionButton_set_item_text: + +- void **set_item_text** **(** :ref:`int` idx, :ref:`String` text **)** + +Set the text of an item at index "idx". + +.. _class_OptionButton_set_item_icon: + +- void **set_item_icon** **(** :ref:`int` idx, :ref:`Texture` texture **)** + +Set the icon of an item at index "idx". + +.. _class_OptionButton_set_item_disabled: + +- void **set_item_disabled** **(** :ref:`int` idx, :ref:`bool` disabled **)** + +.. _class_OptionButton_set_item_ID: + +- void **set_item_ID** **(** :ref:`int` idx, :ref:`int` id **)** + +Set the ID of an item at index "idx". + +.. _class_OptionButton_set_item_metadata: + +- void **set_item_metadata** **(** :ref:`int` idx, var metadata **)** + +.. _class_OptionButton_get_item_text: + +- :ref:`String` **get_item_text** **(** :ref:`int` idx **)** const + +Return the text of the item at index "idx". + +.. _class_OptionButton_get_item_icon: + +- :ref:`Texture` **get_item_icon** **(** :ref:`int` idx **)** const + +Return the icon of the item at index "idx". + +.. _class_OptionButton_get_item_ID: + +- :ref:`int` **get_item_ID** **(** :ref:`int` idx **)** const + +Return the ID of the item at index "idx". + +.. _class_OptionButton_get_item_metadata: + +- void **get_item_metadata** **(** :ref:`int` idx **)** const + +.. _class_OptionButton_is_item_disabled: + +- :ref:`bool` **is_item_disabled** **(** :ref:`int` idx **)** const + +.. _class_OptionButton_get_item_count: + +- :ref:`int` **get_item_count** **(** **)** const + +Return the amount of items in the OptionButton. + +.. _class_OptionButton_add_separator: + +- void **add_separator** **(** **)** + +Add a separator to the list of items. Separators help to group items. Separator also takes up an index and is appended at the end. + +.. _class_OptionButton_clear: + +- void **clear** **(** **)** + +Clear all the items in the :ref:`OptionButton`. + +.. _class_OptionButton_select: + +- void **select** **(** :ref:`int` idx **)** + +Select an item by index and make it the current item. + +.. _class_OptionButton_get_selected: + +- :ref:`int` **get_selected** **(** **)** const + +Return the current item index + +.. _class_OptionButton_get_selected_ID: + +- :ref:`int` **get_selected_ID** **(** **)** const + +.. _class_OptionButton_get_selected_metadata: + +- void **get_selected_metadata** **(** **)** const + +.. _class_OptionButton_remove_item: + +- void **remove_item** **(** :ref:`int` idx **)** + + diff --git a/classes/class_os.rst b/classes/class_os.rst new file mode 100644 index 000000000..b75b643a9 --- /dev/null +++ b/classes/class_os.rst @@ -0,0 +1,690 @@ +.. _class_OS: + +OS +== + +Inherits: :ref:`Object` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Operating System functions. + +Member Functions +---------------- + ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_clipboard` **(** :ref:`String` clipboard **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_clipboard` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_video_mode` **(** :ref:`Vector2` size, :ref:`bool` fullscreen, :ref:`bool` resizable, :ref:`int` screen=0 **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_video_mode_size` **(** :ref:`int` screen=0 **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_video_mode_fullscreen` **(** :ref:`int` screen=0 **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_video_mode_resizable` **(** :ref:`int` screen=0 **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_fullscreen_mode_list` **(** :ref:`int` screen=0 **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_screen_count` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_current_screen` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_current_screen` **(** :ref:`int` screen **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_screen_position` **(** :ref:`int` screen=0 **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_screen_size` **(** :ref:`int` screen=0 **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_window_position` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_window_position` **(** :ref:`Vector2` position **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_window_size` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_window_size` **(** :ref:`Vector2` size **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_window_fullscreen` **(** :ref:`bool` enabled **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_window_fullscreen` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_window_resizable` **(** :ref:`bool` enabled **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_window_resizable` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_window_minimized` **(** :ref:`bool` enabled **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_window_minimized` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_window_maximized` **(** :ref:`bool` enabled **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_window_maximized` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_screen_orientation` **(** :ref:`int` orientation **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_screen_orientation` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_keep_screen_on` **(** :ref:`bool` enabled **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_keep_screen_on` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_iterations_per_second` **(** :ref:`int` iterations_per_second **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_iterations_per_second` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_target_fps` **(** :ref:`int` target_fps **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_target_fps` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_time_scale` **(** :ref:`float` time_scale **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_time_scale` **(** **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_touchscreen_ui_hint` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_window_title` **(** :ref:`String` title **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_low_processor_usage_mode` **(** :ref:`bool` enable **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_in_low_processor_usage_mode` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_processor_count` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_executable_path` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`execute` **(** :ref:`String` path, :ref:`StringArray` arguments, :ref:`bool` blocking, :ref:`Array` output=Array() **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`kill` **(** :ref:`int` pid **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`shell_open` **(** :ref:`String` uri **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_process_ID` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_environment` **(** :ref:`String` environment **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_environment` **(** :ref:`String` environment **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_name` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_cmdline_args` **(** **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_main_loop` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`get_date` **(** :ref:`bool` utc=false **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`get_time` **(** :ref:`bool` utc=false **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`get_time_zone_info` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_unix_time` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_system_time_secs` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_icon` **(** :ref:`Image` icon **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`delay_usec` **(** :ref:`int` usec **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`delay_msec` **(** :ref:`int` msec **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_ticks_msec` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_splash_tick_msec` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_locale` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_model_name` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_custom_level` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`can_draw` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_frames_drawn` **(** **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_stdout_verbose` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`can_use_threads` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_debug_build` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`dump_memory_to_file` **(** :ref:`String` file **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`dump_resources_to_file` **(** :ref:`String` file **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`print_resources_in_use` **(** :ref:`bool` short=false **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`print_all_resources` **(** :ref:`String` tofile="" **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_static_memory_usage` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_static_memory_peak_usage` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_dynamic_memory_usage` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_data_dir` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_system_dir` **(** :ref:`int` dir **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_unique_ID` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_ok_left_and_cancel_right` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_frames_per_second` **(** **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`print_all_textures_by_size` **(** **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`print_resources_by_type` **(** :ref:`StringArray` types **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`native_video_play` **(** :ref:`String` path, :ref:`float` volume, :ref:`String` audio_track, :ref:`String` subtitle_track **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`native_video_is_playing` **(** **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`native_video_stop` **(** **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`native_video_pause` **(** **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_scancode_string` **(** :ref:`int` code **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_scancode_unicode` **(** :ref:`int` code **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`find_scancode_from_string` **(** :ref:`String` string **)** const | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_use_file_access_save_and_swap` **(** :ref:`bool` enabled **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`alert` **(** :ref:`String` text, :ref:`String` title="Alert!" **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`set_thread_name` **(** :ref:`String` name **)** | ++----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **DAY_SUNDAY** = **0** +- **DAY_MONDAY** = **1** +- **DAY_TUESDAY** = **2** +- **DAY_WEDNESDAY** = **3** +- **DAY_THURSDAY** = **4** +- **DAY_FRIDAY** = **5** +- **DAY_SATURDAY** = **6** +- **MONTH_JANUARY** = **0** +- **MONTH_FEBRUARY** = **1** +- **MONTH_MARCH** = **2** +- **MONTH_APRIL** = **3** +- **MONTH_MAY** = **4** +- **MONTH_JUNE** = **5** +- **MONTH_JULY** = **6** +- **MONTH_AUGUST** = **7** +- **MONTH_SEPTEMBER** = **8** +- **MONTH_OCTOBER** = **9** +- **MONTH_NOVEMBER** = **10** +- **MONTH_DECEMBER** = **11** +- **SCREEN_ORIENTATION_LANDSCAPE** = **0** +- **SCREEN_ORIENTATION_PORTRAIT** = **1** +- **SCREEN_ORIENTATION_REVERSE_LANDSCAPE** = **2** +- **SCREEN_ORIENTATION_REVERSE_PORTRAIT** = **3** +- **SCREEN_ORIENTATION_SENSOR_LANDSCAPE** = **4** +- **SCREEN_ORIENTATION_SENSOR_PORTRAIT** = **5** +- **SCREEN_ORIENTATION_SENSOR** = **6** +- **SYSTEM_DIR_DESKTOP** = **0** +- **SYSTEM_DIR_DCIM** = **1** +- **SYSTEM_DIR_DOCUMENTS** = **2** +- **SYSTEM_DIR_DOWNLOADS** = **3** +- **SYSTEM_DIR_MOVIES** = **4** +- **SYSTEM_DIR_MUSIC** = **5** +- **SYSTEM_DIR_PICTURES** = **6** +- **SYSTEM_DIR_RINGTONES** = **7** + +Description +----------- + +Operating System functions. OS Wraps the most common functionality to communicate with the host Operating System, such as: + + -Mouse Grabbing + + -Mouse Cursors + + -Clipboard + + -Video Mode + + -Date " Time + + -Timers + + -Environment Variables + + -Execution of Binaries + + -Command Line + +Member Function Description +--------------------------- + +.. _class_OS_set_clipboard: + +- void **set_clipboard** **(** :ref:`String` clipboard **)** + +Set clipboard to the OS. + +.. _class_OS_get_clipboard: + +- :ref:`String` **get_clipboard** **(** **)** const + +Get clipboard from the host OS. + +.. _class_OS_set_video_mode: + +- void **set_video_mode** **(** :ref:`Vector2` size, :ref:`bool` fullscreen, :ref:`bool` resizable, :ref:`int` screen=0 **)** + +Change the video mode. + +.. _class_OS_get_video_mode_size: + +- :ref:`Vector2` **get_video_mode_size** **(** :ref:`int` screen=0 **)** const + +Return the current video mode size. + +.. _class_OS_is_video_mode_fullscreen: + +- :ref:`bool` **is_video_mode_fullscreen** **(** :ref:`int` screen=0 **)** const + +Return true if the current video mode is fullscreen. + +.. _class_OS_is_video_mode_resizable: + +- :ref:`bool` **is_video_mode_resizable** **(** :ref:`int` screen=0 **)** const + +Return true if the window is resizable. + +.. _class_OS_get_fullscreen_mode_list: + +- :ref:`Array` **get_fullscreen_mode_list** **(** :ref:`int` screen=0 **)** const + +Return the list of fullscreen modes. + +.. _class_OS_get_screen_count: + +- :ref:`int` **get_screen_count** **(** **)** const + +.. _class_OS_get_current_screen: + +- :ref:`int` **get_current_screen** **(** **)** const + +.. _class_OS_set_current_screen: + +- void **set_current_screen** **(** :ref:`int` screen **)** + +.. _class_OS_get_screen_position: + +- :ref:`Vector2` **get_screen_position** **(** :ref:`int` screen=0 **)** const + +.. _class_OS_get_screen_size: + +- :ref:`Vector2` **get_screen_size** **(** :ref:`int` screen=0 **)** const + +.. _class_OS_get_window_position: + +- :ref:`Vector2` **get_window_position** **(** **)** const + +.. _class_OS_set_window_position: + +- void **set_window_position** **(** :ref:`Vector2` position **)** + +.. _class_OS_get_window_size: + +- :ref:`Vector2` **get_window_size** **(** **)** const + +.. _class_OS_set_window_size: + +- void **set_window_size** **(** :ref:`Vector2` size **)** + +.. _class_OS_set_window_fullscreen: + +- void **set_window_fullscreen** **(** :ref:`bool` enabled **)** + +.. _class_OS_is_window_fullscreen: + +- :ref:`bool` **is_window_fullscreen** **(** **)** const + +.. _class_OS_set_window_resizable: + +- void **set_window_resizable** **(** :ref:`bool` enabled **)** + +.. _class_OS_is_window_resizable: + +- :ref:`bool` **is_window_resizable** **(** **)** const + +.. _class_OS_set_window_minimized: + +- void **set_window_minimized** **(** :ref:`bool` enabled **)** + +.. _class_OS_is_window_minimized: + +- :ref:`bool` **is_window_minimized** **(** **)** const + +.. _class_OS_set_window_maximized: + +- void **set_window_maximized** **(** :ref:`bool` enabled **)** + +.. _class_OS_is_window_maximized: + +- :ref:`bool` **is_window_maximized** **(** **)** const + +.. _class_OS_set_screen_orientation: + +- void **set_screen_orientation** **(** :ref:`int` orientation **)** + +.. _class_OS_get_screen_orientation: + +- :ref:`int` **get_screen_orientation** **(** **)** const + +.. _class_OS_set_keep_screen_on: + +- void **set_keep_screen_on** **(** :ref:`bool` enabled **)** + +Set keep screen on if true, or goes to sleep by device setting if false. (for Android/iOS) + +.. _class_OS_is_keep_screen_on: + +- :ref:`bool` **is_keep_screen_on** **(** **)** const + +.. _class_OS_set_iterations_per_second: + +- void **set_iterations_per_second** **(** :ref:`int` iterations_per_second **)** + +Set the amount of fixed iterations per second (for fixed process and physics). + +.. _class_OS_get_iterations_per_second: + +- :ref:`int` **get_iterations_per_second** **(** **)** const + +Return the amount of fixed iterations per second (for fixed process and physics). + +.. _class_OS_set_target_fps: + +- void **set_target_fps** **(** :ref:`int` target_fps **)** + +.. _class_OS_get_target_fps: + +- :ref:`float` **get_target_fps** **(** **)** const + +.. _class_OS_set_time_scale: + +- void **set_time_scale** **(** :ref:`float` time_scale **)** + +.. _class_OS_get_time_scale: + +- :ref:`float` **get_time_scale** **(** **)** + +.. _class_OS_has_touchscreen_ui_hint: + +- :ref:`bool` **has_touchscreen_ui_hint** **(** **)** const + +.. _class_OS_set_window_title: + +- void **set_window_title** **(** :ref:`String` title **)** + +.. _class_OS_set_low_processor_usage_mode: + +- void **set_low_processor_usage_mode** **(** :ref:`bool` enable **)** + +Set to true to enable the low cpu usage mode. In this mode, the screen only redraws when there are changes, and a considerable sleep time is inserted between frames. This way, editors using the engine UI only use very little cpu. + +.. _class_OS_is_in_low_processor_usage_mode: + +- :ref:`bool` **is_in_low_processor_usage_mode** **(** **)** const + +Return true if low cpu usage mode is enabled. + +.. _class_OS_get_processor_count: + +- :ref:`int` **get_processor_count** **(** **)** const + +.. _class_OS_get_executable_path: + +- :ref:`String` **get_executable_path** **(** **)** const + +Return the path to the current engine executable. + +.. _class_OS_execute: + +- :ref:`int` **execute** **(** :ref:`String` path, :ref:`StringArray` arguments, :ref:`bool` blocking, :ref:`Array` output=Array() **)** + +Execute the binary file in given path, optionally blocking until it returns. A process ID is returned. + +.. _class_OS_kill: + +- :ref:`int` **kill** **(** :ref:`int` pid **)** + +Kill a process ID. + +.. _class_OS_shell_open: + +- :ref:`int` **shell_open** **(** :ref:`String` uri **)** + +.. _class_OS_get_process_ID: + +- :ref:`int` **get_process_ID** **(** **)** const + +.. _class_OS_get_environment: + +- :ref:`String` **get_environment** **(** :ref:`String` environment **)** const + +Return an environment variable. + +.. _class_OS_has_environment: + +- :ref:`bool` **has_environment** **(** :ref:`String` environment **)** const + +Return true if an envieronment variable exists. + +.. _class_OS_get_name: + +- :ref:`String` **get_name** **(** **)** const + +Return the name of the host OS. + +.. _class_OS_get_cmdline_args: + +- :ref:`StringArray` **get_cmdline_args** **(** **)** + +Return the commandline passed to the engine. + +.. _class_OS_get_main_loop: + +- :ref:`Object` **get_main_loop** **(** **)** const + +Return the main loop object (see :ref:`MainLoop`). + +.. _class_OS_get_date: + +- :ref:`Dictionary` **get_date** **(** :ref:`bool` utc=false **)** const + +.. _class_OS_get_time: + +- :ref:`Dictionary` **get_time** **(** :ref:`bool` utc=false **)** const + +.. _class_OS_get_time_zone_info: + +- :ref:`Dictionary` **get_time_zone_info** **(** **)** const + +.. _class_OS_get_unix_time: + +- :ref:`int` **get_unix_time** **(** **)** const + +.. _class_OS_get_system_time_secs: + +- :ref:`int` **get_system_time_secs** **(** **)** const + +.. _class_OS_set_icon: + +- void **set_icon** **(** :ref:`Image` icon **)** + +.. _class_OS_delay_usec: + +- void **delay_usec** **(** :ref:`int` usec **)** const + +Delay executing of the current thread by given microseconds. + +.. _class_OS_delay_msec: + +- void **delay_msec** **(** :ref:`int` msec **)** const + +Delay executing of the current thread by given milliseconds. + +.. _class_OS_get_ticks_msec: + +- :ref:`int` **get_ticks_msec** **(** **)** const + +Return the amount of time passed in milliseconds since the engine started. + +.. _class_OS_get_splash_tick_msec: + +- :ref:`int` **get_splash_tick_msec** **(** **)** const + +.. _class_OS_get_locale: + +- :ref:`String` **get_locale** **(** **)** const + +Return the host OS locale. + +.. _class_OS_get_model_name: + +- :ref:`String` **get_model_name** **(** **)** const + +.. _class_OS_get_custom_level: + +- :ref:`String` **get_custom_level** **(** **)** const + +.. _class_OS_can_draw: + +- :ref:`bool` **can_draw** **(** **)** const + +Return true if the host OS allows drawing. + +.. _class_OS_get_frames_drawn: + +- :ref:`int` **get_frames_drawn** **(** **)** + +Return the total amount of frames drawn. + +.. _class_OS_is_stdout_verbose: + +- :ref:`bool` **is_stdout_verbose** **(** **)** const + +Return true if the engine was executed with -v (verbose stdout). + +.. _class_OS_can_use_threads: + +- :ref:`bool` **can_use_threads** **(** **)** const + +.. _class_OS_is_debug_build: + +- :ref:`bool` **is_debug_build** **(** **)** const + +.. _class_OS_dump_memory_to_file: + +- void **dump_memory_to_file** **(** :ref:`String` file **)** + +.. _class_OS_dump_resources_to_file: + +- void **dump_resources_to_file** **(** :ref:`String` file **)** + +.. _class_OS_print_resources_in_use: + +- void **print_resources_in_use** **(** :ref:`bool` short=false **)** + +.. _class_OS_print_all_resources: + +- void **print_all_resources** **(** :ref:`String` tofile="" **)** + +.. _class_OS_get_static_memory_usage: + +- :ref:`int` **get_static_memory_usage** **(** **)** const + +.. _class_OS_get_static_memory_peak_usage: + +- :ref:`int` **get_static_memory_peak_usage** **(** **)** const + +Return the max amount of static memory used (only works in debug). + +.. _class_OS_get_dynamic_memory_usage: + +- :ref:`int` **get_dynamic_memory_usage** **(** **)** const + +Return the total amount of dynamic memory used (only works in debug). + +.. _class_OS_get_data_dir: + +- :ref:`String` **get_data_dir** **(** **)** const + +.. _class_OS_get_system_dir: + +- :ref:`String` **get_system_dir** **(** :ref:`int` dir **)** const + +.. _class_OS_get_unique_ID: + +- :ref:`String` **get_unique_ID** **(** **)** const + +.. _class_OS_is_ok_left_and_cancel_right: + +- :ref:`bool` **is_ok_left_and_cancel_right** **(** **)** const + +.. _class_OS_get_frames_per_second: + +- :ref:`float` **get_frames_per_second** **(** **)** const + +.. _class_OS_print_all_textures_by_size: + +- void **print_all_textures_by_size** **(** **)** + +.. _class_OS_print_resources_by_type: + +- void **print_resources_by_type** **(** :ref:`StringArray` types **)** + +.. _class_OS_native_video_play: + +- :ref:`int` **native_video_play** **(** :ref:`String` path, :ref:`float` volume, :ref:`String` audio_track, :ref:`String` subtitle_track **)** + +.. _class_OS_native_video_is_playing: + +- :ref:`bool` **native_video_is_playing** **(** **)** + +.. _class_OS_native_video_stop: + +- void **native_video_stop** **(** **)** + +.. _class_OS_native_video_pause: + +- void **native_video_pause** **(** **)** + +.. _class_OS_get_scancode_string: + +- :ref:`String` **get_scancode_string** **(** :ref:`int` code **)** const + +.. _class_OS_is_scancode_unicode: + +- :ref:`bool` **is_scancode_unicode** **(** :ref:`int` code **)** const + +.. _class_OS_find_scancode_from_string: + +- :ref:`int` **find_scancode_from_string** **(** :ref:`String` string **)** const + +.. _class_OS_set_use_file_access_save_and_swap: + +- void **set_use_file_access_save_and_swap** **(** :ref:`bool` enabled **)** + +.. _class_OS_alert: + +- void **alert** **(** :ref:`String` text, :ref:`String` title="Alert!" **)** + +.. _class_OS_set_thread_name: + +- :ref:`int` **set_thread_name** **(** :ref:`String` name **)** + + diff --git a/classes/class_packeddatacontainer.rst b/classes/class_packeddatacontainer.rst new file mode 100644 index 000000000..cf7b3d1db --- /dev/null +++ b/classes/class_packeddatacontainer.rst @@ -0,0 +1,37 @@ +.. _class_PackedDataContainer: + +PackedDataContainer +=================== + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------+---------------------------------------------------------------------+ +| Error | :ref:`pack` **(** var value **)** | ++------------------------+---------------------------------------------------------------------+ +| :ref:`int` | :ref:`size` **(** **)** const | ++------------------------+---------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_PackedDataContainer_pack: + +- Error **pack** **(** var value **)** + +.. _class_PackedDataContainer_size: + +- :ref:`int` **size** **(** **)** const + + diff --git a/classes/class_packeddatacontainerref.rst b/classes/class_packeddatacontainerref.rst new file mode 100644 index 000000000..dbbd9e5cf --- /dev/null +++ b/classes/class_packeddatacontainerref.rst @@ -0,0 +1,31 @@ +.. _class_PackedDataContainerRef: + +PackedDataContainerRef +====================== + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------+-------------------------------------------------------------------+ +| :ref:`int` | :ref:`size` **(** **)** const | ++------------------------+-------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_PackedDataContainerRef_size: + +- :ref:`int` **size** **(** **)** const + + diff --git a/classes/class_packedscene.rst b/classes/class_packedscene.rst new file mode 100644 index 000000000..8a1dcf083 --- /dev/null +++ b/classes/class_packedscene.rst @@ -0,0 +1,56 @@ +.. _class_PackedScene: + +PackedScene +=========== + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------------------+--------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`pack` **(** :ref:`Node` path **)** | ++--------------------------------------+--------------------------------------------------------------------------------------------------------------+ +| :ref:`Node` | :ref:`instance` **(** :ref:`bool` gen_edit_state=false **)** const | ++--------------------------------------+--------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`can_instance` **(** **)** const | ++--------------------------------------+--------------------------------------------------------------------------------------------------------------+ +| :ref:`SceneState` | :ref:`get_state` **(** **)** | ++--------------------------------------+--------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +TODO: explain ownership, and that node does not need to own itself + +Member Function Description +--------------------------- + +.. _class_PackedScene_pack: + +- :ref:`int` **pack** **(** :ref:`Node` path **)** + +Pack will ignore any sub-nodes not owned by given node. See :ref:`Node.set_owner`. + +.. _class_PackedScene_instance: + +- :ref:`Node` **instance** **(** :ref:`bool` gen_edit_state=false **)** const + +.. _class_PackedScene_can_instance: + +- :ref:`bool` **can_instance** **(** **)** const + +.. _class_PackedScene_get_state: + +- :ref:`SceneState` **get_state** **(** **)** + + diff --git a/classes/class_packetpeer.rst b/classes/class_packetpeer.rst new file mode 100644 index 000000000..dd50f1470 --- /dev/null +++ b/classes/class_packetpeer.rst @@ -0,0 +1,66 @@ +.. _class_PacketPeer: + +PacketPeer +========== + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Abstraction and base class for packet-based protocols. + +Member Functions +---------------- + ++----------------------------------+-----------------------------------------------------------------------------------------------------+ +| void | :ref:`get_var` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`put_var` **(** Variant var **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------+ +| :ref:`RawArray` | :ref:`get_packet` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------+ +| Error | :ref:`put_packet` **(** :ref:`RawArray` buffer **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------+ +| Error | :ref:`get_packet_error` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_available_packet_count` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------+ + +Description +----------- + +PacketPeer is an abstration and base class for packet-based protocols (such as UDP). It provides an API for sending and receiving packets both as raw data or variables. This makes it easy to transfer data over a protocol, without having to encode data as low level bytes or having to worry about network ordering. + +Member Function Description +--------------------------- + +.. _class_PacketPeer_get_var: + +- void **get_var** **(** **)** const + +.. _class_PacketPeer_put_var: + +- :ref:`int` **put_var** **(** Variant var **)** + +.. _class_PacketPeer_get_packet: + +- :ref:`RawArray` **get_packet** **(** **)** const + +.. _class_PacketPeer_put_packet: + +- Error **put_packet** **(** :ref:`RawArray` buffer **)** + +.. _class_PacketPeer_get_packet_error: + +- Error **get_packet_error** **(** **)** const + +.. _class_PacketPeer_get_available_packet_count: + +- :ref:`int` **get_available_packet_count** **(** **)** const + + diff --git a/classes/class_packetpeerstream.rst b/classes/class_packetpeerstream.rst new file mode 100644 index 000000000..5041e4645 --- /dev/null +++ b/classes/class_packetpeerstream.rst @@ -0,0 +1,38 @@ +.. _class_PacketPeerStream: + +PacketPeerStream +================ + +Inherits: :ref:`PacketPeer` +--------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Wrapper to use a PacketPeer over a StreamPeer. + +Member Functions +---------------- + ++-------+-----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_stream_peer` **(** :ref:`StreamPeer` peer **)** | ++-------+-----------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +PacketStreamPeer provides a wrapper for working using packets over a stream. This allows for using packet based code with StreamPeers. PacketPeerStream implements a custom protocol over the StreamPeer, so the user should not read or write to the wrapped StreamPeer directly. + +Member Function Description +--------------------------- + +.. _class_PacketPeerStream_set_stream_peer: + +- void **set_stream_peer** **(** :ref:`StreamPeer` peer **)** + +Set the StreamPeer object to be wrapped + + diff --git a/classes/class_packetpeerudp.rst b/classes/class_packetpeerudp.rst new file mode 100644 index 000000000..57e4647b5 --- /dev/null +++ b/classes/class_packetpeerudp.rst @@ -0,0 +1,73 @@ +.. _class_PacketPeerUDP: + +PacketPeerUDP +============= + +Inherits: :ref:`PacketPeer` +--------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| Error | :ref:`listen` **(** :ref:`int` port, :ref:`int` recv_buf_size=65536 **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`close` **(** **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| Error | :ref:`wait` **(** **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_listening` **(** **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_packet_ip` **(** **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_packet_address` **(** **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_packet_port` **(** **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`set_send_address` **(** :ref:`String` host, :ref:`int` port **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_PacketPeerUDP_listen: + +- Error **listen** **(** :ref:`int` port, :ref:`int` recv_buf_size=65536 **)** + +.. _class_PacketPeerUDP_close: + +- void **close** **(** **)** + +.. _class_PacketPeerUDP_wait: + +- Error **wait** **(** **)** + +.. _class_PacketPeerUDP_is_listening: + +- :ref:`bool` **is_listening** **(** **)** const + +.. _class_PacketPeerUDP_get_packet_ip: + +- :ref:`String` **get_packet_ip** **(** **)** const + +.. _class_PacketPeerUDP_get_packet_address: + +- :ref:`int` **get_packet_address** **(** **)** const + +.. _class_PacketPeerUDP_get_packet_port: + +- :ref:`int` **get_packet_port** **(** **)** const + +.. _class_PacketPeerUDP_set_send_address: + +- :ref:`int` **set_send_address** **(** :ref:`String` host, :ref:`int` port **)** + + diff --git a/classes/class_panel.rst b/classes/class_panel.rst new file mode 100644 index 000000000..13d87d1e3 --- /dev/null +++ b/classes/class_panel.rst @@ -0,0 +1,21 @@ +.. _class_Panel: + +Panel +===== + +Inherits: :ref:`Control` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Provides an opaque background for :ref:`Control` children. + +Description +----------- + +Panel is a :ref:`Control` that displays an opaque background. It's commoly used as a parent and container for other types of :ref:`Control` nodes. :ref:`img`images/panel_example.png:ref:`/img` + diff --git a/classes/class_panelcontainer.rst b/classes/class_panelcontainer.rst new file mode 100644 index 000000000..3ba38edd4 --- /dev/null +++ b/classes/class_panelcontainer.rst @@ -0,0 +1,21 @@ +.. _class_PanelContainer: + +PanelContainer +============== + +Inherits: :ref:`Container` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Panel container type. + +Description +----------- + +Panel container type. This container fits controls inside of the delimited area of a stylebox. It's useful for giving controls an outline. + diff --git a/classes/class_parallaxbackground.rst b/classes/class_parallaxbackground.rst new file mode 100644 index 000000000..59c876c8b --- /dev/null +++ b/classes/class_parallaxbackground.rst @@ -0,0 +1,97 @@ +.. _class_ParallaxBackground: + +ParallaxBackground +================== + +Inherits: :ref:`CanvasLayer` +----------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_scroll_offset` **(** :ref:`Vector2` ofs **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_scroll_offset` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_scroll_base_offset` **(** :ref:`Vector2` ofs **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_scroll_base_offset` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_scroll_base_scale` **(** :ref:`Vector2` scale **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_scroll_base_scale` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_limit_begin` **(** :ref:`Vector2` ofs **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_limit_begin` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_limit_end` **(** :ref:`Vector2` ofs **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_limit_end` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_ignore_camera_zoom` **(** :ref:`bool` ignore **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_ignore_camera_zoom` **(** **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_ParallaxBackground_set_scroll_offset: + +- void **set_scroll_offset** **(** :ref:`Vector2` ofs **)** + +.. _class_ParallaxBackground_get_scroll_offset: + +- :ref:`Vector2` **get_scroll_offset** **(** **)** const + +.. _class_ParallaxBackground_set_scroll_base_offset: + +- void **set_scroll_base_offset** **(** :ref:`Vector2` ofs **)** + +.. _class_ParallaxBackground_get_scroll_base_offset: + +- :ref:`Vector2` **get_scroll_base_offset** **(** **)** const + +.. _class_ParallaxBackground_set_scroll_base_scale: + +- void **set_scroll_base_scale** **(** :ref:`Vector2` scale **)** + +.. _class_ParallaxBackground_get_scroll_base_scale: + +- :ref:`Vector2` **get_scroll_base_scale** **(** **)** const + +.. _class_ParallaxBackground_set_limit_begin: + +- void **set_limit_begin** **(** :ref:`Vector2` ofs **)** + +.. _class_ParallaxBackground_get_limit_begin: + +- :ref:`Vector2` **get_limit_begin** **(** **)** const + +.. _class_ParallaxBackground_set_limit_end: + +- void **set_limit_end** **(** :ref:`Vector2` ofs **)** + +.. _class_ParallaxBackground_get_limit_end: + +- :ref:`Vector2` **get_limit_end** **(** **)** const + +.. _class_ParallaxBackground_set_ignore_camera_zoom: + +- void **set_ignore_camera_zoom** **(** :ref:`bool` ignore **)** + +.. _class_ParallaxBackground_is_ignore_camera_zoom: + +- :ref:`bool` **is_ignore_camera_zoom** **(** **)** + + diff --git a/classes/class_parallaxlayer.rst b/classes/class_parallaxlayer.rst new file mode 100644 index 000000000..87b435c06 --- /dev/null +++ b/classes/class_parallaxlayer.rst @@ -0,0 +1,49 @@ +.. _class_ParallaxLayer: + +ParallaxLayer +============= + +Inherits: :ref:`Node2D` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_motion_scale` **(** :ref:`Vector2` scale **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_motion_scale` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_mirroring` **(** :ref:`Vector2` mirror **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_mirroring` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_ParallaxLayer_set_motion_scale: + +- void **set_motion_scale** **(** :ref:`Vector2` scale **)** + +.. _class_ParallaxLayer_get_motion_scale: + +- :ref:`Vector2` **get_motion_scale** **(** **)** const + +.. _class_ParallaxLayer_set_mirroring: + +- void **set_mirroring** **(** :ref:`Vector2` mirror **)** + +.. _class_ParallaxLayer_get_mirroring: + +- :ref:`Vector2` **get_mirroring** **(** **)** const + + diff --git a/classes/class_particleattractor2d.rst b/classes/class_particleattractor2d.rst new file mode 100644 index 000000000..5c904103e --- /dev/null +++ b/classes/class_particleattractor2d.rst @@ -0,0 +1,97 @@ +.. _class_ParticleAttractor2D: + +ParticleAttractor2D +=================== + +Inherits: :ref:`Node2D` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_enabled` **(** :ref:`bool` enabled **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_enabled` **(** **)** const | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_radius` **(** :ref:`float` radius **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_radius` **(** **)** const | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_disable_radius` **(** :ref:`float` radius **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_disable_radius` **(** **)** const | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_gravity` **(** :ref:`float` gravity **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_gravity` **(** **)** const | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_absorption` **(** :ref:`float` absorption **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_absorption` **(** **)** const | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_particles_path` **(** :ref:`NodePath` path **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`NodePath` | :ref:`get_particles_path` **(** **)** const | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_ParticleAttractor2D_set_enabled: + +- void **set_enabled** **(** :ref:`bool` enabled **)** + +.. _class_ParticleAttractor2D_is_enabled: + +- :ref:`bool` **is_enabled** **(** **)** const + +.. _class_ParticleAttractor2D_set_radius: + +- void **set_radius** **(** :ref:`float` radius **)** + +.. _class_ParticleAttractor2D_get_radius: + +- :ref:`float` **get_radius** **(** **)** const + +.. _class_ParticleAttractor2D_set_disable_radius: + +- void **set_disable_radius** **(** :ref:`float` radius **)** + +.. _class_ParticleAttractor2D_get_disable_radius: + +- :ref:`float` **get_disable_radius** **(** **)** const + +.. _class_ParticleAttractor2D_set_gravity: + +- void **set_gravity** **(** :ref:`float` gravity **)** + +.. _class_ParticleAttractor2D_get_gravity: + +- :ref:`float` **get_gravity** **(** **)** const + +.. _class_ParticleAttractor2D_set_absorption: + +- void **set_absorption** **(** :ref:`float` absorption **)** + +.. _class_ParticleAttractor2D_get_absorption: + +- :ref:`float` **get_absorption** **(** **)** const + +.. _class_ParticleAttractor2D_set_particles_path: + +- void **set_particles_path** **(** :ref:`NodePath` path **)** + +.. _class_ParticleAttractor2D_get_particles_path: + +- :ref:`NodePath` **get_particles_path** **(** **)** const + + diff --git a/classes/class_particles.rst b/classes/class_particles.rst new file mode 100644 index 000000000..e85981f1f --- /dev/null +++ b/classes/class_particles.rst @@ -0,0 +1,280 @@ +.. _class_Particles: + +Particles +========= + +Inherits: :ref:`GeometryInstance` +--------------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Particle system 3D Node + +Member Functions +---------------- + ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_amount` **(** :ref:`int` amount **)** | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_amount` **(** **)** const | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_emitting` **(** :ref:`bool` enabled **)** | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_emitting` **(** **)** const | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_visibility_aabb` **(** :ref:`AABB` aabb **)** | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`AABB` | :ref:`get_visibility_aabb` **(** **)** const | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_emission_half_extents` **(** :ref:`Vector3` half_extents **)** | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_emission_half_extents` **(** **)** const | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_emission_base_velocity` **(** :ref:`Vector3` base_velocity **)** | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_emission_base_velocity` **(** **)** const | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_emission_points` **(** :ref:`Vector3Array` points **)** | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3Array` | :ref:`get_emission_points` **(** **)** const | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_gravity_normal` **(** :ref:`Vector3` normal **)** | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_gravity_normal` **(** **)** const | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_variable` **(** :ref:`int` variable, :ref:`float` value **)** | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_variable` **(** :ref:`int` variable **)** const | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_randomness` **(** :ref:`int` variable, :ref:`float` randomness **)** | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_randomness` **(** :ref:`int` variable **)** const | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_color_phase_pos` **(** :ref:`int` phase, :ref:`float` pos **)** | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_color_phase_pos` **(** :ref:`int` phase **)** const | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_color_phase_color` **(** :ref:`int` phase, :ref:`Color` color **)** | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_color_phase_color` **(** :ref:`int` phase **)** const | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_material` **(** :ref:`Material` material **)** | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Material` | :ref:`get_material` **(** **)** const | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_emit_timeout` **(** :ref:`float` timeout **)** | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_emit_timeout` **(** **)** const | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_height_from_velocity` **(** :ref:`bool` enable **)** | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_height_from_velocity` **(** **)** const | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_use_local_coordinates` **(** :ref:`bool` enable **)** | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_using_local_coordinates` **(** **)** const | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_color_phases` **(** :ref:`int` count **)** | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_color_phases` **(** **)** const | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **VAR_LIFETIME** = **0** +- **VAR_SPREAD** = **1** +- **VAR_GRAVITY** = **2** +- **VAR_LINEAR_VELOCITY** = **3** +- **VAR_ANGULAR_VELOCITY** = **4** +- **VAR_LINEAR_ACCELERATION** = **5** +- **VAR_DRAG** = **6** +- **VAR_TANGENTIAL_ACCELERATION** = **7** +- **VAR_INITIAL_SIZE** = **9** +- **VAR_FINAL_SIZE** = **10** +- **VAR_INITIAL_ANGLE** = **11** +- **VAR_HEIGHT** = **12** +- **VAR_HEIGHT_SPEED_SCALE** = **13** +- **VAR_MAX** = **14** + +Description +----------- + +Particles is a particle system 3D :ref:`Node` that is used to simulate several types of particle effects, such as explosions, rain, snow, fireflies, or other magical-like shinny sparkles. Particles are drawn using impostors, and given their dynamic behavior, the user must provide a visibility AABB (although helpers to create one automatically exist). + +Member Function Description +--------------------------- + +.. _class_Particles_set_amount: + +- void **set_amount** **(** :ref:`int` amount **)** + +Set total amount of particles in the system. + +.. _class_Particles_get_amount: + +- :ref:`int` **get_amount** **(** **)** const + +Return the total amount of particles in the system. + +.. _class_Particles_set_emitting: + +- void **set_emitting** **(** :ref:`bool` enabled **)** + +Set the "emitting" property state. When emitting, the particle system generates new particles at constant rate. + +.. _class_Particles_is_emitting: + +- :ref:`bool` **is_emitting** **(** **)** const + +Return the "emitting" property state (see :ref:`set_emitting`). + +.. _class_Particles_set_visibility_aabb: + +- void **set_visibility_aabb** **(** :ref:`AABB` aabb **)** + +Set the visibility AABB for the particle system, since the default one will not work properly most of the time. + +.. _class_Particles_get_visibility_aabb: + +- :ref:`AABB` **get_visibility_aabb** **(** **)** const + +Return the current visibility AABB. + +.. _class_Particles_set_emission_half_extents: + +- void **set_emission_half_extents** **(** :ref:`Vector3` half_extents **)** + +Set the half extents for the emission box. + +.. _class_Particles_get_emission_half_extents: + +- :ref:`Vector3` **get_emission_half_extents** **(** **)** const + +Return the half extents for the emission box. + +.. _class_Particles_set_emission_base_velocity: + +- void **set_emission_base_velocity** **(** :ref:`Vector3` base_velocity **)** + +.. _class_Particles_get_emission_base_velocity: + +- :ref:`Vector3` **get_emission_base_velocity** **(** **)** const + +.. _class_Particles_set_emission_points: + +- void **set_emission_points** **(** :ref:`Vector3Array` points **)** + +.. _class_Particles_get_emission_points: + +- :ref:`Vector3Array` **get_emission_points** **(** **)** const + +.. _class_Particles_set_gravity_normal: + +- void **set_gravity_normal** **(** :ref:`Vector3` normal **)** + +Set the normal vector towards where gravity is pulling (by default, negative Y). + +.. _class_Particles_get_gravity_normal: + +- :ref:`Vector3` **get_gravity_normal** **(** **)** const + +Return the normal vector towards where gravity is pulling (by default, negative Y). + +.. _class_Particles_set_variable: + +- void **set_variable** **(** :ref:`int` variable, :ref:`float` value **)** + +Set a specific variable for the particle system (see VAR_* enum). + +.. _class_Particles_get_variable: + +- :ref:`float` **get_variable** **(** :ref:`int` variable **)** const + +Return a specific variable for the particle system (see VAR_* enum). + +.. _class_Particles_set_randomness: + +- void **set_randomness** **(** :ref:`int` variable, :ref:`float` randomness **)** + +Set the randomness for a specific variable of the particle system. Randomness produces small changes from the default each time a particle is emitted. + +.. _class_Particles_get_randomness: + +- :ref:`float` **get_randomness** **(** :ref:`int` variable **)** const + +Return the randomness for a specific variable of the particle system. Randomness produces small changes from the default each time a particle is emitted. + +.. _class_Particles_set_color_phase_pos: + +- void **set_color_phase_pos** **(** :ref:`int` phase, :ref:`float` pos **)** + +Set the position of a color phase (0 to 1). + +.. _class_Particles_get_color_phase_pos: + +- :ref:`float` **get_color_phase_pos** **(** :ref:`int` phase **)** const + +Return the position of a color phase (0 to 1). + +.. _class_Particles_set_color_phase_color: + +- void **set_color_phase_color** **(** :ref:`int` phase, :ref:`Color` color **)** + +Set the color of a color phase. + +.. _class_Particles_get_color_phase_color: + +- :ref:`Color` **get_color_phase_color** **(** :ref:`int` phase **)** const + +Return the color of a color phase. + +.. _class_Particles_set_material: + +- void **set_material** **(** :ref:`Material` material **)** + +Set the material used to draw particles. + +.. _class_Particles_get_material: + +- :ref:`Material` **get_material** **(** **)** const + +Return the material used to draw particles. + +.. _class_Particles_set_emit_timeout: + +- void **set_emit_timeout** **(** :ref:`float` timeout **)** + +.. _class_Particles_get_emit_timeout: + +- :ref:`float` **get_emit_timeout** **(** **)** const + +.. _class_Particles_set_height_from_velocity: + +- void **set_height_from_velocity** **(** :ref:`bool` enable **)** + +.. _class_Particles_has_height_from_velocity: + +- :ref:`bool` **has_height_from_velocity** **(** **)** const + +.. _class_Particles_set_use_local_coordinates: + +- void **set_use_local_coordinates** **(** :ref:`bool` enable **)** + +.. _class_Particles_is_using_local_coordinates: + +- :ref:`bool` **is_using_local_coordinates** **(** **)** const + +.. _class_Particles_set_color_phases: + +- void **set_color_phases** **(** :ref:`int` count **)** + +.. _class_Particles_get_color_phases: + +- :ref:`int` **get_color_phases** **(** **)** const + + diff --git a/classes/class_particles2d.rst b/classes/class_particles2d.rst new file mode 100644 index 000000000..07def08a9 --- /dev/null +++ b/classes/class_particles2d.rst @@ -0,0 +1,347 @@ +.. _class_Particles2D: + +Particles2D +=========== + +Inherits: :ref:`Node2D` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_emitting` **(** :ref:`bool` active **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_emitting` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_amount` **(** :ref:`int` amount **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_amount` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_lifetime` **(** :ref:`float` lifetime **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_lifetime` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_time_scale` **(** :ref:`float` time_scale **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_time_scale` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_pre_process_time` **(** :ref:`float` time **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_pre_process_time` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_emit_timeout` **(** :ref:`float` value **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_emit_timeout` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_param` **(** :ref:`int` param, :ref:`float` value **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_param` **(** :ref:`int` param **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_randomness` **(** :ref:`int` param, :ref:`float` value **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_randomness` **(** :ref:`int` param **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`set_texture` **(** :ref:`Object` texture **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_texture` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_color` **(** :ref:`Color` color **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_color` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`ColorRamp` | :ref:`set_color_ramp` **(** :ref:`Object` color_ramp **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`ColorRamp` | :ref:`get_color_ramp` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_emissor_offset` **(** :ref:`Vector2` offset **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_emissor_offset` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_flip_h` **(** :ref:`bool` enable **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_flipped_h` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_flip_v` **(** :ref:`bool` enable **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_flipped_v` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_h_frames` **(** :ref:`int` enable **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_h_frames` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_v_frames` **(** :ref:`int` enable **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_v_frames` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_emission_half_extents` **(** :ref:`Vector2` extents **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_emission_half_extents` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_color_phases` **(** :ref:`int` phases **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_color_phases` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_color_phase_color` **(** :ref:`int` phase, :ref:`Color` color **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_color_phase_color` **(** :ref:`int` phase **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_color_phase_pos` **(** :ref:`int` phase, :ref:`float` pos **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_color_phase_pos` **(** :ref:`int` phase **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`pre_process` **(** :ref:`float` time **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`reset` **(** **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_use_local_space` **(** :ref:`bool` enable **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_using_local_space` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_initial_velocity` **(** :ref:`Vector2` velocity **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_initial_velocity` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_explosiveness` **(** :ref:`float` amount **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_explosiveness` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_emission_points` **(** :ref:`Vector2Array` points **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2Array` | :ref:`get_emission_points` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **PARAM_DIRECTION** = **0** +- **PARAM_SPREAD** = **1** +- **PARAM_LINEAR_VELOCITY** = **2** +- **PARAM_SPIN_VELOCITY** = **3** +- **PARAM_ORBIT_VELOCITY** = **4** +- **PARAM_GRAVITY_DIRECTION** = **5** +- **PARAM_GRAVITY_STRENGTH** = **6** +- **PARAM_RADIAL_ACCEL** = **7** +- **PARAM_TANGENTIAL_ACCEL** = **8** +- **PARAM_DAMPING** = **9** +- **PARAM_INITIAL_ANGLE** = **10** +- **PARAM_INITIAL_SIZE** = **11** +- **PARAM_FINAL_SIZE** = **12** +- **PARAM_HUE_VARIATION** = **13** +- **PARAM_ANIM_SPEED_SCALE** = **14** +- **PARAM_ANIM_INITIAL_POS** = **15** +- **PARAM_MAX** = **16** +- **MAX_COLOR_PHASES** = **4** + +Member Function Description +--------------------------- + +.. _class_Particles2D_set_emitting: + +- void **set_emitting** **(** :ref:`bool` active **)** + +.. _class_Particles2D_is_emitting: + +- :ref:`bool` **is_emitting** **(** **)** const + +.. _class_Particles2D_set_amount: + +- void **set_amount** **(** :ref:`int` amount **)** + +.. _class_Particles2D_get_amount: + +- :ref:`int` **get_amount** **(** **)** const + +.. _class_Particles2D_set_lifetime: + +- void **set_lifetime** **(** :ref:`float` lifetime **)** + +.. _class_Particles2D_get_lifetime: + +- :ref:`float` **get_lifetime** **(** **)** const + +.. _class_Particles2D_set_time_scale: + +- void **set_time_scale** **(** :ref:`float` time_scale **)** + +.. _class_Particles2D_get_time_scale: + +- :ref:`float` **get_time_scale** **(** **)** const + +.. _class_Particles2D_set_pre_process_time: + +- void **set_pre_process_time** **(** :ref:`float` time **)** + +.. _class_Particles2D_get_pre_process_time: + +- :ref:`float` **get_pre_process_time** **(** **)** const + +.. _class_Particles2D_set_emit_timeout: + +- void **set_emit_timeout** **(** :ref:`float` value **)** + +.. _class_Particles2D_get_emit_timeout: + +- :ref:`float` **get_emit_timeout** **(** **)** const + +.. _class_Particles2D_set_param: + +- void **set_param** **(** :ref:`int` param, :ref:`float` value **)** + +.. _class_Particles2D_get_param: + +- :ref:`float` **get_param** **(** :ref:`int` param **)** const + +.. _class_Particles2D_set_randomness: + +- void **set_randomness** **(** :ref:`int` param, :ref:`float` value **)** + +.. _class_Particles2D_get_randomness: + +- :ref:`float` **get_randomness** **(** :ref:`int` param **)** const + +.. _class_Particles2D_set_texture: + +- :ref:`Texture` **set_texture** **(** :ref:`Object` texture **)** + +.. _class_Particles2D_get_texture: + +- :ref:`Texture` **get_texture** **(** **)** const + +.. _class_Particles2D_set_color: + +- void **set_color** **(** :ref:`Color` color **)** + +.. _class_Particles2D_get_color: + +- :ref:`Color` **get_color** **(** **)** const + +.. _class_Particles2D_set_color_ramp: + +- :ref:`ColorRamp` **set_color_ramp** **(** :ref:`Object` color_ramp **)** + +.. _class_Particles2D_get_color_ramp: + +- :ref:`ColorRamp` **get_color_ramp** **(** **)** const + +.. _class_Particles2D_set_emissor_offset: + +- void **set_emissor_offset** **(** :ref:`Vector2` offset **)** + +.. _class_Particles2D_get_emissor_offset: + +- :ref:`Vector2` **get_emissor_offset** **(** **)** const + +.. _class_Particles2D_set_flip_h: + +- void **set_flip_h** **(** :ref:`bool` enable **)** + +.. _class_Particles2D_is_flipped_h: + +- :ref:`bool` **is_flipped_h** **(** **)** const + +.. _class_Particles2D_set_flip_v: + +- void **set_flip_v** **(** :ref:`bool` enable **)** + +.. _class_Particles2D_is_flipped_v: + +- :ref:`bool` **is_flipped_v** **(** **)** const + +.. _class_Particles2D_set_h_frames: + +- void **set_h_frames** **(** :ref:`int` enable **)** + +.. _class_Particles2D_get_h_frames: + +- :ref:`int` **get_h_frames** **(** **)** const + +.. _class_Particles2D_set_v_frames: + +- void **set_v_frames** **(** :ref:`int` enable **)** + +.. _class_Particles2D_get_v_frames: + +- :ref:`int` **get_v_frames** **(** **)** const + +.. _class_Particles2D_set_emission_half_extents: + +- void **set_emission_half_extents** **(** :ref:`Vector2` extents **)** + +.. _class_Particles2D_get_emission_half_extents: + +- :ref:`Vector2` **get_emission_half_extents** **(** **)** const + +.. _class_Particles2D_set_color_phases: + +- void **set_color_phases** **(** :ref:`int` phases **)** + +.. _class_Particles2D_get_color_phases: + +- :ref:`int` **get_color_phases** **(** **)** const + +.. _class_Particles2D_set_color_phase_color: + +- void **set_color_phase_color** **(** :ref:`int` phase, :ref:`Color` color **)** + +.. _class_Particles2D_get_color_phase_color: + +- :ref:`Color` **get_color_phase_color** **(** :ref:`int` phase **)** const + +.. _class_Particles2D_set_color_phase_pos: + +- void **set_color_phase_pos** **(** :ref:`int` phase, :ref:`float` pos **)** + +.. _class_Particles2D_get_color_phase_pos: + +- :ref:`float` **get_color_phase_pos** **(** :ref:`int` phase **)** const + +.. _class_Particles2D_pre_process: + +- void **pre_process** **(** :ref:`float` time **)** + +.. _class_Particles2D_reset: + +- void **reset** **(** **)** + +.. _class_Particles2D_set_use_local_space: + +- void **set_use_local_space** **(** :ref:`bool` enable **)** + +.. _class_Particles2D_is_using_local_space: + +- :ref:`bool` **is_using_local_space** **(** **)** const + +.. _class_Particles2D_set_initial_velocity: + +- void **set_initial_velocity** **(** :ref:`Vector2` velocity **)** + +.. _class_Particles2D_get_initial_velocity: + +- :ref:`Vector2` **get_initial_velocity** **(** **)** const + +.. _class_Particles2D_set_explosiveness: + +- void **set_explosiveness** **(** :ref:`float` amount **)** + +.. _class_Particles2D_get_explosiveness: + +- :ref:`float` **get_explosiveness** **(** **)** const + +.. _class_Particles2D_set_emission_points: + +- void **set_emission_points** **(** :ref:`Vector2Array` points **)** + +.. _class_Particles2D_get_emission_points: + +- :ref:`Vector2Array` **get_emission_points** **(** **)** const + + diff --git a/classes/class_patch9frame.rst b/classes/class_patch9frame.rst new file mode 100644 index 000000000..cd9550e56 --- /dev/null +++ b/classes/class_patch9frame.rst @@ -0,0 +1,73 @@ +.. _class_Patch9Frame: + +Patch9Frame +=========== + +Inherits: :ref:`Control` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_texture` **(** :ref:`Object` texture **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_texture` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_modulate` **(** :ref:`Color` modulate **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_modulate` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_patch_margin` **(** :ref:`int` margin, :ref:`int` value **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_patch_margin` **(** :ref:`int` margin **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_draw_center` **(** :ref:`bool` draw_center **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_draw_center` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_Patch9Frame_set_texture: + +- void **set_texture** **(** :ref:`Object` texture **)** + +.. _class_Patch9Frame_get_texture: + +- :ref:`Object` **get_texture** **(** **)** const + +.. _class_Patch9Frame_set_modulate: + +- void **set_modulate** **(** :ref:`Color` modulate **)** + +.. _class_Patch9Frame_get_modulate: + +- :ref:`Color` **get_modulate** **(** **)** const + +.. _class_Patch9Frame_set_patch_margin: + +- void **set_patch_margin** **(** :ref:`int` margin, :ref:`int` value **)** + +.. _class_Patch9Frame_get_patch_margin: + +- :ref:`int` **get_patch_margin** **(** :ref:`int` margin **)** const + +.. _class_Patch9Frame_set_draw_center: + +- void **set_draw_center** **(** :ref:`bool` draw_center **)** + +.. _class_Patch9Frame_get_draw_center: + +- :ref:`bool` **get_draw_center** **(** **)** const + + diff --git a/classes/class_path.rst b/classes/class_path.rst new file mode 100644 index 000000000..10ae0cee7 --- /dev/null +++ b/classes/class_path.rst @@ -0,0 +1,46 @@ +.. _class_Path: + +Path +==== + +Inherits: :ref:`Spatial` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Container for a :ref:`Curve3D`. + +Member Functions +---------------- + ++--------------------------------+------------------------------------------------------------------------------------------+ +| void | :ref:`set_curve` **(** :ref:`Curve3D` curve **)** | ++--------------------------------+------------------------------------------------------------------------------------------+ +| :ref:`Curve3D` | :ref:`get_curve` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------+ + +Description +----------- + +This class is a container/Node-ification of a :ref:`Curve3D`, so it can have :ref:`Spatial` properties and :ref:`Node` info. + +Member Function Description +--------------------------- + +.. _class_Path_set_curve: + +- void **set_curve** **(** :ref:`Curve3D` curve **)** + +Sets the :ref:`Curve3D`. + +.. _class_Path_get_curve: + +- :ref:`Curve3D` **get_curve** **(** **)** const + +Returns the :ref:`Curve3D` contained. + + diff --git a/classes/class_path2d.rst b/classes/class_path2d.rst new file mode 100644 index 000000000..472dd69d8 --- /dev/null +++ b/classes/class_path2d.rst @@ -0,0 +1,46 @@ +.. _class_Path2D: + +Path2D +====== + +Inherits: :ref:`Node2D` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Container for a :ref:`Curve2D`. + +Member Functions +---------------- + ++--------------------------------+--------------------------------------------------------------------------------------------+ +| void | :ref:`set_curve` **(** :ref:`Curve2D` curve **)** | ++--------------------------------+--------------------------------------------------------------------------------------------+ +| :ref:`Curve2D` | :ref:`get_curve` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------+ + +Description +----------- + +This class is a container/Node-ification of a :ref:`Curve2D`, so it can have :ref:`Node2D` properties and :ref:`Node` info. + +Member Function Description +--------------------------- + +.. _class_Path2D_set_curve: + +- void **set_curve** **(** :ref:`Curve2D` curve **)** + +Sets the :ref:`Curve2D`. + +.. _class_Path2D_get_curve: + +- :ref:`Curve2D` **get_curve** **(** **)** const + +Returns the :ref:`Curve2D` contained. + + diff --git a/classes/class_pathfollow.rst b/classes/class_pathfollow.rst new file mode 100644 index 000000000..934e0e152 --- /dev/null +++ b/classes/class_pathfollow.rst @@ -0,0 +1,158 @@ +.. _class_PathFollow: + +PathFollow +========== + +Inherits: :ref:`Spatial` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Point sampler for a :ref:`Path`. + +Member Functions +---------------- + ++----------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_offset` **(** :ref:`float` offset **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_offset` **(** **)** const | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_h_offset` **(** :ref:`float` h_offset **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_h_offset` **(** **)** const | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_v_offset` **(** :ref:`float` v_offset **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_v_offset` **(** **)** const | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_unit_offset` **(** :ref:`float` unit_offset **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_unit_offset` **(** **)** const | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_rotation_mode` **(** :ref:`int` rotation_mode **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_rotation_mode` **(** **)** const | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_cubic_interpolation` **(** :ref:`bool` enable **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_cubic_interpolation` **(** **)** const | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_loop` **(** :ref:`bool` loop **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_loop` **(** **)** const | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **ROTATION_NONE** = **0** --- Forbids the PathFollow to rotate. +- **ROTATION_Y** = **1** --- Allows the PathFollow to rotate in the Y axis only. +- **ROTATION_XY** = **2** --- Allows the PathFollow to rotate in both the X, and Y axes. +- **ROTATION_XYZ** = **3** --- Allows the PathFollow to rotate in any axis. + +Description +----------- + +This node takes its parent :ref:`Path`, and returns the coordinates of a point within it, given a distance from the first vertex. + +It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be descendants of this node. Then, when setting an offset in this node, the descendant nodes will move accordingly. + +Member Function Description +--------------------------- + +.. _class_PathFollow_set_offset: + +- void **set_offset** **(** :ref:`float` offset **)** + +Sets the distance from the first vertex, measured in 3D units along the path. This sets this node's position to a point within the path. + +.. _class_PathFollow_get_offset: + +- :ref:`float` **get_offset** **(** **)** const + +Returns the distance along the path in 3D units. + +.. _class_PathFollow_set_h_offset: + +- void **set_h_offset** **(** :ref:`float` h_offset **)** + +Moves this node in the X axis. As this node's position will be set every time its offset is set, this allows many PathFollow to share the same curve (and thus the same movement pattern), yet not return the same position for a given path offset. + +A similar effect may be achieved moving the this node's descendants. + +.. _class_PathFollow_get_h_offset: + +- :ref:`float` **get_h_offset** **(** **)** const + +Returns the X displacement this node has from its parent :ref:`Path`. + +.. _class_PathFollow_set_v_offset: + +- void **set_v_offset** **(** :ref:`float` v_offset **)** + +Moves this node in the Y axis, for the same reasons of :ref:`set_h_offset`. + +.. _class_PathFollow_get_v_offset: + +- :ref:`float` **get_v_offset** **(** **)** const + +Returns the Y displacement this node has from its parent :ref:`Path`. + +.. _class_PathFollow_set_unit_offset: + +- void **set_unit_offset** **(** :ref:`float` unit_offset **)** + +Sets the distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length. + +.. _class_PathFollow_get_unit_offset: + +- :ref:`float` **get_unit_offset** **(** **)** const + +Returns the distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last). + +.. _class_PathFollow_set_rotation_mode: + +- void **set_rotation_mode** **(** :ref:`int` rotation_mode **)** + +Allows or forbids rotation on one or more axes, per the constants below. + +.. _class_PathFollow_get_rotation_mode: + +- :ref:`int` **get_rotation_mode** **(** **)** const + +Returns the rotation mode. The constants below list which axes are allowed to rotate for each mode. + +.. _class_PathFollow_set_cubic_interpolation: + +- void **set_cubic_interpolation** **(** :ref:`bool` enable **)** + +The points along the :ref:`Curve3D` of the :ref:`Path` are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough. + +There are two answers to this problem: Either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations. + +This method controls whether the position between two cached points is interpolated linearly, or cubicly. + +.. _class_PathFollow_get_cubic_interpolation: + +- :ref:`bool` **get_cubic_interpolation** **(** **)** const + +This method returns whether the position between two cached points (see :ref:`set_cubic_interpolation`) is interpolated linearly, or cubicly. + +.. _class_PathFollow_set_loop: + +- void **set_loop** **(** :ref:`bool` loop **)** + +If set, any offset outside the path's length (whether set by :ref:`set_offset` or :ref:`set_unit_offset` will wrap around, instead of stopping at the ends. Set it for cyclic paths. + +.. _class_PathFollow_has_loop: + +- :ref:`bool` **has_loop** **(** **)** const + +Returns whether this node wraps its offsets around, or truncates them to the path ends. + + diff --git a/classes/class_pathfollow2d.rst b/classes/class_pathfollow2d.rst new file mode 100644 index 000000000..448db39ad --- /dev/null +++ b/classes/class_pathfollow2d.rst @@ -0,0 +1,150 @@ +.. _class_PathFollow2D: + +PathFollow2D +============ + +Inherits: :ref:`Node2D` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Point sampler for a :ref:`Path2D`. + +Member Functions +---------------- + ++----------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_offset` **(** :ref:`float` offset **)** | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_offset` **(** **)** const | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_h_offset` **(** :ref:`float` h_offset **)** | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_h_offset` **(** **)** const | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_v_offset` **(** :ref:`float` v_offset **)** | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_v_offset` **(** **)** const | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_unit_offset` **(** :ref:`float` unit_offset **)** | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_unit_offset` **(** **)** const | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_rotate` **(** :ref:`bool` enable **)** | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_rotating` **(** **)** const | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_cubic_interpolation` **(** :ref:`bool` enable **)** | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_cubic_interpolation` **(** **)** const | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_loop` **(** :ref:`bool` loop **)** | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_loop` **(** **)** const | ++----------------------------+-------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +This node takes its parent :ref:`Path2D`, and returns the coordinates of a point within it, given a distance from the first vertex. + +It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be descendants of this node. Then, when setting an offset in this node, the descendant nodes will move accordingly. + +Member Function Description +--------------------------- + +.. _class_PathFollow2D_set_offset: + +- void **set_offset** **(** :ref:`float` offset **)** + +Sets the distance from the first vertex, measured in pixels along the path. This sets this node's position to a point within the path. + +.. _class_PathFollow2D_get_offset: + +- :ref:`float` **get_offset** **(** **)** const + +Returns the distance along the path in pixels. + +.. _class_PathFollow2D_set_h_offset: + +- void **set_h_offset** **(** :ref:`float` h_offset **)** + +Moves this node horizontally. As this node's position will be set every time its offset is set, this allows many PathFollow2D to share the same curve (and thus the same movement pattern), yet not return the same position for a given path offset. + +A similar effect may be achieved moving this node's descendants. + +.. _class_PathFollow2D_get_h_offset: + +- :ref:`float` **get_h_offset** **(** **)** const + +Returns the horizontal displacement this node has from its parent :ref:`Path2D`. + +.. _class_PathFollow2D_set_v_offset: + +- void **set_v_offset** **(** :ref:`float` v_offset **)** + +Moves the PathFollow2D vertically, for the same reasons of :ref:`set_h_offset`. + +.. _class_PathFollow2D_get_v_offset: + +- :ref:`float` **get_v_offset** **(** **)** const + +Returns the vertical displacement this node has from its parent :ref:`Path2D`. + +.. _class_PathFollow2D_set_unit_offset: + +- void **set_unit_offset** **(** :ref:`float` unit_offset **)** + +Sets the distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length. + +.. _class_PathFollow2D_get_unit_offset: + +- :ref:`float` **get_unit_offset** **(** **)** const + +Returns the distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last). + +.. _class_PathFollow2D_set_rotate: + +- void **set_rotate** **(** :ref:`bool` enable **)** + +If set, this node rotates to follow the path, making its descendants rotate. + +.. _class_PathFollow2D_is_rotating: + +- :ref:`bool` **is_rotating** **(** **)** const + +Returns whether this node rotates to follow the path. + +.. _class_PathFollow2D_set_cubic_interpolation: + +- void **set_cubic_interpolation** **(** :ref:`bool` enable **)** + +The points along the :ref:`Curve2D` of the :ref:`Path2D` are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough. + +There are two answers to this problem: Either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations. + +This method controls whether the position between two cached points is interpolated linearly, or cubicly. + +.. _class_PathFollow2D_get_cubic_interpolation: + +- :ref:`bool` **get_cubic_interpolation** **(** **)** const + +This method returns whether the position between two cached points (see :ref:`set_cubic_interpolation`) is interpolated linearly, or cubicly. + +.. _class_PathFollow2D_set_loop: + +- void **set_loop** **(** :ref:`bool` loop **)** + +If set, any offset outside the path's length (whether set by :ref:`set_offset` or :ref:`set_unit_offset` will wrap around, instead of stopping at the ends. Set it for cyclic paths. + +.. _class_PathFollow2D_has_loop: + +- :ref:`bool` **has_loop** **(** **)** const + +Returns whether this node wraps its offsets around, or truncates them to the path ends. + + diff --git a/classes/class_pathremap.rst b/classes/class_pathremap.rst new file mode 100644 index 000000000..9a271d026 --- /dev/null +++ b/classes/class_pathremap.rst @@ -0,0 +1,70 @@ +.. _class_PathRemap: + +PathRemap +========= + +Inherits: :ref:`Object` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Singleton containing the list of remapped resources. + +Member Functions +---------------- + ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_remap` **(** :ref:`String` from, :ref:`String` to, :ref:`String` locale="" **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_remap` **(** :ref:`String` path **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_remap` **(** :ref:`String` path **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`erase_remap` **(** :ref:`String` path **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_remaps` **(** **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +When exporting, the types of some resources may change internally so they are converted to more optimized versions. While it's not usually necesary to access to this directly (path remapping happens automatically when opeining a file), it's exported just for information. + +Member Function Description +--------------------------- + +.. _class_PathRemap_add_remap: + +- void **add_remap** **(** :ref:`String` from, :ref:`String` to, :ref:`String` locale="" **)** + +Add a remap from a file to another. + +.. _class_PathRemap_has_remap: + +- :ref:`bool` **has_remap** **(** :ref:`String` path **)** const + +Return true if a file is being remapped. + +.. _class_PathRemap_get_remap: + +- :ref:`String` **get_remap** **(** :ref:`String` path **)** const + +Return the remapped new path of a file. + +.. _class_PathRemap_erase_remap: + +- void **erase_remap** **(** :ref:`String` path **)** + +Erase a remap. + +.. _class_PathRemap_clear_remaps: + +- void **clear_remaps** **(** **)** + +Clear all remaps. + + diff --git a/classes/class_pckpacker.rst b/classes/class_pckpacker.rst new file mode 100644 index 000000000..db5597c34 --- /dev/null +++ b/classes/class_pckpacker.rst @@ -0,0 +1,43 @@ +.. _class_PCKPacker: + +PCKPacker +========= + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`pck_start` **(** :ref:`String` pck_name, :ref:`int` alignment **)** | ++------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`add_file` **(** :ref:`String` pck_path, :ref:`String` source_path **)** | ++------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`flush` **(** :ref:`bool` verbose **)** | ++------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_PCKPacker_pck_start: + +- :ref:`int` **pck_start** **(** :ref:`String` pck_name, :ref:`int` alignment **)** + +.. _class_PCKPacker_add_file: + +- :ref:`int` **add_file** **(** :ref:`String` pck_path, :ref:`String` source_path **)** + +.. _class_PCKPacker_flush: + +- :ref:`int` **flush** **(** :ref:`bool` verbose **)** + + diff --git a/classes/class_performance.rst b/classes/class_performance.rst new file mode 100644 index 000000000..e4b92cc8d --- /dev/null +++ b/classes/class_performance.rst @@ -0,0 +1,63 @@ +.. _class_Performance: + +Performance +=========== + +Inherits: :ref:`Object` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------+-----------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_monitor` **(** :ref:`int` monitor **)** const | ++----------------------------+-----------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **TIME_FPS** = **0** +- **TIME_PROCESS** = **1** +- **TIME_FIXED_PROCESS** = **2** +- **MEMORY_STATIC** = **3** +- **MEMORY_DYNAMIC** = **4** +- **MEMORY_STATIC_MAX** = **5** +- **MEMORY_DYNAMIC_MAX** = **6** +- **MEMORY_MESSAGE_BUFFER_MAX** = **7** +- **OBJECT_COUNT** = **8** +- **OBJECT_RESOURCE_COUNT** = **9** +- **OBJECT_NODE_COUNT** = **10** +- **RENDER_OBJECTS_IN_FRAME** = **11** +- **RENDER_VERTICES_IN_FRAME** = **12** +- **RENDER_MATERIAL_CHANGES_IN_FRAME** = **13** +- **RENDER_SHADER_CHANGES_IN_FRAME** = **14** +- **RENDER_SURFACE_CHANGES_IN_FRAME** = **15** +- **RENDER_DRAW_CALLS_IN_FRAME** = **16** +- **RENDER_USAGE_VIDEO_MEM_TOTAL** = **20** +- **RENDER_VIDEO_MEM_USED** = **17** +- **RENDER_TEXTURE_MEM_USED** = **18** +- **RENDER_VERTEX_MEM_USED** = **19** +- **PHYSICS_2D_ACTIVE_OBJECTS** = **21** +- **PHYSICS_2D_COLLISION_PAIRS** = **22** +- **PHYSICS_2D_ISLAND_COUNT** = **23** +- **PHYSICS_3D_ACTIVE_OBJECTS** = **24** +- **PHYSICS_3D_COLLISION_PAIRS** = **25** +- **PHYSICS_3D_ISLAND_COUNT** = **26** +- **MONITOR_MAX** = **27** + +Member Function Description +--------------------------- + +.. _class_Performance_get_monitor: + +- :ref:`float` **get_monitor** **(** :ref:`int` monitor **)** const + + diff --git a/classes/class_phashtranslation.rst b/classes/class_phashtranslation.rst new file mode 100644 index 000000000..36665dac6 --- /dev/null +++ b/classes/class_phashtranslation.rst @@ -0,0 +1,36 @@ +.. _class_PHashTranslation: + +PHashTranslation +================ + +Inherits: :ref:`Translation` +----------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Optimized translation. + +Member Functions +---------------- + ++-------+-----------------------------------------------------------------------------------------------------------+ +| void | :ref:`generate` **(** :ref:`Translation` from **)** | ++-------+-----------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Optimized translation. Uses real-time compressed translations, which results in very small dictionaries. + +Member Function Description +--------------------------- + +.. _class_PHashTranslation_generate: + +- void **generate** **(** :ref:`Translation` from **)** + + diff --git a/classes/class_physics2ddirectbodystate.rst b/classes/class_physics2ddirectbodystate.rst new file mode 100644 index 000000000..6999197eb --- /dev/null +++ b/classes/class_physics2ddirectbodystate.rst @@ -0,0 +1,238 @@ +.. _class_Physics2DDirectBodyState: + +Physics2DDirectBodyState +======================== + +Inherits: :ref:`Object` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Direct access object to a physics body in the :ref:`Physics2DServer`. + +Member Functions +---------------- + ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_total_gravity` **(** **)** const | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_total_linear_damp` **(** **)** const | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_total_angular_damp` **(** **)** const | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_inverse_mass` **(** **)** const | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_inverse_inertia` **(** **)** const | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_linear_velocity` **(** :ref:`Vector2` velocity **)** | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_linear_velocity` **(** **)** const | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_angular_velocity` **(** :ref:`float` velocity **)** | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_angular_velocity` **(** **)** const | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_transform` **(** :ref:`Matrix32` transform **)** | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`get_transform` **(** **)** const | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_sleep_state` **(** :ref:`bool` enabled **)** | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_sleeping` **(** **)** const | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_contact_count` **(** **)** const | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_contact_local_pos` **(** :ref:`int` contact_idx **)** const | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_contact_local_normal` **(** :ref:`int` contact_idx **)** const | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_contact_local_shape` **(** :ref:`int` contact_idx **)** const | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_contact_collider` **(** :ref:`int` contact_idx **)** const | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_contact_collider_pos` **(** :ref:`int` contact_idx **)** const | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_contact_collider_id` **(** :ref:`int` contact_idx **)** const | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_contact_collider_object` **(** :ref:`int` contact_idx **)** const | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_contact_collider_shape` **(** :ref:`int` contact_idx **)** const | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Variant | :ref:`get_contact_collider_shape_metadata` **(** :ref:`int` contact_idx **)** const | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_contact_collider_velocity_at_pos` **(** :ref:`int` contact_idx **)** const | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_step` **(** **)** const | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`integrate_forces` **(** **)** | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Physics2DDirectSpaceState` | :ref:`get_space_state` **(** **)** | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Direct access object to a physics body in the :ref:`Physics2DServer`. This object is passed via the direct state callback of rigid/character bodies, and is intended for changing the direct state of that body. + +Member Function Description +--------------------------- + +.. _class_Physics2DDirectBodyState_get_total_gravity: + +- :ref:`Vector2` **get_total_gravity** **(** **)** const + +Return the total gravity vector being currently applied to this body. + +.. _class_Physics2DDirectBodyState_get_total_linear_damp: + +- :ref:`float` **get_total_linear_damp** **(** **)** const + +.. _class_Physics2DDirectBodyState_get_total_angular_damp: + +- :ref:`float` **get_total_angular_damp** **(** **)** const + +.. _class_Physics2DDirectBodyState_get_inverse_mass: + +- :ref:`float` **get_inverse_mass** **(** **)** const + +Return the inverse of the mass of the body. + +.. _class_Physics2DDirectBodyState_get_inverse_inertia: + +- :ref:`float` **get_inverse_inertia** **(** **)** const + +Return the inverse of the inertia of the body. + +.. _class_Physics2DDirectBodyState_set_linear_velocity: + +- void **set_linear_velocity** **(** :ref:`Vector2` velocity **)** + +Change the linear velocity of the body. + +.. _class_Physics2DDirectBodyState_get_linear_velocity: + +- :ref:`Vector2` **get_linear_velocity** **(** **)** const + +Return the current linear velocity of the body. + +.. _class_Physics2DDirectBodyState_set_angular_velocity: + +- void **set_angular_velocity** **(** :ref:`float` velocity **)** + +Change the angular velocity of the body. + +.. _class_Physics2DDirectBodyState_get_angular_velocity: + +- :ref:`float` **get_angular_velocity** **(** **)** const + +Return the angular velocity of the body. + +.. _class_Physics2DDirectBodyState_set_transform: + +- void **set_transform** **(** :ref:`Matrix32` transform **)** + +Change the transform matrix of the body. + +.. _class_Physics2DDirectBodyState_get_transform: + +- :ref:`Matrix32` **get_transform** **(** **)** const + +Return the transform matrix of the body. + +.. _class_Physics2DDirectBodyState_set_sleep_state: + +- void **set_sleep_state** **(** :ref:`bool` enabled **)** + +Set the sleeping state of the body, only affects character/rigid bodies. + +.. _class_Physics2DDirectBodyState_is_sleeping: + +- :ref:`bool` **is_sleeping** **(** **)** const + +Return true if this body is currently sleeping (not active). + +.. _class_Physics2DDirectBodyState_get_contact_count: + +- :ref:`int` **get_contact_count** **(** **)** const + +Return the amount of contacts this body has with other bodies. Note that by default this returns 0 unless bodies are configured to log contacts. + +.. _class_Physics2DDirectBodyState_get_contact_local_pos: + +- :ref:`Vector2` **get_contact_local_pos** **(** :ref:`int` contact_idx **)** const + +Return the local position (of this body) of the contact point. + +.. _class_Physics2DDirectBodyState_get_contact_local_normal: + +- :ref:`Vector2` **get_contact_local_normal** **(** :ref:`int` contact_idx **)** const + +.. _class_Physics2DDirectBodyState_get_contact_local_shape: + +- :ref:`int` **get_contact_local_shape** **(** :ref:`int` contact_idx **)** const + +Return the local shape index of the collision. + +.. _class_Physics2DDirectBodyState_get_contact_collider: + +- :ref:`RID` **get_contact_collider** **(** :ref:`int` contact_idx **)** const + +Return the RID of the collider. + +.. _class_Physics2DDirectBodyState_get_contact_collider_pos: + +- :ref:`Vector2` **get_contact_collider_pos** **(** :ref:`int` contact_idx **)** const + +Return the contact position in the collider. + +.. _class_Physics2DDirectBodyState_get_contact_collider_id: + +- :ref:`int` **get_contact_collider_id** **(** :ref:`int` contact_idx **)** const + +Return the object id of the collider. + +.. _class_Physics2DDirectBodyState_get_contact_collider_object: + +- :ref:`Object` **get_contact_collider_object** **(** :ref:`int` contact_idx **)** const + +Return the collider object, this depends on how it was created (will return a scene node if such was used to create it). + +.. _class_Physics2DDirectBodyState_get_contact_collider_shape: + +- :ref:`int` **get_contact_collider_shape** **(** :ref:`int` contact_idx **)** const + +Return the collider shape index. + +.. _class_Physics2DDirectBodyState_get_contact_collider_shape_metadata: + +- Variant **get_contact_collider_shape_metadata** **(** :ref:`int` contact_idx **)** const + +.. _class_Physics2DDirectBodyState_get_contact_collider_velocity_at_pos: + +- :ref:`Vector2` **get_contact_collider_velocity_at_pos** **(** :ref:`int` contact_idx **)** const + +Return the linear velocity vector at contact point of the collider. + +.. _class_Physics2DDirectBodyState_get_step: + +- :ref:`float` **get_step** **(** **)** const + +Return the timestep (delta) used for the simulation. + +.. _class_Physics2DDirectBodyState_integrate_forces: + +- void **integrate_forces** **(** **)** + +Call the built-in force integration code. + +.. _class_Physics2DDirectBodyState_get_space_state: + +- :ref:`Physics2DDirectSpaceState` **get_space_state** **(** **)** + +Return the current state of space, useful for queries. + + diff --git a/classes/class_physics2ddirectbodystatesw.rst b/classes/class_physics2ddirectbodystatesw.rst new file mode 100644 index 000000000..52f18536b --- /dev/null +++ b/classes/class_physics2ddirectbodystatesw.rst @@ -0,0 +1,16 @@ +.. _class_Physics2DDirectBodyStateSW: + +Physics2DDirectBodyStateSW +========================== + +Inherits: :ref:`Physics2DDirectBodyState` +------------------------------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + diff --git a/classes/class_physics2ddirectspacestate.rst b/classes/class_physics2ddirectspacestate.rst new file mode 100644 index 000000000..d9fa3d019 --- /dev/null +++ b/classes/class_physics2ddirectspacestate.rst @@ -0,0 +1,96 @@ +.. _class_Physics2DDirectSpaceState: + +Physics2DDirectSpaceState +========================= + +Inherits: :ref:`Object` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Direct access object to a space in the :ref:`Physics2DServer`. + +Member Functions +---------------- + ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`intersect_point` **(** :ref:`Vector2` point, :ref:`int` max_results=32, :ref:`Array` exclude=Array(), :ref:`int` layer_mask=2147483647, :ref:`int` type_mask=15 **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`intersect_ray` **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Array` exclude=Array(), :ref:`int` layer_mask=2147483647, :ref:`int` type_mask=15 **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`intersect_shape` **(** :ref:`Physics2DShapeQueryParameters` shape, :ref:`int` max_results=32 **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`cast_motion` **(** :ref:`Physics2DShapeQueryParameters` shape **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`collide_shape` **(** :ref:`Physics2DShapeQueryParameters` shape, :ref:`int` max_results=32 **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`get_rest_info` **(** :ref:`Physics2DShapeQueryParameters` shape **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **TYPE_MASK_STATIC_BODY** = **1** +- **TYPE_MASK_KINEMATIC_BODY** = **2** +- **TYPE_MASK_RIGID_BODY** = **4** +- **TYPE_MASK_CHARACTER_BODY** = **8** +- **TYPE_MASK_AREA** = **16** +- **TYPE_MASK_COLLISION** = **15** + +Description +----------- + +Direct access object to a space in the :ref:`Physics2DServer`. It's used mainly to do queries against objects and areas residing in a given space. + +Member Function Description +--------------------------- + +.. _class_Physics2DDirectSpaceState_intersect_point: + +- :ref:`Array` **intersect_point** **(** :ref:`Vector2` point, :ref:`int` max_results=32, :ref:`Array` exclude=Array(), :ref:`int` layer_mask=2147483647, :ref:`int` type_mask=15 **)** + +.. _class_Physics2DDirectSpaceState_intersect_ray: + +- :ref:`Dictionary` **intersect_ray** **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Array` exclude=Array(), :ref:`int` layer_mask=2147483647, :ref:`int` type_mask=15 **)** + +Intersect a ray in a given space, the returned object is a dictionary with the following fields: + +position: place where ray is stopped. + +normal: normal of the object at the point where the ray was stopped. + +shape: shape index of the object agaisnt which the ray was stopped. + +collider_: collider agaisnt which the ray was stopped. + +collider_id: collider id of the object agaisnt which the ray was stopped. + +collider: collider object agaisnt which the ray was stopped. + +rid: :ref:`RID` of the object agaisnt which the ray was stopped. + +If the ray did not intersect anything, then an empty dictionary (dir.empty()==true) is returned instead. + +.. _class_Physics2DDirectSpaceState_intersect_shape: + +- :ref:`Array` **intersect_shape** **(** :ref:`Physics2DShapeQueryParameters` shape, :ref:`int` max_results=32 **)** + +Intersect a given shape (RID or :ref:`Shape2D`) against the space, the intersected shapes are returned in a special result object. + +.. _class_Physics2DDirectSpaceState_cast_motion: + +- :ref:`Array` **cast_motion** **(** :ref:`Physics2DShapeQueryParameters` shape **)** + +.. _class_Physics2DDirectSpaceState_collide_shape: + +- :ref:`Array` **collide_shape** **(** :ref:`Physics2DShapeQueryParameters` shape, :ref:`int` max_results=32 **)** + +.. _class_Physics2DDirectSpaceState_get_rest_info: + +- :ref:`Dictionary` **get_rest_info** **(** :ref:`Physics2DShapeQueryParameters` shape **)** + + diff --git a/classes/class_physics2dserver.rst b/classes/class_physics2dserver.rst new file mode 100644 index 000000000..19b078bd1 --- /dev/null +++ b/classes/class_physics2dserver.rst @@ -0,0 +1,601 @@ +.. _class_Physics2DServer: + +Physics2DServer +=============== + +Inherits: :ref:`Object` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Physics 2D Server. + +Member Functions +---------------- + ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`shape_create` **(** :ref:`int` type **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shape_set_data` **(** :ref:`RID` shape, var data **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`shape_get_type` **(** :ref:`RID` shape **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shape_get_data` **(** :ref:`RID` shape **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`space_create` **(** **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`space_set_active` **(** :ref:`RID` space, :ref:`bool` active **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`space_is_active` **(** :ref:`RID` space **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`space_set_param` **(** :ref:`RID` space, :ref:`int` param, :ref:`float` value **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`space_get_param` **(** :ref:`RID` space, :ref:`int` param **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Physics2DDirectSpaceState` | :ref:`space_get_direct_state` **(** :ref:`RID` space **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`area_create` **(** **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_set_space` **(** :ref:`RID` area, :ref:`RID` space **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`area_get_space` **(** :ref:`RID` area **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_set_space_override_mode` **(** :ref:`RID` area, :ref:`int` mode **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`area_get_space_override_mode` **(** :ref:`RID` area **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_add_shape` **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Matrix32` transform=1,0, 0,1, 0,0 **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_set_shape` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_set_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Matrix32` transform **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`area_get_shape_count` **(** :ref:`RID` area **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`area_get_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`area_get_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_remove_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_clear_shapes` **(** :ref:`RID` area **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_set_layer_mask` **(** :ref:`RID` area, :ref:`int` mask **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_set_collision_mask` **(** :ref:`RID` area, :ref:`int` mask **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_set_param` **(** :ref:`RID` area, :ref:`int` param, var value **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_set_transform` **(** :ref:`RID` area, :ref:`Matrix32` transform **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_get_param` **(** :ref:`RID` area, :ref:`int` param **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`area_get_transform` **(** :ref:`RID` area **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_attach_object_instance_ID` **(** :ref:`RID` area, :ref:`int` id **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`area_get_object_instance_ID` **(** :ref:`RID` area **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_set_monitor_callback` **(** :ref:`RID` area, :ref:`Object` receiver, :ref:`String` method **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`body_create` **(** :ref:`int` mode=2, :ref:`bool` init_sleeping=false **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_space` **(** :ref:`RID` body, :ref:`RID` space **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`body_get_space` **(** :ref:`RID` body **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_mode` **(** :ref:`RID` body, :ref:`int` mode **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`body_get_mode` **(** :ref:`RID` body **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_add_shape` **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Matrix32` transform=1,0, 0,1, 0,0 **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_shape` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Matrix32` transform **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_shape_metadata` **(** :ref:`RID` body, :ref:`int` shape_idx, var metadata **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`body_get_shape_count` **(** :ref:`RID` body **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`body_get_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`body_get_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_get_shape_metadata` **(** :ref:`RID` body, :ref:`int` shape_idx **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_remove_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_clear_shapes` **(** :ref:`RID` body **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_shape_as_trigger` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` enable **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`body_is_shape_set_as_trigger` **(** :ref:`RID` body, :ref:`int` shape_idx **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_attach_object_instance_ID` **(** :ref:`RID` body, :ref:`int` id **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`body_get_object_instance_ID` **(** :ref:`RID` body **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_continuous_collision_detection_mode` **(** :ref:`RID` body, :ref:`int` mode **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`body_get_continuous_collision_detection_mode` **(** :ref:`RID` body **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_layer_mask` **(** :ref:`RID` body, :ref:`int` mask **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`body_get_layer_mask` **(** :ref:`RID` body **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_collision_mask` **(** :ref:`RID` body, :ref:`int` mask **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`body_get_collision_mask` **(** :ref:`RID` body **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_param` **(** :ref:`RID` body, :ref:`int` param, :ref:`float` value **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`body_get_param` **(** :ref:`RID` body, :ref:`int` param **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_state` **(** :ref:`RID` body, :ref:`int` state, var value **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_get_state` **(** :ref:`RID` body, :ref:`int` state **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_apply_impulse` **(** :ref:`RID` body, :ref:`Vector2` pos, :ref:`Vector2` impulse **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_axis_velocity` **(** :ref:`RID` body, :ref:`Vector2` axis_velocity **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_add_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_remove_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_max_contacts_reported` **(** :ref:`RID` body, :ref:`int` amount **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`body_get_max_contacts_reported` **(** :ref:`RID` body **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_one_way_collision_direction` **(** :ref:`RID` body, :ref:`Vector2` normal **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`body_get_one_way_collision_direction` **(** :ref:`RID` body **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_one_way_collision_max_depth` **(** :ref:`RID` body, :ref:`float` depth **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`body_get_one_way_collision_max_depth` **(** :ref:`RID` body **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_omit_force_integration` **(** :ref:`RID` body, :ref:`bool` enable **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`body_is_omitting_force_integration` **(** :ref:`RID` body **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_force_integration_callback` **(** :ref:`RID` body, :ref:`Object` receiver, :ref:`String` method, var userdata=NULL **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`body_test_motion` **(** :ref:`RID` body, :ref:`Vector2` motion, :ref:`float` margin=0.08, :ref:`Physics2DTestMotionResult` result=NULL **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`joint_set_param` **(** :ref:`RID` joint, :ref:`int` param, :ref:`float` value **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`joint_get_param` **(** :ref:`RID` joint, :ref:`int` param **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`pin_joint_create` **(** :ref:`Vector2` anchor, :ref:`RID` body_a, :ref:`RID` body_b=RID() **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`groove_joint_create` **(** :ref:`Vector2` groove1_a, :ref:`Vector2` groove2_a, :ref:`Vector2` anchor_b, :ref:`RID` body_a=RID(), :ref:`RID` body_b=RID() **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`damped_spring_joint_create` **(** :ref:`Vector2` anchor_a, :ref:`Vector2` anchor_b, :ref:`RID` body_a, :ref:`RID` body_b=RID() **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`damped_string_joint_set_param` **(** :ref:`RID` joint, :ref:`int` param, :ref:`float` value=RID() **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`damped_string_joint_get_param` **(** :ref:`RID` joint, :ref:`int` param **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`joint_get_type` **(** :ref:`RID` joint **)** const | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`free_rid` **(** :ref:`RID` rid **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_active` **(** :ref:`bool` active **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_process_info` **(** :ref:`int` process_info **)** | ++--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **SHAPE_LINE** = **0** +- **SHAPE_SEGMENT** = **2** +- **SHAPE_CIRCLE** = **3** +- **SHAPE_RECTANGLE** = **4** +- **SHAPE_CAPSULE** = **5** +- **SHAPE_CONVEX_POLYGON** = **6** +- **SHAPE_CONCAVE_POLYGON** = **7** +- **SHAPE_CUSTOM** = **8** +- **AREA_PARAM_GRAVITY** = **0** +- **AREA_PARAM_GRAVITY_VECTOR** = **1** +- **AREA_PARAM_GRAVITY_IS_POINT** = **2** +- **AREA_PARAM_GRAVITY_DISTANCE_SCALE** = **3** +- **AREA_PARAM_GRAVITY_POINT_ATTENUATION** = **4** +- **AREA_PARAM_LINEAR_DAMP** = **5** +- **AREA_PARAM_ANGULAR_DAMP** = **6** +- **AREA_PARAM_PRIORITY** = **7** +- **AREA_SPACE_OVERRIDE_DISABLED** = **0** --- This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them. +- **AREA_SPACE_OVERRIDE_COMBINE** = **1** --- This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects. +- **AREA_SPACE_OVERRIDE_COMBINE_REPLACE** = **2** --- This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one. +- **AREA_SPACE_OVERRIDE_REPLACE** = **3** --- This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas. +- **AREA_SPACE_OVERRIDE_REPLACE_COMBINE** = **4** --- This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. +- **BODY_MODE_STATIC** = **0** +- **BODY_MODE_KINEMATIC** = **1** +- **BODY_MODE_RIGID** = **2** +- **BODY_MODE_CHARACTER** = **3** +- **BODY_PARAM_BOUNCE** = **0** +- **BODY_PARAM_FRICTION** = **1** +- **BODY_PARAM_MASS** = **2** +- **BODY_PARAM_GRAVITY_SCALE** = **3** +- **BODY_PARAM_LINEAR_DAMP** = **4** +- **BODY_PARAM_ANGULAR_DAMP** = **5** +- **BODY_PARAM_MAX** = **6** +- **BODY_STATE_TRANSFORM** = **0** +- **BODY_STATE_LINEAR_VELOCITY** = **1** +- **BODY_STATE_ANGULAR_VELOCITY** = **2** +- **BODY_STATE_SLEEPING** = **3** +- **BODY_STATE_CAN_SLEEP** = **4** +- **JOINT_PIN** = **0** +- **JOINT_GROOVE** = **1** +- **JOINT_DAMPED_SPRING** = **2** +- **DAMPED_STRING_REST_LENGTH** = **0** +- **DAMPED_STRING_STIFFNESS** = **1** +- **DAMPED_STRING_DAMPING** = **2** +- **CCD_MODE_DISABLED** = **0** +- **CCD_MODE_CAST_RAY** = **1** +- **CCD_MODE_CAST_SHAPE** = **2** +- **AREA_BODY_ADDED** = **0** +- **AREA_BODY_REMOVED** = **1** +- **INFO_ACTIVE_OBJECTS** = **0** +- **INFO_COLLISION_PAIRS** = **1** +- **INFO_ISLAND_COUNT** = **2** + +Description +----------- + +Physics 2D Server is the server responsible for all 2D physics. + +Member Function Description +--------------------------- + +.. _class_Physics2DServer_shape_create: + +- :ref:`RID` **shape_create** **(** :ref:`int` type **)** + +.. _class_Physics2DServer_shape_set_data: + +- void **shape_set_data** **(** :ref:`RID` shape, var data **)** + +.. _class_Physics2DServer_shape_get_type: + +- :ref:`int` **shape_get_type** **(** :ref:`RID` shape **)** const + +.. _class_Physics2DServer_shape_get_data: + +- void **shape_get_data** **(** :ref:`RID` shape **)** const + +.. _class_Physics2DServer_space_create: + +- :ref:`RID` **space_create** **(** **)** + +.. _class_Physics2DServer_space_set_active: + +- void **space_set_active** **(** :ref:`RID` space, :ref:`bool` active **)** + +.. _class_Physics2DServer_space_is_active: + +- :ref:`bool` **space_is_active** **(** :ref:`RID` space **)** const + +.. _class_Physics2DServer_space_set_param: + +- void **space_set_param** **(** :ref:`RID` space, :ref:`int` param, :ref:`float` value **)** + +.. _class_Physics2DServer_space_get_param: + +- :ref:`float` **space_get_param** **(** :ref:`RID` space, :ref:`int` param **)** const + +.. _class_Physics2DServer_space_get_direct_state: + +- :ref:`Physics2DDirectSpaceState` **space_get_direct_state** **(** :ref:`RID` space **)** + +.. _class_Physics2DServer_area_create: + +- :ref:`RID` **area_create** **(** **)** + +.. _class_Physics2DServer_area_set_space: + +- void **area_set_space** **(** :ref:`RID` area, :ref:`RID` space **)** + +.. _class_Physics2DServer_area_get_space: + +- :ref:`RID` **area_get_space** **(** :ref:`RID` area **)** const + +.. _class_Physics2DServer_area_set_space_override_mode: + +- void **area_set_space_override_mode** **(** :ref:`RID` area, :ref:`int` mode **)** + +.. _class_Physics2DServer_area_get_space_override_mode: + +- :ref:`int` **area_get_space_override_mode** **(** :ref:`RID` area **)** const + +.. _class_Physics2DServer_area_add_shape: + +- void **area_add_shape** **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Matrix32` transform=1,0, 0,1, 0,0 **)** + +.. _class_Physics2DServer_area_set_shape: + +- void **area_set_shape** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** + +.. _class_Physics2DServer_area_set_shape_transform: + +- void **area_set_shape_transform** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Matrix32` transform **)** + +.. _class_Physics2DServer_area_get_shape_count: + +- :ref:`int` **area_get_shape_count** **(** :ref:`RID` area **)** const + +.. _class_Physics2DServer_area_get_shape: + +- :ref:`RID` **area_get_shape** **(** :ref:`RID` area, :ref:`int` shape_idx **)** const + +.. _class_Physics2DServer_area_get_shape_transform: + +- :ref:`Matrix32` **area_get_shape_transform** **(** :ref:`RID` area, :ref:`int` shape_idx **)** const + +.. _class_Physics2DServer_area_remove_shape: + +- void **area_remove_shape** **(** :ref:`RID` area, :ref:`int` shape_idx **)** + +.. _class_Physics2DServer_area_clear_shapes: + +- void **area_clear_shapes** **(** :ref:`RID` area **)** + +.. _class_Physics2DServer_area_set_layer_mask: + +- void **area_set_layer_mask** **(** :ref:`RID` area, :ref:`int` mask **)** + +.. _class_Physics2DServer_area_set_collision_mask: + +- void **area_set_collision_mask** **(** :ref:`RID` area, :ref:`int` mask **)** + +.. _class_Physics2DServer_area_set_param: + +- void **area_set_param** **(** :ref:`RID` area, :ref:`int` param, var value **)** + +.. _class_Physics2DServer_area_set_transform: + +- void **area_set_transform** **(** :ref:`RID` area, :ref:`Matrix32` transform **)** + +.. _class_Physics2DServer_area_get_param: + +- void **area_get_param** **(** :ref:`RID` area, :ref:`int` param **)** const + +.. _class_Physics2DServer_area_get_transform: + +- :ref:`Matrix32` **area_get_transform** **(** :ref:`RID` area **)** const + +.. _class_Physics2DServer_area_attach_object_instance_ID: + +- void **area_attach_object_instance_ID** **(** :ref:`RID` area, :ref:`int` id **)** + +.. _class_Physics2DServer_area_get_object_instance_ID: + +- :ref:`int` **area_get_object_instance_ID** **(** :ref:`RID` area **)** const + +.. _class_Physics2DServer_area_set_monitor_callback: + +- void **area_set_monitor_callback** **(** :ref:`RID` area, :ref:`Object` receiver, :ref:`String` method **)** + +.. _class_Physics2DServer_body_create: + +- :ref:`RID` **body_create** **(** :ref:`int` mode=2, :ref:`bool` init_sleeping=false **)** + +.. _class_Physics2DServer_body_set_space: + +- void **body_set_space** **(** :ref:`RID` body, :ref:`RID` space **)** + +.. _class_Physics2DServer_body_get_space: + +- :ref:`RID` **body_get_space** **(** :ref:`RID` body **)** const + +.. _class_Physics2DServer_body_set_mode: + +- void **body_set_mode** **(** :ref:`RID` body, :ref:`int` mode **)** + +.. _class_Physics2DServer_body_get_mode: + +- :ref:`int` **body_get_mode** **(** :ref:`RID` body **)** const + +.. _class_Physics2DServer_body_add_shape: + +- void **body_add_shape** **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Matrix32` transform=1,0, 0,1, 0,0 **)** + +.. _class_Physics2DServer_body_set_shape: + +- void **body_set_shape** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** + +.. _class_Physics2DServer_body_set_shape_transform: + +- void **body_set_shape_transform** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Matrix32` transform **)** + +.. _class_Physics2DServer_body_set_shape_metadata: + +- void **body_set_shape_metadata** **(** :ref:`RID` body, :ref:`int` shape_idx, var metadata **)** + +.. _class_Physics2DServer_body_get_shape_count: + +- :ref:`int` **body_get_shape_count** **(** :ref:`RID` body **)** const + +.. _class_Physics2DServer_body_get_shape: + +- :ref:`RID` **body_get_shape** **(** :ref:`RID` body, :ref:`int` shape_idx **)** const + +.. _class_Physics2DServer_body_get_shape_transform: + +- :ref:`Matrix32` **body_get_shape_transform** **(** :ref:`RID` body, :ref:`int` shape_idx **)** const + +.. _class_Physics2DServer_body_get_shape_metadata: + +- void **body_get_shape_metadata** **(** :ref:`RID` body, :ref:`int` shape_idx **)** const + +.. _class_Physics2DServer_body_remove_shape: + +- void **body_remove_shape** **(** :ref:`RID` body, :ref:`int` shape_idx **)** + +.. _class_Physics2DServer_body_clear_shapes: + +- void **body_clear_shapes** **(** :ref:`RID` body **)** + +.. _class_Physics2DServer_body_set_shape_as_trigger: + +- void **body_set_shape_as_trigger** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` enable **)** + +.. _class_Physics2DServer_body_is_shape_set_as_trigger: + +- :ref:`bool` **body_is_shape_set_as_trigger** **(** :ref:`RID` body, :ref:`int` shape_idx **)** const + +.. _class_Physics2DServer_body_attach_object_instance_ID: + +- void **body_attach_object_instance_ID** **(** :ref:`RID` body, :ref:`int` id **)** + +.. _class_Physics2DServer_body_get_object_instance_ID: + +- :ref:`int` **body_get_object_instance_ID** **(** :ref:`RID` body **)** const + +.. _class_Physics2DServer_body_set_continuous_collision_detection_mode: + +- void **body_set_continuous_collision_detection_mode** **(** :ref:`RID` body, :ref:`int` mode **)** + +.. _class_Physics2DServer_body_get_continuous_collision_detection_mode: + +- :ref:`int` **body_get_continuous_collision_detection_mode** **(** :ref:`RID` body **)** const + +.. _class_Physics2DServer_body_set_layer_mask: + +- void **body_set_layer_mask** **(** :ref:`RID` body, :ref:`int` mask **)** + +.. _class_Physics2DServer_body_get_layer_mask: + +- :ref:`int` **body_get_layer_mask** **(** :ref:`RID` body **)** const + +.. _class_Physics2DServer_body_set_collision_mask: + +- void **body_set_collision_mask** **(** :ref:`RID` body, :ref:`int` mask **)** + +.. _class_Physics2DServer_body_get_collision_mask: + +- :ref:`int` **body_get_collision_mask** **(** :ref:`RID` body **)** const + +.. _class_Physics2DServer_body_set_param: + +- void **body_set_param** **(** :ref:`RID` body, :ref:`int` param, :ref:`float` value **)** + +.. _class_Physics2DServer_body_get_param: + +- :ref:`float` **body_get_param** **(** :ref:`RID` body, :ref:`int` param **)** const + +.. _class_Physics2DServer_body_set_state: + +- void **body_set_state** **(** :ref:`RID` body, :ref:`int` state, var value **)** + +.. _class_Physics2DServer_body_get_state: + +- void **body_get_state** **(** :ref:`RID` body, :ref:`int` state **)** const + +.. _class_Physics2DServer_body_apply_impulse: + +- void **body_apply_impulse** **(** :ref:`RID` body, :ref:`Vector2` pos, :ref:`Vector2` impulse **)** + +.. _class_Physics2DServer_body_set_axis_velocity: + +- void **body_set_axis_velocity** **(** :ref:`RID` body, :ref:`Vector2` axis_velocity **)** + +.. _class_Physics2DServer_body_add_collision_exception: + +- void **body_add_collision_exception** **(** :ref:`RID` body, :ref:`RID` excepted_body **)** + +.. _class_Physics2DServer_body_remove_collision_exception: + +- void **body_remove_collision_exception** **(** :ref:`RID` body, :ref:`RID` excepted_body **)** + +.. _class_Physics2DServer_body_set_max_contacts_reported: + +- void **body_set_max_contacts_reported** **(** :ref:`RID` body, :ref:`int` amount **)** + +.. _class_Physics2DServer_body_get_max_contacts_reported: + +- :ref:`int` **body_get_max_contacts_reported** **(** :ref:`RID` body **)** const + +.. _class_Physics2DServer_body_set_one_way_collision_direction: + +- void **body_set_one_way_collision_direction** **(** :ref:`RID` body, :ref:`Vector2` normal **)** + +.. _class_Physics2DServer_body_get_one_way_collision_direction: + +- :ref:`Vector2` **body_get_one_way_collision_direction** **(** :ref:`RID` body **)** const + +.. _class_Physics2DServer_body_set_one_way_collision_max_depth: + +- void **body_set_one_way_collision_max_depth** **(** :ref:`RID` body, :ref:`float` depth **)** + +.. _class_Physics2DServer_body_get_one_way_collision_max_depth: + +- :ref:`float` **body_get_one_way_collision_max_depth** **(** :ref:`RID` body **)** const + +.. _class_Physics2DServer_body_set_omit_force_integration: + +- void **body_set_omit_force_integration** **(** :ref:`RID` body, :ref:`bool` enable **)** + +.. _class_Physics2DServer_body_is_omitting_force_integration: + +- :ref:`bool` **body_is_omitting_force_integration** **(** :ref:`RID` body **)** const + +.. _class_Physics2DServer_body_set_force_integration_callback: + +- void **body_set_force_integration_callback** **(** :ref:`RID` body, :ref:`Object` receiver, :ref:`String` method, var userdata=NULL **)** + +.. _class_Physics2DServer_body_test_motion: + +- :ref:`bool` **body_test_motion** **(** :ref:`RID` body, :ref:`Vector2` motion, :ref:`float` margin=0.08, :ref:`Physics2DTestMotionResult` result=NULL **)** + +.. _class_Physics2DServer_joint_set_param: + +- void **joint_set_param** **(** :ref:`RID` joint, :ref:`int` param, :ref:`float` value **)** + +.. _class_Physics2DServer_joint_get_param: + +- :ref:`float` **joint_get_param** **(** :ref:`RID` joint, :ref:`int` param **)** const + +.. _class_Physics2DServer_pin_joint_create: + +- :ref:`RID` **pin_joint_create** **(** :ref:`Vector2` anchor, :ref:`RID` body_a, :ref:`RID` body_b=RID() **)** + +.. _class_Physics2DServer_groove_joint_create: + +- :ref:`RID` **groove_joint_create** **(** :ref:`Vector2` groove1_a, :ref:`Vector2` groove2_a, :ref:`Vector2` anchor_b, :ref:`RID` body_a=RID(), :ref:`RID` body_b=RID() **)** + +.. _class_Physics2DServer_damped_spring_joint_create: + +- :ref:`RID` **damped_spring_joint_create** **(** :ref:`Vector2` anchor_a, :ref:`Vector2` anchor_b, :ref:`RID` body_a, :ref:`RID` body_b=RID() **)** + +.. _class_Physics2DServer_damped_string_joint_set_param: + +- void **damped_string_joint_set_param** **(** :ref:`RID` joint, :ref:`int` param, :ref:`float` value=RID() **)** + +.. _class_Physics2DServer_damped_string_joint_get_param: + +- :ref:`float` **damped_string_joint_get_param** **(** :ref:`RID` joint, :ref:`int` param **)** const + +.. _class_Physics2DServer_joint_get_type: + +- :ref:`int` **joint_get_type** **(** :ref:`RID` joint **)** const + +.. _class_Physics2DServer_free_rid: + +- void **free_rid** **(** :ref:`RID` rid **)** + +.. _class_Physics2DServer_set_active: + +- void **set_active** **(** :ref:`bool` active **)** + +.. _class_Physics2DServer_get_process_info: + +- :ref:`int` **get_process_info** **(** :ref:`int` process_info **)** + + diff --git a/classes/class_physics2dserversw.rst b/classes/class_physics2dserversw.rst new file mode 100644 index 000000000..82d21ca93 --- /dev/null +++ b/classes/class_physics2dserversw.rst @@ -0,0 +1,16 @@ +.. _class_Physics2DServerSW: + +Physics2DServerSW +================= + +Inherits: :ref:`Physics2DServer` +------------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + diff --git a/classes/class_physics2dshapequeryparameters.rst b/classes/class_physics2dshapequeryparameters.rst new file mode 100644 index 000000000..9b99ef2c4 --- /dev/null +++ b/classes/class_physics2dshapequeryparameters.rst @@ -0,0 +1,115 @@ +.. _class_Physics2DShapeQueryParameters: + +Physics2DShapeQueryParameters +============================= + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shape` **(** :ref:`Shape2D` shape **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shape_rid` **(** :ref:`RID` shape **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_shape_rid` **(** **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_transform` **(** :ref:`Matrix32` transform **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`get_transform` **(** **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_motion` **(** :ref:`Vector2` motion **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_motion` **(** **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_margin` **(** :ref:`float` margin **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_margin` **(** **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_layer_mask` **(** :ref:`int` layer_mask **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_layer_mask` **(** **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_object_type_mask` **(** :ref:`int` object_type_mask **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_object_type_mask` **(** **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_exclude` **(** :ref:`Array` exclude **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_exclude` **(** **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_Physics2DShapeQueryParameters_set_shape: + +- void **set_shape** **(** :ref:`Shape2D` shape **)** + +.. _class_Physics2DShapeQueryParameters_set_shape_rid: + +- void **set_shape_rid** **(** :ref:`RID` shape **)** + +.. _class_Physics2DShapeQueryParameters_get_shape_rid: + +- :ref:`RID` **get_shape_rid** **(** **)** const + +.. _class_Physics2DShapeQueryParameters_set_transform: + +- void **set_transform** **(** :ref:`Matrix32` transform **)** + +.. _class_Physics2DShapeQueryParameters_get_transform: + +- :ref:`Matrix32` **get_transform** **(** **)** const + +.. _class_Physics2DShapeQueryParameters_set_motion: + +- void **set_motion** **(** :ref:`Vector2` motion **)** + +.. _class_Physics2DShapeQueryParameters_get_motion: + +- :ref:`Vector2` **get_motion** **(** **)** const + +.. _class_Physics2DShapeQueryParameters_set_margin: + +- void **set_margin** **(** :ref:`float` margin **)** + +.. _class_Physics2DShapeQueryParameters_get_margin: + +- :ref:`float` **get_margin** **(** **)** const + +.. _class_Physics2DShapeQueryParameters_set_layer_mask: + +- void **set_layer_mask** **(** :ref:`int` layer_mask **)** + +.. _class_Physics2DShapeQueryParameters_get_layer_mask: + +- :ref:`int` **get_layer_mask** **(** **)** const + +.. _class_Physics2DShapeQueryParameters_set_object_type_mask: + +- void **set_object_type_mask** **(** :ref:`int` object_type_mask **)** + +.. _class_Physics2DShapeQueryParameters_get_object_type_mask: + +- :ref:`int` **get_object_type_mask** **(** **)** const + +.. _class_Physics2DShapeQueryParameters_set_exclude: + +- void **set_exclude** **(** :ref:`Array` exclude **)** + +.. _class_Physics2DShapeQueryParameters_get_exclude: + +- :ref:`Array` **get_exclude** **(** **)** const + + diff --git a/classes/class_physics2dshapequeryresult.rst b/classes/class_physics2dshapequeryresult.rst new file mode 100644 index 000000000..5c4afcfaa --- /dev/null +++ b/classes/class_physics2dshapequeryresult.rst @@ -0,0 +1,55 @@ +.. _class_Physics2DShapeQueryResult: + +Physics2DShapeQueryResult +========================= + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_result_count` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_result_rid` **(** :ref:`int` idx **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_result_object_id` **(** :ref:`int` idx **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_result_object` **(** :ref:`int` idx **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_result_object_shape` **(** :ref:`int` idx **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_Physics2DShapeQueryResult_get_result_count: + +- :ref:`int` **get_result_count** **(** **)** const + +.. _class_Physics2DShapeQueryResult_get_result_rid: + +- :ref:`RID` **get_result_rid** **(** :ref:`int` idx **)** const + +.. _class_Physics2DShapeQueryResult_get_result_object_id: + +- :ref:`int` **get_result_object_id** **(** :ref:`int` idx **)** const + +.. _class_Physics2DShapeQueryResult_get_result_object: + +- :ref:`Object` **get_result_object** **(** :ref:`int` idx **)** const + +.. _class_Physics2DShapeQueryResult_get_result_object_shape: + +- :ref:`int` **get_result_object_shape** **(** :ref:`int` idx **)** const + + diff --git a/classes/class_physics2dtestmotionresult.rst b/classes/class_physics2dtestmotionresult.rst new file mode 100644 index 000000000..476ce4f6f --- /dev/null +++ b/classes/class_physics2dtestmotionresult.rst @@ -0,0 +1,79 @@ +.. _class_Physics2DTestMotionResult: + +Physics2DTestMotionResult +========================= + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------------+--------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_motion` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_motion_remainder` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_collision_point` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_collision_normal` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_collider_velocity` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_collider_id` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_collider_rid` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_collider` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_collider_shape` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_Physics2DTestMotionResult_get_motion: + +- :ref:`Vector2` **get_motion** **(** **)** const + +.. _class_Physics2DTestMotionResult_get_motion_remainder: + +- :ref:`Vector2` **get_motion_remainder** **(** **)** const + +.. _class_Physics2DTestMotionResult_get_collision_point: + +- :ref:`Vector2` **get_collision_point** **(** **)** const + +.. _class_Physics2DTestMotionResult_get_collision_normal: + +- :ref:`Vector2` **get_collision_normal** **(** **)** const + +.. _class_Physics2DTestMotionResult_get_collider_velocity: + +- :ref:`Vector2` **get_collider_velocity** **(** **)** const + +.. _class_Physics2DTestMotionResult_get_collider_id: + +- :ref:`int` **get_collider_id** **(** **)** const + +.. _class_Physics2DTestMotionResult_get_collider_rid: + +- :ref:`RID` **get_collider_rid** **(** **)** const + +.. _class_Physics2DTestMotionResult_get_collider: + +- :ref:`Object` **get_collider** **(** **)** const + +.. _class_Physics2DTestMotionResult_get_collider_shape: + +- :ref:`int` **get_collider_shape** **(** **)** const + + diff --git a/classes/class_physicsbody.rst b/classes/class_physicsbody.rst new file mode 100644 index 000000000..e93ce7221 --- /dev/null +++ b/classes/class_physicsbody.rst @@ -0,0 +1,54 @@ +.. _class_PhysicsBody: + +PhysicsBody +=========== + +Inherits: :ref:`CollisionObject` +------------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Base class for different types of Physics bodies. + +Member Functions +---------------- + ++------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_layer_mask` **(** :ref:`int` mask **)** | ++------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_layer_mask` **(** **)** const | ++------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_collision_exception_with` **(** :ref:`PhysicsBody` body **)** | ++------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_collision_exception_with` **(** :ref:`PhysicsBody` body **)** | ++------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +PhysicsBody is an abstract base class for implementing a physics body. All PhysicsBody types inherit from it. + +Member Function Description +--------------------------- + +.. _class_PhysicsBody_set_layer_mask: + +- void **set_layer_mask** **(** :ref:`int` mask **)** + +.. _class_PhysicsBody_get_layer_mask: + +- :ref:`int` **get_layer_mask** **(** **)** const + +.. _class_PhysicsBody_add_collision_exception_with: + +- void **add_collision_exception_with** **(** :ref:`PhysicsBody` body **)** + +.. _class_PhysicsBody_remove_collision_exception_with: + +- void **remove_collision_exception_with** **(** :ref:`PhysicsBody` body **)** + + diff --git a/classes/class_physicsbody2d.rst b/classes/class_physicsbody2d.rst new file mode 100644 index 000000000..f229db76b --- /dev/null +++ b/classes/class_physicsbody2d.rst @@ -0,0 +1,146 @@ +.. _class_PhysicsBody2D: + +PhysicsBody2D +============= + +Inherits: :ref:`CollisionObject2D` +----------------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Base class for all objects affected by physics. + +Member Functions +---------------- + ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_layer_mask` **(** :ref:`int` mask **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_layer_mask` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_mask` **(** :ref:`int` mask **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_collision_mask` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_mask_bit` **(** :ref:`int` bit, :ref:`bool` value **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_collision_mask_bit` **(** :ref:`int` bit **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_layer_mask_bit` **(** :ref:`int` bit, :ref:`bool` value **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_layer_mask_bit` **(** :ref:`int` bit **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_one_way_collision_direction` **(** :ref:`Vector2` dir **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_one_way_collision_direction` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_one_way_collision_max_depth` **(** :ref:`float` depth **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_one_way_collision_max_depth` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_collision_exception_with` **(** :ref:`PhysicsBody2D` body **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_collision_exception_with` **(** :ref:`PhysicsBody2D` body **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +PhysicsBody2D is an abstract base class for implementing a physics body. All *x*Body2D types inherit from it. + +Member Function Description +--------------------------- + +.. _class_PhysicsBody2D_set_layer_mask: + +- void **set_layer_mask** **(** :ref:`int` mask **)** + +Set the physics layers this area is in. + +Collidable objects can exist in any of 32 different layers. These layers are not visual, but more of a tagging system instead. A collidable can use these layers/tags to select with which objects it can collide, using :ref:`set_collision_mask`. + +A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. + +.. _class_PhysicsBody2D_get_layer_mask: + +- :ref:`int` **get_layer_mask** **(** **)** const + +Return the physics layer this area is in. + +.. _class_PhysicsBody2D_set_collision_mask: + +- void **set_collision_mask** **(** :ref:`int` mask **)** + +Set the physics layers this area can scan for collisions. + +.. _class_PhysicsBody2D_get_collision_mask: + +- :ref:`int` **get_collision_mask** **(** **)** const + +Return the physics layers this area can scan for collisions. + +.. _class_PhysicsBody2D_set_collision_mask_bit: + +- void **set_collision_mask_bit** **(** :ref:`int` bit, :ref:`bool` value **)** + +Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier. + +.. _class_PhysicsBody2D_get_collision_mask_bit: + +- :ref:`bool` **get_collision_mask_bit** **(** :ref:`int` bit **)** const + +Return an individual bit on the collision mask. + +.. _class_PhysicsBody2D_set_layer_mask_bit: + +- void **set_layer_mask_bit** **(** :ref:`int` bit, :ref:`bool` value **)** + +Set/clear individual bits on the layer mask. This makes getting a body in/out of only one layer easier. + +.. _class_PhysicsBody2D_get_layer_mask_bit: + +- :ref:`bool` **get_layer_mask_bit** **(** :ref:`int` bit **)** const + +Return an individual bit on the collision mask. + +.. _class_PhysicsBody2D_set_one_way_collision_direction: + +- void **set_one_way_collision_direction** **(** :ref:`Vector2` dir **)** + +Set a direction in which bodies can go through this one. If this value is different from (0,0), any movement within 90 degrees of this vector is considered a valid movement. Set this direction to (0,0) to disable one-way collisions. + +.. _class_PhysicsBody2D_get_one_way_collision_direction: + +- :ref:`Vector2` **get_one_way_collision_direction** **(** **)** const + +Return the direction used for one-way collision detection. + +.. _class_PhysicsBody2D_set_one_way_collision_max_depth: + +- void **set_one_way_collision_max_depth** **(** :ref:`float` depth **)** + +Set how far a body can go through this one, when it allows one-way collisions (see :ref:`set_one_way_collision_detection`). + +.. _class_PhysicsBody2D_get_one_way_collision_max_depth: + +- :ref:`float` **get_one_way_collision_max_depth** **(** **)** const + +Return how far a body can go through this one, when it allows one-way collisions. + +.. _class_PhysicsBody2D_add_collision_exception_with: + +- void **add_collision_exception_with** **(** :ref:`PhysicsBody2D` body **)** + +Adds a body to the collision exception list. This list contains bodies that this body will not collide with. + +.. _class_PhysicsBody2D_remove_collision_exception_with: + +- void **remove_collision_exception_with** **(** :ref:`PhysicsBody2D` body **)** + +Removes a body from the collision exception list. + + diff --git a/classes/class_physicsdirectbodystate.rst b/classes/class_physicsdirectbodystate.rst new file mode 100644 index 000000000..555045af3 --- /dev/null +++ b/classes/class_physicsdirectbodystate.rst @@ -0,0 +1,193 @@ +.. _class_PhysicsDirectBodyState: + +PhysicsDirectBodyState +====================== + +Inherits: :ref:`Object` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_total_gravity` **(** **)** const | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_total_linear_damp` **(** **)** const | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_total_angular_damp` **(** **)** const | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_inverse_mass` **(** **)** const | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_inverse_inertia` **(** **)** const | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_linear_velocity` **(** :ref:`Vector3` velocity **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_linear_velocity` **(** **)** const | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_angular_velocity` **(** :ref:`Vector3` velocity **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_angular_velocity` **(** **)** const | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_transform` **(** :ref:`Transform` transform **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`get_transform` **(** **)** const | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_force` **(** :ref:`Vector3` force, :ref:`Vector3` pos **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`apply_impulse` **(** :ref:`Vector3` pos, :ref:`Vector3` j **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_sleep_state` **(** :ref:`bool` enabled **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_sleeping` **(** **)** const | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_contact_count` **(** **)** const | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_contact_local_pos` **(** :ref:`int` contact_idx **)** const | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_contact_local_normal` **(** :ref:`int` contact_idx **)** const | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_contact_local_shape` **(** :ref:`int` contact_idx **)** const | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_contact_collider` **(** :ref:`int` contact_idx **)** const | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_contact_collider_pos` **(** :ref:`int` contact_idx **)** const | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_contact_collider_id` **(** :ref:`int` contact_idx **)** const | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_contact_collider_object` **(** :ref:`int` contact_idx **)** const | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_contact_collider_shape` **(** :ref:`int` contact_idx **)** const | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_contact_collider_velocity_at_pos` **(** :ref:`int` contact_idx **)** const | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_step` **(** **)** const | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`integrate_forces` **(** **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PhysicsDirectSpaceState` | :ref:`get_space_state` **(** **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_PhysicsDirectBodyState_get_total_gravity: + +- :ref:`Vector3` **get_total_gravity** **(** **)** const + +.. _class_PhysicsDirectBodyState_get_total_linear_damp: + +- :ref:`float` **get_total_linear_damp** **(** **)** const + +.. _class_PhysicsDirectBodyState_get_total_angular_damp: + +- :ref:`float` **get_total_angular_damp** **(** **)** const + +.. _class_PhysicsDirectBodyState_get_inverse_mass: + +- :ref:`float` **get_inverse_mass** **(** **)** const + +.. _class_PhysicsDirectBodyState_get_inverse_inertia: + +- :ref:`Vector3` **get_inverse_inertia** **(** **)** const + +.. _class_PhysicsDirectBodyState_set_linear_velocity: + +- void **set_linear_velocity** **(** :ref:`Vector3` velocity **)** + +.. _class_PhysicsDirectBodyState_get_linear_velocity: + +- :ref:`Vector3` **get_linear_velocity** **(** **)** const + +.. _class_PhysicsDirectBodyState_set_angular_velocity: + +- void **set_angular_velocity** **(** :ref:`Vector3` velocity **)** + +.. _class_PhysicsDirectBodyState_get_angular_velocity: + +- :ref:`Vector3` **get_angular_velocity** **(** **)** const + +.. _class_PhysicsDirectBodyState_set_transform: + +- void **set_transform** **(** :ref:`Transform` transform **)** + +.. _class_PhysicsDirectBodyState_get_transform: + +- :ref:`Transform` **get_transform** **(** **)** const + +.. _class_PhysicsDirectBodyState_add_force: + +- void **add_force** **(** :ref:`Vector3` force, :ref:`Vector3` pos **)** + +.. _class_PhysicsDirectBodyState_apply_impulse: + +- void **apply_impulse** **(** :ref:`Vector3` pos, :ref:`Vector3` j **)** + +.. _class_PhysicsDirectBodyState_set_sleep_state: + +- void **set_sleep_state** **(** :ref:`bool` enabled **)** + +.. _class_PhysicsDirectBodyState_is_sleeping: + +- :ref:`bool` **is_sleeping** **(** **)** const + +.. _class_PhysicsDirectBodyState_get_contact_count: + +- :ref:`int` **get_contact_count** **(** **)** const + +.. _class_PhysicsDirectBodyState_get_contact_local_pos: + +- :ref:`Vector3` **get_contact_local_pos** **(** :ref:`int` contact_idx **)** const + +.. _class_PhysicsDirectBodyState_get_contact_local_normal: + +- :ref:`Vector3` **get_contact_local_normal** **(** :ref:`int` contact_idx **)** const + +.. _class_PhysicsDirectBodyState_get_contact_local_shape: + +- :ref:`int` **get_contact_local_shape** **(** :ref:`int` contact_idx **)** const + +.. _class_PhysicsDirectBodyState_get_contact_collider: + +- :ref:`RID` **get_contact_collider** **(** :ref:`int` contact_idx **)** const + +.. _class_PhysicsDirectBodyState_get_contact_collider_pos: + +- :ref:`Vector3` **get_contact_collider_pos** **(** :ref:`int` contact_idx **)** const + +.. _class_PhysicsDirectBodyState_get_contact_collider_id: + +- :ref:`int` **get_contact_collider_id** **(** :ref:`int` contact_idx **)** const + +.. _class_PhysicsDirectBodyState_get_contact_collider_object: + +- :ref:`Object` **get_contact_collider_object** **(** :ref:`int` contact_idx **)** const + +.. _class_PhysicsDirectBodyState_get_contact_collider_shape: + +- :ref:`int` **get_contact_collider_shape** **(** :ref:`int` contact_idx **)** const + +.. _class_PhysicsDirectBodyState_get_contact_collider_velocity_at_pos: + +- :ref:`Vector3` **get_contact_collider_velocity_at_pos** **(** :ref:`int` contact_idx **)** const + +.. _class_PhysicsDirectBodyState_get_step: + +- :ref:`float` **get_step** **(** **)** const + +.. _class_PhysicsDirectBodyState_integrate_forces: + +- void **integrate_forces** **(** **)** + +.. _class_PhysicsDirectBodyState_get_space_state: + +- :ref:`PhysicsDirectSpaceState` **get_space_state** **(** **)** + + diff --git a/classes/class_physicsdirectbodystatesw.rst b/classes/class_physicsdirectbodystatesw.rst new file mode 100644 index 000000000..61eec79b1 --- /dev/null +++ b/classes/class_physicsdirectbodystatesw.rst @@ -0,0 +1,16 @@ +.. _class_PhysicsDirectBodyStateSW: + +PhysicsDirectBodyStateSW +======================== + +Inherits: :ref:`PhysicsDirectBodyState` +--------------------------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + diff --git a/classes/class_physicsdirectspacestate.rst b/classes/class_physicsdirectspacestate.rst new file mode 100644 index 000000000..ea9f2504f --- /dev/null +++ b/classes/class_physicsdirectspacestate.rst @@ -0,0 +1,65 @@ +.. _class_PhysicsDirectSpaceState: + +PhysicsDirectSpaceState +======================= + +Inherits: :ref:`Object` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`intersect_ray` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Array` exclude=Array(), :ref:`int` layer_mask=2147483647, :ref:`int` type_mask=15 **)** | ++--------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`intersect_shape` **(** :ref:`PhysicsShapeQueryParameters` shape, :ref:`int` max_results=32 **)** | ++--------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`cast_motion` **(** :ref:`PhysicsShapeQueryParameters` shape, :ref:`Vector3` motion **)** | ++--------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`collide_shape` **(** :ref:`PhysicsShapeQueryParameters` shape, :ref:`int` max_results=32 **)** | ++--------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`get_rest_info` **(** :ref:`PhysicsShapeQueryParameters` shape **)** | ++--------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **TYPE_MASK_STATIC_BODY** = **1** +- **TYPE_MASK_KINEMATIC_BODY** = **2** +- **TYPE_MASK_RIGID_BODY** = **4** +- **TYPE_MASK_CHARACTER_BODY** = **8** +- **TYPE_MASK_AREA** = **16** +- **TYPE_MASK_COLLISION** = **15** + +Member Function Description +--------------------------- + +.. _class_PhysicsDirectSpaceState_intersect_ray: + +- :ref:`Dictionary` **intersect_ray** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Array` exclude=Array(), :ref:`int` layer_mask=2147483647, :ref:`int` type_mask=15 **)** + +.. _class_PhysicsDirectSpaceState_intersect_shape: + +- :ref:`Array` **intersect_shape** **(** :ref:`PhysicsShapeQueryParameters` shape, :ref:`int` max_results=32 **)** + +.. _class_PhysicsDirectSpaceState_cast_motion: + +- :ref:`Array` **cast_motion** **(** :ref:`PhysicsShapeQueryParameters` shape, :ref:`Vector3` motion **)** + +.. _class_PhysicsDirectSpaceState_collide_shape: + +- :ref:`Array` **collide_shape** **(** :ref:`PhysicsShapeQueryParameters` shape, :ref:`int` max_results=32 **)** + +.. _class_PhysicsDirectSpaceState_get_rest_info: + +- :ref:`Dictionary` **get_rest_info** **(** :ref:`PhysicsShapeQueryParameters` shape **)** + + diff --git a/classes/class_physicsserver.rst b/classes/class_physicsserver.rst new file mode 100644 index 000000000..ee0b76236 --- /dev/null +++ b/classes/class_physicsserver.rst @@ -0,0 +1,705 @@ +.. _class_PhysicsServer: + +PhysicsServer +============= + +Inherits: :ref:`Object` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`shape_create` **(** :ref:`int` type **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shape_set_data` **(** :ref:`RID` shape, var data **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`shape_get_type` **(** :ref:`RID` shape **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shape_get_data` **(** :ref:`RID` shape **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`space_create` **(** **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`space_set_active` **(** :ref:`RID` space, :ref:`bool` active **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`space_is_active` **(** :ref:`RID` space **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`space_set_param` **(** :ref:`RID` space, :ref:`int` param, :ref:`float` value **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`space_get_param` **(** :ref:`RID` space, :ref:`int` param **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PhysicsDirectSpaceState` | :ref:`space_get_direct_state` **(** :ref:`RID` space **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`area_create` **(** **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_set_space` **(** :ref:`RID` area, :ref:`RID` space **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`area_get_space` **(** :ref:`RID` area **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_set_space_override_mode` **(** :ref:`RID` area, :ref:`int` mode **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`area_get_space_override_mode` **(** :ref:`RID` area **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_add_shape` **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform` transform=Transform() **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_set_shape` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_set_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform` transform **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`area_get_shape_count` **(** :ref:`RID` area **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`area_get_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`area_get_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_remove_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_clear_shapes` **(** :ref:`RID` area **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_set_param` **(** :ref:`RID` area, :ref:`int` param, var value **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_set_transform` **(** :ref:`RID` area, :ref:`Transform` transform **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_get_param` **(** :ref:`RID` area, :ref:`int` param **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`area_get_transform` **(** :ref:`RID` area **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_attach_object_instance_ID` **(** :ref:`RID` area, :ref:`int` id **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`area_get_object_instance_ID` **(** :ref:`RID` area **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_set_monitor_callback` **(** :ref:`RID` area, :ref:`Object` receiver, :ref:`String` method **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`area_set_ray_pickable` **(** :ref:`RID` area, :ref:`bool` enable **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`area_is_ray_pickable` **(** :ref:`RID` area **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`body_create` **(** :ref:`int` mode=2, :ref:`bool` init_sleeping=false **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_space` **(** :ref:`RID` body, :ref:`RID` space **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`body_get_space` **(** :ref:`RID` body **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_mode` **(** :ref:`RID` body, :ref:`int` mode **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`body_get_mode` **(** :ref:`RID` body **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_add_shape` **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform` transform=Transform() **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_shape` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform` transform **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`body_get_shape_count` **(** :ref:`RID` body **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`body_get_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`body_get_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_remove_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_clear_shapes` **(** :ref:`RID` body **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_attach_object_instance_ID` **(** :ref:`RID` body, :ref:`int` id **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`body_get_object_instance_ID` **(** :ref:`RID` body **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_enable_continuous_collision_detection` **(** :ref:`RID` body, :ref:`bool` enable **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`body_is_continuous_collision_detection_enabled` **(** :ref:`RID` body **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_param` **(** :ref:`RID` body, :ref:`int` param, :ref:`float` value **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`body_get_param` **(** :ref:`RID` body, :ref:`int` param **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_state` **(** :ref:`RID` body, :ref:`int` state, var value **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_get_state` **(** :ref:`RID` body, :ref:`int` state **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_apply_impulse` **(** :ref:`RID` body, :ref:`Vector3` pos, :ref:`Vector3` impulse **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_axis_velocity` **(** :ref:`RID` body, :ref:`Vector3` axis_velocity **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_axis_lock` **(** :ref:`RID` body, :ref:`int` axis **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`body_get_axis_lock` **(** :ref:`RID` body **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_add_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_remove_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_max_contacts_reported` **(** :ref:`RID` body, :ref:`int` amount **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`body_get_max_contacts_reported` **(** :ref:`RID` body **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_omit_force_integration` **(** :ref:`RID` body, :ref:`bool` enable **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`body_is_omitting_force_integration` **(** :ref:`RID` body **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_force_integration_callback` **(** :ref:`RID` body, :ref:`Object` receiver, :ref:`String` method, var userdata=NULL **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`body_set_ray_pickable` **(** :ref:`RID` body, :ref:`bool` enable **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`body_is_ray_pickable` **(** :ref:`RID` body **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`joint_create_pin` **(** :ref:`RID` body_A, :ref:`Vector3` local_A, :ref:`RID` body_B, :ref:`Vector3` local_B **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`pin_joint_set_param` **(** :ref:`RID` joint, :ref:`int` param, :ref:`float` value **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`pin_joint_get_param` **(** :ref:`RID` joint, :ref:`int` param **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`pin_joint_set_local_A` **(** :ref:`RID` joint, :ref:`Vector3` local_A **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`pin_joint_get_local_A` **(** :ref:`RID` joint **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`pin_joint_set_local_B` **(** :ref:`RID` joint, :ref:`Vector3` local_B **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`pin_joint_get_local_B` **(** :ref:`RID` joint **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`joint_create_hinge` **(** :ref:`RID` body_A, :ref:`Transform` hinge_A, :ref:`RID` body_B, :ref:`Transform` hinge_B **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`hinge_joint_set_param` **(** :ref:`RID` joint, :ref:`int` param, :ref:`float` value **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`hinge_joint_get_param` **(** :ref:`RID` joint, :ref:`int` param **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`hinge_joint_set_flag` **(** :ref:`RID` joint, :ref:`int` flag, :ref:`bool` enabled **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`hinge_joint_get_flag` **(** :ref:`RID` joint, :ref:`int` flag **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`joint_create_slider` **(** :ref:`RID` body_A, :ref:`Transform` local_ref_A, :ref:`RID` body_B, :ref:`Transform` local_ref_B **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`slider_joint_set_param` **(** :ref:`RID` joint, :ref:`int` param, :ref:`float` value **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`slider_joint_get_param` **(** :ref:`RID` joint, :ref:`int` param **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`joint_create_cone_twist` **(** :ref:`RID` body_A, :ref:`Transform` local_ref_A, :ref:`RID` body_B, :ref:`Transform` local_ref_B **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`cone_twist_joint_set_param` **(** :ref:`RID` joint, :ref:`int` param, :ref:`float` value **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`cone_twist_joint_get_param` **(** :ref:`RID` joint, :ref:`int` param **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`joint_get_type` **(** :ref:`RID` joint **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`joint_set_solver_priority` **(** :ref:`RID` joint, :ref:`int` priority **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`joint_get_solver_priority` **(** :ref:`RID` joint **)** const | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`joint_create_generic_6dof` **(** :ref:`RID` body_A, :ref:`Transform` local_ref_A, :ref:`RID` body_B, :ref:`Transform` local_ref_B **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`generic_6dof_joint_set_param` **(** :ref:`RID` joint, :ref:`int` axis, :ref:`int` param, :ref:`float` value **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`generic_6dof_joint_get_param` **(** :ref:`RID` joint, :ref:`int` axis, :ref:`int` param **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`generic_6dof_joint_set_flag` **(** :ref:`RID` joint, :ref:`int` axis, :ref:`int` flag, :ref:`bool` enable **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`generic_6dof_joint_get_flag` **(** :ref:`RID` joint, :ref:`int` axis, :ref:`int` flag **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`free_rid` **(** :ref:`RID` rid **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_active` **(** :ref:`bool` active **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_process_info` **(** :ref:`int` process_info **)** | ++----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **JOINT_PIN** = **0** +- **JOINT_HINGE** = **1** +- **JOINT_SLIDER** = **2** +- **JOINT_CONE_TWIST** = **3** +- **JOINT_6DOF** = **4** +- **PIN_JOINT_BIAS** = **0** +- **PIN_JOINT_DAMPING** = **1** +- **PIN_JOINT_IMPULSE_CLAMP** = **2** +- **HINGE_JOINT_BIAS** = **0** +- **HINGE_JOINT_LIMIT_UPPER** = **1** +- **HINGE_JOINT_LIMIT_LOWER** = **2** +- **HINGE_JOINT_LIMIT_BIAS** = **3** +- **HINGE_JOINT_LIMIT_SOFTNESS** = **4** +- **HINGE_JOINT_LIMIT_RELAXATION** = **5** +- **HINGE_JOINT_MOTOR_TARGET_VELOCITY** = **6** +- **HINGE_JOINT_MOTOR_MAX_IMPULSE** = **7** +- **HINGE_JOINT_FLAG_USE_LIMIT** = **0** +- **HINGE_JOINT_FLAG_ENABLE_MOTOR** = **1** +- **SLIDER_JOINT_LINEAR_LIMIT_UPPER** = **0** +- **SLIDER_JOINT_LINEAR_LIMIT_LOWER** = **1** +- **SLIDER_JOINT_LINEAR_LIMIT_SOFTNESS** = **2** +- **SLIDER_JOINT_LINEAR_LIMIT_RESTITUTION** = **3** +- **SLIDER_JOINT_LINEAR_LIMIT_DAMPING** = **4** +- **SLIDER_JOINT_LINEAR_MOTION_SOFTNESS** = **5** +- **SLIDER_JOINT_LINEAR_MOTION_RESTITUTION** = **6** +- **SLIDER_JOINT_LINEAR_MOTION_DAMPING** = **7** +- **SLIDER_JOINT_LINEAR_ORTHOGONAL_SOFTNESS** = **8** +- **SLIDER_JOINT_LINEAR_ORTHOGONAL_RESTITUTION** = **9** +- **SLIDER_JOINT_LINEAR_ORTHOGONAL_DAMPING** = **10** +- **SLIDER_JOINT_ANGULAR_LIMIT_UPPER** = **11** +- **SLIDER_JOINT_ANGULAR_LIMIT_LOWER** = **12** +- **SLIDER_JOINT_ANGULAR_LIMIT_SOFTNESS** = **13** +- **SLIDER_JOINT_ANGULAR_LIMIT_RESTITUTION** = **14** +- **SLIDER_JOINT_ANGULAR_LIMIT_DAMPING** = **15** +- **SLIDER_JOINT_ANGULAR_MOTION_SOFTNESS** = **16** +- **SLIDER_JOINT_ANGULAR_MOTION_RESTITUTION** = **17** +- **SLIDER_JOINT_ANGULAR_MOTION_DAMPING** = **18** +- **SLIDER_JOINT_ANGULAR_ORTHOGONAL_SOFTNESS** = **19** +- **SLIDER_JOINT_ANGULAR_ORTHOGONAL_RESTITUTION** = **20** +- **SLIDER_JOINT_ANGULAR_ORTHOGONAL_DAMPING** = **21** +- **SLIDER_JOINT_MAX** = **22** +- **CONE_TWIST_JOINT_SWING_SPAN** = **0** +- **CONE_TWIST_JOINT_TWIST_SPAN** = **1** +- **CONE_TWIST_JOINT_BIAS** = **2** +- **CONE_TWIST_JOINT_SOFTNESS** = **3** +- **CONE_TWIST_JOINT_RELAXATION** = **4** +- **G6DOF_JOINT_LINEAR_LOWER_LIMIT** = **0** +- **G6DOF_JOINT_LINEAR_UPPER_LIMIT** = **1** +- **G6DOF_JOINT_LINEAR_LIMIT_SOFTNESS** = **2** +- **G6DOF_JOINT_LINEAR_RESTITUTION** = **3** +- **G6DOF_JOINT_LINEAR_DAMPING** = **4** +- **G6DOF_JOINT_ANGULAR_LOWER_LIMIT** = **5** +- **G6DOF_JOINT_ANGULAR_UPPER_LIMIT** = **6** +- **G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS** = **7** +- **G6DOF_JOINT_ANGULAR_DAMPING** = **8** +- **G6DOF_JOINT_ANGULAR_RESTITUTION** = **9** +- **G6DOF_JOINT_ANGULAR_FORCE_LIMIT** = **10** +- **G6DOF_JOINT_ANGULAR_ERP** = **11** +- **G6DOF_JOINT_ANGULAR_MOTOR_TARGET_VELOCITY** = **12** +- **G6DOF_JOINT_ANGULAR_MOTOR_FORCE_LIMIT** = **13** +- **G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT** = **0** +- **G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT** = **1** +- **G6DOF_JOINT_FLAG_ENABLE_MOTOR** = **2** +- **SHAPE_PLANE** = **0** +- **SHAPE_RAY** = **1** +- **SHAPE_SPHERE** = **2** +- **SHAPE_BOX** = **3** +- **SHAPE_CAPSULE** = **4** +- **SHAPE_CONVEX_POLYGON** = **5** +- **SHAPE_CONCAVE_POLYGON** = **6** +- **SHAPE_HEIGHTMAP** = **7** +- **SHAPE_CUSTOM** = **8** +- **AREA_PARAM_GRAVITY** = **0** +- **AREA_PARAM_GRAVITY_VECTOR** = **1** +- **AREA_PARAM_GRAVITY_IS_POINT** = **2** +- **AREA_PARAM_GRAVITY_DISTANCE_SCALE** = **3** +- **AREA_PARAM_GRAVITY_POINT_ATTENUATION** = **4** +- **AREA_PARAM_LINEAR_DAMP** = **5** +- **AREA_PARAM_ANGULAR_DAMP** = **6** +- **AREA_PARAM_PRIORITY** = **7** +- **AREA_SPACE_OVERRIDE_DISABLED** = **0** --- This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them. +- **AREA_SPACE_OVERRIDE_COMBINE** = **1** --- This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects. +- **AREA_SPACE_OVERRIDE_COMBINE_REPLACE** = **2** --- This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one. +- **AREA_SPACE_OVERRIDE_REPLACE** = **3** --- This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas. +- **AREA_SPACE_OVERRIDE_REPLACE_COMBINE** = **4** --- This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. +- **BODY_MODE_STATIC** = **0** +- **BODY_MODE_KINEMATIC** = **1** +- **BODY_MODE_RIGID** = **2** +- **BODY_MODE_CHARACTER** = **3** +- **BODY_PARAM_BOUNCE** = **0** +- **BODY_PARAM_FRICTION** = **1** +- **BODY_PARAM_MASS** = **2** +- **BODY_PARAM_GRAVITY_SCALE** = **3** +- **BODY_PARAM_ANGULAR_DAMP** = **5** +- **BODY_PARAM_LINEAR_DAMP** = **4** +- **BODY_PARAM_MAX** = **6** +- **BODY_STATE_TRANSFORM** = **0** +- **BODY_STATE_LINEAR_VELOCITY** = **1** +- **BODY_STATE_ANGULAR_VELOCITY** = **2** +- **BODY_STATE_SLEEPING** = **3** +- **BODY_STATE_CAN_SLEEP** = **4** +- **AREA_BODY_ADDED** = **0** +- **AREA_BODY_REMOVED** = **1** +- **INFO_ACTIVE_OBJECTS** = **0** +- **INFO_COLLISION_PAIRS** = **1** +- **INFO_ISLAND_COUNT** = **2** + +Member Function Description +--------------------------- + +.. _class_PhysicsServer_shape_create: + +- :ref:`RID` **shape_create** **(** :ref:`int` type **)** + +.. _class_PhysicsServer_shape_set_data: + +- void **shape_set_data** **(** :ref:`RID` shape, var data **)** + +.. _class_PhysicsServer_shape_get_type: + +- :ref:`int` **shape_get_type** **(** :ref:`RID` shape **)** const + +.. _class_PhysicsServer_shape_get_data: + +- void **shape_get_data** **(** :ref:`RID` shape **)** const + +.. _class_PhysicsServer_space_create: + +- :ref:`RID` **space_create** **(** **)** + +.. _class_PhysicsServer_space_set_active: + +- void **space_set_active** **(** :ref:`RID` space, :ref:`bool` active **)** + +.. _class_PhysicsServer_space_is_active: + +- :ref:`bool` **space_is_active** **(** :ref:`RID` space **)** const + +.. _class_PhysicsServer_space_set_param: + +- void **space_set_param** **(** :ref:`RID` space, :ref:`int` param, :ref:`float` value **)** + +.. _class_PhysicsServer_space_get_param: + +- :ref:`float` **space_get_param** **(** :ref:`RID` space, :ref:`int` param **)** const + +.. _class_PhysicsServer_space_get_direct_state: + +- :ref:`PhysicsDirectSpaceState` **space_get_direct_state** **(** :ref:`RID` space **)** + +.. _class_PhysicsServer_area_create: + +- :ref:`RID` **area_create** **(** **)** + +.. _class_PhysicsServer_area_set_space: + +- void **area_set_space** **(** :ref:`RID` area, :ref:`RID` space **)** + +.. _class_PhysicsServer_area_get_space: + +- :ref:`RID` **area_get_space** **(** :ref:`RID` area **)** const + +.. _class_PhysicsServer_area_set_space_override_mode: + +- void **area_set_space_override_mode** **(** :ref:`RID` area, :ref:`int` mode **)** + +.. _class_PhysicsServer_area_get_space_override_mode: + +- :ref:`int` **area_get_space_override_mode** **(** :ref:`RID` area **)** const + +.. _class_PhysicsServer_area_add_shape: + +- void **area_add_shape** **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform` transform=Transform() **)** + +.. _class_PhysicsServer_area_set_shape: + +- void **area_set_shape** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** + +.. _class_PhysicsServer_area_set_shape_transform: + +- void **area_set_shape_transform** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform` transform **)** + +.. _class_PhysicsServer_area_get_shape_count: + +- :ref:`int` **area_get_shape_count** **(** :ref:`RID` area **)** const + +.. _class_PhysicsServer_area_get_shape: + +- :ref:`RID` **area_get_shape** **(** :ref:`RID` area, :ref:`int` shape_idx **)** const + +.. _class_PhysicsServer_area_get_shape_transform: + +- :ref:`Transform` **area_get_shape_transform** **(** :ref:`RID` area, :ref:`int` shape_idx **)** const + +.. _class_PhysicsServer_area_remove_shape: + +- void **area_remove_shape** **(** :ref:`RID` area, :ref:`int` shape_idx **)** + +.. _class_PhysicsServer_area_clear_shapes: + +- void **area_clear_shapes** **(** :ref:`RID` area **)** + +.. _class_PhysicsServer_area_set_param: + +- void **area_set_param** **(** :ref:`RID` area, :ref:`int` param, var value **)** + +.. _class_PhysicsServer_area_set_transform: + +- void **area_set_transform** **(** :ref:`RID` area, :ref:`Transform` transform **)** + +.. _class_PhysicsServer_area_get_param: + +- void **area_get_param** **(** :ref:`RID` area, :ref:`int` param **)** const + +.. _class_PhysicsServer_area_get_transform: + +- :ref:`Transform` **area_get_transform** **(** :ref:`RID` area **)** const + +.. _class_PhysicsServer_area_attach_object_instance_ID: + +- void **area_attach_object_instance_ID** **(** :ref:`RID` area, :ref:`int` id **)** + +.. _class_PhysicsServer_area_get_object_instance_ID: + +- :ref:`int` **area_get_object_instance_ID** **(** :ref:`RID` area **)** const + +.. _class_PhysicsServer_area_set_monitor_callback: + +- void **area_set_monitor_callback** **(** :ref:`RID` area, :ref:`Object` receiver, :ref:`String` method **)** + +.. _class_PhysicsServer_area_set_ray_pickable: + +- void **area_set_ray_pickable** **(** :ref:`RID` area, :ref:`bool` enable **)** + +.. _class_PhysicsServer_area_is_ray_pickable: + +- :ref:`bool` **area_is_ray_pickable** **(** :ref:`RID` area **)** const + +.. _class_PhysicsServer_body_create: + +- :ref:`RID` **body_create** **(** :ref:`int` mode=2, :ref:`bool` init_sleeping=false **)** + +.. _class_PhysicsServer_body_set_space: + +- void **body_set_space** **(** :ref:`RID` body, :ref:`RID` space **)** + +.. _class_PhysicsServer_body_get_space: + +- :ref:`RID` **body_get_space** **(** :ref:`RID` body **)** const + +.. _class_PhysicsServer_body_set_mode: + +- void **body_set_mode** **(** :ref:`RID` body, :ref:`int` mode **)** + +.. _class_PhysicsServer_body_get_mode: + +- :ref:`int` **body_get_mode** **(** :ref:`RID` body **)** const + +.. _class_PhysicsServer_body_add_shape: + +- void **body_add_shape** **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform` transform=Transform() **)** + +.. _class_PhysicsServer_body_set_shape: + +- void **body_set_shape** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** + +.. _class_PhysicsServer_body_set_shape_transform: + +- void **body_set_shape_transform** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform` transform **)** + +.. _class_PhysicsServer_body_get_shape_count: + +- :ref:`int` **body_get_shape_count** **(** :ref:`RID` body **)** const + +.. _class_PhysicsServer_body_get_shape: + +- :ref:`RID` **body_get_shape** **(** :ref:`RID` body, :ref:`int` shape_idx **)** const + +.. _class_PhysicsServer_body_get_shape_transform: + +- :ref:`Transform` **body_get_shape_transform** **(** :ref:`RID` body, :ref:`int` shape_idx **)** const + +.. _class_PhysicsServer_body_remove_shape: + +- void **body_remove_shape** **(** :ref:`RID` body, :ref:`int` shape_idx **)** + +.. _class_PhysicsServer_body_clear_shapes: + +- void **body_clear_shapes** **(** :ref:`RID` body **)** + +.. _class_PhysicsServer_body_attach_object_instance_ID: + +- void **body_attach_object_instance_ID** **(** :ref:`RID` body, :ref:`int` id **)** + +.. _class_PhysicsServer_body_get_object_instance_ID: + +- :ref:`int` **body_get_object_instance_ID** **(** :ref:`RID` body **)** const + +.. _class_PhysicsServer_body_set_enable_continuous_collision_detection: + +- void **body_set_enable_continuous_collision_detection** **(** :ref:`RID` body, :ref:`bool` enable **)** + +.. _class_PhysicsServer_body_is_continuous_collision_detection_enabled: + +- :ref:`bool` **body_is_continuous_collision_detection_enabled** **(** :ref:`RID` body **)** const + +.. _class_PhysicsServer_body_set_param: + +- void **body_set_param** **(** :ref:`RID` body, :ref:`int` param, :ref:`float` value **)** + +.. _class_PhysicsServer_body_get_param: + +- :ref:`float` **body_get_param** **(** :ref:`RID` body, :ref:`int` param **)** const + +.. _class_PhysicsServer_body_set_state: + +- void **body_set_state** **(** :ref:`RID` body, :ref:`int` state, var value **)** + +.. _class_PhysicsServer_body_get_state: + +- void **body_get_state** **(** :ref:`RID` body, :ref:`int` state **)** const + +.. _class_PhysicsServer_body_apply_impulse: + +- void **body_apply_impulse** **(** :ref:`RID` body, :ref:`Vector3` pos, :ref:`Vector3` impulse **)** + +.. _class_PhysicsServer_body_set_axis_velocity: + +- void **body_set_axis_velocity** **(** :ref:`RID` body, :ref:`Vector3` axis_velocity **)** + +.. _class_PhysicsServer_body_set_axis_lock: + +- void **body_set_axis_lock** **(** :ref:`RID` body, :ref:`int` axis **)** + +.. _class_PhysicsServer_body_get_axis_lock: + +- :ref:`int` **body_get_axis_lock** **(** :ref:`RID` body **)** const + +.. _class_PhysicsServer_body_add_collision_exception: + +- void **body_add_collision_exception** **(** :ref:`RID` body, :ref:`RID` excepted_body **)** + +.. _class_PhysicsServer_body_remove_collision_exception: + +- void **body_remove_collision_exception** **(** :ref:`RID` body, :ref:`RID` excepted_body **)** + +.. _class_PhysicsServer_body_set_max_contacts_reported: + +- void **body_set_max_contacts_reported** **(** :ref:`RID` body, :ref:`int` amount **)** + +.. _class_PhysicsServer_body_get_max_contacts_reported: + +- :ref:`int` **body_get_max_contacts_reported** **(** :ref:`RID` body **)** const + +.. _class_PhysicsServer_body_set_omit_force_integration: + +- void **body_set_omit_force_integration** **(** :ref:`RID` body, :ref:`bool` enable **)** + +.. _class_PhysicsServer_body_is_omitting_force_integration: + +- :ref:`bool` **body_is_omitting_force_integration** **(** :ref:`RID` body **)** const + +.. _class_PhysicsServer_body_set_force_integration_callback: + +- void **body_set_force_integration_callback** **(** :ref:`RID` body, :ref:`Object` receiver, :ref:`String` method, var userdata=NULL **)** + +.. _class_PhysicsServer_body_set_ray_pickable: + +- void **body_set_ray_pickable** **(** :ref:`RID` body, :ref:`bool` enable **)** + +.. _class_PhysicsServer_body_is_ray_pickable: + +- :ref:`bool` **body_is_ray_pickable** **(** :ref:`RID` body **)** const + +.. _class_PhysicsServer_joint_create_pin: + +- :ref:`RID` **joint_create_pin** **(** :ref:`RID` body_A, :ref:`Vector3` local_A, :ref:`RID` body_B, :ref:`Vector3` local_B **)** + +.. _class_PhysicsServer_pin_joint_set_param: + +- void **pin_joint_set_param** **(** :ref:`RID` joint, :ref:`int` param, :ref:`float` value **)** + +.. _class_PhysicsServer_pin_joint_get_param: + +- :ref:`float` **pin_joint_get_param** **(** :ref:`RID` joint, :ref:`int` param **)** const + +.. _class_PhysicsServer_pin_joint_set_local_A: + +- void **pin_joint_set_local_A** **(** :ref:`RID` joint, :ref:`Vector3` local_A **)** + +.. _class_PhysicsServer_pin_joint_get_local_A: + +- :ref:`Vector3` **pin_joint_get_local_A** **(** :ref:`RID` joint **)** const + +.. _class_PhysicsServer_pin_joint_set_local_B: + +- void **pin_joint_set_local_B** **(** :ref:`RID` joint, :ref:`Vector3` local_B **)** + +.. _class_PhysicsServer_pin_joint_get_local_B: + +- :ref:`Vector3` **pin_joint_get_local_B** **(** :ref:`RID` joint **)** const + +.. _class_PhysicsServer_joint_create_hinge: + +- :ref:`RID` **joint_create_hinge** **(** :ref:`RID` body_A, :ref:`Transform` hinge_A, :ref:`RID` body_B, :ref:`Transform` hinge_B **)** + +.. _class_PhysicsServer_hinge_joint_set_param: + +- void **hinge_joint_set_param** **(** :ref:`RID` joint, :ref:`int` param, :ref:`float` value **)** + +.. _class_PhysicsServer_hinge_joint_get_param: + +- :ref:`float` **hinge_joint_get_param** **(** :ref:`RID` joint, :ref:`int` param **)** const + +.. _class_PhysicsServer_hinge_joint_set_flag: + +- void **hinge_joint_set_flag** **(** :ref:`RID` joint, :ref:`int` flag, :ref:`bool` enabled **)** + +.. _class_PhysicsServer_hinge_joint_get_flag: + +- :ref:`bool` **hinge_joint_get_flag** **(** :ref:`RID` joint, :ref:`int` flag **)** const + +.. _class_PhysicsServer_joint_create_slider: + +- :ref:`RID` **joint_create_slider** **(** :ref:`RID` body_A, :ref:`Transform` local_ref_A, :ref:`RID` body_B, :ref:`Transform` local_ref_B **)** + +.. _class_PhysicsServer_slider_joint_set_param: + +- void **slider_joint_set_param** **(** :ref:`RID` joint, :ref:`int` param, :ref:`float` value **)** + +.. _class_PhysicsServer_slider_joint_get_param: + +- :ref:`float` **slider_joint_get_param** **(** :ref:`RID` joint, :ref:`int` param **)** const + +.. _class_PhysicsServer_joint_create_cone_twist: + +- :ref:`RID` **joint_create_cone_twist** **(** :ref:`RID` body_A, :ref:`Transform` local_ref_A, :ref:`RID` body_B, :ref:`Transform` local_ref_B **)** + +.. _class_PhysicsServer_cone_twist_joint_set_param: + +- void **cone_twist_joint_set_param** **(** :ref:`RID` joint, :ref:`int` param, :ref:`float` value **)** + +.. _class_PhysicsServer_cone_twist_joint_get_param: + +- :ref:`float` **cone_twist_joint_get_param** **(** :ref:`RID` joint, :ref:`int` param **)** const + +.. _class_PhysicsServer_joint_get_type: + +- :ref:`int` **joint_get_type** **(** :ref:`RID` joint **)** const + +.. _class_PhysicsServer_joint_set_solver_priority: + +- void **joint_set_solver_priority** **(** :ref:`RID` joint, :ref:`int` priority **)** + +.. _class_PhysicsServer_joint_get_solver_priority: + +- :ref:`int` **joint_get_solver_priority** **(** :ref:`RID` joint **)** const + +.. _class_PhysicsServer_joint_create_generic_6dof: + +- :ref:`RID` **joint_create_generic_6dof** **(** :ref:`RID` body_A, :ref:`Transform` local_ref_A, :ref:`RID` body_B, :ref:`Transform` local_ref_B **)** + +.. _class_PhysicsServer_generic_6dof_joint_set_param: + +- void **generic_6dof_joint_set_param** **(** :ref:`RID` joint, :ref:`int` axis, :ref:`int` param, :ref:`float` value **)** + +.. _class_PhysicsServer_generic_6dof_joint_get_param: + +- :ref:`float` **generic_6dof_joint_get_param** **(** :ref:`RID` joint, :ref:`int` axis, :ref:`int` param **)** + +.. _class_PhysicsServer_generic_6dof_joint_set_flag: + +- void **generic_6dof_joint_set_flag** **(** :ref:`RID` joint, :ref:`int` axis, :ref:`int` flag, :ref:`bool` enable **)** + +.. _class_PhysicsServer_generic_6dof_joint_get_flag: + +- :ref:`bool` **generic_6dof_joint_get_flag** **(** :ref:`RID` joint, :ref:`int` axis, :ref:`int` flag **)** + +.. _class_PhysicsServer_free_rid: + +- void **free_rid** **(** :ref:`RID` rid **)** + +.. _class_PhysicsServer_set_active: + +- void **set_active** **(** :ref:`bool` active **)** + +.. _class_PhysicsServer_get_process_info: + +- :ref:`int` **get_process_info** **(** :ref:`int` process_info **)** + + diff --git a/classes/class_physicsserversw.rst b/classes/class_physicsserversw.rst new file mode 100644 index 000000000..74a1bab88 --- /dev/null +++ b/classes/class_physicsserversw.rst @@ -0,0 +1,16 @@ +.. _class_PhysicsServerSW: + +PhysicsServerSW +=============== + +Inherits: :ref:`PhysicsServer` +--------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + diff --git a/classes/class_physicsshapequeryparameters.rst b/classes/class_physicsshapequeryparameters.rst new file mode 100644 index 000000000..6911ba651 --- /dev/null +++ b/classes/class_physicsshapequeryparameters.rst @@ -0,0 +1,103 @@ +.. _class_PhysicsShapeQueryParameters: + +PhysicsShapeQueryParameters +=========================== + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shape` **(** :ref:`Shape` shape **)** | ++------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shape_rid` **(** :ref:`RID` shape **)** | ++------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_shape_rid` **(** **)** const | ++------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_transform` **(** :ref:`Transform` transform **)** | ++------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`get_transform` **(** **)** const | ++------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_margin` **(** :ref:`float` margin **)** | ++------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_margin` **(** **)** const | ++------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_layer_mask` **(** :ref:`int` layer_mask **)** | ++------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_layer_mask` **(** **)** const | ++------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_object_type_mask` **(** :ref:`int` object_type_mask **)** | ++------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_object_type_mask` **(** **)** const | ++------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_exclude` **(** :ref:`Array` exclude **)** | ++------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_exclude` **(** **)** const | ++------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_PhysicsShapeQueryParameters_set_shape: + +- void **set_shape** **(** :ref:`Shape` shape **)** + +.. _class_PhysicsShapeQueryParameters_set_shape_rid: + +- void **set_shape_rid** **(** :ref:`RID` shape **)** + +.. _class_PhysicsShapeQueryParameters_get_shape_rid: + +- :ref:`RID` **get_shape_rid** **(** **)** const + +.. _class_PhysicsShapeQueryParameters_set_transform: + +- void **set_transform** **(** :ref:`Transform` transform **)** + +.. _class_PhysicsShapeQueryParameters_get_transform: + +- :ref:`Transform` **get_transform** **(** **)** const + +.. _class_PhysicsShapeQueryParameters_set_margin: + +- void **set_margin** **(** :ref:`float` margin **)** + +.. _class_PhysicsShapeQueryParameters_get_margin: + +- :ref:`float` **get_margin** **(** **)** const + +.. _class_PhysicsShapeQueryParameters_set_layer_mask: + +- void **set_layer_mask** **(** :ref:`int` layer_mask **)** + +.. _class_PhysicsShapeQueryParameters_get_layer_mask: + +- :ref:`int` **get_layer_mask** **(** **)** const + +.. _class_PhysicsShapeQueryParameters_set_object_type_mask: + +- void **set_object_type_mask** **(** :ref:`int` object_type_mask **)** + +.. _class_PhysicsShapeQueryParameters_get_object_type_mask: + +- :ref:`int` **get_object_type_mask** **(** **)** const + +.. _class_PhysicsShapeQueryParameters_set_exclude: + +- void **set_exclude** **(** :ref:`Array` exclude **)** + +.. _class_PhysicsShapeQueryParameters_get_exclude: + +- :ref:`Array` **get_exclude** **(** **)** const + + diff --git a/classes/class_physicsshapequeryresult.rst b/classes/class_physicsshapequeryresult.rst new file mode 100644 index 000000000..cf4d2ada9 --- /dev/null +++ b/classes/class_physicsshapequeryresult.rst @@ -0,0 +1,55 @@ +.. _class_PhysicsShapeQueryResult: + +PhysicsShapeQueryResult +======================= + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Result of a shape query in Physics2DServer. + +Member Functions +---------------- + ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_result_count` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_result_rid` **(** :ref:`int` idx **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_result_object_id` **(** :ref:`int` idx **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_result_object` **(** :ref:`int` idx **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_result_object_shape` **(** :ref:`int` idx **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_PhysicsShapeQueryResult_get_result_count: + +- :ref:`int` **get_result_count** **(** **)** const + +.. _class_PhysicsShapeQueryResult_get_result_rid: + +- :ref:`RID` **get_result_rid** **(** :ref:`int` idx **)** const + +.. _class_PhysicsShapeQueryResult_get_result_object_id: + +- :ref:`int` **get_result_object_id** **(** :ref:`int` idx **)** const + +.. _class_PhysicsShapeQueryResult_get_result_object: + +- :ref:`Object` **get_result_object** **(** :ref:`int` idx **)** const + +.. _class_PhysicsShapeQueryResult_get_result_object_shape: + +- :ref:`int` **get_result_object_shape** **(** :ref:`int` idx **)** const + + diff --git a/classes/class_pinjoint.rst b/classes/class_pinjoint.rst new file mode 100644 index 000000000..797001c8f --- /dev/null +++ b/classes/class_pinjoint.rst @@ -0,0 +1,44 @@ +.. _class_PinJoint: + +PinJoint +======== + +Inherits: :ref:`Joint` +----------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_param` **(** :ref:`int` param, :ref:`float` value **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_param` **(** :ref:`int` param **)** const | ++----------------------------+-----------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **PARAM_BIAS** = **0** +- **PARAM_DAMPING** = **1** +- **PARAM_IMPULSE_CLAMP** = **2** + +Member Function Description +--------------------------- + +.. _class_PinJoint_set_param: + +- void **set_param** **(** :ref:`int` param, :ref:`float` value **)** + +.. _class_PinJoint_get_param: + +- :ref:`float` **get_param** **(** :ref:`int` param **)** const + + diff --git a/classes/class_pinjoint2d.rst b/classes/class_pinjoint2d.rst new file mode 100644 index 000000000..ea1b3140f --- /dev/null +++ b/classes/class_pinjoint2d.rst @@ -0,0 +1,42 @@ +.. _class_PinJoint2D: + +PinJoint2D +========== + +Inherits: :ref:`Joint2D` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Pin Joint for 2D Shapes. + +Member Functions +---------------- + ++----------------------------+-----------------------------------------------------------------------------------------------------+ +| void | :ref:`set_softness` **(** :ref:`float` softness **)** | ++----------------------------+-----------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_softness` **(** **)** const | ++----------------------------+-----------------------------------------------------------------------------------------------------+ + +Description +----------- + +Pin Joint for 2D Rigid Bodies. It pins 2 bodies (rigid or static) together, or a single body to a fixed position in space. + +Member Function Description +--------------------------- + +.. _class_PinJoint2D_set_softness: + +- void **set_softness** **(** :ref:`float` softness **)** + +.. _class_PinJoint2D_get_softness: + +- :ref:`float` **get_softness** **(** **)** const + + diff --git a/classes/class_plane.rst b/classes/class_plane.rst new file mode 100644 index 000000000..a8ee4b650 --- /dev/null +++ b/classes/class_plane.rst @@ -0,0 +1,140 @@ +.. _class_Plane: + +Plane +===== + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + +Plane in hessian form. + +Member Functions +---------------- + ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`center` **(** **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`distance_to` **(** :ref:`Vector3` point **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_any_point` **(** **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_point` **(** :ref:`Vector3` point, :ref:`float` epsilon=0.00001 **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`intersect_3` **(** :ref:`Plane` b, :ref:`Plane` c **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`intersects_ray` **(** :ref:`Vector3` from, :ref:`Vector3` dir **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`intersects_segment` **(** :ref:`Vector3` begin, :ref:`Vector3` end **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_point_over` **(** :ref:`Vector3` point **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Plane` | :ref:`normalized` **(** **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`project` **(** :ref:`Vector3` point **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Plane` | :ref:`Plane` **(** :ref:`float` a, :ref:`float` b, :ref:`float` c, :ref:`float` d **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Plane` | :ref:`Plane` **(** :ref:`Vector3` v1, :ref:`Vector3` v2, :ref:`Vector3` v3 **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Plane` | :ref:`Plane` **(** :ref:`Vector3` normal, :ref:`float` d **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Variables +---------------- + +- :ref:`Vector3` **normal** +- :ref:`float` **x** +- :ref:`float` **y** +- :ref:`float` **z** +- :ref:`float` **d** + +Description +----------- + +Plane represents a normalized plane equation. Basically, "normal" is the normal of the plane (a,b,c normalized), and "d" is the distance from the origin to the plane (in the direction of "normal"). "Over" or "Above" the plane is considered the side of the plane towards where the normal is pointing. + +Member Function Description +--------------------------- + +.. _class_Plane_center: + +- :ref:`Vector3` **center** **(** **)** + +Returns the center of the plane. + +.. _class_Plane_distance_to: + +- :ref:`float` **distance_to** **(** :ref:`Vector3` point **)** + +Returns the shortest distance from the plane to the position "point". + +.. _class_Plane_get_any_point: + +- :ref:`Vector3` **get_any_point** **(** **)** + +Returns a point on the plane. + +.. _class_Plane_has_point: + +- :ref:`bool` **has_point** **(** :ref:`Vector3` point, :ref:`float` epsilon=0.00001 **)** + +Returns true if "point" is inside the plane (by a very minimum treshold). + +.. _class_Plane_intersect_3: + +- :ref:`Vector3` **intersect_3** **(** :ref:`Plane` b, :ref:`Plane` c **)** + +Returns the intersection point of the three planes "b", "c" and this plane. If no intersection is found null is returned. + +.. _class_Plane_intersects_ray: + +- :ref:`Vector3` **intersects_ray** **(** :ref:`Vector3` from, :ref:`Vector3` dir **)** + +Returns the intersection point of a ray consisting of the position "from" and the direction normal "dir" with this plane. If no intersection is found null is returned. + +.. _class_Plane_intersects_segment: + +- :ref:`Vector3` **intersects_segment** **(** :ref:`Vector3` begin, :ref:`Vector3` end **)** + +Returns the intersection point of a segment from position "begin" to position "end" with this plane. If no intersection is found null is returned. + +.. _class_Plane_is_point_over: + +- :ref:`bool` **is_point_over** **(** :ref:`Vector3` point **)** + +Returns true if "point" is located above the plane. + +.. _class_Plane_normalized: + +- :ref:`Plane` **normalized** **(** **)** + +Returns a copy of the plane, normalized. + +.. _class_Plane_project: + +- :ref:`Vector3` **project** **(** :ref:`Vector3` point **)** + +Returns the orthogonal projection of point "p" into a point in the plane. + +.. _class_Plane_Plane: + +- :ref:`Plane` **Plane** **(** :ref:`float` a, :ref:`float` b, :ref:`float` c, :ref:`float` d **)** + +Creates a plane from the three parameters "a", "b", "c" and "d". + +.. _class_Plane_Plane: + +- :ref:`Plane` **Plane** **(** :ref:`Vector3` v1, :ref:`Vector3` v2, :ref:`Vector3` v3 **)** + +Creates a plane from three points. + +.. _class_Plane_Plane: + +- :ref:`Plane` **Plane** **(** :ref:`Vector3` normal, :ref:`float` d **)** + +Creates a plane from the normal and the plane's distance to the origin. + + diff --git a/classes/class_planeshape.rst b/classes/class_planeshape.rst new file mode 100644 index 000000000..1b6b98474 --- /dev/null +++ b/classes/class_planeshape.rst @@ -0,0 +1,37 @@ +.. _class_PlaneShape: + +PlaneShape +========== + +Inherits: :ref:`Shape` +----------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------+--------------------------------------------------------------------------------------------+ +| void | :ref:`set_plane` **(** :ref:`Plane` plane **)** | ++----------------------------+--------------------------------------------------------------------------------------------+ +| :ref:`Plane` | :ref:`get_plane` **(** **)** const | ++----------------------------+--------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_PlaneShape_set_plane: + +- void **set_plane** **(** :ref:`Plane` plane **)** + +.. _class_PlaneShape_get_plane: + +- :ref:`Plane` **get_plane** **(** **)** const + + diff --git a/classes/class_polygon2d.rst b/classes/class_polygon2d.rst new file mode 100644 index 000000000..976d0e7c8 --- /dev/null +++ b/classes/class_polygon2d.rst @@ -0,0 +1,145 @@ +.. _class_Polygon2D: + +Polygon2D +========= + +Inherits: :ref:`Node2D` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_polygon` **(** :ref:`Vector2Array` polygon **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2Array` | :ref:`get_polygon` **(** **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_uv` **(** :ref:`Vector2Array` uv **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2Array` | :ref:`get_uv` **(** **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_color` **(** :ref:`Color` color **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_color` **(** **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_texture` **(** :ref:`Object` texture **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_texture` **(** **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_texture_offset` **(** :ref:`Vector2` texture_offset **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_texture_offset` **(** **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_texture_rotation` **(** :ref:`float` texture_rotation **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_texture_rotation` **(** **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_texture_scale` **(** :ref:`Vector2` texture_scale **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_texture_scale` **(** **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_invert` **(** :ref:`bool` invert **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_invert` **(** **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_invert_border` **(** :ref:`float` invert_border **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_invert_border` **(** **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_offset` **(** :ref:`Vector2` offset **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_offset` **(** **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_Polygon2D_set_polygon: + +- void **set_polygon** **(** :ref:`Vector2Array` polygon **)** + +.. _class_Polygon2D_get_polygon: + +- :ref:`Vector2Array` **get_polygon** **(** **)** const + +.. _class_Polygon2D_set_uv: + +- void **set_uv** **(** :ref:`Vector2Array` uv **)** + +.. _class_Polygon2D_get_uv: + +- :ref:`Vector2Array` **get_uv** **(** **)** const + +.. _class_Polygon2D_set_color: + +- void **set_color** **(** :ref:`Color` color **)** + +.. _class_Polygon2D_get_color: + +- :ref:`Color` **get_color** **(** **)** const + +.. _class_Polygon2D_set_texture: + +- void **set_texture** **(** :ref:`Object` texture **)** + +.. _class_Polygon2D_get_texture: + +- :ref:`Object` **get_texture** **(** **)** const + +.. _class_Polygon2D_set_texture_offset: + +- void **set_texture_offset** **(** :ref:`Vector2` texture_offset **)** + +.. _class_Polygon2D_get_texture_offset: + +- :ref:`Vector2` **get_texture_offset** **(** **)** const + +.. _class_Polygon2D_set_texture_rotation: + +- void **set_texture_rotation** **(** :ref:`float` texture_rotation **)** + +.. _class_Polygon2D_get_texture_rotation: + +- :ref:`float` **get_texture_rotation** **(** **)** const + +.. _class_Polygon2D_set_texture_scale: + +- void **set_texture_scale** **(** :ref:`Vector2` texture_scale **)** + +.. _class_Polygon2D_get_texture_scale: + +- :ref:`Vector2` **get_texture_scale** **(** **)** const + +.. _class_Polygon2D_set_invert: + +- void **set_invert** **(** :ref:`bool` invert **)** + +.. _class_Polygon2D_get_invert: + +- :ref:`bool` **get_invert** **(** **)** const + +.. _class_Polygon2D_set_invert_border: + +- void **set_invert_border** **(** :ref:`float` invert_border **)** + +.. _class_Polygon2D_get_invert_border: + +- :ref:`float` **get_invert_border** **(** **)** const + +.. _class_Polygon2D_set_offset: + +- void **set_offset** **(** :ref:`Vector2` offset **)** + +.. _class_Polygon2D_get_offset: + +- :ref:`Vector2` **get_offset** **(** **)** const + + diff --git a/classes/class_polygonpathfinder.rst b/classes/class_polygonpathfinder.rst new file mode 100644 index 000000000..b4dd7daa0 --- /dev/null +++ b/classes/class_polygonpathfinder.rst @@ -0,0 +1,73 @@ +.. _class_PolygonPathFinder: + +PolygonPathFinder +================= + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`setup` **(** :ref:`Vector2Array` points, :ref:`IntArray` connections **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2Array` | :ref:`find_path` **(** :ref:`Vector2` from, :ref:`Vector2` to **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2Array` | :ref:`get_intersections` **(** :ref:`Vector2` from, :ref:`Vector2` to **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_closest_point` **(** :ref:`Vector2` point **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_point_inside` **(** :ref:`Vector2` point **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_penalty` **(** :ref:`int` idx, :ref:`float` penalty **)** | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_point_penalty` **(** :ref:`int` idx **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`get_bounds` **(** **)** const | ++------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_PolygonPathFinder_setup: + +- void **setup** **(** :ref:`Vector2Array` points, :ref:`IntArray` connections **)** + +.. _class_PolygonPathFinder_find_path: + +- :ref:`Vector2Array` **find_path** **(** :ref:`Vector2` from, :ref:`Vector2` to **)** + +.. _class_PolygonPathFinder_get_intersections: + +- :ref:`Vector2Array` **get_intersections** **(** :ref:`Vector2` from, :ref:`Vector2` to **)** const + +.. _class_PolygonPathFinder_get_closest_point: + +- :ref:`Vector2` **get_closest_point** **(** :ref:`Vector2` point **)** const + +.. _class_PolygonPathFinder_is_point_inside: + +- :ref:`bool` **is_point_inside** **(** :ref:`Vector2` point **)** const + +.. _class_PolygonPathFinder_set_point_penalty: + +- void **set_point_penalty** **(** :ref:`int` idx, :ref:`float` penalty **)** + +.. _class_PolygonPathFinder_get_point_penalty: + +- :ref:`float` **get_point_penalty** **(** :ref:`int` idx **)** const + +.. _class_PolygonPathFinder_get_bounds: + +- :ref:`Rect2` **get_bounds** **(** **)** const + + diff --git a/classes/class_popup.rst b/classes/class_popup.rst new file mode 100644 index 000000000..69d160dd7 --- /dev/null +++ b/classes/class_popup.rst @@ -0,0 +1,84 @@ +.. _class_Popup: + +Popup +===== + +Inherits: :ref:`Control` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Base container control for popups and dialogs. + +Member Functions +---------------- + ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`popup_centered` **(** :ref:`Vector2` size=Vector2(0,0) **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`popup_centered_ratio` **(** :ref:`float` ratio=0.75 **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`popup_centered_minsize` **(** :ref:`Vector2` minsize=Vector2(0,0) **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`popup` **(** **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_exclusive` **(** :ref:`bool` enable **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_exclusive` **(** **)** const | ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **popup_hide** **(** **)** +- **about_to_show** **(** **)** + +Numeric Constants +----------------- + +- **NOTIFICATION_POST_POPUP** = **80** +- **NOTIFICATION_POPUP_HIDE** = **81** + +Description +----------- + +PopUp is a base :ref:`Control` used to show dialogs and popups. It's a subwindow and modal by default (see :ref:`Control`) and has helpers for custom popup behavior. + +Member Function Description +--------------------------- + +.. _class_Popup_popup_centered: + +- void **popup_centered** **(** :ref:`Vector2` size=Vector2(0,0) **)** + +Popup (show the control in modal form) in the center of the screen, at the curent size, or at a size determined by "size". + +.. _class_Popup_popup_centered_ratio: + +- void **popup_centered_ratio** **(** :ref:`float` ratio=0.75 **)** + +Popup (show the control in modal form) in the center of the screen, scalled at a ratio of size of the screen. + +.. _class_Popup_popup_centered_minsize: + +- void **popup_centered_minsize** **(** :ref:`Vector2` minsize=Vector2(0,0) **)** + +.. _class_Popup_popup: + +- void **popup** **(** **)** + +Popup (show the control in modal form). + +.. _class_Popup_set_exclusive: + +- void **set_exclusive** **(** :ref:`bool` enable **)** + +.. _class_Popup_is_exclusive: + +- :ref:`bool` **is_exclusive** **(** **)** const + + diff --git a/classes/class_popupdialog.rst b/classes/class_popupdialog.rst new file mode 100644 index 000000000..44ceaf9ab --- /dev/null +++ b/classes/class_popupdialog.rst @@ -0,0 +1,16 @@ +.. _class_PopupDialog: + +PopupDialog +=========== + +Inherits: :ref:`Popup` +----------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Base class for Popup Dialogs. + diff --git a/classes/class_popupmenu.rst b/classes/class_popupmenu.rst new file mode 100644 index 000000000..0185d6574 --- /dev/null +++ b/classes/class_popupmenu.rst @@ -0,0 +1,251 @@ +.. _class_PopupMenu: + +PopupMenu +========= + +Inherits: :ref:`Popup` +----------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +PopupMenu displays a list of options. + +Member Functions +---------------- + ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_icon_item` **(** :ref:`Object` texture, :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_item` **(** :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_icon_check_item` **(** :ref:`Object` texture, :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_check_item` **(** :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_submenu_item` **(** :ref:`String` label, :ref:`String` submenu, :ref:`int` id=-1 **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_text` **(** :ref:`int` idx, :ref:`String` text **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_icon` **(** :ref:`int` idx, :ref:`Object` icon **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_accelerator` **(** :ref:`int` idx, :ref:`int` accel **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_metadata` **(** :ref:`int` idx, var metadata **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_checked` **(** :ref:`int` idx, :ref:`bool` checked **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_disabled` **(** :ref:`int` idx, :ref:`bool` disabled **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_submenu` **(** :ref:`int` idx, :ref:`String` submenu **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_as_separator` **(** :ref:`int` idx, :ref:`bool` enable **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_as_checkable` **(** :ref:`int` idx, :ref:`bool` enable **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_ID` **(** :ref:`int` idx, :ref:`int` id **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_item_text` **(** :ref:`int` idx **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_item_icon` **(** :ref:`int` idx **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`get_item_metadata` **(** :ref:`int` idx **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_item_accelerator` **(** :ref:`int` idx **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_item_submenu` **(** :ref:`int` idx **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_item_separator` **(** :ref:`int` idx **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_item_checkable` **(** :ref:`int` idx **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_item_checked` **(** :ref:`int` idx **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_item_disabled` **(** :ref:`int` idx **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_item_ID` **(** :ref:`int` idx **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_item_index` **(** :ref:`int` id **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_item_count` **(** **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_separator` **(** **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_item` **(** :ref:`int` idx **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **item_pressed** **(** :ref:`int` ID **)** + +Description +----------- + +PopupMenu is the typical Control that displays a list of options. They are popular in toolbars or context menus. + +Member Function Description +--------------------------- + +.. _class_PopupMenu_add_icon_item: + +- void **add_icon_item** **(** :ref:`Object` texture, :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** + +Add a new item with text "label" and icon "texture". An id can optonally be provided, as well as an accelerator. If no id is provided, one will be created from the index. + +.. _class_PopupMenu_add_item: + +- void **add_item** **(** :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** + +Add a new item with text "label". An id can optonally be provided, as well as an accelerator. If no id is provided, one will be created from the index. + +.. _class_PopupMenu_add_icon_check_item: + +- void **add_icon_check_item** **(** :ref:`Object` texture, :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** + +Add a new checkable item with text "label" and icon "texture". An id can optonally be provided, as well as an accelerator. If no id is provided, one will be created from the index. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. + +.. _class_PopupMenu_add_check_item: + +- void **add_check_item** **(** :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** + +Add a new checkable item with text "label". An id can optonally be provided, as well as an accelerator. If no id is provided, one will be created from the index. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. + +.. _class_PopupMenu_add_submenu_item: + +- void **add_submenu_item** **(** :ref:`String` label, :ref:`String` submenu, :ref:`int` id=-1 **)** + +.. _class_PopupMenu_set_item_text: + +- void **set_item_text** **(** :ref:`int` idx, :ref:`String` text **)** + +Set the text of the item at index "idx". + +.. _class_PopupMenu_set_item_icon: + +- void **set_item_icon** **(** :ref:`int` idx, :ref:`Object` icon **)** + +Set the icon of the item at index "idx". + +.. _class_PopupMenu_set_item_accelerator: + +- void **set_item_accelerator** **(** :ref:`int` idx, :ref:`int` accel **)** + +Set the accelerator of the item at index "idx". Accelerators are special combinations of keys that activate the item, no matter which control is focused. + +.. _class_PopupMenu_set_item_metadata: + +- void **set_item_metadata** **(** :ref:`int` idx, var metadata **)** + +.. _class_PopupMenu_set_item_checked: + +- void **set_item_checked** **(** :ref:`int` idx, :ref:`bool` checked **)** + +Set the checkstate status of the item at index "idx". + +.. _class_PopupMenu_set_item_disabled: + +- void **set_item_disabled** **(** :ref:`int` idx, :ref:`bool` disabled **)** + +.. _class_PopupMenu_set_item_submenu: + +- void **set_item_submenu** **(** :ref:`int` idx, :ref:`String` submenu **)** + +.. _class_PopupMenu_set_item_as_separator: + +- void **set_item_as_separator** **(** :ref:`int` idx, :ref:`bool` enable **)** + +.. _class_PopupMenu_set_item_as_checkable: + +- void **set_item_as_checkable** **(** :ref:`int` idx, :ref:`bool` enable **)** + +.. _class_PopupMenu_set_item_ID: + +- void **set_item_ID** **(** :ref:`int` idx, :ref:`int` id **)** + +Set the id of the item at index "idx". + +.. _class_PopupMenu_get_item_text: + +- :ref:`String` **get_item_text** **(** :ref:`int` idx **)** const + +Return the text of the item at index "idx". + +.. _class_PopupMenu_get_item_icon: + +- :ref:`Object` **get_item_icon** **(** :ref:`int` idx **)** const + +Return the icon of the item at index "idx". + +.. _class_PopupMenu_get_item_metadata: + +- void **get_item_metadata** **(** :ref:`int` idx **)** const + +.. _class_PopupMenu_get_item_accelerator: + +- :ref:`int` **get_item_accelerator** **(** :ref:`int` idx **)** const + +Return the accelerator of the item at index "idx". Accelerators are special combinations of keys that activate the item, no matter which control is focused. + +.. _class_PopupMenu_get_item_submenu: + +- :ref:`String` **get_item_submenu** **(** :ref:`int` idx **)** const + +.. _class_PopupMenu_is_item_separator: + +- :ref:`bool` **is_item_separator** **(** :ref:`int` idx **)** const + +.. _class_PopupMenu_is_item_checkable: + +- :ref:`bool` **is_item_checkable** **(** :ref:`int` idx **)** const + +.. _class_PopupMenu_is_item_checked: + +- :ref:`bool` **is_item_checked** **(** :ref:`int` idx **)** const + +Return the checkstate status of the item at index "idx". + +.. _class_PopupMenu_is_item_disabled: + +- :ref:`bool` **is_item_disabled** **(** :ref:`int` idx **)** const + +.. _class_PopupMenu_get_item_ID: + +- :ref:`int` **get_item_ID** **(** :ref:`int` idx **)** const + +Return the id of the item at index "idx". + +.. _class_PopupMenu_get_item_index: + +- :ref:`int` **get_item_index** **(** :ref:`int` id **)** const + +Find and return the index of the item containing a given id. + +.. _class_PopupMenu_get_item_count: + +- :ref:`int` **get_item_count** **(** **)** const + +Return the amount of items. + +.. _class_PopupMenu_add_separator: + +- void **add_separator** **(** **)** + +Add a separator between items. Separators also occupy an index. + +.. _class_PopupMenu_remove_item: + +- void **remove_item** **(** :ref:`int` idx **)** + +.. _class_PopupMenu_clear: + +- void **clear** **(** **)** + +Clear the popup menu. + + diff --git a/classes/class_popuppanel.rst b/classes/class_popuppanel.rst new file mode 100644 index 000000000..056508113 --- /dev/null +++ b/classes/class_popuppanel.rst @@ -0,0 +1,16 @@ +.. _class_PopupPanel: + +PopupPanel +========== + +Inherits: :ref:`Popup` +----------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Base class for Popup Panels + diff --git a/classes/class_portal.rst b/classes/class_portal.rst new file mode 100644 index 000000000..3fedd1325 --- /dev/null +++ b/classes/class_portal.rst @@ -0,0 +1,110 @@ +.. _class_Portal: + +Portal +====== + +Inherits: :ref:`VisualInstance` +----------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Portals provide virtual openings to rooms. + +Member Functions +---------------- + ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shape` **(** :ref:`Vector2Array` points **)** | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2Array` | :ref:`get_shape` **(** **)** const | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_enabled` **(** :ref:`bool` enable **)** | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_enabled` **(** **)** const | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_disable_distance` **(** :ref:`float` distance **)** | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_disable_distance` **(** **)** const | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_disabled_color` **(** :ref:`Color` color **)** | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_disabled_color` **(** **)** const | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_connect_range` **(** :ref:`float` range **)** | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_connect_range` **(** **)** const | ++------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Portals provide virtual openings to :ref:`RoomInstance` nodes, so cameras can look at them from the outside. Note that portals are a visibility optimization technique, and are in no way related to the game of the same name (as in, they are not used for teleportation). For more information on how rooms and portals work, see :ref:`RoomInstance`. Portals are represented as 2D convex polygon shapes (in the X,Y local plane), and are placed on the surface of the areas occupied by a :ref:`RoomInstance`, to indicate that the room can be accessed or looked-at through them. If two rooms are next to each other, and two similar portals in each of them share the same world position (and are parallel and opposed to each other), they will automatically "connect" and form "doors" (for example, the portals that connect a kitchen to a living room are placed in the door they share). Portals must always have a :ref:`RoomInstance` node as a parent, grandparent or far parent, or else they will not be active. + +Member Function Description +--------------------------- + +.. _class_Portal_set_shape: + +- void **set_shape** **(** :ref:`Vector2Array` points **)** + +Set the portal shape. The shape is an array of :ref:`Point2` points, representing a convex polygon in the X,Y plane. + +.. _class_Portal_get_shape: + +- :ref:`Vector2Array` **get_shape** **(** **)** const + +Return the portal shape. The shape is an array of :ref:`Point2` points, representing a convex polygon in the X,Y plane. + +.. _class_Portal_set_enabled: + +- void **set_enabled** **(** :ref:`bool` enable **)** + +Enable the portal (it is enabled by defaul though), disabling it will cause the parent :ref:`RoomInstance` to not be visible any longer when looking through the portal. + +.. _class_Portal_is_enabled: + +- :ref:`bool` **is_enabled** **(** **)** const + +Return wether the portal is active. When disabled it causes the parent :ref:`RoomInstance` to not be visible any longer when looking through the portal. + +.. _class_Portal_set_disable_distance: + +- void **set_disable_distance** **(** :ref:`float` distance **)** + +Set the distance threshold for disabling the portal. Every time that the portal goes beyond "distance", it disables itself, becoming the opaque color (see :ref:`set_disabled_color`). + +.. _class_Portal_get_disable_distance: + +- :ref:`float` **get_disable_distance** **(** **)** const + +Return the distance threshold for disabling the portal. Every time that the portal goes beyond "distance", it disables itself, becoming the opaque color (see :ref:`set_disabled_color`). + +.. _class_Portal_set_disabled_color: + +- void **set_disabled_color** **(** :ref:`Color` color **)** + +When the portal goes beyond the disable distance (see :ref:`set_disable_distance`), it becomes opaque and displayed with color "color". + +.. _class_Portal_get_disabled_color: + +- :ref:`Color` **get_disabled_color** **(** **)** const + +Return the color for when the portal goes beyond the disable distance (see :ref:`set_disable_distance`) and becomes disabled. + +.. _class_Portal_set_connect_range: + +- void **set_connect_range** **(** :ref:`float` range **)** + +Set the range for auto-connecting two portals from different rooms sharing the same space. + +.. _class_Portal_get_connect_range: + +- :ref:`float` **get_connect_range** **(** **)** const + +Return the range for auto-connecting two portals from different rooms sharing the same space. + + diff --git a/classes/class_position2d.rst b/classes/class_position2d.rst new file mode 100644 index 000000000..272f31326 --- /dev/null +++ b/classes/class_position2d.rst @@ -0,0 +1,21 @@ +.. _class_Position2D: + +Position2D +========== + +Inherits: :ref:`Node2D` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Generic 2D Position hint for editing. + +Description +----------- + +Generic 2D Position hint for editing. It's just like a plain :ref:`Node2D` but displays as a cross in the 2D-Editor at all times. + diff --git a/classes/class_position3d.rst b/classes/class_position3d.rst new file mode 100644 index 000000000..8693184e2 --- /dev/null +++ b/classes/class_position3d.rst @@ -0,0 +1,21 @@ +.. _class_Position3D: + +Position3D +========== + +Inherits: :ref:`Spatial` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Generic 3D Position hint for editing + +Description +----------- + +Generic 3D Position hint for editing. It's just like a plain :ref:`Spatial` but displays as a cross in the 3D-Editor at all times. + diff --git a/classes/class_progressbar.rst b/classes/class_progressbar.rst new file mode 100644 index 000000000..99cbf0c62 --- /dev/null +++ b/classes/class_progressbar.rst @@ -0,0 +1,42 @@ +.. _class_ProgressBar: + +ProgressBar +=========== + +Inherits: :ref:`Range` +----------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +General purpose progress bar. + +Member Functions +---------------- + ++--------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_percent_visible` **(** :ref:`bool` visible **)** | ++--------------------------+-----------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_percent_visible` **(** **)** const | ++--------------------------+-----------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +General purpose progress bar. Shows fill percentage from right to left. + +Member Function Description +--------------------------- + +.. _class_ProgressBar_set_percent_visible: + +- void **set_percent_visible** **(** :ref:`bool` visible **)** + +.. _class_ProgressBar_is_percent_visible: + +- :ref:`bool` **is_percent_visible** **(** **)** const + + diff --git a/classes/class_proximitygroup.rst b/classes/class_proximitygroup.rst new file mode 100644 index 000000000..0e86b9650 --- /dev/null +++ b/classes/class_proximitygroup.rst @@ -0,0 +1,65 @@ +.. _class_ProximityGroup: + +ProximityGroup +============== + +Inherits: :ref:`Spatial` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +General purpose proximity-detection node. + +Member Functions +---------------- + ++--------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_group_name` **(** :ref:`String` name **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`broadcast` **(** :ref:`String` name, var parameters **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_dispatch_mode` **(** :ref:`int` mode **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_grid_radius` **(** :ref:`Vector3` radius **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_grid_radius` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **broadcast** **(** :ref:`String` name, :ref:`Array` parameters **)** + +Description +----------- + +General purpose proximity-detection node. + +Member Function Description +--------------------------- + +.. _class_ProximityGroup_set_group_name: + +- void **set_group_name** **(** :ref:`String` name **)** + +.. _class_ProximityGroup_broadcast: + +- void **broadcast** **(** :ref:`String` name, var parameters **)** + +.. _class_ProximityGroup_set_dispatch_mode: + +- void **set_dispatch_mode** **(** :ref:`int` mode **)** + +.. _class_ProximityGroup_set_grid_radius: + +- void **set_grid_radius** **(** :ref:`Vector3` radius **)** + +.. _class_ProximityGroup_get_grid_radius: + +- :ref:`Vector3` **get_grid_radius** **(** **)** const + + diff --git a/classes/class_quad.rst b/classes/class_quad.rst new file mode 100644 index 000000000..d27bab2a4 --- /dev/null +++ b/classes/class_quad.rst @@ -0,0 +1,73 @@ +.. _class_Quad: + +Quad +==== + +Inherits: :ref:`GeometryInstance` +--------------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------------+---------------------------------------------------------------------------------------------+ +| void | :ref:`set_axis` **(** :ref:`int` axis **)** | ++--------------------------------+---------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_axis` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------+ +| void | :ref:`set_size` **(** :ref:`Vector2` size **)** | ++--------------------------------+---------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_size` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------+ +| void | :ref:`set_centered` **(** :ref:`bool` centered **)** | ++--------------------------------+---------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_centered` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------+ +| void | :ref:`set_offset` **(** :ref:`Vector2` offset **)** | ++--------------------------------+---------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_offset` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_Quad_set_axis: + +- void **set_axis** **(** :ref:`int` axis **)** + +.. _class_Quad_get_axis: + +- :ref:`int` **get_axis** **(** **)** const + +.. _class_Quad_set_size: + +- void **set_size** **(** :ref:`Vector2` size **)** + +.. _class_Quad_get_size: + +- :ref:`Vector2` **get_size** **(** **)** const + +.. _class_Quad_set_centered: + +- void **set_centered** **(** :ref:`bool` centered **)** + +.. _class_Quad_is_centered: + +- :ref:`bool` **is_centered** **(** **)** const + +.. _class_Quad_set_offset: + +- void **set_offset** **(** :ref:`Vector2` offset **)** + +.. _class_Quad_get_offset: + +- :ref:`Vector2` **get_offset** **(** **)** const + + diff --git a/classes/class_quat.rst b/classes/class_quat.rst new file mode 100644 index 000000000..7c9b85614 --- /dev/null +++ b/classes/class_quat.rst @@ -0,0 +1,119 @@ +.. _class_Quat: + +Quat +==== + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + +Quaternion. + +Member Functions +---------------- + ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Quat` | :ref:`cubic_slerp` **(** :ref:`Quat` b, :ref:`Quat` pre_a, :ref:`Quat` post_b, :ref:`float` t **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`dot` **(** :ref:`Quat` b **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Quat` | :ref:`inverse` **(** **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`length` **(** **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`length_squared` **(** **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Quat` | :ref:`normalized` **(** **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Quat` | :ref:`slerp` **(** :ref:`Quat` b, :ref:`float` t **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Quat` | :ref:`slerpni` **(** :ref:`Quat` b, :ref:`float` t **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`xform` **(** :ref:`Vector3` v **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Quat` | :ref:`Quat` **(** :ref:`float` x, :ref:`float` y, :ref:`float` z, :ref:`float` w **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Quat` | :ref:`Quat` **(** :ref:`Vector3` axis, :ref:`float` angle **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Quat` | :ref:`Quat` **(** :ref:`Matrix3` from **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Variables +---------------- + +- :ref:`float` **x** +- :ref:`float` **y** +- :ref:`float` **z** +- :ref:`float` **w** + +Description +----------- + +Quaternion is a 4 dimensional vector that is used to represent a rotation. It mainly exists to perform SLERP (spherical-linear interpolation) between to rotations obtained by a Matrix3 cheaply. Adding quaternions also cheaply adds the rotations, however quaternions need to be often normalized, or else they suffer from precision issues. + +Member Function Description +--------------------------- + +.. _class_Quat_cubic_slerp: + +- :ref:`Quat` **cubic_slerp** **(** :ref:`Quat` b, :ref:`Quat` pre_a, :ref:`Quat` post_b, :ref:`float` t **)** + +.. _class_Quat_dot: + +- :ref:`float` **dot** **(** :ref:`Quat` b **)** + +Returns the dot product between two quaternions. + +.. _class_Quat_inverse: + +- :ref:`Quat` **inverse** **(** **)** + +Returns the inverse of the quaternion (applies to the inverse rotatio too). + +.. _class_Quat_length: + +- :ref:`float` **length** **(** **)** + +Returns the length of the quaternion. + +.. _class_Quat_length_squared: + +- :ref:`float` **length_squared** **(** **)** + +Returns the length of the quaternion, squared. + +.. _class_Quat_normalized: + +- :ref:`Quat` **normalized** **(** **)** + +Returns a copy of the quaternion, normalized to unit length. + +.. _class_Quat_slerp: + +- :ref:`Quat` **slerp** **(** :ref:`Quat` b, :ref:`float` t **)** + +Perform a spherical-linear interpolation with another quaternion. + +.. _class_Quat_slerpni: + +- :ref:`Quat` **slerpni** **(** :ref:`Quat` b, :ref:`float` t **)** + +.. _class_Quat_xform: + +- :ref:`Vector3` **xform** **(** :ref:`Vector3` v **)** + +.. _class_Quat_Quat: + +- :ref:`Quat` **Quat** **(** :ref:`float` x, :ref:`float` y, :ref:`float` z, :ref:`float` w **)** + +.. _class_Quat_Quat: + +- :ref:`Quat` **Quat** **(** :ref:`Vector3` axis, :ref:`float` angle **)** + +.. _class_Quat_Quat: + +- :ref:`Quat` **Quat** **(** :ref:`Matrix3` from **)** + + diff --git a/classes/class_range.rst b/classes/class_range.rst new file mode 100644 index 000000000..5e39a9e4d --- /dev/null +++ b/classes/class_range.rst @@ -0,0 +1,176 @@ +.. _class_Range: + +Range +===== + +Inherits: :ref:`Control` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Abstract base class for range-based controls. + +Member Functions +---------------- + ++----------------------------+---------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_val` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_value` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_min` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_max` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_step` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_page` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_unit_value` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_val` **(** :ref:`float` value **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_value` **(** :ref:`float` value **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_min` **(** :ref:`float` minimum **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_max` **(** :ref:`float` maximum **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_step` **(** :ref:`float` step **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_page` **(** :ref:`float` pagesize **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_unit_value` **(** :ref:`float` value **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_rounded_values` **(** :ref:`bool` enabled **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_rounded_values` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_exp_unit_value` **(** :ref:`bool` enabled **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_unit_value_exp` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------+ +| void | :ref:`share` **(** :ref:`Object` with **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------+ +| void | :ref:`unshare` **(** **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **value_changed** **(** :ref:`float` value **)** +- **changed** **(** **)** + +Description +----------- + +Range is a base class for :ref:`Control` nodes that change a floating point *value* between a *minimum* and a *maximum*, using *step* and *page*, for example a :ref:`ScrollBar`. + +Member Function Description +--------------------------- + +.. _class_Range_get_val: + +- :ref:`float` **get_val** **(** **)** const + +Return the current value. + +.. _class_Range_get_value: + +- :ref:`float` **get_value** **(** **)** const + +.. _class_Range_get_min: + +- :ref:`float` **get_min** **(** **)** const + +Return the minimum value. + +.. _class_Range_get_max: + +- :ref:`float` **get_max** **(** **)** const + +Return the maximum value. + +.. _class_Range_get_step: + +- :ref:`float` **get_step** **(** **)** const + +Return the stepping, if step is 0, stepping is disabled. + +.. _class_Range_get_page: + +- :ref:`float` **get_page** **(** **)** const + +Return the page size, if page is 0, paging is disabled. + +.. _class_Range_get_unit_value: + +- :ref:`float` **get_unit_value** **(** **)** const + +Return value mapped to 0 to 1 (unit) range. + +.. _class_Range_set_val: + +- void **set_val** **(** :ref:`float` value **)** + +.. _class_Range_set_value: + +- void **set_value** **(** :ref:`float` value **)** + +.. _class_Range_set_min: + +- void **set_min** **(** :ref:`float` minimum **)** + +Set minimum value, clamped range value to it if it's less. + +.. _class_Range_set_max: + +- void **set_max** **(** :ref:`float` maximum **)** + +.. _class_Range_set_step: + +- void **set_step** **(** :ref:`float` step **)** + +Set step value. If step is 0, stepping will be disabled. + +.. _class_Range_set_page: + +- void **set_page** **(** :ref:`float` pagesize **)** + +Set page size. Page is mainly used for scrollbars or anything that controls text scrolling. + +.. _class_Range_set_unit_value: + +- void **set_unit_value** **(** :ref:`float` value **)** + +Set value mapped to 0 to 1 (unit) range, it will then be converted to the actual value within min and max. + +.. _class_Range_set_rounded_values: + +- void **set_rounded_values** **(** :ref:`bool` enabled **)** + +.. _class_Range_is_rounded_values: + +- :ref:`bool` **is_rounded_values** **(** **)** const + +.. _class_Range_set_exp_unit_value: + +- void **set_exp_unit_value** **(** :ref:`bool` enabled **)** + +.. _class_Range_is_unit_value_exp: + +- :ref:`bool` **is_unit_value_exp** **(** **)** const + +.. _class_Range_share: + +- void **share** **(** :ref:`Object` with **)** + +.. _class_Range_unshare: + +- void **unshare** **(** **)** + + diff --git a/classes/class_rawarray.rst b/classes/class_rawarray.rst new file mode 100644 index 000000000..3786c2263 --- /dev/null +++ b/classes/class_rawarray.rst @@ -0,0 +1,73 @@ +.. _class_RawArray: + +RawArray +======== + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + +Raw byte array. + +Member Functions +---------------- + ++----------------------------------+----------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_string_from_ascii` **(** **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_string_from_utf8` **(** **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------+ +| void | :ref:`push_back` **(** :ref:`int` byte **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------+ +| void | :ref:`resize` **(** :ref:`int` idx **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------+ +| void | :ref:`set` **(** :ref:`int` idx, :ref:`int` byte **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`size` **(** **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------+ +| :ref:`RawArray` | :ref:`RawArray` **(** :ref:`Array` from **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------+ + +Description +----------- + +Raw byte array. Contains bytes. Optimized for memory usage, can't fragment the memory. + +Member Function Description +--------------------------- + +.. _class_RawArray_get_string_from_ascii: + +- :ref:`String` **get_string_from_ascii** **(** **)** + +Returns a copy of the array's contents formatted as String. Fast alternative to get_string_from_utf8(), assuming the content is ASCII-only (unlike the UTF-8 function, this function maps every byte to a character in the string, so any multibyte sequence will be torn apart). + +.. _class_RawArray_get_string_from_utf8: + +- :ref:`String` **get_string_from_utf8** **(** **)** + +Returns a copy of the array's contents formatted as String, assuming the array is formatted as UTF-8. Slower than get_string_from_ascii(), but works for UTF-8. Usually you should prefer this function over get_string_from_ascii() to support international input. + +.. _class_RawArray_push_back: + +- void **push_back** **(** :ref:`int` byte **)** + +.. _class_RawArray_resize: + +- void **resize** **(** :ref:`int` idx **)** + +.. _class_RawArray_set: + +- void **set** **(** :ref:`int` idx, :ref:`int` byte **)** + +.. _class_RawArray_size: + +- :ref:`int` **size** **(** **)** + +.. _class_RawArray_RawArray: + +- :ref:`RawArray` **RawArray** **(** :ref:`Array` from **)** + + diff --git a/classes/class_raycast.rst b/classes/class_raycast.rst new file mode 100644 index 000000000..51fb511ce --- /dev/null +++ b/classes/class_raycast.rst @@ -0,0 +1,109 @@ +.. _class_RayCast: + +RayCast +======= + +Inherits: :ref:`Spatial` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------------+---------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_enabled` **(** :ref:`bool` enabled **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_enabled` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_cast_to` **(** :ref:`Vector3` local_point **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_cast_to` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_colliding` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_collider` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_collider_shape` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_collision_point` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_collision_normal` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_exception_rid` **(** :ref:`RID` rid **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_exception` **(** :ref:`Object` node **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_exception_rid` **(** :ref:`RID` rid **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_exception` **(** :ref:`Object` node **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_exceptions` **(** **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_RayCast_set_enabled: + +- void **set_enabled** **(** :ref:`bool` enabled **)** + +.. _class_RayCast_is_enabled: + +- :ref:`bool` **is_enabled** **(** **)** const + +.. _class_RayCast_set_cast_to: + +- void **set_cast_to** **(** :ref:`Vector3` local_point **)** + +.. _class_RayCast_get_cast_to: + +- :ref:`Vector3` **get_cast_to** **(** **)** const + +.. _class_RayCast_is_colliding: + +- :ref:`bool` **is_colliding** **(** **)** const + +.. _class_RayCast_get_collider: + +- :ref:`Object` **get_collider** **(** **)** const + +.. _class_RayCast_get_collider_shape: + +- :ref:`int` **get_collider_shape** **(** **)** const + +.. _class_RayCast_get_collision_point: + +- :ref:`Vector3` **get_collision_point** **(** **)** const + +.. _class_RayCast_get_collision_normal: + +- :ref:`Vector3` **get_collision_normal** **(** **)** const + +.. _class_RayCast_add_exception_rid: + +- void **add_exception_rid** **(** :ref:`RID` rid **)** + +.. _class_RayCast_add_exception: + +- void **add_exception** **(** :ref:`Object` node **)** + +.. _class_RayCast_remove_exception_rid: + +- void **remove_exception_rid** **(** :ref:`RID` rid **)** + +.. _class_RayCast_remove_exception: + +- void **remove_exception** **(** :ref:`Object` node **)** + +.. _class_RayCast_clear_exceptions: + +- void **clear_exceptions** **(** **)** + + diff --git a/classes/class_raycast2d.rst b/classes/class_raycast2d.rst new file mode 100644 index 000000000..42afe89e1 --- /dev/null +++ b/classes/class_raycast2d.rst @@ -0,0 +1,137 @@ +.. _class_RayCast2D: + +RayCast2D +========= + +Inherits: :ref:`Node2D` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------------+-----------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_enabled` **(** :ref:`bool` enabled **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_enabled` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_cast_to` **(** :ref:`Vector2` local_point **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_cast_to` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_colliding` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_collider` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_collider_shape` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_collision_point` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_collision_normal` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_exception_rid` **(** :ref:`RID` rid **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_exception` **(** :ref:`Object` node **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_exception_rid` **(** :ref:`RID` rid **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_exception` **(** :ref:`Object` node **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_exceptions` **(** **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_layer_mask` **(** :ref:`int` mask **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_layer_mask` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_type_mask` **(** :ref:`int` mask **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_type_mask` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_RayCast2D_set_enabled: + +- void **set_enabled** **(** :ref:`bool` enabled **)** + +.. _class_RayCast2D_is_enabled: + +- :ref:`bool` **is_enabled** **(** **)** const + +.. _class_RayCast2D_set_cast_to: + +- void **set_cast_to** **(** :ref:`Vector2` local_point **)** + +.. _class_RayCast2D_get_cast_to: + +- :ref:`Vector2` **get_cast_to** **(** **)** const + +.. _class_RayCast2D_is_colliding: + +- :ref:`bool` **is_colliding** **(** **)** const + +Return whether the closest object the ray is pointing to is colliding with the vector, with the vector length considered. + +.. _class_RayCast2D_get_collider: + +- :ref:`Object` **get_collider** **(** **)** const + +Return the closest object the ray is pointing to. Note that this does not consider the length of the vector, so you must also use :ref:`is_colliding` to check if the object returned is actually colliding with the ray. + +.. _class_RayCast2D_get_collider_shape: + +- :ref:`int` **get_collider_shape** **(** **)** const + +.. _class_RayCast2D_get_collision_point: + +- :ref:`Vector2` **get_collision_point** **(** **)** const + +.. _class_RayCast2D_get_collision_normal: + +- :ref:`Vector2` **get_collision_normal** **(** **)** const + +.. _class_RayCast2D_add_exception_rid: + +- void **add_exception_rid** **(** :ref:`RID` rid **)** + +.. _class_RayCast2D_add_exception: + +- void **add_exception** **(** :ref:`Object` node **)** + +.. _class_RayCast2D_remove_exception_rid: + +- void **remove_exception_rid** **(** :ref:`RID` rid **)** + +.. _class_RayCast2D_remove_exception: + +- void **remove_exception** **(** :ref:`Object` node **)** + +.. _class_RayCast2D_clear_exceptions: + +- void **clear_exceptions** **(** **)** + +.. _class_RayCast2D_set_layer_mask: + +- void **set_layer_mask** **(** :ref:`int` mask **)** + +.. _class_RayCast2D_get_layer_mask: + +- :ref:`int` **get_layer_mask** **(** **)** const + +.. _class_RayCast2D_set_type_mask: + +- void **set_type_mask** **(** :ref:`int` mask **)** + +.. _class_RayCast2D_get_type_mask: + +- :ref:`int` **get_type_mask** **(** **)** const + + diff --git a/classes/class_rayshape.rst b/classes/class_rayshape.rst new file mode 100644 index 000000000..9a2fa35da --- /dev/null +++ b/classes/class_rayshape.rst @@ -0,0 +1,37 @@ +.. _class_RayShape: + +RayShape +======== + +Inherits: :ref:`Shape` +----------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------+---------------------------------------------------------------------------------------------+ +| void | :ref:`set_length` **(** :ref:`float` length **)** | ++----------------------------+---------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_length` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_RayShape_set_length: + +- void **set_length** **(** :ref:`float` length **)** + +.. _class_RayShape_get_length: + +- :ref:`float` **get_length** **(** **)** const + + diff --git a/classes/class_rayshape2d.rst b/classes/class_rayshape2d.rst new file mode 100644 index 000000000..6e16a0e2e --- /dev/null +++ b/classes/class_rayshape2d.rst @@ -0,0 +1,46 @@ +.. _class_RayShape2D: + +RayShape2D +========== + +Inherits: :ref:`Shape2D` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Ray 2D shape resource for physics. + +Member Functions +---------------- + ++----------------------------+-----------------------------------------------------------------------------------------------+ +| void | :ref:`set_length` **(** :ref:`float` length **)** | ++----------------------------+-----------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_length` **(** **)** const | ++----------------------------+-----------------------------------------------------------------------------------------------+ + +Description +----------- + +Ray 2D shape resource for physics. A ray is not really a collision body, isntead it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. + +Member Function Description +--------------------------- + +.. _class_RayShape2D_set_length: + +- void **set_length** **(** :ref:`float` length **)** + +Set the length of the ray. + +.. _class_RayShape2D_get_length: + +- :ref:`float` **get_length** **(** **)** const + +Return the length of the ray. + + diff --git a/classes/class_realarray.rst b/classes/class_realarray.rst new file mode 100644 index 000000000..fccab8c39 --- /dev/null +++ b/classes/class_realarray.rst @@ -0,0 +1,57 @@ +.. _class_RealArray: + +RealArray +========= + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + +Real Array . + +Member Functions +---------------- + ++------------------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`push_back` **(** :ref:`float` value **)** | ++------------------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`resize` **(** :ref:`int` idx **)** | ++------------------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`set` **(** :ref:`int` idx, :ref:`float` value **)** | ++------------------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`size` **(** **)** | ++------------------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`RealArray` | :ref:`RealArray` **(** :ref:`Array` from **)** | ++------------------------------------+----------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Real Array. Array of floating point values. Can only contain floats. Optimized for memory usage, can't fragment the memory. + +Member Function Description +--------------------------- + +.. _class_RealArray_push_back: + +- void **push_back** **(** :ref:`float` value **)** + +.. _class_RealArray_resize: + +- void **resize** **(** :ref:`int` idx **)** + +.. _class_RealArray_set: + +- void **set** **(** :ref:`int` idx, :ref:`float` value **)** + +.. _class_RealArray_size: + +- :ref:`int` **size** **(** **)** + +.. _class_RealArray_RealArray: + +- :ref:`RealArray` **RealArray** **(** :ref:`Array` from **)** + + diff --git a/classes/class_rect2.rst b/classes/class_rect2.rst new file mode 100644 index 000000000..045946ccf --- /dev/null +++ b/classes/class_rect2.rst @@ -0,0 +1,122 @@ +.. _class_Rect2: + +Rect2 +===== + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + +2D Axis-aligned bounding box. + +Member Functions +---------------- + ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`clip` **(** :ref:`Rect2` b **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`encloses` **(** :ref:`Rect2` b **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`expand` **(** :ref:`Vector2` to **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_area` **(** **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`grow` **(** :ref:`float` by **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_no_area` **(** **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_point` **(** :ref:`Vector2` point **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`intersects` **(** :ref:`Rect2` b **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`merge` **(** :ref:`Rect2` b **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`Rect2` **(** :ref:`Vector2` pos, :ref:`Vector2` size **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`Rect2` **(** :ref:`float` x, :ref:`float` y, :ref:`float` width, :ref:`float` height **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Variables +---------------- + +- :ref:`Vector2` **pos** +- :ref:`Vector2` **size** +- :ref:`Vector2` **end** + +Description +----------- + +Rect2 provides an 2D Axis-Aligned Bounding Box. It consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. + +Member Function Description +--------------------------- + +.. _class_Rect2_clip: + +- :ref:`Rect2` **clip** **(** :ref:`Rect2` b **)** + +Returns the intersection of this :ref:`Rect2` and b. + +.. _class_Rect2_encloses: + +- :ref:`bool` **encloses** **(** :ref:`Rect2` b **)** + +Returns true if this :ref:`Rect2` completely encloses another one. + +.. _class_Rect2_expand: + +- :ref:`Rect2` **expand** **(** :ref:`Vector2` to **)** + +Return this :ref:`Rect2` expanded to include a given point. + +.. _class_Rect2_get_area: + +- :ref:`float` **get_area** **(** **)** + +Get the area of the :ref:`Rect2`. + +.. _class_Rect2_grow: + +- :ref:`Rect2` **grow** **(** :ref:`float` by **)** + +Return a copy of the :ref:`Rect2` grown a given amount of units towards all the sides. + +.. _class_Rect2_has_no_area: + +- :ref:`bool` **has_no_area** **(** **)** + +Return true if the :ref:`Rect2` is flat or empty. + +.. _class_Rect2_has_point: + +- :ref:`bool` **has_point** **(** :ref:`Vector2` point **)** + +Return true if the :ref:`Rect2` contains a point. + +.. _class_Rect2_intersects: + +- :ref:`bool` **intersects** **(** :ref:`Rect2` b **)** + +Return true if the :ref:`Rect2` overlaps with another. + +.. _class_Rect2_merge: + +- :ref:`Rect2` **merge** **(** :ref:`Rect2` b **)** + +Combine this :ref:`Rect2` with another, a larger one is returned that contains both. + +.. _class_Rect2_Rect2: + +- :ref:`Rect2` **Rect2** **(** :ref:`Vector2` pos, :ref:`Vector2` size **)** + +Construct a :ref:`Rect2` by position and size. + +.. _class_Rect2_Rect2: + +- :ref:`Rect2` **Rect2** **(** :ref:`float` x, :ref:`float` y, :ref:`float` width, :ref:`float` height **)** + +Construct a :ref:`Rect2` by x, y, width and height. + + diff --git a/classes/class_rectangleshape2d.rst b/classes/class_rectangleshape2d.rst new file mode 100644 index 000000000..83c9969c0 --- /dev/null +++ b/classes/class_rectangleshape2d.rst @@ -0,0 +1,46 @@ +.. _class_RectangleShape2D: + +RectangleShape2D +================ + +Inherits: :ref:`Shape2D` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Rectangle Shape for 2D Physics. + +Member Functions +---------------- + ++--------------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_extents` **(** :ref:`Vector2` extents **)** | ++--------------------------------+------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_extents` **(** **)** const | ++--------------------------------+------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Rectangle Shape for 2D Physics. This shape is useful for modelling box-like 2D objects. + +Member Function Description +--------------------------- + +.. _class_RectangleShape2D_set_extents: + +- void **set_extents** **(** :ref:`Vector2` extents **)** + +Set the half extents, the actual width and height of this shape is twice the half extents. + +.. _class_RectangleShape2D_get_extents: + +- :ref:`Vector2` **get_extents** **(** **)** const + +Return the half extents, the actual width and height of this shape is twice the half extents. + + diff --git a/classes/class_reference.rst b/classes/class_reference.rst new file mode 100644 index 000000000..2b65b23b6 --- /dev/null +++ b/classes/class_reference.rst @@ -0,0 +1,52 @@ +.. _class_Reference: + +Reference +========= + +Inherits: :ref:`Object` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Base class for anything that keeps a reference count. + +Member Functions +---------------- + ++--------------------------+--------------------------------------------------------------+ +| :ref:`bool` | :ref:`init_ref` **(** **)** | ++--------------------------+--------------------------------------------------------------+ +| void | :ref:`reference` **(** **)** | ++--------------------------+--------------------------------------------------------------+ +| :ref:`bool` | :ref:`unreference` **(** **)** | ++--------------------------+--------------------------------------------------------------+ + +Description +----------- + +Base class for anything that keeps a reference count. Resource and many other helper objects inherit this. References keep an internal reference counter so they are only released when no longer in use. + +Member Function Description +--------------------------- + +.. _class_Reference_init_ref: + +- :ref:`bool` **init_ref** **(** **)** + +.. _class_Reference_reference: + +- void **reference** **(** **)** + +Increase the internal reference counter. Use this only if you really know what you are doing. + +.. _class_Reference_unreference: + +- :ref:`bool` **unreference** **(** **)** + +Decrease the internal reference counter. Use this only if you really know what you are doing. + + diff --git a/classes/class_referenceframe.rst b/classes/class_referenceframe.rst new file mode 100644 index 000000000..3845a69d8 --- /dev/null +++ b/classes/class_referenceframe.rst @@ -0,0 +1,21 @@ +.. _class_ReferenceFrame: + +ReferenceFrame +============== + +Inherits: :ref:`Control` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Reference frame for GUI. + +Description +----------- + +Reference frame for GUI. It's just like an empty control, except a red box is displayed while editing around its size at all times. + diff --git a/classes/class_regex.rst b/classes/class_regex.rst new file mode 100644 index 000000000..68eba74fd --- /dev/null +++ b/classes/class_regex.rst @@ -0,0 +1,120 @@ +.. _class_RegEx: + +RegEx +===== + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Simple regular expression matcher. + +Member Functions +---------------- + ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`compile` **(** :ref:`String` pattern, :ref:`int` capture=9 **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`find` **(** :ref:`String` text, :ref:`int` start=0, :ref:`int` end=-1 **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_valid` **(** **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_capture_count` **(** **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_capture` **(** :ref:`int` capture **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_captures` **(** **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Class for finding text patterns in a string using regular expressions. Regular expressions are a way to define patterns of text to be searched. + +This class only finds patterns in a string. It can not perform replacements. + +Usage of regular expressions is too long to be explained here, but Internet is full of tutorials and detailed explanations. + +Currently supported features: + +Capturing :ref:`code`():ref:`/code` and non-capturing :ref:`code`(?:):ref:`/code` groups + +Any character :ref:`code`.:ref:`/code` + +Shorthand caracter classes :ref:`code`\w \W \s \S \d \D:ref:`/code` + +User-defined character classes such as :ref:`code`:ref:`A-Za-z`:ref:`/code` + +Simple quantifiers :ref:`code`?:ref:`/code`, :ref:`code`*:ref:`/code` and :ref:`code`+:ref:`/code` + +Range quantifiers :ref:`code`{x,y}:ref:`/code` + +Lazy (non-greedy) quantifiers :ref:`code`*?:ref:`/code` + +Begining :ref:`code`^:ref:`/code` and end :ref:`code`$:ref:`/code` anchors + +Alternation :ref:`code`|:ref:`/code` + +Backreferences :ref:`code`\1:ref:`/code` and :ref:`code`\g{1}:ref:`/code` + +POSIX character classes :ref:`code`:ref:`[:alnum:`]:ref:`/code` + +Lookahead :ref:`code`(?=):ref:`/code`, :ref:`code`(?!):ref:`/code` and lookbehind :ref:`code`(?<=):ref:`/code`, :ref:`code`(?` + +ASCII :ref:`code`\xFF:ref:`/code` and Unicode :ref:`code`\uFFFF:ref:`/code` code points (in a style similar to Python) + +Word boundaries :ref:`code`\b:ref:`/code`, :ref:`code`\B:ref:`/code` + +Member Function Description +--------------------------- + +.. _class_RegEx_compile: + +- :ref:`int` **compile** **(** :ref:`String` pattern, :ref:`int` capture=9 **)** + +Compiles and assign the regular expression pattern to use. The limit on the number of capturing groups can be specified or made unlimited if negative. + +.. _class_RegEx_find: + +- :ref:`int` **find** **(** :ref:`String` text, :ref:`int` start=0, :ref:`int` end=-1 **)** const + +This method tries to find the pattern within the string, and returns the position where it was found. It also stores any capturing group (see :ref:`get_capture`) for further retrieval. + +.. _class_RegEx_clear: + +- void **clear** **(** **)** + +This method resets the state of the object, as it was freshly created. Namely, it unassigns the regular expression of this object, and forgets all captures made by the last :ref:`find`. + +.. _class_RegEx_is_valid: + +- :ref:`bool` **is_valid** **(** **)** const + +Returns whether this object has a valid regular expression assigned. + +.. _class_RegEx_get_capture_count: + +- :ref:`int` **get_capture_count** **(** **)** const + +Returns the number of capturing groups. A captured group is the part of a string that matches a part of the pattern delimited by parentheses (unless they are non-capturing parentheses *(?:)*). + +.. _class_RegEx_get_capture: + +- :ref:`String` **get_capture** **(** :ref:`int` capture **)** const + +Returns a captured group. A captured group is the part of a string that matches a part of the pattern delimited by parentheses (unless they are non-capturing parentheses *(?:)*). + +.. _class_RegEx_get_captures: + +- :ref:`StringArray` **get_captures** **(** **)** const + +Return a list of all the captures made by the regular expression. + + diff --git a/classes/class_remotetransform2d.rst b/classes/class_remotetransform2d.rst new file mode 100644 index 000000000..750be0fdd --- /dev/null +++ b/classes/class_remotetransform2d.rst @@ -0,0 +1,37 @@ +.. _class_RemoteTransform2D: + +RemoteTransform2D +================= + +Inherits: :ref:`Node2D` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------------+--------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_remote_node` **(** :ref:`NodePath` path **)** | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------+ +| :ref:`NodePath` | :ref:`get_remote_node` **(** **)** const | ++----------------------------------+--------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_RemoteTransform2D_set_remote_node: + +- void **set_remote_node** **(** :ref:`NodePath` path **)** + +.. _class_RemoteTransform2D_get_remote_node: + +- :ref:`NodePath` **get_remote_node** **(** **)** const + + diff --git a/classes/class_rendertargettexture.rst b/classes/class_rendertargettexture.rst new file mode 100644 index 000000000..6d184d377 --- /dev/null +++ b/classes/class_rendertargettexture.rst @@ -0,0 +1,16 @@ +.. _class_RenderTargetTexture: + +RenderTargetTexture +=================== + +Inherits: :ref:`Texture` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + diff --git a/classes/class_resource.rst b/classes/class_resource.rst new file mode 100644 index 000000000..d1abf9560 --- /dev/null +++ b/classes/class_resource.rst @@ -0,0 +1,99 @@ +.. _class_Resource: + +Resource +======== + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Base class for all resources. + +Member Functions +---------------- + ++------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_path` **(** :ref:`String` path **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`take_over_path` **(** :ref:`String` path **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_path` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_name` **(** :ref:`String` name **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_name` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_rid` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_import_metadata` **(** :ref:`Object` metadata **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_import_metadata` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`duplicate` **(** :ref:`bool` subresources=false **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **changed** **(** **)** + +Description +----------- + +Resource is the base class for all resource types. Resources are primarily data containers. They are reference counted and freed when no longer in use. They are also loaded only once from disk, and further attempts to load the resource will return the same reference (all this in contrast to a :ref:`Node`, which is not reference counted and can be instanced from disk as many times as desred). Resources can be saved externally on disk or bundled into another object, such as a :ref:`Node` or another resource. + +Member Function Description +--------------------------- + +.. _class_Resource_set_path: + +- void **set_path** **(** :ref:`String` path **)** + +Set the path of the resource. This is useful mainly for editors when saving/loading, and shouldn't be changed by anything else. + +.. _class_Resource_take_over_path: + +- void **take_over_path** **(** :ref:`String` path **)** + +.. _class_Resource_get_path: + +- :ref:`String` **get_path** **(** **)** const + +Return the path of the resource. This is useful mainly for editors when saving/loading, and shouldn't be changed by anything else. + +.. _class_Resource_set_name: + +- void **set_name** **(** :ref:`String` name **)** + +Set the name of the resources, any name is valid (it doesn't have to be unique). Name is for descriptive purposes only. + +.. _class_Resource_get_name: + +- :ref:`String` **get_name** **(** **)** const + +Return the name of the resources, any name is valid (it doesn't have to be unique). Name is for descriptive purposes only. + +.. _class_Resource_get_rid: + +- :ref:`RID` **get_rid** **(** **)** const + +Return the RID of the resource (or an empty RID). Many resources (such as :ref:`Texture`, :ref:`Mesh`, etc) are high level abstractions of resources stored in a server, so this function will return the original RID. + +.. _class_Resource_set_import_metadata: + +- void **set_import_metadata** **(** :ref:`Object` metadata **)** + +.. _class_Resource_get_import_metadata: + +- :ref:`Object` **get_import_metadata** **(** **)** const + +.. _class_Resource_duplicate: + +- :ref:`Object` **duplicate** **(** :ref:`bool` subresources=false **)** + + diff --git a/classes/class_resourceimportmetadata.rst b/classes/class_resourceimportmetadata.rst new file mode 100644 index 000000000..3c0b0151a --- /dev/null +++ b/classes/class_resourceimportmetadata.rst @@ -0,0 +1,85 @@ +.. _class_ResourceImportMetadata: + +ResourceImportMetadata +====================== + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_editor` **(** :ref:`String` name **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_editor` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_source` **(** :ref:`String` path, :ref:`String` md5="" **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_source_path` **(** :ref:`int` idx **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_source_md5` **(** :ref:`int` idx **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_source` **(** :ref:`int` idx **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_source_count` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_option` **(** :ref:`String` key, var value **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`get_option` **(** :ref:`String` key **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_options` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_ResourceImportMetadata_set_editor: + +- void **set_editor** **(** :ref:`String` name **)** + +.. _class_ResourceImportMetadata_get_editor: + +- :ref:`String` **get_editor** **(** **)** const + +.. _class_ResourceImportMetadata_add_source: + +- void **add_source** **(** :ref:`String` path, :ref:`String` md5="" **)** + +.. _class_ResourceImportMetadata_get_source_path: + +- :ref:`String` **get_source_path** **(** :ref:`int` idx **)** const + +.. _class_ResourceImportMetadata_get_source_md5: + +- :ref:`String` **get_source_md5** **(** :ref:`int` idx **)** const + +.. _class_ResourceImportMetadata_remove_source: + +- void **remove_source** **(** :ref:`int` idx **)** + +.. _class_ResourceImportMetadata_get_source_count: + +- :ref:`int` **get_source_count** **(** **)** const + +.. _class_ResourceImportMetadata_set_option: + +- void **set_option** **(** :ref:`String` key, var value **)** + +.. _class_ResourceImportMetadata_get_option: + +- void **get_option** **(** :ref:`String` key **)** const + +.. _class_ResourceImportMetadata_get_options: + +- :ref:`StringArray` **get_options** **(** **)** const + + diff --git a/classes/class_resourceinteractiveloader.rst b/classes/class_resourceinteractiveloader.rst new file mode 100644 index 000000000..cd9ed0a9a --- /dev/null +++ b/classes/class_resourceinteractiveloader.rst @@ -0,0 +1,68 @@ +.. _class_ResourceInteractiveLoader: + +ResourceInteractiveLoader +========================= + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Interactive Resource Loader. + +Member Functions +---------------- + ++------------------------------+--------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_resource` **(** **)** | ++------------------------------+--------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`poll` **(** **)** | ++------------------------------+--------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`wait` **(** **)** | ++------------------------------+--------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_stage` **(** **)** const | ++------------------------------+--------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_stage_count` **(** **)** const | ++------------------------------+--------------------------------------------------------------------------------------------+ + +Description +----------- + +Interactive Resource Loader. This object is returned by ResourceLoader when performing an interactive load. It allows to load with high granularity, so this is mainly useful for displaying load bars/percentages. + +Member Function Description +--------------------------- + +.. _class_ResourceInteractiveLoader_get_resource: + +- :ref:`Object` **get_resource** **(** **)** + +Return the loaded resource (only if loaded). Otherwise, returns null. + +.. _class_ResourceInteractiveLoader_poll: + +- :ref:`int` **poll** **(** **)** + +Poll the load. If OK is returned, this means poll will have to be called again. If ERR_EOF is returned, them the load has finished and the resource can be obtained by calling :ref:`get_resource`. + +.. _class_ResourceInteractiveLoader_wait: + +- :ref:`int` **wait** **(** **)** + +.. _class_ResourceInteractiveLoader_get_stage: + +- :ref:`int` **get_stage** **(** **)** const + +Return the load stage. The total amount of stages can be queried with :ref:`get_stage_count` + +.. _class_ResourceInteractiveLoader_get_stage_count: + +- :ref:`int` **get_stage_count** **(** **)** const + +Return the total amount of stages (calls to :ref:`poll` ) needed to completely load this resource. + + diff --git a/classes/class_resourceloader.rst b/classes/class_resourceloader.rst new file mode 100644 index 000000000..b01477307 --- /dev/null +++ b/classes/class_resourceloader.rst @@ -0,0 +1,72 @@ +.. _class_ResourceLoader: + +ResourceLoader +============== + +Inherits: :ref:`Object` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Resource Loader. + +Member Functions +---------------- + ++--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`ResourceInteractiveLoader` | :ref:`load_interactive` **(** :ref:`String` path, :ref:`String` type_hint="" **)** | ++--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Resource` | :ref:`load` **(** :ref:`String` path, :ref:`String` type_hint="", :ref:`bool` p_no_cache=false **)** | ++--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_recognized_extensions_for_type` **(** :ref:`String` type **)** | ++--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_abort_on_missing_resources` **(** :ref:`bool` abort **)** | ++--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_dependencies` **(** :ref:`String` path **)** | ++--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has` **(** :ref:`String` path **)** | ++--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Resource Loader. This is a static object accessible as :ref:`ResourceLoader`. GDScript has a simplified load() function, though. + +Member Function Description +--------------------------- + +.. _class_ResourceLoader_load_interactive: + +- :ref:`ResourceInteractiveLoader` **load_interactive** **(** :ref:`String` path, :ref:`String` type_hint="" **)** + +Load a resource interactively, the returned object allows to load with high granularity. + +.. _class_ResourceLoader_load: + +- :ref:`Resource` **load** **(** :ref:`String` path, :ref:`String` type_hint="", :ref:`bool` p_no_cache=false **)** + +.. _class_ResourceLoader_get_recognized_extensions_for_type: + +- :ref:`StringArray` **get_recognized_extensions_for_type** **(** :ref:`String` type **)** + +Return the list of recognized extensions for a resource type. + +.. _class_ResourceLoader_set_abort_on_missing_resources: + +- void **set_abort_on_missing_resources** **(** :ref:`bool` abort **)** + +Change the behavior on missing sub-resources. Default is to abort load. + +.. _class_ResourceLoader_get_dependencies: + +- :ref:`StringArray` **get_dependencies** **(** :ref:`String` path **)** + +.. _class_ResourceLoader_has: + +- :ref:`bool` **has** **(** :ref:`String` path **)** + + diff --git a/classes/class_resourcepreloader.rst b/classes/class_resourcepreloader.rst new file mode 100644 index 000000000..127f772a0 --- /dev/null +++ b/classes/class_resourcepreloader.rst @@ -0,0 +1,78 @@ +.. _class_ResourcePreloader: + +ResourcePreloader +================= + +Inherits: :ref:`Node` +--------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Resource Preloader Node. + +Member Functions +---------------- + ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_resource` **(** :ref:`String` name, :ref:`Object` resource **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_resource` **(** :ref:`String` name **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`rename_resource` **(** :ref:`String` name, :ref:`String` newname **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_resource` **(** :ref:`String` name **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_resource` **(** :ref:`String` name **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_resource_list` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Resource Preloader Node. This node is used to preload sub-resources inside a scene, so when the scene is loaded all the resourcs are ready to use and be retrieved from here. + +Member Function Description +--------------------------- + +.. _class_ResourcePreloader_add_resource: + +- void **add_resource** **(** :ref:`String` name, :ref:`Object` resource **)** + +Add a resource to the preloader. Set the text-id that will be used to identify it (retrieve it/erase it/etc). + +.. _class_ResourcePreloader_remove_resource: + +- void **remove_resource** **(** :ref:`String` name **)** + +Remove a resource from the preloader by text id. + +.. _class_ResourcePreloader_rename_resource: + +- void **rename_resource** **(** :ref:`String` name, :ref:`String` newname **)** + +Rename a resource inside the preloader, from a text-id to a new text-id. + +.. _class_ResourcePreloader_has_resource: + +- :ref:`bool` **has_resource** **(** :ref:`String` name **)** const + +Return true if the preloader has a given resource. + +.. _class_ResourcePreloader_get_resource: + +- :ref:`Object` **get_resource** **(** :ref:`String` name **)** const + +Return the resource given a text-id. + +.. _class_ResourcePreloader_get_resource_list: + +- :ref:`StringArray` **get_resource_list** **(** **)** const + +Return the list of resources inside the preloader. + + diff --git a/classes/class_resourcesaver.rst b/classes/class_resourcesaver.rst new file mode 100644 index 000000000..3023cba96 --- /dev/null +++ b/classes/class_resourcesaver.rst @@ -0,0 +1,56 @@ +.. _class_ResourceSaver: + +ResourceSaver +============= + +Inherits: :ref:`Object` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Resource Saving Interface. + +Member Functions +---------------- + ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`save` **(** :ref:`String` path, :ref:`Resource` resource, :ref:`int` flags=0 **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_recognized_extensions` **(** :ref:`Object` type **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **FLAG_RELATIVE_PATHS** = **1** +- **FLAG_BUNDLE_RESOURCES** = **2** +- **FLAG_CHANGE_PATH** = **4** +- **FLAG_OMIT_EDITOR_PROPERTIES** = **8** +- **FLAG_SAVE_BIG_ENDIAN** = **16** +- **FLAG_COMPRESS** = **32** + +Description +----------- + +Resource Saving Interface. This interface is used for saving resources to disk. + +Member Function Description +--------------------------- + +.. _class_ResourceSaver_save: + +- :ref:`int` **save** **(** :ref:`String` path, :ref:`Resource` resource, :ref:`int` flags=0 **)** + +Save a resource to disk, to a given path. + +.. _class_ResourceSaver_get_recognized_extensions: + +- :ref:`StringArray` **get_recognized_extensions** **(** :ref:`Object` type **)** + +Return the list of extensions available for saving a resource of a given type. + + diff --git a/classes/class_richtextlabel.rst b/classes/class_richtextlabel.rst new file mode 100644 index 000000000..94624cf2b --- /dev/null +++ b/classes/class_richtextlabel.rst @@ -0,0 +1,277 @@ +.. _class_RichTextLabel: + +RichTextLabel +============= + +Inherits: :ref:`Control` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Label that displays rich text. + +Member Functions +---------------- + ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_text` **(** :ref:`String` text **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_image` **(** :ref:`Texture` image **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`newline` **(** **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`push_font` **(** :ref:`Object` font **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`push_color` **(** :ref:`Color` color **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`push_align` **(** :ref:`int` align **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`push_indent` **(** :ref:`int` level **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`push_list` **(** :ref:`int` type **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`push_meta` **(** var data **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`push_underline` **(** **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`push_table` **(** :ref:`int` columns **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_table_column_expand` **(** :ref:`int` column, :ref:`bool` expand, :ref:`int` ratio **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`push_cell` **(** **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`pop` **(** **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_meta_underline` **(** :ref:`bool` enable **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_meta_underlined` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_scroll_active` **(** :ref:`bool` active **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_scroll_active` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_scroll_follow` **(** :ref:`bool` follow **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_scroll_following` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_v_scroll` **(** **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`scroll_to_line` **(** :ref:`int` line **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_tab_size` **(** :ref:`int` spaces **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_tab_size` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_selection_enabled` **(** :ref:`bool` enabled **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_selection_enabled` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`parse_bbcode` **(** :ref:`String` bbcode **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`append_bbcode` **(** :ref:`String` bbcode **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_bbcode` **(** :ref:`String` text **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_bbcode` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_visible_characters` **(** :ref:`int` amount **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_visible_characters` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_total_character_count` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_use_bbcode` **(** :ref:`bool` enable **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_using_bbcode` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **meta_clicked** **(** :ref:`Nil` meta **)** + +Numeric Constants +----------------- + +- **ALIGN_LEFT** = **0** +- **ALIGN_CENTER** = **1** +- **ALIGN_RIGHT** = **2** +- **ALIGN_FILL** = **3** +- **LIST_NUMBERS** = **0** +- **LIST_LETTERS** = **1** +- **LIST_DOTS** = **2** +- **ITEM_FRAME** = **0** +- **ITEM_TEXT** = **1** +- **ITEM_IMAGE** = **2** +- **ITEM_NEWLINE** = **3** +- **ITEM_FONT** = **4** +- **ITEM_COLOR** = **5** +- **ITEM_UNDERLINE** = **6** +- **ITEM_ALIGN** = **7** +- **ITEM_INDENT** = **8** +- **ITEM_LIST** = **9** +- **ITEM_META** = **11** + +Description +----------- + +Label that displays rich text. Rich text can contain custom text, fonts, images and some basic formatting. It also adapts itself to given width/heights. + +Member Function Description +--------------------------- + +.. _class_RichTextLabel_add_text: + +- void **add_text** **(** :ref:`String` text **)** + +.. _class_RichTextLabel_add_image: + +- void **add_image** **(** :ref:`Texture` image **)** + +.. _class_RichTextLabel_newline: + +- void **newline** **(** **)** + +.. _class_RichTextLabel_push_font: + +- void **push_font** **(** :ref:`Object` font **)** + +.. _class_RichTextLabel_push_color: + +- void **push_color** **(** :ref:`Color` color **)** + +.. _class_RichTextLabel_push_align: + +- void **push_align** **(** :ref:`int` align **)** + +.. _class_RichTextLabel_push_indent: + +- void **push_indent** **(** :ref:`int` level **)** + +.. _class_RichTextLabel_push_list: + +- void **push_list** **(** :ref:`int` type **)** + +.. _class_RichTextLabel_push_meta: + +- void **push_meta** **(** var data **)** + +.. _class_RichTextLabel_push_underline: + +- void **push_underline** **(** **)** + +.. _class_RichTextLabel_push_table: + +- void **push_table** **(** :ref:`int` columns **)** + +.. _class_RichTextLabel_set_table_column_expand: + +- void **set_table_column_expand** **(** :ref:`int` column, :ref:`bool` expand, :ref:`int` ratio **)** + +.. _class_RichTextLabel_push_cell: + +- void **push_cell** **(** **)** + +.. _class_RichTextLabel_pop: + +- void **pop** **(** **)** + +.. _class_RichTextLabel_clear: + +- void **clear** **(** **)** + +.. _class_RichTextLabel_set_meta_underline: + +- void **set_meta_underline** **(** :ref:`bool` enable **)** + +.. _class_RichTextLabel_is_meta_underlined: + +- :ref:`bool` **is_meta_underlined** **(** **)** const + +.. _class_RichTextLabel_set_scroll_active: + +- void **set_scroll_active** **(** :ref:`bool` active **)** + +.. _class_RichTextLabel_is_scroll_active: + +- :ref:`bool` **is_scroll_active** **(** **)** const + +.. _class_RichTextLabel_set_scroll_follow: + +- void **set_scroll_follow** **(** :ref:`bool` follow **)** + +.. _class_RichTextLabel_is_scroll_following: + +- :ref:`bool` **is_scroll_following** **(** **)** const + +.. _class_RichTextLabel_get_v_scroll: + +- :ref:`Object` **get_v_scroll** **(** **)** + +.. _class_RichTextLabel_scroll_to_line: + +- void **scroll_to_line** **(** :ref:`int` line **)** + +.. _class_RichTextLabel_set_tab_size: + +- void **set_tab_size** **(** :ref:`int` spaces **)** + +.. _class_RichTextLabel_get_tab_size: + +- :ref:`int` **get_tab_size** **(** **)** const + +.. _class_RichTextLabel_set_selection_enabled: + +- void **set_selection_enabled** **(** :ref:`bool` enabled **)** + +Set to true if selecting the text inside this richtext is allowed. + +.. _class_RichTextLabel_is_selection_enabled: + +- :ref:`bool` **is_selection_enabled** **(** **)** const + +Return true if selecting the text inside this richtext is allowed. + +.. _class_RichTextLabel_parse_bbcode: + +- :ref:`int` **parse_bbcode** **(** :ref:`String` bbcode **)** + +.. _class_RichTextLabel_append_bbcode: + +- :ref:`int` **append_bbcode** **(** :ref:`String` bbcode **)** + +.. _class_RichTextLabel_set_bbcode: + +- void **set_bbcode** **(** :ref:`String` text **)** + +.. _class_RichTextLabel_get_bbcode: + +- :ref:`String` **get_bbcode** **(** **)** const + +.. _class_RichTextLabel_set_visible_characters: + +- void **set_visible_characters** **(** :ref:`int` amount **)** + +.. _class_RichTextLabel_get_visible_characters: + +- :ref:`int` **get_visible_characters** **(** **)** const + +.. _class_RichTextLabel_get_total_character_count: + +- :ref:`int` **get_total_character_count** **(** **)** const + +.. _class_RichTextLabel_set_use_bbcode: + +- void **set_use_bbcode** **(** :ref:`bool` enable **)** + +.. _class_RichTextLabel_is_using_bbcode: + +- :ref:`bool` **is_using_bbcode** **(** **)** const + + diff --git a/classes/class_rid.rst b/classes/class_rid.rst new file mode 100644 index 000000000..33a70dc6c --- /dev/null +++ b/classes/class_rid.rst @@ -0,0 +1,34 @@ +.. _class_RID: + +RID +=== + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------+--------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_id` **(** **)** | ++------------------------+--------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`RID` **(** :ref:`Object` from **)** | ++------------------------+--------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_RID_get_id: + +- :ref:`int` **get_id** **(** **)** + +.. _class_RID_RID: + +- :ref:`RID` **RID** **(** :ref:`Object` from **)** + + diff --git a/classes/class_rigidbody.rst b/classes/class_rigidbody.rst new file mode 100644 index 000000000..a5f54c6a4 --- /dev/null +++ b/classes/class_rigidbody.rst @@ -0,0 +1,269 @@ +.. _class_RigidBody: + +RigidBody +========= + +Inherits: :ref:`PhysicsBody` +----------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_integrate_forces` **(** :ref:`PhysicsDirectBodyState` state **)** virtual | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_mode` **(** :ref:`int` mode **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_mode` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_mass` **(** :ref:`float` mass **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_mass` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_weight` **(** :ref:`float` weight **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_weight` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_friction` **(** :ref:`float` friction **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_friction` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_bounce` **(** :ref:`float` bounce **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_bounce` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_linear_velocity` **(** :ref:`Vector3` linear_velocity **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_linear_velocity` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_angular_velocity` **(** :ref:`Vector3` angular_velocity **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_angular_velocity` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_gravity_scale` **(** :ref:`float` gravity_scale **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_gravity_scale` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_linear_damp` **(** :ref:`float` linear_damp **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_linear_damp` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_angular_damp` **(** :ref:`float` angular_damp **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_angular_damp` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_max_contacts_reported` **(** :ref:`int` amount **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_max_contacts_reported` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_use_custom_integrator` **(** :ref:`bool` enable **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_using_custom_integrator` **(** **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_contact_monitor` **(** :ref:`bool` enabled **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_contact_monitor_enabled` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_use_continuous_collision_detection` **(** :ref:`bool` enable **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_using_continuous_collision_detection` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_axis_velocity` **(** :ref:`Vector3` axis_velocity **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`apply_impulse` **(** :ref:`Vector3` pos, :ref:`Vector3` impulse **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_sleeping` **(** :ref:`bool` sleeping **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_sleeping` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_can_sleep` **(** :ref:`bool` able_to_sleep **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_able_to_sleep` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_axis_lock` **(** :ref:`int` axis_lock **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_axis_lock` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_colliding_bodies` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **body_enter** **(** :ref:`Object` body **)** +- **body_enter_shape** **(** :ref:`int` body_id, :ref:`Object` body, :ref:`int` body_shape, :ref:`int` local_shape **)** +- **body_exit** **(** :ref:`Object` body **)** +- **body_exit_shape** **(** :ref:`int` body_id, :ref:`Object` body, :ref:`int` body_shape, :ref:`int` local_shape **)** + +Numeric Constants +----------------- + +- **MODE_STATIC** = **1** +- **MODE_KINEMATIC** = **3** +- **MODE_RIGID** = **0** +- **MODE_CHARACTER** = **2** + +Member Function Description +--------------------------- + +.. _class_RigidBody__integrate_forces: + +- void **_integrate_forces** **(** :ref:`PhysicsDirectBodyState` state **)** virtual + +.. _class_RigidBody_set_mode: + +- void **set_mode** **(** :ref:`int` mode **)** + +.. _class_RigidBody_get_mode: + +- :ref:`int` **get_mode** **(** **)** const + +.. _class_RigidBody_set_mass: + +- void **set_mass** **(** :ref:`float` mass **)** + +.. _class_RigidBody_get_mass: + +- :ref:`float` **get_mass** **(** **)** const + +.. _class_RigidBody_set_weight: + +- void **set_weight** **(** :ref:`float` weight **)** + +.. _class_RigidBody_get_weight: + +- :ref:`float` **get_weight** **(** **)** const + +.. _class_RigidBody_set_friction: + +- void **set_friction** **(** :ref:`float` friction **)** + +.. _class_RigidBody_get_friction: + +- :ref:`float` **get_friction** **(** **)** const + +.. _class_RigidBody_set_bounce: + +- void **set_bounce** **(** :ref:`float` bounce **)** + +.. _class_RigidBody_get_bounce: + +- :ref:`float` **get_bounce** **(** **)** const + +.. _class_RigidBody_set_linear_velocity: + +- void **set_linear_velocity** **(** :ref:`Vector3` linear_velocity **)** + +.. _class_RigidBody_get_linear_velocity: + +- :ref:`Vector3` **get_linear_velocity** **(** **)** const + +.. _class_RigidBody_set_angular_velocity: + +- void **set_angular_velocity** **(** :ref:`Vector3` angular_velocity **)** + +.. _class_RigidBody_get_angular_velocity: + +- :ref:`Vector3` **get_angular_velocity** **(** **)** const + +.. _class_RigidBody_set_gravity_scale: + +- void **set_gravity_scale** **(** :ref:`float` gravity_scale **)** + +.. _class_RigidBody_get_gravity_scale: + +- :ref:`float` **get_gravity_scale** **(** **)** const + +.. _class_RigidBody_set_linear_damp: + +- void **set_linear_damp** **(** :ref:`float` linear_damp **)** + +.. _class_RigidBody_get_linear_damp: + +- :ref:`float` **get_linear_damp** **(** **)** const + +.. _class_RigidBody_set_angular_damp: + +- void **set_angular_damp** **(** :ref:`float` angular_damp **)** + +.. _class_RigidBody_get_angular_damp: + +- :ref:`float` **get_angular_damp** **(** **)** const + +.. _class_RigidBody_set_max_contacts_reported: + +- void **set_max_contacts_reported** **(** :ref:`int` amount **)** + +.. _class_RigidBody_get_max_contacts_reported: + +- :ref:`int` **get_max_contacts_reported** **(** **)** const + +.. _class_RigidBody_set_use_custom_integrator: + +- void **set_use_custom_integrator** **(** :ref:`bool` enable **)** + +.. _class_RigidBody_is_using_custom_integrator: + +- :ref:`bool` **is_using_custom_integrator** **(** **)** + +.. _class_RigidBody_set_contact_monitor: + +- void **set_contact_monitor** **(** :ref:`bool` enabled **)** + +.. _class_RigidBody_is_contact_monitor_enabled: + +- :ref:`bool` **is_contact_monitor_enabled** **(** **)** const + +.. _class_RigidBody_set_use_continuous_collision_detection: + +- void **set_use_continuous_collision_detection** **(** :ref:`bool` enable **)** + +.. _class_RigidBody_is_using_continuous_collision_detection: + +- :ref:`bool` **is_using_continuous_collision_detection** **(** **)** const + +.. _class_RigidBody_set_axis_velocity: + +- void **set_axis_velocity** **(** :ref:`Vector3` axis_velocity **)** + +.. _class_RigidBody_apply_impulse: + +- void **apply_impulse** **(** :ref:`Vector3` pos, :ref:`Vector3` impulse **)** + +.. _class_RigidBody_set_sleeping: + +- void **set_sleeping** **(** :ref:`bool` sleeping **)** + +.. _class_RigidBody_is_sleeping: + +- :ref:`bool` **is_sleeping** **(** **)** const + +.. _class_RigidBody_set_can_sleep: + +- void **set_can_sleep** **(** :ref:`bool` able_to_sleep **)** + +.. _class_RigidBody_is_able_to_sleep: + +- :ref:`bool` **is_able_to_sleep** **(** **)** const + +.. _class_RigidBody_set_axis_lock: + +- void **set_axis_lock** **(** :ref:`int` axis_lock **)** + +.. _class_RigidBody_get_axis_lock: + +- :ref:`int` **get_axis_lock** **(** **)** const + +.. _class_RigidBody_get_colliding_bodies: + +- :ref:`Array` **get_colliding_bodies** **(** **)** const + + diff --git a/classes/class_rigidbody2d.rst b/classes/class_rigidbody2d.rst new file mode 100644 index 000000000..bcbee426e --- /dev/null +++ b/classes/class_rigidbody2d.rst @@ -0,0 +1,369 @@ +.. _class_RigidBody2D: + +RigidBody2D +=========== + +Inherits: :ref:`PhysicsBody2D` +--------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Rigid body 2D node. + +Member Functions +---------------- + ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_integrate_forces` **(** :ref:`Physics2DDirectBodyState` state **)** virtual | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_mode` **(** :ref:`int` mode **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_mode` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_mass` **(** :ref:`float` mass **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_mass` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_weight` **(** :ref:`float` weight **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_weight` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_friction` **(** :ref:`float` friction **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_friction` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_bounce` **(** :ref:`float` bounce **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_bounce` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_gravity_scale` **(** :ref:`float` gravity_scale **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_gravity_scale` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_linear_damp` **(** :ref:`float` linear_damp **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_linear_damp` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_angular_damp` **(** :ref:`float` angular_damp **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_angular_damp` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_linear_velocity` **(** :ref:`Vector2` linear_velocity **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_linear_velocity` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_angular_velocity` **(** :ref:`float` angular_velocity **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_angular_velocity` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_max_contacts_reported` **(** :ref:`int` amount **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_max_contacts_reported` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_use_custom_integrator` **(** :ref:`bool` enable **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_using_custom_integrator` **(** **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_contact_monitor` **(** :ref:`bool` enabled **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_contact_monitor_enabled` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_continuous_collision_detection_mode` **(** :ref:`int` mode **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_continuous_collision_detection_mode` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_axis_velocity` **(** :ref:`Vector2` axis_velocity **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`apply_impulse` **(** :ref:`Vector2` pos, :ref:`Vector2` impulse **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_applied_force` **(** :ref:`Vector2` force **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_applied_force` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_sleeping` **(** :ref:`bool` sleeping **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_sleeping` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_can_sleep` **(** :ref:`bool` able_to_sleep **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_able_to_sleep` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`test_motion` **(** :ref:`Vector2` motion, :ref:`float` margin=0.08, :ref:`Physics2DTestMotionResult` result=NULL **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_colliding_bodies` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **body_enter** **(** :ref:`Object` body **)** +- **body_enter_shape** **(** :ref:`int` body_id, :ref:`Object` body, :ref:`int` body_shape, :ref:`int` local_shape **)** +- **body_exit** **(** :ref:`Object` body **)** +- **body_exit_shape** **(** :ref:`int` body_id, :ref:`Object` body, :ref:`int` body_shape, :ref:`int` local_shape **)** + +Numeric Constants +----------------- + +- **MODE_STATIC** = **1** --- Static mode. The body behaves like a :ref:`StaticBody2D`, and can only move by user code. +- **MODE_KINEMATIC** = **3** --- Kinematic body. The body behaves like a :ref:`KinematicBody2D`, and can only move by user code. +- **MODE_RIGID** = **0** --- Rigid body. This is the "natural" state of a rigid body. It is affected by forces, and can move, rotate, and be affected by user code. +- **MODE_CHARACTER** = **2** --- Character body. This behaves like a rigid body, but can not rotate. +- **CCD_MODE_DISABLED** = **0** --- Disables continuous collision detection. This is the fastest way to detect body collisions, but can miss small, fast-moving objects. +- **CCD_MODE_CAST_RAY** = **1** --- Enables continuous collision detection by raycasting. It is faster than shapecasting, but less precise. +- **CCD_MODE_CAST_SHAPE** = **2** --- Enables continuous collision detection by shapecasting. It is the slowest CCD method, and the most precise. + +Description +----------- + +Rigid body 2D node. This node is used for placing rigid bodies in the scene. It can contain a number of shapes, and also shift state between regular Rigid body, Kinematic, Character or Static. + +Character mode forbids the node from being rotated. This node can have a custom force integrator function, for writing complex physics motion behavior per node. + +As a warning, don't change this node position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop will yield strange behavior. + +Member Function Description +--------------------------- + +.. _class_RigidBody2D__integrate_forces: + +- void **_integrate_forces** **(** :ref:`Physics2DDirectBodyState` state **)** virtual + +Override this function to use a custom force integrator. This allows to hook up to the physics processing and alter the simulation state for the object on every frame. + +.. _class_RigidBody2D_set_mode: + +- void **set_mode** **(** :ref:`int` mode **)** + +Set the body mode, from the MODE_* enum. This allows to change to a static body or a character body. + +.. _class_RigidBody2D_get_mode: + +- :ref:`int` **get_mode** **(** **)** const + +Return the current body mode, see :ref:`set_mode`. + +.. _class_RigidBody2D_set_mass: + +- void **set_mass** **(** :ref:`float` mass **)** + +Set the body mass. + +.. _class_RigidBody2D_get_mass: + +- :ref:`float` **get_mass** **(** **)** const + +Return the body mass. + +.. _class_RigidBody2D_set_weight: + +- void **set_weight** **(** :ref:`float` weight **)** + +Set the body weight given standard earth-weight (gravity 9.8). Not really useful for 2D since most measures for this node are in pixels. + +.. _class_RigidBody2D_get_weight: + +- :ref:`float` **get_weight** **(** **)** const + +Return the body weight given standard earth-weight (gravity 9.8). + +.. _class_RigidBody2D_set_friction: + +- void **set_friction** **(** :ref:`float` friction **)** + +Set the body friction, from 0 (frictionless) to 1 (full friction). + +.. _class_RigidBody2D_get_friction: + +- :ref:`float` **get_friction** **(** **)** const + +Return the body friction. + +.. _class_RigidBody2D_set_bounce: + +- void **set_bounce** **(** :ref:`float` bounce **)** + +Set the body bounciness, from 0 (no bounce) to 1 (full bounce). + +.. _class_RigidBody2D_get_bounce: + +- :ref:`float` **get_bounce** **(** **)** const + +Return the body bounciness. + +.. _class_RigidBody2D_set_gravity_scale: + +- void **set_gravity_scale** **(** :ref:`float` gravity_scale **)** + +Set The gravity factor. This factor multiplies gravity intensity just for this body. + +.. _class_RigidBody2D_get_gravity_scale: + +- :ref:`float` **get_gravity_scale** **(** **)** const + +Return the gravity factor. + +.. _class_RigidBody2D_set_linear_damp: + +- void **set_linear_damp** **(** :ref:`float` linear_damp **)** + +Set the linear damp for this body. If this value is different from -1, any linear damp derived from the world or areas will be overriden. + +.. _class_RigidBody2D_get_linear_damp: + +- :ref:`float` **get_linear_damp** **(** **)** const + +Return the linear damp for this body. + +.. _class_RigidBody2D_set_angular_damp: + +- void **set_angular_damp** **(** :ref:`float` angular_damp **)** + +Set the angular damp for this body. If this value is different from -1, any angular damp derived from the world or areas will be overriden. + +.. _class_RigidBody2D_get_angular_damp: + +- :ref:`float` **get_angular_damp** **(** **)** const + +Return the angular damp for this body. + +.. _class_RigidBody2D_set_linear_velocity: + +- void **set_linear_velocity** **(** :ref:`Vector2` linear_velocity **)** + +Set the body linear velocity. Can be used sporadically, but** DONT SET THIS IN EVERY FRAME **, because physics may be running in another thread and definitely runs at a different granularity. Use :ref:`_integrate_forces` as your process loop if you want to have precise control of the body state. + +.. _class_RigidBody2D_get_linear_velocity: + +- :ref:`Vector2` **get_linear_velocity** **(** **)** const + +Return the body linear velocity. This changes by physics granularity. See :ref:`set_linear_velocity`. + +.. _class_RigidBody2D_set_angular_velocity: + +- void **set_angular_velocity** **(** :ref:`float` angular_velocity **)** + +Set the body angular velocity. Can be used sporadically, but** DONT SET THIS IN EVERY FRAME **, because physics may be running in another thread and definitely runs at a different granularity. Use :ref:`_integrate_forces` as your process loop if you want to have precise control of the body state. + +.. _class_RigidBody2D_get_angular_velocity: + +- :ref:`float` **get_angular_velocity** **(** **)** const + +Return the body angular velocity. This changes by physics granularity. See :ref:`set_angular_velocity`. + +.. _class_RigidBody2D_set_max_contacts_reported: + +- void **set_max_contacts_reported** **(** :ref:`int` amount **)** + +Set the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. + +.. _class_RigidBody2D_get_max_contacts_reported: + +- :ref:`int` **get_max_contacts_reported** **(** **)** const + +Return the maximum contacts that can be reported. See :ref:`set_max_contacts_reported`. + +.. _class_RigidBody2D_set_use_custom_integrator: + +- void **set_use_custom_integrator** **(** :ref:`bool` enable **)** + +Set to true if the body shall not do any internal force integration at all (like gravity or air friction). Only the :ref:`_integrate_forces` will be able to integrate them if overrided. + +.. _class_RigidBody2D_is_using_custom_integrator: + +- :ref:`bool` **is_using_custom_integrator** **(** **)** + +Return true if the body is not doing any built-in force integration. + +.. _class_RigidBody2D_set_contact_monitor: + +- void **set_contact_monitor** **(** :ref:`bool` enabled **)** + +Enable contact monitoring. This allows the body to emit signals when it collides with another. + +.. _class_RigidBody2D_is_contact_monitor_enabled: + +- :ref:`bool` **is_contact_monitor_enabled** **(** **)** const + +Return whether contact monitoring is enabled. + +.. _class_RigidBody2D_set_continuous_collision_detection_mode: + +- void **set_continuous_collision_detection_mode** **(** :ref:`int` mode **)** + +Set the continuous collision detection mode from the enum CCD_MODE_*. + +Coninuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. The first is more precise, and misses less impacts by small, fast-moving objects. The second is faster to compute, but can miss small, fat-moving objects. + +.. _class_RigidBody2D_get_continuous_collision_detection_mode: + +- :ref:`int` **get_continuous_collision_detection_mode** **(** **)** const + +Return whether this body is using continuous collision detection. + +.. _class_RigidBody2D_set_axis_velocity: + +- void **set_axis_velocity** **(** :ref:`Vector2` axis_velocity **)** + +Set an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. + +.. _class_RigidBody2D_apply_impulse: + +- void **apply_impulse** **(** :ref:`Vector2` pos, :ref:`Vector2` impulse **)** + +Apply a positioned impulse (which will be affected by the body mass and shape). This is the equivalent of hitting a billiard ball with a cue: a force that is applied once, and only once. + +.. _class_RigidBody2D_set_applied_force: + +- void **set_applied_force** **(** :ref:`Vector2` force **)** + +Set the applied force vector. This is the equivalent of pushing a box over the ground: the force applied is applied constantly. + +.. _class_RigidBody2D_get_applied_force: + +- :ref:`Vector2` **get_applied_force** **(** **)** const + +Return the applied force vector. + +.. _class_RigidBody2D_set_sleeping: + +- void **set_sleeping** **(** :ref:`bool` sleeping **)** + +Set whether a body is isleeping or not. Sleeping bodies are not affected by forces until a collision or an :ref:`apply_impulse`/:ref:`set_applied_force` wakes them up. Until then, they behave like a static body. + +.. _class_RigidBody2D_is_sleeping: + +- :ref:`bool` **is_sleeping** **(** **)** const + +Return whether the body is sleeping. + +.. _class_RigidBody2D_set_can_sleep: + +- void **set_can_sleep** **(** :ref:`bool` able_to_sleep **)** + +Set the body ability to fall asleep when not moving. This saves an enormous amount of processor time when there are plenty of rigid bodies (non static) in a scene. + +Sleeping bodies are not affected by forces until a collision or an :ref:`apply_impulse`/:ref:`set_applied_force` wakes them up. Until then, they behave like a static body. + +.. _class_RigidBody2D_is_able_to_sleep: + +- :ref:`bool` **is_able_to_sleep** **(** **)** const + +Return true if the body has the ability to fall asleep when not moving. See :ref:`set_can_sleep`. + +.. _class_RigidBody2D_test_motion: + +- :ref:`bool` **test_motion** **(** :ref:`Vector2` motion, :ref:`float` margin=0.08, :ref:`Physics2DTestMotionResult` result=NULL **)** + +Return whether the body would collide, if it tried to move in the given vector. This method allows two extra parameters: A margin, which increases slightly the size of the shapes involved in the collision detection, and an object of type :ref:`Physics2DTestMotionResult`, which will store additional information about the collision (should there be one). + +.. _class_RigidBody2D_get_colliding_bodies: + +- :ref:`Array` **get_colliding_bodies** **(** **)** const + +Return a list of the bodies colliding with this one. + + diff --git a/classes/class_room.rst b/classes/class_room.rst new file mode 100644 index 000000000..1111813b2 --- /dev/null +++ b/classes/class_room.rst @@ -0,0 +1,60 @@ +.. _class_Room: + +Room +==== + +Inherits: :ref:`VisualInstance` +----------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Room data resource. + +Member Functions +---------------- + ++--------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_room` **(** :ref:`Room` room **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`Room` | :ref:`get_room` **(** **)** const | ++--------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`compute_room_from_subtree` **(** **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_simulate_acoustics` **(** :ref:`bool` enable **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_simulating_acoustics` **(** **)** const | ++--------------------------+---------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Room contains the data to define the bounds of a scene (using a BSP Tree). It is instanced by a :ref:`RoomInstance` node to create rooms. See that class documentation for more information about rooms. + +Member Function Description +--------------------------- + +.. _class_Room_set_room: + +- void **set_room** **(** :ref:`Room` room **)** + +.. _class_Room_get_room: + +- :ref:`Room` **get_room** **(** **)** const + +.. _class_Room_compute_room_from_subtree: + +- void **compute_room_from_subtree** **(** **)** + +.. _class_Room_set_simulate_acoustics: + +- void **set_simulate_acoustics** **(** :ref:`bool` enable **)** + +.. _class_Room_is_simulating_acoustics: + +- :ref:`bool` **is_simulating_acoustics** **(** **)** const + + diff --git a/classes/class_roombounds.rst b/classes/class_roombounds.rst new file mode 100644 index 000000000..410ece7da --- /dev/null +++ b/classes/class_roombounds.rst @@ -0,0 +1,61 @@ +.. _class_RoomBounds: + +RoomBounds +========== + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_bounds` **(** :ref:`Dictionary` bsp_tree **)** | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`get_bounds` **(** **)** const | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_geometry_hint` **(** :ref:`Vector3Array` triangles **)** | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3Array` | :ref:`get_geometry_hint` **(** **)** const | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`regenerate_bsp` **(** **)** | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`regenerate_bsp_cubic` **(** **)** | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_RoomBounds_set_bounds: + +- void **set_bounds** **(** :ref:`Dictionary` bsp_tree **)** + +.. _class_RoomBounds_get_bounds: + +- :ref:`Dictionary` **get_bounds** **(** **)** const + +.. _class_RoomBounds_set_geometry_hint: + +- void **set_geometry_hint** **(** :ref:`Vector3Array` triangles **)** + +.. _class_RoomBounds_get_geometry_hint: + +- :ref:`Vector3Array` **get_geometry_hint** **(** **)** const + +.. _class_RoomBounds_regenerate_bsp: + +- void **regenerate_bsp** **(** **)** + +.. _class_RoomBounds_regenerate_bsp_cubic: + +- void **regenerate_bsp_cubic** **(** **)** + + diff --git a/classes/class_sample.rst b/classes/class_sample.rst new file mode 100644 index 000000000..a65259633 --- /dev/null +++ b/classes/class_sample.rst @@ -0,0 +1,162 @@ +.. _class_Sample: + +Sample +====== + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Audio sample (sound) class. + +Member Functions +---------------- + ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`create` **(** :ref:`int` format, :ref:`bool` stereo, :ref:`int` length **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_format` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_stereo` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_length` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_data` **(** :ref:`RawArray` data **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RawArray` | :ref:`get_data` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_mix_rate` **(** :ref:`int` hz **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_mix_rate` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_loop_format` **(** :ref:`int` format **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_loop_format` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_loop_begin` **(** :ref:`int` pos **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_loop_begin` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_loop_end` **(** :ref:`int` pos **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_loop_end` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **FORMAT_PCM8** = **0** --- 8-bits signed PCM audio. +- **FORMAT_PCM16** = **1** --- 16-bits signed little endian PCM audio. +- **FORMAT_IMA_ADPCM** = **2** --- IMA-ADPCM Audio. +- **LOOP_NONE** = **0** --- No loop enabled. +- **LOOP_FORWARD** = **1** --- Forward looping (when playback reaches loop end, goes back to loop begin). +- **LOOP_PING_PONG** = **2** --- Ping-pong looping (when playback reaches loop end, plays backward until loop begin). Not available in all platforms. + +Description +----------- + +Sample provides an audio sample class, containing audio data, together with some information for playback, such as format, mix rate and loop. It is used by sound playback routines. + +Member Function Description +--------------------------- + +.. _class_Sample_create: + +- void **create** **(** :ref:`int` format, :ref:`bool` stereo, :ref:`int` length **)** + +Create new data for the sample, with format (see FORMAT_* constants), stereo hint, and length in samples (not bytes). + +Calling this method overrides previously existing data. Stereo samples are interleaved pairs of left and right points (in that order), but count as one sample for length purposes. + +.. _class_Sample_get_format: + +- :ref:`int` **get_format** **(** **)** const + +Return the sample format. + +.. _class_Sample_is_stereo: + +- :ref:`bool` **is_stereo** **(** **)** const + +Return whether the current sample was created as stereo. + +.. _class_Sample_get_length: + +- :ref:`int` **get_length** **(** **)** const + +Return the sample length in samples. Stereo samples count as one, even if they are made of a left and a right sample. + +.. _class_Sample_set_data: + +- void **set_data** **(** :ref:`RawArray` data **)** + +Set sample data. Data must be little endian, no matter the host platform, and exactly as long as to fit all samples. The length of this array can be calculated as follows: + +Get the sample length (:ref:`get_length`). + +If the sample format is FORMAT_PCM16, multiply it by 2. + +If the sample format is FORMAT_IMA_ADPCM, divide it by 2 (rounding any fraction up), then add 4. + +If the sample is stereo (:ref:`is_stereo`), multiply it by 2. + +.. _class_Sample_get_data: + +- :ref:`RawArray` **get_data** **(** **)** const + +Return sample data as little endian. + +.. _class_Sample_set_mix_rate: + +- void **set_mix_rate** **(** :ref:`int` hz **)** + +Set the mix rate for the sample (expected playback frequency). + +.. _class_Sample_get_mix_rate: + +- :ref:`int` **get_mix_rate** **(** **)** const + +Return the mix rate for the sample. + +.. _class_Sample_set_loop_format: + +- void **set_loop_format** **(** :ref:`int` format **)** + +Set the loop format (use LOOP_* constants as argument). + +.. _class_Sample_get_loop_format: + +- :ref:`int` **get_loop_format** **(** **)** const + +Return the loop format. + +.. _class_Sample_set_loop_begin: + +- void **set_loop_begin** **(** :ref:`int` pos **)** + +Set the loop begin position. It must be a valid frame and less than the loop end position. + +.. _class_Sample_get_loop_begin: + +- :ref:`int` **get_loop_begin** **(** **)** const + +Return the loop begin position. + +.. _class_Sample_set_loop_end: + +- void **set_loop_end** **(** :ref:`int` pos **)** + +Set the loop end position. It must be a valid frame and greater than the loop begin position. + +.. _class_Sample_get_loop_end: + +- :ref:`int` **get_loop_end** **(** **)** const + +Return the loop end position. + + diff --git a/classes/class_samplelibrary.rst b/classes/class_samplelibrary.rst new file mode 100644 index 000000000..c05ec87ce --- /dev/null +++ b/classes/class_samplelibrary.rst @@ -0,0 +1,94 @@ +.. _class_SampleLibrary: + +SampleLibrary +============= + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Library that contains a collection of samples. + +Member Functions +---------------- + ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_sample` **(** :ref:`String` name, :ref:`Sample` sample **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Sample` | :ref:`get_sample` **(** :ref:`String` name **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_sample` **(** :ref:`String` name **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_sample` **(** :ref:`String` name **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`sample_set_volume_db` **(** :ref:`String` name, :ref:`float` db **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`sample_get_volume_db` **(** :ref:`String` name **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`sample_set_pitch_scale` **(** :ref:`String` name, :ref:`float` pitch **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`sample_get_pitch_scale` **(** :ref:`String` name **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Library that contains a collection of :ref:`Sample`s, each identified by a text ID. This is used as a data container for the majority of the SamplePlayer classes and derivatives. + +Member Function Description +--------------------------- + +.. _class_SampleLibrary_add_sample: + +- void **add_sample** **(** :ref:`String` name, :ref:`Sample` sample **)** + +Add a sample to the library, with a given text ID. + +.. _class_SampleLibrary_get_sample: + +- :ref:`Sample` **get_sample** **(** :ref:`String` name **)** const + +Return the sample from the library matching the given text ID. Return null if the sample is not found. + +.. _class_SampleLibrary_has_sample: + +- :ref:`bool` **has_sample** **(** :ref:`String` name **)** const + +Return true if the sample text ID exists in the library. + +.. _class_SampleLibrary_remove_sample: + +- void **remove_sample** **(** :ref:`String` name **)** + +Remove the sample matching the given text ID. + +.. _class_SampleLibrary_sample_set_volume_db: + +- void **sample_set_volume_db** **(** :ref:`String` name, :ref:`float` db **)** + +Set the volume (in dB) for the given sample. + +.. _class_SampleLibrary_sample_get_volume_db: + +- :ref:`float` **sample_get_volume_db** **(** :ref:`String` name **)** const + +Return the volume (in dB) for the given sample. + +.. _class_SampleLibrary_sample_set_pitch_scale: + +- void **sample_set_pitch_scale** **(** :ref:`String` name, :ref:`float` pitch **)** + +Set the pitch scale for the given sample. + +.. _class_SampleLibrary_sample_get_pitch_scale: + +- :ref:`float` **sample_get_pitch_scale** **(** :ref:`String` name **)** const + +Return the pitch scale for the given sample. + + diff --git a/classes/class_sampleplayer.rst b/classes/class_sampleplayer.rst new file mode 100644 index 000000000..4ceff2d54 --- /dev/null +++ b/classes/class_sampleplayer.rst @@ -0,0 +1,478 @@ +.. _class_SamplePlayer: + +SamplePlayer +============ + +Inherits: :ref:`Node` +--------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Sample Player node. + +Member Functions +---------------- + ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_sample_library` **(** :ref:`SampleLibrary` library **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`SampleLibrary` | :ref:`get_sample_library` **(** **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_polyphony` **(** :ref:`int` max_voices **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_polyphony` **(** **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`play` **(** :ref:`String` name, :ref:`bool` unique=false **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`stop` **(** :ref:`int` voice **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`stop_all` **(** **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_mix_rate` **(** :ref:`int` voice, :ref:`int` hz **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_pitch_scale` **(** :ref:`int` voice, :ref:`float` ratio **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_volume` **(** :ref:`int` voice, :ref:`float` volume **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_volume_db` **(** :ref:`int` voice, :ref:`float` db **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_pan` **(** :ref:`int` voice, :ref:`float` pan, :ref:`float` depth=0, :ref:`float` height=0 **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_filter` **(** :ref:`int` voice, :ref:`int` type, :ref:`float` cutoff_hz, :ref:`float` resonance, :ref:`float` gain=0 **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_chorus` **(** :ref:`int` voice, :ref:`float` send **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_reverb` **(** :ref:`int` voice, :ref:`int` room_type, :ref:`float` send **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_mix_rate` **(** :ref:`int` voice **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_pitch_scale` **(** :ref:`int` voice **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_volume` **(** :ref:`int` voice **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_volume_db` **(** :ref:`int` voice **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_pan` **(** :ref:`int` voice **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_pan_depth` **(** :ref:`int` voice **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_pan_height` **(** :ref:`int` voice **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_filter_type` **(** :ref:`int` voice **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_filter_cutoff` **(** :ref:`int` voice **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_filter_resonance` **(** :ref:`int` voice **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_filter_gain` **(** :ref:`int` voice **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_chorus` **(** :ref:`int` voice **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_reverb_room` **(** :ref:`int` voice **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_reverb` **(** :ref:`int` voice **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_default_pitch_scale` **(** :ref:`float` ratio **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_default_volume` **(** :ref:`float` volume **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_default_volume_db` **(** :ref:`float` db **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_default_pan` **(** :ref:`float` pan, :ref:`float` depth=0, :ref:`float` height=0 **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_default_filter` **(** :ref:`int` type, :ref:`float` cutoff_hz, :ref:`float` resonance, :ref:`float` gain=0 **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_default_chorus` **(** :ref:`float` send **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_default_reverb` **(** :ref:`int` room_type, :ref:`float` send **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_default_pitch_scale` **(** **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_default_volume` **(** **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_default_volume_db` **(** **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_default_pan` **(** **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_default_pan_depth` **(** **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_default_pan_height` **(** **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_default_filter_type` **(** **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_default_filter_cutoff` **(** **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_default_filter_resonance` **(** **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_default_filter_gain` **(** **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_default_chorus` **(** **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_default_reverb_room` **(** **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_default_reverb` **(** **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_active` **(** **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_voice_active` **(** :ref:`int` voice **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **FILTER_NONE** = **0** --- Filter is disabled for voice. +- **FILTER_LOWPASS** = **1** --- Low-pass filter is used for voice. +- **FILTER_BANDPASS** = **2** --- Band-pass filter is used for voice. +- **FILTER_HIPASS** = **3** --- High-pass filter is used for voice. +- **FILTER_NOTCH** = **4** --- Notch (band reject) filter is used for voice. +- **FILTER_PEAK** = **5** --- Peak (exclusive band) filter is used for voice. +- **FILTER_BANDLIMIT** = **6** --- Band-limit filter is used for voice, in this case resonance is the high-pass cutoff. A band-limit filter has a different frequency response than a notch filter, but otherwise both are band-rejecting filters. +- **FILTER_LOW_SHELF** = **7** --- Low-shelf filter is used for voice. +- **FILTER_HIGH_SHELF** = **8** --- High-shelf filter is used for voice. +- **REVERB_SMALL** = **0** --- Small reverberation room (house room). +- **REVERB_MEDIUM** = **1** --- Medium reverberation room (street) +- **REVERB_LARGE** = **2** --- Large reverberation room (theatre) +- **REVERB_HALL** = **3** --- Huge reverberation room (cathedral, warehouse). +- **INVALID_VOICE_ID** = **-1** --- Value returned if the voice ID is invalid. + +Description +----------- + +SamplePlayer is a :ref:`Node` meant for simple sample playback. A library of samples is loaded and played back "as is", without positioning or anything. + +Member Function Description +--------------------------- + +.. _class_SamplePlayer_set_sample_library: + +- void **set_sample_library** **(** :ref:`SampleLibrary` library **)** + +Set the sample library for the player. + +.. _class_SamplePlayer_get_sample_library: + +- :ref:`SampleLibrary` **get_sample_library** **(** **)** const + +Return the sample library used by the player. + +.. _class_SamplePlayer_set_polyphony: + +- void **set_polyphony** **(** :ref:`int` max_voices **)** + +Set the polyphony of the player (maximum amount of simultaneous voices). + +.. _class_SamplePlayer_get_polyphony: + +- :ref:`int` **get_polyphony** **(** **)** const + +Return the polyphony of the player. + +.. _class_SamplePlayer_play: + +- :ref:`int` **play** **(** :ref:`String` name, :ref:`bool` unique=false **)** + +Play a sample referenced by its name. + +Optionally, the playback can be made "unique" to force stopping all other samples currently played. The voices allocated for playback will then be returned. + +.. _class_SamplePlayer_stop: + +- void **stop** **(** :ref:`int` voice **)** + +Stop a given voice. + +.. _class_SamplePlayer_stop_all: + +- void **stop_all** **(** **)** + +Stop all playing voices. + +.. _class_SamplePlayer_set_mix_rate: + +- void **set_mix_rate** **(** :ref:`int` voice, :ref:`int` hz **)** + +Set the mix rate (in Hz) of a given voice. + +.. _class_SamplePlayer_set_pitch_scale: + +- void **set_pitch_scale** **(** :ref:`int` voice, :ref:`float` ratio **)** + +Set the pitch scale of a given voice. A ratio of 1.0 is the normal scale. + +.. _class_SamplePlayer_set_volume: + +- void **set_volume** **(** :ref:`int` voice, :ref:`float` volume **)** + +Set the volume of a given voice using a linear scale. + +The "volume" argument should be a positive factor ranging from 0.0 (mute) up to 16.0 (i.e. 24 dB). + +A factor of 1.0 means that the voice will be played at normal system volume. Factors above 1.0 might be limited by the platform's audio output. + +.. _class_SamplePlayer_set_volume_db: + +- void **set_volume_db** **(** :ref:`int` voice, :ref:`float` db **)** + +Set the volume of a given voice in dB. + +The "dB" argument can range from -80 to 24 dB, 0 dB being the maximum volume. Every 6 dB (resp. -6 dB), the volume is increased (resp. reduced) by half. + +.. _class_SamplePlayer_set_pan: + +- void **set_pan** **(** :ref:`int` voice, :ref:`float` pan, :ref:`float` depth=0, :ref:`float` height=0 **)** + +Set the panning of a voice. Panning goes from -1.0 (left) to +1.0 (right). + +Optionally, for hardware than support 3D sound, one can also set depth and height (also in range -1.0 to +1.0). + +.. _class_SamplePlayer_set_filter: + +- void **set_filter** **(** :ref:`int` voice, :ref:`int` type, :ref:`float` cutoff_hz, :ref:`float` resonance, :ref:`float` gain=0 **)** + +Set the filter for a given voice, using the given type (see FILTER_* constants), cutoff frequency (from 20 to 16,384 Hz) and resonance (from 0 to 4.0). + +Optionally, a gain can also be given (from 0 to 2.0). + +.. _class_SamplePlayer_set_chorus: + +- void **set_chorus** **(** :ref:`int` voice, :ref:`float` send **)** + +Set the chorus send level of a voice (from 0 to 1.0). For setting chorus parameters, see :ref:`AudioServer`. + +.. _class_SamplePlayer_set_reverb: + +- void **set_reverb** **(** :ref:`int` voice, :ref:`int` room_type, :ref:`float` send **)** + +Set the reverberation type (see REVERB_* constants) and send level (from 0 to 1.0) of a voice. + +.. _class_SamplePlayer_get_mix_rate: + +- :ref:`int` **get_mix_rate** **(** :ref:`int` voice **)** const + +Return the current mix rate for a given voice. + +.. _class_SamplePlayer_get_pitch_scale: + +- :ref:`float` **get_pitch_scale** **(** :ref:`int` voice **)** const + +Return the current pitch scale for a given voice. + +.. _class_SamplePlayer_get_volume: + +- :ref:`float` **get_volume** **(** :ref:`int` voice **)** const + +Return the current volume (on a linear scale) for a given voice. + +.. _class_SamplePlayer_get_volume_db: + +- :ref:`float` **get_volume_db** **(** :ref:`int` voice **)** const + +Return the current volume (in dB) for a given voice. + +.. _class_SamplePlayer_get_pan: + +- :ref:`float` **get_pan** **(** :ref:`int` voice **)** const + +Return the current panning for a given voice. + +.. _class_SamplePlayer_get_pan_depth: + +- :ref:`float` **get_pan_depth** **(** :ref:`int` voice **)** const + +Return the current pan depth for a given voice. + +.. _class_SamplePlayer_get_pan_height: + +- :ref:`float` **get_pan_height** **(** :ref:`int` voice **)** const + +Return the current pan height for a given voice. + +.. _class_SamplePlayer_get_filter_type: + +- :ref:`int` **get_filter_type** **(** :ref:`int` voice **)** const + +Return the current filter type in use (see FILTER_* constants) for a given voice. + +.. _class_SamplePlayer_get_filter_cutoff: + +- :ref:`float` **get_filter_cutoff** **(** :ref:`int` voice **)** const + +Return the current filter cutoff frequency for a given voice. + +.. _class_SamplePlayer_get_filter_resonance: + +- :ref:`float` **get_filter_resonance** **(** :ref:`int` voice **)** const + +Return the current filter resonance for a given voice. + +.. _class_SamplePlayer_get_filter_gain: + +- :ref:`float` **get_filter_gain** **(** :ref:`int` voice **)** const + +Return the current filter gain for a given voice. + +.. _class_SamplePlayer_get_chorus: + +- :ref:`float` **get_chorus** **(** :ref:`int` voice **)** const + +Return the current chorus send level for a given voice. + +.. _class_SamplePlayer_get_reverb_room: + +- :ref:`int` **get_reverb_room** **(** :ref:`int` voice **)** const + +Return the current reverberation room type for a given voice (see REVERB_* enum). + +.. _class_SamplePlayer_get_reverb: + +- :ref:`float` **get_reverb** **(** :ref:`int` voice **)** const + +Return the current reverberation send level for a given voice. + +.. _class_SamplePlayer_set_default_pitch_scale: + +- void **set_default_pitch_scale** **(** :ref:`float` ratio **)** + +Set the default pitch scale of the player. A ratio of 1.0 is the normal scale. + +.. _class_SamplePlayer_set_default_volume: + +- void **set_default_volume** **(** :ref:`float` volume **)** + +Set the default volume of the player using a linear scale. + +The "volume" argument should be a positive factor ranging from 0.0 (mute) up to 16.0 (i.e. 24 dB). + +A factor of 1.0 means that the voice will be played at normal system volume. Factors above 1.0 might be limited by the platform's audio output. + +.. _class_SamplePlayer_set_default_volume_db: + +- void **set_default_volume_db** **(** :ref:`float` db **)** + +Set the default volume of the player in dB. + +The "dB" argument can range from -80 to 24 dB, 0 dB being the maximum volume. Every 6 dB (resp. -6 dB), the volume is increased (resp. reduced) by half. + +.. _class_SamplePlayer_set_default_pan: + +- void **set_default_pan** **(** :ref:`float` pan, :ref:`float` depth=0, :ref:`float` height=0 **)** + +Set the default panning of the player. Panning goes from -1.0 (left) to +1.0 (right). + +Optionally, for hardware than support 3D sound, one can also set depth and height (also in range -1.0 to +1.0). + +.. _class_SamplePlayer_set_default_filter: + +- void **set_default_filter** **(** :ref:`int` type, :ref:`float` cutoff_hz, :ref:`float` resonance, :ref:`float` gain=0 **)** + +Set the default filter for the player, using the given type (see FILTER_* constants), cutoff frequency (from 20 to 16,384 Hz) and resonance (from 0 to 4.0). + +Optionally, a gain can also be given (from 0 to 2.0). + +.. _class_SamplePlayer_set_default_chorus: + +- void **set_default_chorus** **(** :ref:`float` send **)** + +Set the default chorus send level of the player (from 0 to 1.0). For setting chorus parameters, see :ref:`AudioServer`. + +.. _class_SamplePlayer_set_default_reverb: + +- void **set_default_reverb** **(** :ref:`int` room_type, :ref:`float` send **)** + +Set the default reverberation type (see REVERB_* constants) and send level (from 0 to 1.0) of the player. + +.. _class_SamplePlayer_get_default_pitch_scale: + +- :ref:`float` **get_default_pitch_scale** **(** **)** const + +Return the default pitch scale of the player. + +.. _class_SamplePlayer_get_default_volume: + +- :ref:`float` **get_default_volume** **(** **)** const + +Return the default volume (on a linear scale) of the player. + +.. _class_SamplePlayer_get_default_volume_db: + +- :ref:`float` **get_default_volume_db** **(** **)** const + +Return the default volume (in dB) of the player. + +.. _class_SamplePlayer_get_default_pan: + +- :ref:`float` **get_default_pan** **(** **)** const + +Return the default panning of the player. + +.. _class_SamplePlayer_get_default_pan_depth: + +- :ref:`float` **get_default_pan_depth** **(** **)** const + +Return the default pan depth of the player. + +.. _class_SamplePlayer_get_default_pan_height: + +- :ref:`float` **get_default_pan_height** **(** **)** const + +Return the default pan height of the player. + +.. _class_SamplePlayer_get_default_filter_type: + +- :ref:`int` **get_default_filter_type** **(** **)** const + +Return the default filter type in use (see FILTER_* constants) for the player. + +.. _class_SamplePlayer_get_default_filter_cutoff: + +- :ref:`float` **get_default_filter_cutoff** **(** **)** const + +Return the default filter cutoff frequency of the player. + +.. _class_SamplePlayer_get_default_filter_resonance: + +- :ref:`float` **get_default_filter_resonance** **(** **)** const + +Return the default filter resonance of the player. + +.. _class_SamplePlayer_get_default_filter_gain: + +- :ref:`float` **get_default_filter_gain** **(** **)** const + +Return the default filter gain of the player. + +.. _class_SamplePlayer_get_default_chorus: + +- :ref:`float` **get_default_chorus** **(** **)** const + +Return the default chorus send level of the player. + +.. _class_SamplePlayer_get_default_reverb_room: + +- :ref:`int` **get_default_reverb_room** **(** **)** const + +Return the default reverberation room type of the player (see REVERB_* enum). + +.. _class_SamplePlayer_get_default_reverb: + +- :ref:`float` **get_default_reverb** **(** **)** const + +Return the default reverberation send level of the player. + +.. _class_SamplePlayer_is_active: + +- :ref:`bool` **is_active** **(** **)** const + +Return whether the player is currently active. + +.. _class_SamplePlayer_is_voice_active: + +- :ref:`bool` **is_voice_active** **(** :ref:`int` voice **)** const + +Return whether the given voice is currently active. + + diff --git a/classes/class_sampleplayer2d.rst b/classes/class_sampleplayer2d.rst new file mode 100644 index 000000000..697ff705a --- /dev/null +++ b/classes/class_sampleplayer2d.rst @@ -0,0 +1,140 @@ +.. _class_SamplePlayer2D: + +SamplePlayer2D +============== + +Inherits: :ref:`SoundPlayer2D` +--------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Sample player for positional 2D Sound. + +Member Functions +---------------- + ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_sample_library` **(** :ref:`SampleLibrary` library **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`SampleLibrary` | :ref:`get_sample_library` **(** **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_polyphony` **(** :ref:`int` max_voices **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_polyphony` **(** **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`play` **(** :ref:`String` sample, :ref:`int` voice=-2 **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`voice_set_pitch_scale` **(** :ref:`int` voice, :ref:`float` ratio **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`voice_set_volume_scale_db` **(** :ref:`int` voice, :ref:`float` db **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_voice_active` **(** :ref:`int` voice **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`stop_voice` **(** :ref:`int` voice **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`stop_all` **(** **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_random_pitch_scale` **(** :ref:`float` val **)** | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_random_pitch_scale` **(** **)** const | ++--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **INVALID_VOICE** = **-1** --- Value returned if the voice or sample are invalid. +- **NEXT_VOICE** = **-2** --- Default voice for the play method. Corresponds to the first voice following the last used voice. + +Description +----------- + +Sample player for positional 2D Sound. Plays sound samples positionally, left and right depending on the distance/place on the screen. + +Member Function Description +--------------------------- + +.. _class_SamplePlayer2D_set_sample_library: + +- void **set_sample_library** **(** :ref:`SampleLibrary` library **)** + +Set the sample library for the player. + +.. _class_SamplePlayer2D_get_sample_library: + +- :ref:`SampleLibrary` **get_sample_library** **(** **)** const + +Return the sample library used by the player. + +.. _class_SamplePlayer2D_set_polyphony: + +- void **set_polyphony** **(** :ref:`int` max_voices **)** + +Set the polyphony of the player (maximum amount of simultaneous voices). + +.. _class_SamplePlayer2D_get_polyphony: + +- :ref:`int` **get_polyphony** **(** **)** const + +Return the polyphony of the player. + +.. _class_SamplePlayer2D_play: + +- :ref:`int` **play** **(** :ref:`String` sample, :ref:`int` voice=-2 **)** + +Play a sample. An internal polyphony ID can optionally be passed, or defaults to NEXT_VOICE. + +Return a voice ID which can be used to modify the voice parameters, or INVALID_VOICE if the voice or sample are invalid. + +.. _class_SamplePlayer2D_voice_set_pitch_scale: + +- void **voice_set_pitch_scale** **(** :ref:`int` voice, :ref:`float` ratio **)** + +Change the pitch scale of a currently playing voice. + +.. _class_SamplePlayer2D_voice_set_volume_scale_db: + +- void **voice_set_volume_scale_db** **(** :ref:`int` voice, :ref:`float` db **)** + +Change the volume scale (in dB) of a currently playing voice. + +.. _class_SamplePlayer2D_is_voice_active: + +- :ref:`bool` **is_voice_active** **(** :ref:`int` voice **)** const + +Return whether a voice is still active or has stopped playing. + +.. _class_SamplePlayer2D_stop_voice: + +- void **stop_voice** **(** :ref:`int` voice **)** + +Stop a given voice. + +.. _class_SamplePlayer2D_stop_all: + +- void **stop_all** **(** **)** + +Stop all playing voices. + +.. _class_SamplePlayer2D_set_random_pitch_scale: + +- void **set_random_pitch_scale** **(** :ref:`float` val **)** + +Set the amplitude for random pitch scale variations. If different from zero, the pitch scale will vary randomly around 1.0 in a range defined by val. + +The actual pitch scale will be, with "variation" ranging from -val to val: + +* variation > 0: 1.0 + variation + +* variation < 0: 1.0/(1.0 - variation) + +.. _class_SamplePlayer2D_get_random_pitch_scale: + +- :ref:`float` **get_random_pitch_scale** **(** **)** const + +Return the amplitude used for random pitch scale variations. + + diff --git a/classes/class_scenestate.rst b/classes/class_scenestate.rst new file mode 100644 index 000000000..bdd4f97e2 --- /dev/null +++ b/classes/class_scenestate.rst @@ -0,0 +1,127 @@ +.. _class_SceneState: + +SceneState +========== + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_node_count` **(** **)** const | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_node_type` **(** :ref:`int` idx **)** const | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_node_name` **(** :ref:`int` idx **)** const | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`NodePath` | :ref:`get_node_path` **(** :ref:`int` idx, :ref:`bool` for_parent=false **)** const | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`NodePath` | :ref:`get_node_owner_path` **(** :ref:`int` idx **)** const | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedScene` | :ref:`get_node_instance` **(** :ref:`int` idx **)** const | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_node_groups` **(** :ref:`int` idx **)** const | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_node_property_count` **(** :ref:`int` idx **)** const | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_node_property_name` **(** :ref:`int` idx, :ref:`int` prop_idx **)** const | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`get_node_property_value` **(** :ref:`int` idx, :ref:`int` prop_idx **)** const | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_connection_count` **(** **)** const | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`NodePath` | :ref:`get_connection_source` **(** :ref:`int` idx **)** const | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_connection_signal` **(** :ref:`int` idx **)** const | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`NodePath` | :ref:`get_connection_target` **(** :ref:`int` idx **)** const | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_connection_method` **(** :ref:`int` idx **)** const | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_connection_flags` **(** :ref:`int` idx **)** const | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_connection_binds` **(** :ref:`int` idx **)** const | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_SceneState_get_node_count: + +- :ref:`int` **get_node_count** **(** **)** const + +.. _class_SceneState_get_node_type: + +- :ref:`String` **get_node_type** **(** :ref:`int` idx **)** const + +.. _class_SceneState_get_node_name: + +- :ref:`String` **get_node_name** **(** :ref:`int` idx **)** const + +.. _class_SceneState_get_node_path: + +- :ref:`NodePath` **get_node_path** **(** :ref:`int` idx, :ref:`bool` for_parent=false **)** const + +.. _class_SceneState_get_node_owner_path: + +- :ref:`NodePath` **get_node_owner_path** **(** :ref:`int` idx **)** const + +.. _class_SceneState_get_node_instance: + +- :ref:`PackedScene` **get_node_instance** **(** :ref:`int` idx **)** const + +.. _class_SceneState_get_node_groups: + +- :ref:`StringArray` **get_node_groups** **(** :ref:`int` idx **)** const + +.. _class_SceneState_get_node_property_count: + +- :ref:`int` **get_node_property_count** **(** :ref:`int` idx **)** const + +.. _class_SceneState_get_node_property_name: + +- :ref:`String` **get_node_property_name** **(** :ref:`int` idx, :ref:`int` prop_idx **)** const + +.. _class_SceneState_get_node_property_value: + +- void **get_node_property_value** **(** :ref:`int` idx, :ref:`int` prop_idx **)** const + +.. _class_SceneState_get_connection_count: + +- :ref:`int` **get_connection_count** **(** **)** const + +.. _class_SceneState_get_connection_source: + +- :ref:`NodePath` **get_connection_source** **(** :ref:`int` idx **)** const + +.. _class_SceneState_get_connection_signal: + +- :ref:`String` **get_connection_signal** **(** :ref:`int` idx **)** const + +.. _class_SceneState_get_connection_target: + +- :ref:`NodePath` **get_connection_target** **(** :ref:`int` idx **)** const + +.. _class_SceneState_get_connection_method: + +- :ref:`String` **get_connection_method** **(** :ref:`int` idx **)** const + +.. _class_SceneState_get_connection_flags: + +- :ref:`int` **get_connection_flags** **(** :ref:`int` idx **)** const + +.. _class_SceneState_get_connection_binds: + +- :ref:`Array` **get_connection_binds** **(** :ref:`int` idx **)** const + + diff --git a/classes/class_scenetree.rst b/classes/class_scenetree.rst new file mode 100644 index 000000000..bf4e4fc33 --- /dev/null +++ b/classes/class_scenetree.rst @@ -0,0 +1,217 @@ +.. _class_SceneTree: + +SceneTree +========= + +Inherits: :ref:`MainLoop` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`notify_group` **(** :ref:`int` call_flags, :ref:`String` group, :ref:`int` notification **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_group` **(** :ref:`int` call_flags, :ref:`String` group, :ref:`String` property, var value **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_nodes_in_group` **(** :ref:`String` group **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Viewport` | :ref:`get_root` **(** **)** const | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_group` **(** :ref:`String` name **)** const | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_auto_accept_quit` **(** :ref:`bool` enabled **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_editor_hint` **(** :ref:`bool` enable **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_editor_hint` **(** **)** const | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_debug_collisions_hint` **(** :ref:`bool` enable **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_debugging_collisions_hint` **(** **)** const | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_debug_navigation_hint` **(** :ref:`bool` enable **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_debugging_navigation_hint` **(** **)** const | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_edited_scene_root` **(** :ref:`Object` scene **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_edited_scene_root` **(** **)** const | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_pause` **(** :ref:`bool` enable **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_paused` **(** **)** const | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_input_as_handled` **(** **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_node_count` **(** **)** const | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_frame` **(** **)** const | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`quit` **(** **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_screen_stretch` **(** :ref:`int` mode, :ref:`int` aspect, :ref:`Vector2` minsize **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`queue_delete` **(** :ref:`Object` obj **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`call_group` **(** :ref:`int` flags, :ref:`String` group, :ref:`String` method, var arg0=NULL, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_current_scene` **(** :ref:`Node` child_node **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Node` | :ref:`get_current_scene` **(** **)** const | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`change_scene` **(** :ref:`String` path **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`change_scene_to` **(** :ref:`PackedScene` packed_scene **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`reload_current_scene` **(** **)** | ++----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **screen_resized** **(** **)** +- **node_removed** **(** :ref:`Object` node **)** +- **idle_frame** **(** **)** +- **tree_changed** **(** **)** +- **fixed_frame** **(** **)** + +Numeric Constants +----------------- + +- **GROUP_CALL_DEFAULT** = **0** +- **GROUP_CALL_REVERSE** = **1** +- **GROUP_CALL_REALTIME** = **2** +- **GROUP_CALL_UNIQUE** = **4** +- **STRETCH_MODE_DISABLED** = **0** +- **STRETCH_MODE_2D** = **1** +- **STRETCH_MODE_VIEWPORT** = **2** +- **STRETCH_ASPECT_IGNORE** = **0** +- **STRETCH_ASPECT_KEEP** = **1** +- **STRETCH_ASPECT_KEEP_WIDTH** = **2** +- **STRETCH_ASPECT_KEEP_HEIGHT** = **3** + +Member Function Description +--------------------------- + +.. _class_SceneTree_notify_group: + +- void **notify_group** **(** :ref:`int` call_flags, :ref:`String` group, :ref:`int` notification **)** + +.. _class_SceneTree_set_group: + +- void **set_group** **(** :ref:`int` call_flags, :ref:`String` group, :ref:`String` property, var value **)** + +.. _class_SceneTree_get_nodes_in_group: + +- :ref:`Array` **get_nodes_in_group** **(** :ref:`String` group **)** + +.. _class_SceneTree_get_root: + +- :ref:`Viewport` **get_root** **(** **)** const + +.. _class_SceneTree_has_group: + +- :ref:`bool` **has_group** **(** :ref:`String` name **)** const + +.. _class_SceneTree_set_auto_accept_quit: + +- void **set_auto_accept_quit** **(** :ref:`bool` enabled **)** + +.. _class_SceneTree_set_editor_hint: + +- void **set_editor_hint** **(** :ref:`bool` enable **)** + +.. _class_SceneTree_is_editor_hint: + +- :ref:`bool` **is_editor_hint** **(** **)** const + +.. _class_SceneTree_set_debug_collisions_hint: + +- void **set_debug_collisions_hint** **(** :ref:`bool` enable **)** + +.. _class_SceneTree_is_debugging_collisions_hint: + +- :ref:`bool` **is_debugging_collisions_hint** **(** **)** const + +.. _class_SceneTree_set_debug_navigation_hint: + +- void **set_debug_navigation_hint** **(** :ref:`bool` enable **)** + +.. _class_SceneTree_is_debugging_navigation_hint: + +- :ref:`bool` **is_debugging_navigation_hint** **(** **)** const + +.. _class_SceneTree_set_edited_scene_root: + +- void **set_edited_scene_root** **(** :ref:`Object` scene **)** + +.. _class_SceneTree_get_edited_scene_root: + +- :ref:`Object` **get_edited_scene_root** **(** **)** const + +.. _class_SceneTree_set_pause: + +- void **set_pause** **(** :ref:`bool` enable **)** + +.. _class_SceneTree_is_paused: + +- :ref:`bool` **is_paused** **(** **)** const + +.. _class_SceneTree_set_input_as_handled: + +- void **set_input_as_handled** **(** **)** + +.. _class_SceneTree_get_node_count: + +- :ref:`int` **get_node_count** **(** **)** const + +.. _class_SceneTree_get_frame: + +- :ref:`int` **get_frame** **(** **)** const + +.. _class_SceneTree_quit: + +- void **quit** **(** **)** + +.. _class_SceneTree_set_screen_stretch: + +- void **set_screen_stretch** **(** :ref:`int` mode, :ref:`int` aspect, :ref:`Vector2` minsize **)** + +.. _class_SceneTree_queue_delete: + +- void **queue_delete** **(** :ref:`Object` obj **)** + +.. _class_SceneTree_call_group: + +- void **call_group** **(** :ref:`int` flags, :ref:`String` group, :ref:`String` method, var arg0=NULL, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL **)** + +.. _class_SceneTree_set_current_scene: + +- void **set_current_scene** **(** :ref:`Node` child_node **)** + +.. _class_SceneTree_get_current_scene: + +- :ref:`Node` **get_current_scene** **(** **)** const + +.. _class_SceneTree_change_scene: + +- :ref:`int` **change_scene** **(** :ref:`String` path **)** + +.. _class_SceneTree_change_scene_to: + +- :ref:`int` **change_scene_to** **(** :ref:`PackedScene` packed_scene **)** + +.. _class_SceneTree_reload_current_scene: + +- :ref:`int` **reload_current_scene** **(** **)** + + diff --git a/classes/class_script.rst b/classes/class_script.rst new file mode 100644 index 000000000..47f1a66e7 --- /dev/null +++ b/classes/class_script.rst @@ -0,0 +1,78 @@ +.. _class_Script: + +Script +====== + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Base class for scripts. + +Member Functions +---------------- + ++------------------------------+------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`can_instance` **(** **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`instance_has` **(** :ref:`Object` base_object **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_source_code` **(** **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_source_code` **(** **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_source_code` **(** :ref:`String` source **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`reload` **(** **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Base class for scripts. Any script that is loaded becomes one of these resources, which can then create instances. + +Member Function Description +--------------------------- + +.. _class_Script_can_instance: + +- :ref:`bool` **can_instance** **(** **)** const + +Return true if this script can be instance (ie not a library). + +.. _class_Script_instance_has: + +- :ref:`bool` **instance_has** **(** :ref:`Object` base_object **)** const + +Return true if a given object uses an instance of this script. + +.. _class_Script_has_source_code: + +- :ref:`bool` **has_source_code** **(** **)** const + +Return true if the script contains source code. + +.. _class_Script_get_source_code: + +- :ref:`String` **get_source_code** **(** **)** const + +Return the script source code (if available). + +.. _class_Script_set_source_code: + +- void **set_source_code** **(** :ref:`String` source **)** + +Set the script source code. + +.. _class_Script_reload: + +- :ref:`int` **reload** **(** **)** + +Reload the script. This will fail if there are existing instances. + + diff --git a/classes/class_scrollbar.rst b/classes/class_scrollbar.rst new file mode 100644 index 000000000..ef375cfb9 --- /dev/null +++ b/classes/class_scrollbar.rst @@ -0,0 +1,42 @@ +.. _class_ScrollBar: + +ScrollBar +========= + +Inherits: :ref:`Range` +----------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Base class for scroll bars. + +Member Functions +---------------- + ++----------------------------+------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_custom_step` **(** :ref:`float` step **)** | ++----------------------------+------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_custom_step` **(** **)** const | ++----------------------------+------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Scrollbars are a :ref:`Range` based :ref:`Control`, that display a draggable area (the size of the page). Horizontal (:ref:`HScrollBar`) and Vertical (:ref:`VScrollBar`) versions are available. + +Member Function Description +--------------------------- + +.. _class_ScrollBar_set_custom_step: + +- void **set_custom_step** **(** :ref:`float` step **)** + +.. _class_ScrollBar_get_custom_step: + +- :ref:`float` **get_custom_step** **(** **)** const + + diff --git a/classes/class_scrollcontainer.rst b/classes/class_scrollcontainer.rst new file mode 100644 index 000000000..2e09ec720 --- /dev/null +++ b/classes/class_scrollcontainer.rst @@ -0,0 +1,78 @@ +.. _class_ScrollContainer: + +ScrollContainer +=============== + +Inherits: :ref:`Container` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +A helper node for displaying scollable elements (e.g. lists). + +Member Functions +---------------- + ++--------------------------+--------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_enable_h_scroll` **(** :ref:`bool` enable **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_h_scroll_enabled` **(** **)** const | ++--------------------------+--------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_enable_v_scroll` **(** :ref:`bool` enable **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_v_scroll_enabled` **(** **)** const | ++--------------------------+--------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_h_scroll` **(** :ref:`int` val **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_h_scroll` **(** **)** const | ++--------------------------+--------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_v_scroll` **(** :ref:`int` val **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_v_scroll` **(** **)** const | ++--------------------------+--------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +A ScrollContainer node with a :ref:`Control` child and scrollbar child (:ref:`HScrollbar`, :ref:`VScrollBar`, or both) will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the minimum_size of the Control relative to the ScrollContainer. Works great with a :ref:`Panel` control. + +Member Function Description +--------------------------- + +.. _class_ScrollContainer_set_enable_h_scroll: + +- void **set_enable_h_scroll** **(** :ref:`bool` enable **)** + +.. _class_ScrollContainer_is_h_scroll_enabled: + +- :ref:`bool` **is_h_scroll_enabled** **(** **)** const + +.. _class_ScrollContainer_set_enable_v_scroll: + +- void **set_enable_v_scroll** **(** :ref:`bool` enable **)** + +.. _class_ScrollContainer_is_v_scroll_enabled: + +- :ref:`bool` **is_v_scroll_enabled** **(** **)** const + +.. _class_ScrollContainer_set_h_scroll: + +- void **set_h_scroll** **(** :ref:`int` val **)** + +.. _class_ScrollContainer_get_h_scroll: + +- :ref:`int` **get_h_scroll** **(** **)** const + +.. _class_ScrollContainer_set_v_scroll: + +- void **set_v_scroll** **(** :ref:`int` val **)** + +.. _class_ScrollContainer_get_v_scroll: + +- :ref:`int` **get_v_scroll** **(** **)** const + + diff --git a/classes/class_segmentshape2d.rst b/classes/class_segmentshape2d.rst new file mode 100644 index 000000000..9c35553d9 --- /dev/null +++ b/classes/class_segmentshape2d.rst @@ -0,0 +1,62 @@ +.. _class_SegmentShape2D: + +SegmentShape2D +============== + +Inherits: :ref:`Shape2D` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Segment Shape for 2D Collision Detection. + +Member Functions +---------------- + ++--------------------------------+----------------------------------------------------------------------------------------+ +| void | :ref:`set_a` **(** :ref:`Vector2` a **)** | ++--------------------------------+----------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_a` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------+ +| void | :ref:`set_b` **(** :ref:`Vector2` b **)** | ++--------------------------------+----------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_b` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------+ + +Description +----------- + +Segment Shape for 2D Collision Detection, consists of two points, 'a' and 'b'. + +Member Function Description +--------------------------- + +.. _class_SegmentShape2D_set_a: + +- void **set_a** **(** :ref:`Vector2` a **)** + +Set the first point's position. + +.. _class_SegmentShape2D_get_a: + +- :ref:`Vector2` **get_a** **(** **)** const + +Return the first point's position. + +.. _class_SegmentShape2D_set_b: + +- void **set_b** **(** :ref:`Vector2` b **)** + +Set the second point's position. + +.. _class_SegmentShape2D_get_b: + +- :ref:`Vector2` **get_b** **(** **)** const + +Return the second point's position. + + diff --git a/classes/class_semaphore.rst b/classes/class_semaphore.rst new file mode 100644 index 000000000..4f28d0461 --- /dev/null +++ b/classes/class_semaphore.rst @@ -0,0 +1,37 @@ +.. _class_Semaphore: + +Semaphore +========= + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------+------------------------------------------------+ +| Error | :ref:`wait` **(** **)** | ++--------+------------------------------------------------+ +| Error | :ref:`post` **(** **)** | ++--------+------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_Semaphore_wait: + +- Error **wait** **(** **)** + +.. _class_Semaphore_post: + +- Error **post** **(** **)** + + diff --git a/classes/class_separator.rst b/classes/class_separator.rst new file mode 100644 index 000000000..8a9550adb --- /dev/null +++ b/classes/class_separator.rst @@ -0,0 +1,21 @@ +.. _class_Separator: + +Separator +========= + +Inherits: :ref:`Control` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Base class for separators. + +Description +----------- + +Separator is a :ref:`Control` used for sepataring other controls. It's purely a visual decoration. Horizontal (:ref:`HSeparator`) and Vertical (:ref:`VSeparator`) versions are available. + diff --git a/classes/class_shader.rst b/classes/class_shader.rst new file mode 100644 index 000000000..bd16402b3 --- /dev/null +++ b/classes/class_shader.rst @@ -0,0 +1,85 @@ +.. _class_Shader: + +Shader +====== + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +To be changed, ignore. + +Member Functions +---------------- + ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_mode` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_code` **(** :ref:`String` vcode, :ref:`String` fcode, :ref:`String` lcode, :ref:`int` fofs=0, :ref:`int` lofs=0 **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_vertex_code` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_fragment_code` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_light_code` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_default_texture_param` **(** :ref:`String` param, :ref:`Texture` texture **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_default_texture_param` **(** :ref:`String` param **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_param` **(** :ref:`String` name **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **MODE_MATERIAL** = **0** +- **MODE_CANVAS_ITEM** = **1** +- **MODE_POST_PROCESS** = **2** + +Description +----------- + +To be changed, ignore. + +Member Function Description +--------------------------- + +.. _class_Shader_get_mode: + +- :ref:`int` **get_mode** **(** **)** const + +.. _class_Shader_set_code: + +- void **set_code** **(** :ref:`String` vcode, :ref:`String` fcode, :ref:`String` lcode, :ref:`int` fofs=0, :ref:`int` lofs=0 **)** + +.. _class_Shader_get_vertex_code: + +- :ref:`String` **get_vertex_code** **(** **)** const + +.. _class_Shader_get_fragment_code: + +- :ref:`String` **get_fragment_code** **(** **)** const + +.. _class_Shader_get_light_code: + +- :ref:`String` **get_light_code** **(** **)** const + +.. _class_Shader_set_default_texture_param: + +- void **set_default_texture_param** **(** :ref:`String` param, :ref:`Texture` texture **)** + +.. _class_Shader_get_default_texture_param: + +- :ref:`Texture` **get_default_texture_param** **(** :ref:`String` param **)** const + +.. _class_Shader_has_param: + +- :ref:`bool` **has_param** **(** :ref:`String` name **)** const + + diff --git a/classes/class_shadergraph.rst b/classes/class_shadergraph.rst new file mode 100644 index 000000000..c804e1a0e --- /dev/null +++ b/classes/class_shadergraph.rst @@ -0,0 +1,518 @@ +.. _class_ShaderGraph: + +ShaderGraph +=========== + +Inherits: :ref:`Shader` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`node_add` **(** :ref:`int` shader_type, :ref:`int` node_type, :ref:`int` id **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`node_remove` **(** :ref:`int` shader_type, :ref:`int` id **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`node_set_pos` **(** :ref:`int` shader_type, :ref:`int` id, :ref:`Vector2` pos **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`node_get_pos` **(** :ref:`int` shader_type, :ref:`int` id **)** const | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`node_get_type` **(** :ref:`int` shader_type, :ref:`int` id **)** const | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_node_list` **(** :ref:`int` shader_type **)** const | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`default_set_value` **(** :ref:`int` shader_type, :ref:`int` id, :ref:`int` param_id, var value **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`default_get_value` **(** :ref:`int` shader_type, :ref:`int` id, :ref:`int` param_id **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`scalar_const_node_set_value` **(** :ref:`int` shader_type, :ref:`int` id, :ref:`float` value **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`scalar_const_node_get_value` **(** :ref:`int` shader_type, :ref:`int` id **)** const | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`vec_const_node_set_value` **(** :ref:`int` shader_type, :ref:`int` id, :ref:`Vector3` value **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`vec_const_node_get_value` **(** :ref:`int` shader_type, :ref:`int` id **)** const | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`rgb_const_node_set_value` **(** :ref:`int` shader_type, :ref:`int` id, :ref:`Color` value **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`rgb_const_node_get_value` **(** :ref:`int` shader_type, :ref:`int` id **)** const | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`xform_const_node_set_value` **(** :ref:`int` shader_type, :ref:`int` id, :ref:`Transform` value **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`xform_const_node_get_value` **(** :ref:`int` shader_type, :ref:`int` id **)** const | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`texture_node_set_filter_size` **(** :ref:`int` shader_type, :ref:`int` id, :ref:`int` filter_size **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`texture_node_get_filter_size` **(** :ref:`int` shader_type, :ref:`int` id **)** const | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`texture_node_set_filter_strength` **(** :ref:`int` shader_type, :ref:`float` id, :ref:`float` filter_strength **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`texture_node_get_filter_strength` **(** :ref:`int` shader_type, :ref:`float` id **)** const | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`scalar_op_node_set_op` **(** :ref:`int` shader_type, :ref:`float` id, :ref:`int` op **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`scalar_op_node_get_op` **(** :ref:`int` shader_type, :ref:`float` id **)** const | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`vec_op_node_set_op` **(** :ref:`int` shader_type, :ref:`float` id, :ref:`int` op **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`vec_op_node_get_op` **(** :ref:`int` shader_type, :ref:`float` id **)** const | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`vec_scalar_op_node_set_op` **(** :ref:`int` shader_type, :ref:`float` id, :ref:`int` op **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`vec_scalar_op_node_get_op` **(** :ref:`int` shader_type, :ref:`float` id **)** const | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`rgb_op_node_set_op` **(** :ref:`int` shader_type, :ref:`float` id, :ref:`int` op **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`rgb_op_node_get_op` **(** :ref:`int` shader_type, :ref:`float` id **)** const | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`xform_vec_mult_node_set_no_translation` **(** :ref:`int` shader_type, :ref:`int` id, :ref:`bool` disable **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`xform_vec_mult_node_get_no_translation` **(** :ref:`int` shader_type, :ref:`int` id **)** const | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`scalar_func_node_set_function` **(** :ref:`int` shader_type, :ref:`int` id, :ref:`int` func **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`scalar_func_node_get_function` **(** :ref:`int` shader_type, :ref:`int` id **)** const | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`vec_func_node_set_function` **(** :ref:`int` shader_type, :ref:`int` id, :ref:`int` func **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`vec_func_node_get_function` **(** :ref:`int` shader_type, :ref:`int` id **)** const | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`input_node_set_name` **(** :ref:`int` shader_type, :ref:`int` id, :ref:`String` name **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`input_node_get_name` **(** :ref:`int` shader_type, :ref:`int` id **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`scalar_input_node_set_value` **(** :ref:`int` shader_type, :ref:`int` id, :ref:`float` value **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`scalar_input_node_get_value` **(** :ref:`int` shader_type, :ref:`int` id **)** const | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`vec_input_node_set_value` **(** :ref:`int` shader_type, :ref:`int` id, :ref:`Vector3` value **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`vec_input_node_get_value` **(** :ref:`int` shader_type, :ref:`int` id **)** const | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`rgb_input_node_set_value` **(** :ref:`int` shader_type, :ref:`int` id, :ref:`Color` value **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`rgb_input_node_get_value` **(** :ref:`int` shader_type, :ref:`int` id **)** const | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`xform_input_node_set_value` **(** :ref:`int` shader_type, :ref:`int` id, :ref:`Transform` value **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`xform_input_node_get_value` **(** :ref:`int` shader_type, :ref:`int` id **)** const | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`texture_input_node_set_value` **(** :ref:`int` shader_type, :ref:`int` id, :ref:`Texture` value **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`texture_input_node_get_value` **(** :ref:`int` shader_type, :ref:`int` id **)** const | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`cubemap_input_node_set_value` **(** :ref:`int` shader_type, :ref:`int` id, :ref:`CubeMap` value **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`CubeMap` | :ref:`cubemap_input_node_get_value` **(** :ref:`int` shader_type, :ref:`int` id **)** const | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`comment_node_set_text` **(** :ref:`int` shader_type, :ref:`int` id, :ref:`String` text **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`comment_node_get_text` **(** :ref:`int` shader_type, :ref:`int` id **)** const | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`color_ramp_node_set_ramp` **(** :ref:`int` shader_type, :ref:`int` id, :ref:`ColorArray` colors, :ref:`RealArray` offsets **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`ColorArray` | :ref:`color_ramp_node_get_colors` **(** :ref:`int` shader_type, :ref:`int` id **)** const | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RealArray` | :ref:`color_ramp_node_get_offsets` **(** :ref:`int` shader_type, :ref:`int` id **)** const | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`curve_map_node_set_points` **(** :ref:`int` shader_type, :ref:`int` id, :ref:`Vector2Array` points **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2Array` | :ref:`curve_map_node_get_points` **(** :ref:`int` shader_type, :ref:`int` id **)** const | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Error | :ref:`connect_node` **(** :ref:`int` shader_type, :ref:`int` src_id, :ref:`int` src_slot, :ref:`int` dst_id, :ref:`int` dst_slot **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_node_connected` **(** :ref:`int` shader_type, :ref:`int` src_id, :ref:`int` src_slot, :ref:`int` dst_id, :ref:`int` dst_slot **)** const | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`disconnect_node` **(** :ref:`int` shader_type, :ref:`int` src_id, :ref:`int` src_slot, :ref:`int` dst_id, :ref:`int` dst_slot **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_node_connections` **(** :ref:`int` shader_type **)** const | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** :ref:`int` shader_type **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`node_set_state` **(** :ref:`int` shader_type, :ref:`int` id, var state **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Variant | :ref:`node_get_state` **(** :ref:`int` shader_type, :ref:`int` id **)** const | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **updated** **(** **)** + +Numeric Constants +----------------- + +- **NODE_INPUT** = **0** +- **NODE_SCALAR_CONST** = **1** +- **NODE_VEC_CONST** = **2** +- **NODE_RGB_CONST** = **3** +- **NODE_XFORM_CONST** = **4** +- **NODE_TIME** = **5** +- **NODE_SCREEN_TEX** = **6** +- **NODE_SCALAR_OP** = **7** +- **NODE_VEC_OP** = **8** +- **NODE_VEC_SCALAR_OP** = **9** +- **NODE_RGB_OP** = **10** +- **NODE_XFORM_MULT** = **11** +- **NODE_XFORM_VEC_MULT** = **12** +- **NODE_XFORM_VEC_INV_MULT** = **13** +- **NODE_SCALAR_FUNC** = **14** +- **NODE_VEC_FUNC** = **15** +- **NODE_VEC_LEN** = **16** +- **NODE_DOT_PROD** = **17** +- **NODE_VEC_TO_SCALAR** = **18** +- **NODE_SCALAR_TO_VEC** = **19** +- **NODE_VEC_TO_XFORM** = **21** +- **NODE_XFORM_TO_VEC** = **20** +- **NODE_SCALAR_INTERP** = **22** +- **NODE_VEC_INTERP** = **23** +- **NODE_COLOR_RAMP** = **24** +- **NODE_CURVE_MAP** = **25** +- **NODE_SCALAR_INPUT** = **26** +- **NODE_VEC_INPUT** = **27** +- **NODE_RGB_INPUT** = **28** +- **NODE_XFORM_INPUT** = **29** +- **NODE_TEXTURE_INPUT** = **30** +- **NODE_CUBEMAP_INPUT** = **31** +- **NODE_DEFAULT_TEXTURE** = **32** +- **NODE_OUTPUT** = **33** +- **NODE_COMMENT** = **34** +- **NODE_TYPE_MAX** = **35** +- **SLOT_TYPE_SCALAR** = **0** +- **SLOT_TYPE_VEC** = **1** +- **SLOT_TYPE_XFORM** = **2** +- **SLOT_TYPE_TEXTURE** = **3** +- **SLOT_MAX** = **4** +- **SHADER_TYPE_VERTEX** = **0** +- **SHADER_TYPE_FRAGMENT** = **1** +- **SHADER_TYPE_LIGHT** = **2** +- **SHADER_TYPE_MAX** = **3** +- **SLOT_IN** = **0** +- **SLOT_OUT** = **1** +- **GRAPH_OK** = **0** +- **GRAPH_ERROR_CYCLIC** = **1** +- **GRAPH_ERROR_MISSING_CONNECTIONS** = **2** +- **SCALAR_OP_ADD** = **0** +- **SCALAR_OP_SUB** = **1** +- **SCALAR_OP_MUL** = **2** +- **SCALAR_OP_DIV** = **3** +- **SCALAR_OP_MOD** = **4** +- **SCALAR_OP_POW** = **5** +- **SCALAR_OP_MAX** = **6** +- **SCALAR_OP_MIN** = **7** +- **SCALAR_OP_ATAN2** = **8** +- **SCALAR_MAX_OP** = **9** +- **VEC_OP_ADD** = **0** +- **VEC_OP_SUB** = **1** +- **VEC_OP_MUL** = **2** +- **VEC_OP_DIV** = **3** +- **VEC_OP_MOD** = **4** +- **VEC_OP_POW** = **5** +- **VEC_OP_MAX** = **6** +- **VEC_OP_MIN** = **7** +- **VEC_OP_CROSS** = **8** +- **VEC_MAX_OP** = **9** +- **VEC_SCALAR_OP_MUL** = **0** +- **VEC_SCALAR_OP_DIV** = **1** +- **VEC_SCALAR_OP_POW** = **2** +- **VEC_SCALAR_MAX_OP** = **3** +- **RGB_OP_SCREEN** = **0** +- **RGB_OP_DIFFERENCE** = **1** +- **RGB_OP_DARKEN** = **2** +- **RGB_OP_LIGHTEN** = **3** +- **RGB_OP_OVERLAY** = **4** +- **RGB_OP_DODGE** = **5** +- **RGB_OP_BURN** = **6** +- **RGB_OP_SOFT_LIGHT** = **7** +- **RGB_OP_HARD_LIGHT** = **8** +- **RGB_MAX_OP** = **9** +- **SCALAR_FUNC_SIN** = **0** +- **SCALAR_FUNC_COS** = **1** +- **SCALAR_FUNC_TAN** = **2** +- **SCALAR_FUNC_ASIN** = **3** +- **SCALAR_FUNC_ACOS** = **4** +- **SCALAR_FUNC_ATAN** = **5** +- **SCALAR_FUNC_SINH** = **6** +- **SCALAR_FUNC_COSH** = **7** +- **SCALAR_FUNC_TANH** = **8** +- **SCALAR_FUNC_LOG** = **9** +- **SCALAR_FUNC_EXP** = **10** +- **SCALAR_FUNC_SQRT** = **11** +- **SCALAR_FUNC_ABS** = **12** +- **SCALAR_FUNC_SIGN** = **13** +- **SCALAR_FUNC_FLOOR** = **14** +- **SCALAR_FUNC_ROUND** = **15** +- **SCALAR_FUNC_CEIL** = **16** +- **SCALAR_FUNC_FRAC** = **17** +- **SCALAR_FUNC_SATURATE** = **18** +- **SCALAR_FUNC_NEGATE** = **19** +- **SCALAR_MAX_FUNC** = **20** +- **VEC_FUNC_NORMALIZE** = **0** +- **VEC_FUNC_SATURATE** = **1** +- **VEC_FUNC_NEGATE** = **2** +- **VEC_FUNC_RECIPROCAL** = **3** +- **VEC_FUNC_RGB2HSV** = **4** +- **VEC_FUNC_HSV2RGB** = **5** +- **VEC_MAX_FUNC** = **6** + +Member Function Description +--------------------------- + +.. _class_ShaderGraph_node_add: + +- void **node_add** **(** :ref:`int` shader_type, :ref:`int` node_type, :ref:`int` id **)** + +.. _class_ShaderGraph_node_remove: + +- void **node_remove** **(** :ref:`int` shader_type, :ref:`int` id **)** + +.. _class_ShaderGraph_node_set_pos: + +- void **node_set_pos** **(** :ref:`int` shader_type, :ref:`int` id, :ref:`Vector2` pos **)** + +.. _class_ShaderGraph_node_get_pos: + +- :ref:`Vector2` **node_get_pos** **(** :ref:`int` shader_type, :ref:`int` id **)** const + +.. _class_ShaderGraph_node_get_type: + +- :ref:`int` **node_get_type** **(** :ref:`int` shader_type, :ref:`int` id **)** const + +.. _class_ShaderGraph_get_node_list: + +- :ref:`Array` **get_node_list** **(** :ref:`int` shader_type **)** const + +.. _class_ShaderGraph_default_set_value: + +- void **default_set_value** **(** :ref:`int` shader_type, :ref:`int` id, :ref:`int` param_id, var value **)** + +.. _class_ShaderGraph_default_get_value: + +- void **default_get_value** **(** :ref:`int` shader_type, :ref:`int` id, :ref:`int` param_id **)** + +.. _class_ShaderGraph_scalar_const_node_set_value: + +- void **scalar_const_node_set_value** **(** :ref:`int` shader_type, :ref:`int` id, :ref:`float` value **)** + +.. _class_ShaderGraph_scalar_const_node_get_value: + +- :ref:`float` **scalar_const_node_get_value** **(** :ref:`int` shader_type, :ref:`int` id **)** const + +.. _class_ShaderGraph_vec_const_node_set_value: + +- void **vec_const_node_set_value** **(** :ref:`int` shader_type, :ref:`int` id, :ref:`Vector3` value **)** + +.. _class_ShaderGraph_vec_const_node_get_value: + +- :ref:`Vector3` **vec_const_node_get_value** **(** :ref:`int` shader_type, :ref:`int` id **)** const + +.. _class_ShaderGraph_rgb_const_node_set_value: + +- void **rgb_const_node_set_value** **(** :ref:`int` shader_type, :ref:`int` id, :ref:`Color` value **)** + +.. _class_ShaderGraph_rgb_const_node_get_value: + +- :ref:`Color` **rgb_const_node_get_value** **(** :ref:`int` shader_type, :ref:`int` id **)** const + +.. _class_ShaderGraph_xform_const_node_set_value: + +- void **xform_const_node_set_value** **(** :ref:`int` shader_type, :ref:`int` id, :ref:`Transform` value **)** + +.. _class_ShaderGraph_xform_const_node_get_value: + +- :ref:`Transform` **xform_const_node_get_value** **(** :ref:`int` shader_type, :ref:`int` id **)** const + +.. _class_ShaderGraph_texture_node_set_filter_size: + +- void **texture_node_set_filter_size** **(** :ref:`int` shader_type, :ref:`int` id, :ref:`int` filter_size **)** + +.. _class_ShaderGraph_texture_node_get_filter_size: + +- :ref:`int` **texture_node_get_filter_size** **(** :ref:`int` shader_type, :ref:`int` id **)** const + +.. _class_ShaderGraph_texture_node_set_filter_strength: + +- void **texture_node_set_filter_strength** **(** :ref:`int` shader_type, :ref:`float` id, :ref:`float` filter_strength **)** + +.. _class_ShaderGraph_texture_node_get_filter_strength: + +- :ref:`float` **texture_node_get_filter_strength** **(** :ref:`int` shader_type, :ref:`float` id **)** const + +.. _class_ShaderGraph_scalar_op_node_set_op: + +- void **scalar_op_node_set_op** **(** :ref:`int` shader_type, :ref:`float` id, :ref:`int` op **)** + +.. _class_ShaderGraph_scalar_op_node_get_op: + +- :ref:`int` **scalar_op_node_get_op** **(** :ref:`int` shader_type, :ref:`float` id **)** const + +.. _class_ShaderGraph_vec_op_node_set_op: + +- void **vec_op_node_set_op** **(** :ref:`int` shader_type, :ref:`float` id, :ref:`int` op **)** + +.. _class_ShaderGraph_vec_op_node_get_op: + +- :ref:`int` **vec_op_node_get_op** **(** :ref:`int` shader_type, :ref:`float` id **)** const + +.. _class_ShaderGraph_vec_scalar_op_node_set_op: + +- void **vec_scalar_op_node_set_op** **(** :ref:`int` shader_type, :ref:`float` id, :ref:`int` op **)** + +.. _class_ShaderGraph_vec_scalar_op_node_get_op: + +- :ref:`int` **vec_scalar_op_node_get_op** **(** :ref:`int` shader_type, :ref:`float` id **)** const + +.. _class_ShaderGraph_rgb_op_node_set_op: + +- void **rgb_op_node_set_op** **(** :ref:`int` shader_type, :ref:`float` id, :ref:`int` op **)** + +.. _class_ShaderGraph_rgb_op_node_get_op: + +- :ref:`int` **rgb_op_node_get_op** **(** :ref:`int` shader_type, :ref:`float` id **)** const + +.. _class_ShaderGraph_xform_vec_mult_node_set_no_translation: + +- void **xform_vec_mult_node_set_no_translation** **(** :ref:`int` shader_type, :ref:`int` id, :ref:`bool` disable **)** + +.. _class_ShaderGraph_xform_vec_mult_node_get_no_translation: + +- :ref:`bool` **xform_vec_mult_node_get_no_translation** **(** :ref:`int` shader_type, :ref:`int` id **)** const + +.. _class_ShaderGraph_scalar_func_node_set_function: + +- void **scalar_func_node_set_function** **(** :ref:`int` shader_type, :ref:`int` id, :ref:`int` func **)** + +.. _class_ShaderGraph_scalar_func_node_get_function: + +- :ref:`int` **scalar_func_node_get_function** **(** :ref:`int` shader_type, :ref:`int` id **)** const + +.. _class_ShaderGraph_vec_func_node_set_function: + +- void **vec_func_node_set_function** **(** :ref:`int` shader_type, :ref:`int` id, :ref:`int` func **)** + +.. _class_ShaderGraph_vec_func_node_get_function: + +- :ref:`int` **vec_func_node_get_function** **(** :ref:`int` shader_type, :ref:`int` id **)** const + +.. _class_ShaderGraph_input_node_set_name: + +- void **input_node_set_name** **(** :ref:`int` shader_type, :ref:`int` id, :ref:`String` name **)** + +.. _class_ShaderGraph_input_node_get_name: + +- :ref:`String` **input_node_get_name** **(** :ref:`int` shader_type, :ref:`int` id **)** + +.. _class_ShaderGraph_scalar_input_node_set_value: + +- void **scalar_input_node_set_value** **(** :ref:`int` shader_type, :ref:`int` id, :ref:`float` value **)** + +.. _class_ShaderGraph_scalar_input_node_get_value: + +- :ref:`float` **scalar_input_node_get_value** **(** :ref:`int` shader_type, :ref:`int` id **)** const + +.. _class_ShaderGraph_vec_input_node_set_value: + +- void **vec_input_node_set_value** **(** :ref:`int` shader_type, :ref:`int` id, :ref:`Vector3` value **)** + +.. _class_ShaderGraph_vec_input_node_get_value: + +- :ref:`Vector3` **vec_input_node_get_value** **(** :ref:`int` shader_type, :ref:`int` id **)** const + +.. _class_ShaderGraph_rgb_input_node_set_value: + +- void **rgb_input_node_set_value** **(** :ref:`int` shader_type, :ref:`int` id, :ref:`Color` value **)** + +.. _class_ShaderGraph_rgb_input_node_get_value: + +- :ref:`Color` **rgb_input_node_get_value** **(** :ref:`int` shader_type, :ref:`int` id **)** const + +.. _class_ShaderGraph_xform_input_node_set_value: + +- void **xform_input_node_set_value** **(** :ref:`int` shader_type, :ref:`int` id, :ref:`Transform` value **)** + +.. _class_ShaderGraph_xform_input_node_get_value: + +- :ref:`Transform` **xform_input_node_get_value** **(** :ref:`int` shader_type, :ref:`int` id **)** const + +.. _class_ShaderGraph_texture_input_node_set_value: + +- void **texture_input_node_set_value** **(** :ref:`int` shader_type, :ref:`int` id, :ref:`Texture` value **)** + +.. _class_ShaderGraph_texture_input_node_get_value: + +- :ref:`Texture` **texture_input_node_get_value** **(** :ref:`int` shader_type, :ref:`int` id **)** const + +.. _class_ShaderGraph_cubemap_input_node_set_value: + +- void **cubemap_input_node_set_value** **(** :ref:`int` shader_type, :ref:`int` id, :ref:`CubeMap` value **)** + +.. _class_ShaderGraph_cubemap_input_node_get_value: + +- :ref:`CubeMap` **cubemap_input_node_get_value** **(** :ref:`int` shader_type, :ref:`int` id **)** const + +.. _class_ShaderGraph_comment_node_set_text: + +- void **comment_node_set_text** **(** :ref:`int` shader_type, :ref:`int` id, :ref:`String` text **)** + +.. _class_ShaderGraph_comment_node_get_text: + +- :ref:`String` **comment_node_get_text** **(** :ref:`int` shader_type, :ref:`int` id **)** const + +.. _class_ShaderGraph_color_ramp_node_set_ramp: + +- void **color_ramp_node_set_ramp** **(** :ref:`int` shader_type, :ref:`int` id, :ref:`ColorArray` colors, :ref:`RealArray` offsets **)** + +.. _class_ShaderGraph_color_ramp_node_get_colors: + +- :ref:`ColorArray` **color_ramp_node_get_colors** **(** :ref:`int` shader_type, :ref:`int` id **)** const + +.. _class_ShaderGraph_color_ramp_node_get_offsets: + +- :ref:`RealArray` **color_ramp_node_get_offsets** **(** :ref:`int` shader_type, :ref:`int` id **)** const + +.. _class_ShaderGraph_curve_map_node_set_points: + +- void **curve_map_node_set_points** **(** :ref:`int` shader_type, :ref:`int` id, :ref:`Vector2Array` points **)** + +.. _class_ShaderGraph_curve_map_node_get_points: + +- :ref:`Vector2Array` **curve_map_node_get_points** **(** :ref:`int` shader_type, :ref:`int` id **)** const + +.. _class_ShaderGraph_connect_node: + +- Error **connect_node** **(** :ref:`int` shader_type, :ref:`int` src_id, :ref:`int` src_slot, :ref:`int` dst_id, :ref:`int` dst_slot **)** + +.. _class_ShaderGraph_is_node_connected: + +- :ref:`bool` **is_node_connected** **(** :ref:`int` shader_type, :ref:`int` src_id, :ref:`int` src_slot, :ref:`int` dst_id, :ref:`int` dst_slot **)** const + +.. _class_ShaderGraph_disconnect_node: + +- void **disconnect_node** **(** :ref:`int` shader_type, :ref:`int` src_id, :ref:`int` src_slot, :ref:`int` dst_id, :ref:`int` dst_slot **)** + +.. _class_ShaderGraph_get_node_connections: + +- :ref:`Array` **get_node_connections** **(** :ref:`int` shader_type **)** const + +.. _class_ShaderGraph_clear: + +- void **clear** **(** :ref:`int` shader_type **)** + +.. _class_ShaderGraph_node_set_state: + +- void **node_set_state** **(** :ref:`int` shader_type, :ref:`int` id, var state **)** + +.. _class_ShaderGraph_node_get_state: + +- Variant **node_get_state** **(** :ref:`int` shader_type, :ref:`int` id **)** const + + diff --git a/classes/class_shadermaterial.rst b/classes/class_shadermaterial.rst new file mode 100644 index 000000000..3326c84a9 --- /dev/null +++ b/classes/class_shadermaterial.rst @@ -0,0 +1,49 @@ +.. _class_ShaderMaterial: + +ShaderMaterial +============== + +Inherits: :ref:`Material` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shader` **(** :ref:`Shader` shader **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Shader` | :ref:`get_shader` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_shader_param` **(** :ref:`String` param, Variant value **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| Variant | :ref:`get_shader_param` **(** :ref:`String` param **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_ShaderMaterial_set_shader: + +- void **set_shader** **(** :ref:`Shader` shader **)** + +.. _class_ShaderMaterial_get_shader: + +- :ref:`Shader` **get_shader** **(** **)** const + +.. _class_ShaderMaterial_set_shader_param: + +- void **set_shader_param** **(** :ref:`String` param, Variant value **)** + +.. _class_ShaderMaterial_get_shader_param: + +- Variant **get_shader_param** **(** :ref:`String` param **)** const + + diff --git a/classes/class_shape.rst b/classes/class_shape.rst new file mode 100644 index 000000000..e413d669a --- /dev/null +++ b/classes/class_shape.rst @@ -0,0 +1,16 @@ +.. _class_Shape: + +Shape +===== + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + diff --git a/classes/class_shape2d.rst b/classes/class_shape2d.rst new file mode 100644 index 000000000..9de8182e9 --- /dev/null +++ b/classes/class_shape2d.rst @@ -0,0 +1,88 @@ +.. _class_Shape2D: + +Shape2D +======= + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Base class for all 2D Shapes. + +Member Functions +---------------- + ++----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_custom_solver_bias` **(** :ref:`float` bias **)** | ++----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_custom_solver_bias` **(** **)** const | ++----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`collide` **(** :ref:`Matrix32` local_xform, :ref:`Shape2D` with_shape, :ref:`Matrix32` shape_xform **)** | ++----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`collide_with_motion` **(** :ref:`Matrix32` local_xform, :ref:`Vector2` local_motion, :ref:`Shape2D` with_shape, :ref:`Matrix32` shape_xform, :ref:`Vector2` shape_motion **)** | ++----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Variant | :ref:`collide_and_get_contacts` **(** :ref:`Matrix32` local_xform, :ref:`Shape2D` with_shape, :ref:`Matrix32` shape_xform **)** | ++----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Variant | :ref:`collide_with_motion_and_get_contacts` **(** :ref:`Matrix32` local_xform, :ref:`Vector2` local_motion, :ref:`Shape2D` with_shape, :ref:`Matrix32` shape_xform, :ref:`Vector2` shape_motion **)** | ++----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Base class for all 2D Shapes. All 2D shape types inherit from this. + +Member Function Description +--------------------------- + +.. _class_Shape2D_set_custom_solver_bias: + +- void **set_custom_solver_bias** **(** :ref:`float` bias **)** + +Use a custom solver bias. No need to change this unless you really know what you are doing. + +The solver bias is a factor controlling how much two objects "rebound" off each other, when colliding, to avoid them getting into each other because of numerical imprecision. + +.. _class_Shape2D_get_custom_solver_bias: + +- :ref:`float` **get_custom_solver_bias** **(** **)** const + +Return the custom solver bias. + +.. _class_Shape2D_collide: + +- :ref:`bool` **collide** **(** :ref:`Matrix32` local_xform, :ref:`Shape2D` with_shape, :ref:`Matrix32` shape_xform **)** + +Return whether this shape is colliding with another. + +This method needs the transformation matrix for this shape (:ref:`code`local_xform:ref:`/code`), the shape to check collisions with (:ref:`code`with_shape:ref:`/code`), and the transformation matrix of that shape (:ref:`code`shape_xform:ref:`/code`). + +.. _class_Shape2D_collide_with_motion: + +- :ref:`bool` **collide_with_motion** **(** :ref:`Matrix32` local_xform, :ref:`Vector2` local_motion, :ref:`Shape2D` with_shape, :ref:`Matrix32` shape_xform, :ref:`Vector2` shape_motion **)** + +Return whether this shape would collide with another, if a given movemen was applied. + +This method needs the transformation matrix for this shape (:ref:`code`local_xform:ref:`/code`), the movement to test on this shape (:ref:`code`local_motion:ref:`/code`), the shape to check collisions with (:ref:`code`with_shape:ref:`/code`), the transformation matrix of that shape (:ref:`code`shape_xform:ref:`/code`), and the movement to test ont the other object (:ref:`code`shape_motion:ref:`/code`). + +.. _class_Shape2D_collide_and_get_contacts: + +- Variant **collide_and_get_contacts** **(** :ref:`Matrix32` local_xform, :ref:`Shape2D` with_shape, :ref:`Matrix32` shape_xform **)** + +Return a list of the points where this shape touches another. If there are no collisions, the list is empty. + +This method needs the transformation matrix for this shape (:ref:`code`local_xform:ref:`/code`), the shape to check collisions with (:ref:`code`with_shape:ref:`/code`), and the transformation matrix of that shape (:ref:`code`shape_xform:ref:`/code`). + +.. _class_Shape2D_collide_with_motion_and_get_contacts: + +- Variant **collide_with_motion_and_get_contacts** **(** :ref:`Matrix32` local_xform, :ref:`Vector2` local_motion, :ref:`Shape2D` with_shape, :ref:`Matrix32` shape_xform, :ref:`Vector2` shape_motion **)** + +Return a list of the points where this shape would touch another, if a given movement was applied. If there are no collisions, the list is empty. + +This method needs the transformation matrix for this shape (:ref:`code`local_xform:ref:`/code`), the movement to test on this shape (:ref:`code`local_motion:ref:`/code`), the shape to check collisions with (:ref:`code`with_shape:ref:`/code`), the transformation matrix of that shape (:ref:`code`shape_xform:ref:`/code`), and the movement to test ont the other object (:ref:`code`shape_motion:ref:`/code`). + + diff --git a/classes/class_skeleton.rst b/classes/class_skeleton.rst new file mode 100644 index 000000000..e495188c1 --- /dev/null +++ b/classes/class_skeleton.rst @@ -0,0 +1,195 @@ +.. _class_Skeleton: + +Skeleton +======== + +Inherits: :ref:`Spatial` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Skeleton for characters and animated objects. + +Member Functions +---------------- + ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_bone` **(** :ref:`String` name **)** | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`find_bone` **(** :ref:`String` name **)** const | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_bone_name` **(** :ref:`int` bone_idx **)** const | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_bone_parent` **(** :ref:`int` bone_idx **)** const | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_bone_parent` **(** :ref:`int` bone_idx, :ref:`int` parent_idx **)** | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_bone_count` **(** **)** const | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`unparent_bone_and_rest` **(** :ref:`int` bone_idx **)** | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`get_bone_rest` **(** :ref:`int` bone_idx **)** const | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_bone_rest` **(** :ref:`int` bone_idx, :ref:`Transform` rest **)** | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_bone_disable_rest` **(** :ref:`int` bone_idx, :ref:`bool` disable **)** | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_bone_rest_disabled` **(** :ref:`int` bone_idx **)** const | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`bind_child_node_to_bone` **(** :ref:`int` bone_idx, :ref:`Node` node **)** | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`unbind_child_node_from_bone` **(** :ref:`int` bone_idx, :ref:`Node` node **)** | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_bound_child_nodes_to_bone` **(** :ref:`int` bone_idx **)** const | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_bones` **(** **)** | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`get_bone_pose` **(** :ref:`int` bone_idx **)** const | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_bone_pose` **(** :ref:`int` bone_idx, :ref:`Transform` pose **)** | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_bone_global_pose` **(** :ref:`int` bone_idx, :ref:`Transform` pose **)** | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`get_bone_global_pose` **(** :ref:`int` bone_idx **)** const | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`get_bone_custom_pose` **(** :ref:`int` bone_idx **)** const | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_bone_custom_pose` **(** :ref:`int` bone_idx, :ref:`Transform` custom_pose **)** | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`get_bone_transform` **(** :ref:`int` bone_idx **)** const | ++------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **NOTIFICATION_UPDATE_SKELETON** = **50** + +Description +----------- + +Skeleton provides a hierachial interface for managing bones, including pose, rest and animation (see :ref:`Animation`). Skeleton will support rag doll dynamics in the future. + +Member Function Description +--------------------------- + +.. _class_Skeleton_add_bone: + +- void **add_bone** **(** :ref:`String` name **)** + +Add a bone, with name "name". :ref:`get_bone_count` will become the bone index. + +.. _class_Skeleton_find_bone: + +- :ref:`int` **find_bone** **(** :ref:`String` name **)** const + +Return the bone index that matches "name" as its name. + +.. _class_Skeleton_get_bone_name: + +- :ref:`String` **get_bone_name** **(** :ref:`int` bone_idx **)** const + +Return the name of the bone at index "index" + +.. _class_Skeleton_get_bone_parent: + +- :ref:`int` **get_bone_parent** **(** :ref:`int` bone_idx **)** const + +Return the bone index which is the parent of the bone at "bone_idx". If -1, then bone has no parent. Note that the parent bone returned will always be less than "bone_idx". + +.. _class_Skeleton_set_bone_parent: + +- void **set_bone_parent** **(** :ref:`int` bone_idx, :ref:`int` parent_idx **)** + +Set the bone index "parent_idx" as the parent of the bone at "bone_idx". If -1, then bone has no parent. Note: "parent_idx" must be less than "bone_idx". + +.. _class_Skeleton_get_bone_count: + +- :ref:`int` **get_bone_count** **(** **)** const + +Return the amount of bones in the skeleton. + +.. _class_Skeleton_unparent_bone_and_rest: + +- void **unparent_bone_and_rest** **(** :ref:`int` bone_idx **)** + +.. _class_Skeleton_get_bone_rest: + +- :ref:`Transform` **get_bone_rest** **(** :ref:`int` bone_idx **)** const + +Return the rest transform for a bone "bone_idx". + +.. _class_Skeleton_set_bone_rest: + +- void **set_bone_rest** **(** :ref:`int` bone_idx, :ref:`Transform` rest **)** + +Set the rest transform for bone "bone_idx" + +.. _class_Skeleton_set_bone_disable_rest: + +- void **set_bone_disable_rest** **(** :ref:`int` bone_idx, :ref:`bool` disable **)** + +.. _class_Skeleton_is_bone_rest_disabled: + +- :ref:`bool` **is_bone_rest_disabled** **(** :ref:`int` bone_idx **)** const + +.. _class_Skeleton_bind_child_node_to_bone: + +- void **bind_child_node_to_bone** **(** :ref:`int` bone_idx, :ref:`Node` node **)** + +Deprecated soon. + +.. _class_Skeleton_unbind_child_node_from_bone: + +- void **unbind_child_node_from_bone** **(** :ref:`int` bone_idx, :ref:`Node` node **)** + +Deprecated soon. + +.. _class_Skeleton_get_bound_child_nodes_to_bone: + +- :ref:`Array` **get_bound_child_nodes_to_bone** **(** :ref:`int` bone_idx **)** const + +Deprecated soon. + +.. _class_Skeleton_clear_bones: + +- void **clear_bones** **(** **)** + +Clear all the bones in this skeleton. + +.. _class_Skeleton_get_bone_pose: + +- :ref:`Transform` **get_bone_pose** **(** :ref:`int` bone_idx **)** const + +Return the pose transform for bone "bone_idx". + +.. _class_Skeleton_set_bone_pose: + +- void **set_bone_pose** **(** :ref:`int` bone_idx, :ref:`Transform` pose **)** + +Return the pose transform for bone "bone_idx". + +.. _class_Skeleton_set_bone_global_pose: + +- void **set_bone_global_pose** **(** :ref:`int` bone_idx, :ref:`Transform` pose **)** + +.. _class_Skeleton_get_bone_global_pose: + +- :ref:`Transform` **get_bone_global_pose** **(** :ref:`int` bone_idx **)** const + +.. _class_Skeleton_get_bone_custom_pose: + +- :ref:`Transform` **get_bone_custom_pose** **(** :ref:`int` bone_idx **)** const + +.. _class_Skeleton_set_bone_custom_pose: + +- void **set_bone_custom_pose** **(** :ref:`int` bone_idx, :ref:`Transform` custom_pose **)** + +.. _class_Skeleton_get_bone_transform: + +- :ref:`Transform` **get_bone_transform** **(** :ref:`int` bone_idx **)** const + + diff --git a/classes/class_slider.rst b/classes/class_slider.rst new file mode 100644 index 000000000..71818e7e7 --- /dev/null +++ b/classes/class_slider.rst @@ -0,0 +1,62 @@ +.. _class_Slider: + +Slider +====== + +Inherits: :ref:`Range` +----------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Base class for GUI Sliders. + +Member Functions +---------------- + ++--------------------------+----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_ticks` **(** :ref:`int` count **)** | ++--------------------------+----------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_ticks` **(** **)** const | ++--------------------------+----------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_ticks_on_borders` **(** **)** const | ++--------------------------+----------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_ticks_on_borders` **(** :ref:`bool` ticks_on_border **)** | ++--------------------------+----------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Base class for GUI Sliders. + +Member Function Description +--------------------------- + +.. _class_Slider_set_ticks: + +- void **set_ticks** **(** :ref:`int` count **)** + +Set amount of ticks to display in slider. + +.. _class_Slider_get_ticks: + +- :ref:`int` **get_ticks** **(** **)** const + +Return amounts of ticks to display on slider. + +.. _class_Slider_get_ticks_on_borders: + +- :ref:`bool` **get_ticks_on_borders** **(** **)** const + +Return true if ticks are visible on borders. + +.. _class_Slider_set_ticks_on_borders: + +- void **set_ticks_on_borders** **(** :ref:`bool` ticks_on_border **)** + +Set true if ticks are visible on borders. + + diff --git a/classes/class_sliderjoint.rst b/classes/class_sliderjoint.rst new file mode 100644 index 000000000..493a02be6 --- /dev/null +++ b/classes/class_sliderjoint.rst @@ -0,0 +1,64 @@ +.. _class_SliderJoint: + +SliderJoint +=========== + +Inherits: :ref:`Joint` +----------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_param` **(** :ref:`int` param, :ref:`float` value **)** | ++----------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_param` **(** :ref:`int` param **)** const | ++----------------------------+--------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **PARAM_LINEAR_LIMIT_UPPER** = **0** +- **PARAM_LINEAR_LIMIT_LOWER** = **1** +- **PARAM_LINEAR_LIMIT_SOFTNESS** = **2** +- **PARAM_LINEAR_LIMIT_RESTITUTION** = **3** +- **PARAM_LINEAR_LIMIT_DAMPING** = **4** +- **PARAM_LINEAR_MOTION_SOFTNESS** = **5** +- **PARAM_LINEAR_MOTION_RESTITUTION** = **6** +- **PARAM_LINEAR_MOTION_DAMPING** = **7** +- **PARAM_LINEAR_ORTHOGONAL_SOFTNESS** = **8** +- **PARAM_LINEAR_ORTHOGONAL_RESTITUTION** = **9** +- **PARAM_LINEAR_ORTHOGONAL_DAMPING** = **10** +- **PARAM_ANGULAR_LIMIT_UPPER** = **11** +- **PARAM_ANGULAR_LIMIT_LOWER** = **12** +- **PARAM_ANGULAR_LIMIT_SOFTNESS** = **13** +- **PARAM_ANGULAR_LIMIT_RESTITUTION** = **14** +- **PARAM_ANGULAR_LIMIT_DAMPING** = **15** +- **PARAM_ANGULAR_MOTION_SOFTNESS** = **16** +- **PARAM_ANGULAR_MOTION_RESTITUTION** = **17** +- **PARAM_ANGULAR_MOTION_DAMPING** = **18** +- **PARAM_ANGULAR_ORTHOGONAL_SOFTNESS** = **19** +- **PARAM_ANGULAR_ORTHOGONAL_RESTITUTION** = **20** +- **PARAM_ANGULAR_ORTHOGONAL_DAMPING** = **21** +- **PARAM_MAX** = **22** + +Member Function Description +--------------------------- + +.. _class_SliderJoint_set_param: + +- void **set_param** **(** :ref:`int` param, :ref:`float` value **)** + +.. _class_SliderJoint_get_param: + +- :ref:`float` **get_param** **(** :ref:`int` param **)** const + + diff --git a/classes/class_soundplayer2d.rst b/classes/class_soundplayer2d.rst new file mode 100644 index 000000000..412978335 --- /dev/null +++ b/classes/class_soundplayer2d.rst @@ -0,0 +1,52 @@ +.. _class_SoundPlayer2D: + +SoundPlayer2D +============= + +Inherits: :ref:`Node2D` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Base class for playing spatial 2D sound. + +Member Functions +---------------- + ++----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_param` **(** :ref:`int` param, :ref:`float` value **)** | ++----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_param` **(** :ref:`int` param **)** const | ++----------------------------+----------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **PARAM_VOLUME_DB** = **0** +- **PARAM_PITCH_SCALE** = **1** +- **PARAM_ATTENUATION_MIN_DISTANCE** = **2** +- **PARAM_ATTENUATION_MAX_DISTANCE** = **3** +- **PARAM_ATTENUATION_DISTANCE_EXP** = **4** +- **PARAM_MAX** = **5** + +Description +----------- + +Base class for playing spatial 2D sound. + +Member Function Description +--------------------------- + +.. _class_SoundPlayer2D_set_param: + +- void **set_param** **(** :ref:`int` param, :ref:`float` value **)** + +.. _class_SoundPlayer2D_get_param: + +- :ref:`float` **get_param** **(** :ref:`int` param **)** const + + diff --git a/classes/class_soundroomparams.rst b/classes/class_soundroomparams.rst new file mode 100644 index 000000000..2d83d1d3a --- /dev/null +++ b/classes/class_soundroomparams.rst @@ -0,0 +1,61 @@ +.. _class_SoundRoomParams: + +SoundRoomParams +=============== + +Inherits: :ref:`Node` +--------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_param` **(** :ref:`int` param, :ref:`float` value **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_param` **(** :ref:`int` param **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_reverb_mode` **(** :ref:`int` reverb_mode **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_reverb_mode` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_force_params_to_all_sources` **(** :ref:`bool` enabled **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_forcing_params_to_all_sources` **(** **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_SoundRoomParams_set_param: + +- void **set_param** **(** :ref:`int` param, :ref:`float` value **)** + +.. _class_SoundRoomParams_get_param: + +- :ref:`float` **get_param** **(** :ref:`int` param **)** const + +.. _class_SoundRoomParams_set_reverb_mode: + +- void **set_reverb_mode** **(** :ref:`int` reverb_mode **)** + +.. _class_SoundRoomParams_get_reverb_mode: + +- :ref:`int` **get_reverb_mode** **(** **)** const + +.. _class_SoundRoomParams_set_force_params_to_all_sources: + +- void **set_force_params_to_all_sources** **(** :ref:`bool` enabled **)** + +.. _class_SoundRoomParams_is_forcing_params_to_all_sources: + +- :ref:`bool` **is_forcing_params_to_all_sources** **(** **)** + + diff --git a/classes/class_spatial.rst b/classes/class_spatial.rst new file mode 100644 index 000000000..29046473c --- /dev/null +++ b/classes/class_spatial.rst @@ -0,0 +1,269 @@ +.. _class_Spatial: + +Spatial +======= + +Inherits: :ref:`Node` +--------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Base class for all 3D nodes. + +Member Functions +---------------- + ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_transform` **(** :ref:`Transform` local **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`get_transform` **(** **)** const | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_translation` **(** :ref:`Vector3` translation **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_translation` **(** **)** const | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_rotation` **(** :ref:`Vector3` rotation **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_rotation` **(** **)** const | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_scale` **(** :ref:`Vector3` scale **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_scale` **(** **)** const | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_global_transform` **(** :ref:`Transform` global **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`get_global_transform` **(** **)** const | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_parent_spatial` **(** **)** const | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_ignore_transform_notification` **(** :ref:`bool` enabled **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_as_toplevel` **(** :ref:`bool` enable **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_set_as_toplevel` **(** **)** const | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`World` | :ref:`get_world` **(** **)** const | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`update_gizmo` **(** **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_gizmo` **(** SpatialGizmo gizmo **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| SpatialGizmo | :ref:`get_gizmo` **(** **)** const | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`show` **(** **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`hide` **(** **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_visible` **(** **)** const | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_hidden` **(** **)** const | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_hidden` **(** :ref:`bool` hidden **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_notify_local_transform` **(** :ref:`bool` enable **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_local_transform_notification_enabled` **(** **)** const | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`rotate` **(** :ref:`Vector3` normal, :ref:`float` radians **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_rotate` **(** :ref:`Vector3` normal, :ref:`float` radians **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`rotate_x` **(** :ref:`float` radians **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`rotate_y` **(** :ref:`float` radians **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`rotate_z` **(** :ref:`float` radians **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`translate` **(** :ref:`Vector3` offset **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_translate` **(** :ref:`Vector3` offset **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`orthonormalize` **(** **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_identity` **(** **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`look_at` **(** :ref:`Vector3` target, :ref:`Vector3` up **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`look_at_from_pos` **(** :ref:`Vector3` pos, :ref:`Vector3` target, :ref:`Vector3` up **)** | ++------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **visibility_changed** **(** **)** + +Numeric Constants +----------------- + +- **NOTIFICATION_TRANSFORM_CHANGED** = **29** --- Spatial nodes receive this notifacation with their global transform changes. This means that either the current or a parent node changed its transform. +- **NOTIFICATION_ENTER_WORLD** = **41** +- **NOTIFICATION_EXIT_WORLD** = **42** +- **NOTIFICATION_VISIBILITY_CHANGED** = **43** + +Description +----------- + +Spatial is the base for every type of 3D :ref:`Node`. It contains a 3D :ref:`Transform` which can be set or get as local or global. If a Spatial :ref:`Node` has Spatial children, their transforms will be relative to the parent. + +Member Function Description +--------------------------- + +.. _class_Spatial_set_transform: + +- void **set_transform** **(** :ref:`Transform` local **)** + +Set the transform locally, relative to the parent spatial node. + +.. _class_Spatial_get_transform: + +- :ref:`Transform` **get_transform** **(** **)** const + +Return the local transform, relative to the bone parent. + +.. _class_Spatial_set_translation: + +- void **set_translation** **(** :ref:`Vector3` translation **)** + +.. _class_Spatial_get_translation: + +- :ref:`Vector3` **get_translation** **(** **)** const + +.. _class_Spatial_set_rotation: + +- void **set_rotation** **(** :ref:`Vector3` rotation **)** + +.. _class_Spatial_get_rotation: + +- :ref:`Vector3` **get_rotation** **(** **)** const + +.. _class_Spatial_set_scale: + +- void **set_scale** **(** :ref:`Vector3` scale **)** + +.. _class_Spatial_get_scale: + +- :ref:`Vector3` **get_scale** **(** **)** const + +.. _class_Spatial_set_global_transform: + +- void **set_global_transform** **(** :ref:`Transform` global **)** + +Set the transform globally, relative to worldspace. + +.. _class_Spatial_get_global_transform: + +- :ref:`Transform` **get_global_transform** **(** **)** const + +Return the gloal transform, relative to worldspace. + +.. _class_Spatial_get_parent_spatial: + +- :ref:`Object` **get_parent_spatial** **(** **)** const + +Return the parent :ref:`Spatial`, or an empty :ref:`Object` if no parent exists or parent is not of type :ref:`Spatial`. + +.. _class_Spatial_set_ignore_transform_notification: + +- void **set_ignore_transform_notification** **(** :ref:`bool` enabled **)** + +.. _class_Spatial_set_as_toplevel: + +- void **set_as_toplevel** **(** :ref:`bool` enable **)** + +.. _class_Spatial_is_set_as_toplevel: + +- :ref:`bool` **is_set_as_toplevel** **(** **)** const + +.. _class_Spatial_get_world: + +- :ref:`World` **get_world** **(** **)** const + +.. _class_Spatial_update_gizmo: + +- void **update_gizmo** **(** **)** + +.. _class_Spatial_set_gizmo: + +- void **set_gizmo** **(** SpatialGizmo gizmo **)** + +.. _class_Spatial_get_gizmo: + +- SpatialGizmo **get_gizmo** **(** **)** const + +.. _class_Spatial_show: + +- void **show** **(** **)** + +.. _class_Spatial_hide: + +- void **hide** **(** **)** + +.. _class_Spatial_is_visible: + +- :ref:`bool` **is_visible** **(** **)** const + +.. _class_Spatial_is_hidden: + +- :ref:`bool` **is_hidden** **(** **)** const + +.. _class_Spatial_set_hidden: + +- void **set_hidden** **(** :ref:`bool` hidden **)** + +.. _class_Spatial_set_notify_local_transform: + +- void **set_notify_local_transform** **(** :ref:`bool` enable **)** + +.. _class_Spatial_is_local_transform_notification_enabled: + +- :ref:`bool` **is_local_transform_notification_enabled** **(** **)** const + +.. _class_Spatial_rotate: + +- void **rotate** **(** :ref:`Vector3` normal, :ref:`float` radians **)** + +.. _class_Spatial_global_rotate: + +- void **global_rotate** **(** :ref:`Vector3` normal, :ref:`float` radians **)** + +.. _class_Spatial_rotate_x: + +- void **rotate_x** **(** :ref:`float` radians **)** + +.. _class_Spatial_rotate_y: + +- void **rotate_y** **(** :ref:`float` radians **)** + +.. _class_Spatial_rotate_z: + +- void **rotate_z** **(** :ref:`float` radians **)** + +.. _class_Spatial_translate: + +- void **translate** **(** :ref:`Vector3` offset **)** + +.. _class_Spatial_global_translate: + +- void **global_translate** **(** :ref:`Vector3` offset **)** + +.. _class_Spatial_orthonormalize: + +- void **orthonormalize** **(** **)** + +.. _class_Spatial_set_identity: + +- void **set_identity** **(** **)** + +.. _class_Spatial_look_at: + +- void **look_at** **(** :ref:`Vector3` target, :ref:`Vector3` up **)** + +.. _class_Spatial_look_at_from_pos: + +- void **look_at_from_pos** **(** :ref:`Vector3` pos, :ref:`Vector3` target, :ref:`Vector3` up **)** + + diff --git a/classes/class_spatialplayer.rst b/classes/class_spatialplayer.rst new file mode 100644 index 000000000..fa0c26dea --- /dev/null +++ b/classes/class_spatialplayer.rst @@ -0,0 +1,49 @@ +.. _class_SpatialPlayer: + +SpatialPlayer +============= + +Inherits: :ref:`Spatial` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_param` **(** :ref:`int` param, :ref:`float` value **)** | ++----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_param` **(** :ref:`int` param **)** const | ++----------------------------+----------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **PARAM_VOLUME_DB** = **0** +- **PARAM_PITCH_SCALE** = **1** +- **PARAM_ATTENUATION_MIN_DISTANCE** = **2** +- **PARAM_ATTENUATION_MAX_DISTANCE** = **3** +- **PARAM_ATTENUATION_DISTANCE_EXP** = **4** +- **PARAM_EMISSION_CONE_DEGREES** = **5** +- **PARAM_EMISSION_CONE_ATTENUATION_DB** = **6** +- **PARAM_MAX** = **7** + +Member Function Description +--------------------------- + +.. _class_SpatialPlayer_set_param: + +- void **set_param** **(** :ref:`int` param, :ref:`float` value **)** + +.. _class_SpatialPlayer_get_param: + +- :ref:`float` **get_param** **(** :ref:`int` param **)** const + + diff --git a/classes/class_spatialsampleplayer.rst b/classes/class_spatialsampleplayer.rst new file mode 100644 index 000000000..8d1ebd4ec --- /dev/null +++ b/classes/class_spatialsampleplayer.rst @@ -0,0 +1,91 @@ +.. _class_SpatialSamplePlayer: + +SpatialSamplePlayer +=================== + +Inherits: :ref:`SpatialPlayer` +--------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_sample_library` **(** :ref:`SampleLibrary` library **)** | ++--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`SampleLibrary` | :ref:`get_sample_library` **(** **)** const | ++--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_polyphony` **(** :ref:`int` voices **)** | ++--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_polyphony` **(** **)** const | ++--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`play` **(** :ref:`String` sample, :ref:`int` voice=-2 **)** | ++--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`voice_set_pitch_scale` **(** :ref:`int` voice, :ref:`float` ratio **)** | ++--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`voice_set_volume_scale_db` **(** :ref:`int` voice, :ref:`float` db **)** | ++--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_voice_active` **(** :ref:`int` voice **)** const | ++--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`stop_voice` **(** :ref:`int` voice **)** | ++--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`stop_all` **(** **)** | ++--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **INVALID_VOICE** = **-1** +- **NEXT_VOICE** = **-2** + +Member Function Description +--------------------------- + +.. _class_SpatialSamplePlayer_set_sample_library: + +- void **set_sample_library** **(** :ref:`SampleLibrary` library **)** + +.. _class_SpatialSamplePlayer_get_sample_library: + +- :ref:`SampleLibrary` **get_sample_library** **(** **)** const + +.. _class_SpatialSamplePlayer_set_polyphony: + +- void **set_polyphony** **(** :ref:`int` voices **)** + +.. _class_SpatialSamplePlayer_get_polyphony: + +- :ref:`int` **get_polyphony** **(** **)** const + +.. _class_SpatialSamplePlayer_play: + +- :ref:`int` **play** **(** :ref:`String` sample, :ref:`int` voice=-2 **)** + +.. _class_SpatialSamplePlayer_voice_set_pitch_scale: + +- void **voice_set_pitch_scale** **(** :ref:`int` voice, :ref:`float` ratio **)** + +.. _class_SpatialSamplePlayer_voice_set_volume_scale_db: + +- void **voice_set_volume_scale_db** **(** :ref:`int` voice, :ref:`float` db **)** + +.. _class_SpatialSamplePlayer_is_voice_active: + +- :ref:`bool` **is_voice_active** **(** :ref:`int` voice **)** const + +.. _class_SpatialSamplePlayer_stop_voice: + +- void **stop_voice** **(** :ref:`int` voice **)** + +.. _class_SpatialSamplePlayer_stop_all: + +- void **stop_all** **(** **)** + + diff --git a/classes/class_spatialsound2dserver.rst b/classes/class_spatialsound2dserver.rst new file mode 100644 index 000000000..6d4900e3c --- /dev/null +++ b/classes/class_spatialsound2dserver.rst @@ -0,0 +1,21 @@ +.. _class_SpatialSound2DServer: + +SpatialSound2DServer +==================== + +Inherits: :ref:`Object` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Server for Spatial 2D Sound. + +Description +----------- + +Server for Spatial 2D Sound. + diff --git a/classes/class_spatialsound2dserversw.rst b/classes/class_spatialsound2dserversw.rst new file mode 100644 index 000000000..062b3e468 --- /dev/null +++ b/classes/class_spatialsound2dserversw.rst @@ -0,0 +1,16 @@ +.. _class_SpatialSound2DServerSW: + +SpatialSound2DServerSW +====================== + +Inherits: :ref:`SpatialSound2DServer` +----------------------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + diff --git a/classes/class_spatialsoundserver.rst b/classes/class_spatialsoundserver.rst new file mode 100644 index 000000000..6626ab229 --- /dev/null +++ b/classes/class_spatialsoundserver.rst @@ -0,0 +1,16 @@ +.. _class_SpatialSoundServer: + +SpatialSoundServer +================== + +Inherits: :ref:`Object` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + diff --git a/classes/class_spatialsoundserversw.rst b/classes/class_spatialsoundserversw.rst new file mode 100644 index 000000000..eac102bee --- /dev/null +++ b/classes/class_spatialsoundserversw.rst @@ -0,0 +1,16 @@ +.. _class_SpatialSoundServerSW: + +SpatialSoundServerSW +==================== + +Inherits: :ref:`SpatialSoundServer` +------------------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + diff --git a/classes/class_spatialstreamplayer.rst b/classes/class_spatialstreamplayer.rst new file mode 100644 index 000000000..d031abb23 --- /dev/null +++ b/classes/class_spatialstreamplayer.rst @@ -0,0 +1,169 @@ +.. _class_SpatialStreamPlayer: + +SpatialStreamPlayer +=================== + +Inherits: :ref:`SpatialPlayer` +--------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_stream` **(** Stream stream **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Stream | :ref:`get_stream` **(** **)** const | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`play` **(** :ref:`float` offset=0 **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`stop` **(** **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_playing` **(** **)** const | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_paused` **(** :ref:`bool` paused **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_paused` **(** **)** const | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_loop` **(** :ref:`bool` enabled **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_loop` **(** **)** const | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_volume` **(** :ref:`float` volume **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_volume` **(** **)** const | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_volume_db` **(** :ref:`float` db **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_volume_db` **(** **)** const | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_buffering_msec` **(** :ref:`int` msec **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_buffering_msec` **(** **)** const | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_loop_restart_time` **(** :ref:`float` secs **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_loop_restart_time` **(** **)** const | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_stream_name` **(** **)** const | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_loop_count` **(** **)** const | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_pos` **(** **)** const | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`seek_pos` **(** :ref:`float` time **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_autoplay` **(** :ref:`bool` enabled **)** | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_autoplay` **(** **)** const | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_length` **(** **)** const | ++------------------------------+----------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_SpatialStreamPlayer_set_stream: + +- void **set_stream** **(** Stream stream **)** + +.. _class_SpatialStreamPlayer_get_stream: + +- Stream **get_stream** **(** **)** const + +.. _class_SpatialStreamPlayer_play: + +- void **play** **(** :ref:`float` offset=0 **)** + +.. _class_SpatialStreamPlayer_stop: + +- void **stop** **(** **)** + +.. _class_SpatialStreamPlayer_is_playing: + +- :ref:`bool` **is_playing** **(** **)** const + +.. _class_SpatialStreamPlayer_set_paused: + +- void **set_paused** **(** :ref:`bool` paused **)** + +.. _class_SpatialStreamPlayer_is_paused: + +- :ref:`bool` **is_paused** **(** **)** const + +.. _class_SpatialStreamPlayer_set_loop: + +- void **set_loop** **(** :ref:`bool` enabled **)** + +.. _class_SpatialStreamPlayer_has_loop: + +- :ref:`bool` **has_loop** **(** **)** const + +.. _class_SpatialStreamPlayer_set_volume: + +- void **set_volume** **(** :ref:`float` volume **)** + +.. _class_SpatialStreamPlayer_get_volume: + +- :ref:`float` **get_volume** **(** **)** const + +.. _class_SpatialStreamPlayer_set_volume_db: + +- void **set_volume_db** **(** :ref:`float` db **)** + +.. _class_SpatialStreamPlayer_get_volume_db: + +- :ref:`float` **get_volume_db** **(** **)** const + +.. _class_SpatialStreamPlayer_set_buffering_msec: + +- void **set_buffering_msec** **(** :ref:`int` msec **)** + +.. _class_SpatialStreamPlayer_get_buffering_msec: + +- :ref:`int` **get_buffering_msec** **(** **)** const + +.. _class_SpatialStreamPlayer_set_loop_restart_time: + +- void **set_loop_restart_time** **(** :ref:`float` secs **)** + +.. _class_SpatialStreamPlayer_get_loop_restart_time: + +- :ref:`float` **get_loop_restart_time** **(** **)** const + +.. _class_SpatialStreamPlayer_get_stream_name: + +- :ref:`String` **get_stream_name** **(** **)** const + +.. _class_SpatialStreamPlayer_get_loop_count: + +- :ref:`int` **get_loop_count** **(** **)** const + +.. _class_SpatialStreamPlayer_get_pos: + +- :ref:`float` **get_pos** **(** **)** const + +.. _class_SpatialStreamPlayer_seek_pos: + +- void **seek_pos** **(** :ref:`float` time **)** + +.. _class_SpatialStreamPlayer_set_autoplay: + +- void **set_autoplay** **(** :ref:`bool` enabled **)** + +.. _class_SpatialStreamPlayer_has_autoplay: + +- :ref:`bool` **has_autoplay** **(** **)** const + +.. _class_SpatialStreamPlayer_get_length: + +- :ref:`float` **get_length** **(** **)** const + + diff --git a/classes/class_sphereshape.rst b/classes/class_sphereshape.rst new file mode 100644 index 000000000..4950852cd --- /dev/null +++ b/classes/class_sphereshape.rst @@ -0,0 +1,37 @@ +.. _class_SphereShape: + +SphereShape +=========== + +Inherits: :ref:`Shape` +----------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------+------------------------------------------------------------------------------------------------+ +| void | :ref:`set_radius` **(** :ref:`float` radius **)** | ++----------------------------+------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_radius` **(** **)** const | ++----------------------------+------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_SphereShape_set_radius: + +- void **set_radius** **(** :ref:`float` radius **)** + +.. _class_SphereShape_get_radius: + +- :ref:`float` **get_radius** **(** **)** const + + diff --git a/classes/class_spinbox.rst b/classes/class_spinbox.rst new file mode 100644 index 000000000..18c1fb729 --- /dev/null +++ b/classes/class_spinbox.rst @@ -0,0 +1,82 @@ +.. _class_SpinBox: + +SpinBox +======= + +Inherits: :ref:`Range` +----------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Numerical input text field. + +Member Functions +---------------- + ++------------------------------+------------------------------------------------------------------------------------------------+ +| void | :ref:`set_suffix` **(** :ref:`String` suffix **)** | ++------------------------------+------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_suffix` **(** **)** const | ++------------------------------+------------------------------------------------------------------------------------------------+ +| void | :ref:`set_prefix` **(** :ref:`String` prefix **)** | ++------------------------------+------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_prefix` **(** **)** const | ++------------------------------+------------------------------------------------------------------------------------------------+ +| void | :ref:`set_editable` **(** :ref:`bool` editable **)** | ++------------------------------+------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_editable` **(** **)** const | ++------------------------------+------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_line_edit` **(** **)** | ++------------------------------+------------------------------------------------------------------------------------------------+ + +Description +----------- + +SpinBox is a numerical input text field. It allows entering integers and floats. + +Member Function Description +--------------------------- + +.. _class_SpinBox_set_suffix: + +- void **set_suffix** **(** :ref:`String` suffix **)** + +Set a specific suffix. + +.. _class_SpinBox_get_suffix: + +- :ref:`String` **get_suffix** **(** **)** const + +Return the specific suffix. + +.. _class_SpinBox_set_prefix: + +- void **set_prefix** **(** :ref:`String` prefix **)** + +Set a prefix. + +.. _class_SpinBox_get_prefix: + +- :ref:`String` **get_prefix** **(** **)** const + +.. _class_SpinBox_set_editable: + +- void **set_editable** **(** :ref:`bool` editable **)** + +Set whether the spinbox is editable. + +.. _class_SpinBox_is_editable: + +- :ref:`bool` **is_editable** **(** **)** const + +Return if the spinbox is editable. + +.. _class_SpinBox_get_line_edit: + +- :ref:`Object` **get_line_edit** **(** **)** + + diff --git a/classes/class_splitcontainer.rst b/classes/class_splitcontainer.rst new file mode 100644 index 000000000..fe78cc88e --- /dev/null +++ b/classes/class_splitcontainer.rst @@ -0,0 +1,86 @@ +.. _class_SplitContainer: + +SplitContainer +============== + +Inherits: :ref:`Container` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Container for splitting and adjusting. + +Member Functions +---------------- + ++--------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_split_offset` **(** :ref:`int` offset **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_split_offset` **(** **)** const | ++--------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collapsed` **(** :ref:`bool` collapsed **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_collapsed` **(** **)** const | ++--------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_dragger_visibility` **(** :ref:`int` mode **)** | ++--------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_dragger_visibility` **(** **)** const | ++--------------------------+---------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **dragged** **(** :ref:`int` offset **)** + +Numeric Constants +----------------- + +- **DRAGGER_VISIBLE** = **0** +- **DRAGGER_HIDDEN** = **1** +- **DRAGGER_HIDDEN_COLLAPSED** = **2** + +Description +----------- + +Container for splitting two controls vertically or horizontally, with a grabber that allows adjusting the split offset or ratio. + +Member Function Description +--------------------------- + +.. _class_SplitContainer_set_split_offset: + +- void **set_split_offset** **(** :ref:`int` offset **)** + +Set the split offset. + +.. _class_SplitContainer_get_split_offset: + +- :ref:`int` **get_split_offset** **(** **)** const + +Return the split offset. + +.. _class_SplitContainer_set_collapsed: + +- void **set_collapsed** **(** :ref:`bool` collapsed **)** + +Set if the split must be collapsed. + +.. _class_SplitContainer_is_collapsed: + +- :ref:`bool` **is_collapsed** **(** **)** const + +Return if the split is collapsed. + +.. _class_SplitContainer_set_dragger_visibility: + +- void **set_dragger_visibility** **(** :ref:`int` mode **)** + +.. _class_SplitContainer_get_dragger_visibility: + +- :ref:`int` **get_dragger_visibility** **(** **)** const + + diff --git a/classes/class_spotlight.rst b/classes/class_spotlight.rst new file mode 100644 index 000000000..ec1ae4ebd --- /dev/null +++ b/classes/class_spotlight.rst @@ -0,0 +1,21 @@ +.. _class_SpotLight: + +SpotLight +========= + +Inherits: :ref:`Light` +----------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Spotlight :ref:`Light`, such as a reflector spotlight or a latern. + +Description +----------- + +A SpotLight light is a type of :ref:`Light` node that emits lights in a specific direction, in the shape of a cone. The light is attenuated through the distance and this attenuation can be configured by changing the energy, radius and attenuation parameters of :ref:`Light`. TODO: Image of a spotlight. + diff --git a/classes/class_sprite.rst b/classes/class_sprite.rst new file mode 100644 index 000000000..3530cee69 --- /dev/null +++ b/classes/class_sprite.rst @@ -0,0 +1,211 @@ +.. _class_Sprite: + +Sprite +====== + +Inherits: :ref:`Node2D` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +General purpose Sprite node. + +Member Functions +---------------- + ++--------------------------------+---------------------------------------------------------------------------------------------------+ +| void | :ref:`set_texture` **(** :ref:`Texture` texture **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_texture` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------+ +| void | :ref:`set_centered` **(** :ref:`bool` centered **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_centered` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------+ +| void | :ref:`set_offset` **(** :ref:`Vector2` offset **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_offset` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------+ +| void | :ref:`set_flip_h` **(** :ref:`bool` flip_h **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_flipped_h` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------+ +| void | :ref:`set_flip_v` **(** :ref:`bool` flip_v **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_flipped_v` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------+ +| void | :ref:`set_region` **(** :ref:`bool` enabled **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_region` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------+ +| void | :ref:`set_region_rect` **(** :ref:`Rect2` rect **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`get_region_rect` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------+ +| void | :ref:`set_frame` **(** :ref:`int` frame **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_frame` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------+ +| void | :ref:`set_vframes` **(** :ref:`int` vframes **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_vframes` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------+ +| void | :ref:`set_hframes` **(** :ref:`int` hframes **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_hframes` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------+ +| void | :ref:`set_modulate` **(** :ref:`Color` modulate **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_modulate` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **frame_changed** **(** **)** + +Description +----------- + +General purpose Sprite node. This Sprite node can show any texture as a sprite. The texture can be used as a spritesheet for animation, or only a region from a bigger texture can referenced, like an atlas. + +Member Function Description +--------------------------- + +.. _class_Sprite_set_texture: + +- void **set_texture** **(** :ref:`Texture` texture **)** + +Set the base texture for the sprite. + +.. _class_Sprite_get_texture: + +- :ref:`Texture` **get_texture** **(** **)** const + +Return the base texture for the sprite. + +.. _class_Sprite_set_centered: + +- void **set_centered** **(** :ref:`bool` centered **)** + +Set whether the sprite should be centered on the origin. + +.. _class_Sprite_is_centered: + +- :ref:`bool` **is_centered** **(** **)** const + +Return if the sprite is centered at the local origin. + +.. _class_Sprite_set_offset: + +- void **set_offset** **(** :ref:`Vector2` offset **)** + +Set the sprite draw offset, useful for setting rotation pivots. + +.. _class_Sprite_get_offset: + +- :ref:`Vector2` **get_offset** **(** **)** const + +Return sprite draw offst. + +.. _class_Sprite_set_flip_h: + +- void **set_flip_h** **(** :ref:`bool` flip_h **)** + +Set true to flip the sprite horizontaly. + +.. _class_Sprite_is_flipped_h: + +- :ref:`bool` **is_flipped_h** **(** **)** const + +Return true if the sprite is flipped horizontally. + +.. _class_Sprite_set_flip_v: + +- void **set_flip_v** **(** :ref:`bool` flip_v **)** + +Set true to flip the sprite vertically. + +.. _class_Sprite_is_flipped_v: + +- :ref:`bool` **is_flipped_v** **(** **)** const + +Return true if the sprite is flipped vertically. + +.. _class_Sprite_set_region: + +- void **set_region** **(** :ref:`bool` enabled **)** + +Set the sprite as a sub-region of a bigger texture. Useful for texture-atlases. + +.. _class_Sprite_is_region: + +- :ref:`bool` **is_region** **(** **)** const + +Return if the sprite reads from a region. + +.. _class_Sprite_set_region_rect: + +- void **set_region_rect** **(** :ref:`Rect2` rect **)** + +Set the region rect to read from. + +.. _class_Sprite_get_region_rect: + +- :ref:`Rect2` **get_region_rect** **(** **)** const + +Return the region rect to read from. + +.. _class_Sprite_set_frame: + +- void **set_frame** **(** :ref:`int` frame **)** + +Set the texture frame for a sprite-sheet, works when vframes or hframes are greater than 1. + +.. _class_Sprite_get_frame: + +- :ref:`int` **get_frame** **(** **)** const + +Return the texture frame for a sprite-sheet, works when vframes or hframes are greater than 1. + +.. _class_Sprite_set_vframes: + +- void **set_vframes** **(** :ref:`int` vframes **)** + +Set the amount of vertical frames and converts the sprite into a sprite-sheet. This is useful for animation. + +.. _class_Sprite_get_vframes: + +- :ref:`int` **get_vframes** **(** **)** const + +Return the amount of vertical frames. See :ref:`set_vframes`. + +.. _class_Sprite_set_hframes: + +- void **set_hframes** **(** :ref:`int` hframes **)** + +Set the amount of horizontal frames and converts the sprite into a sprite-sheet. This is useful for animation. + +.. _class_Sprite_get_hframes: + +- :ref:`int` **get_hframes** **(** **)** const + +Return the amount of horizontal frames. See :ref:`set_hframes`. + +.. _class_Sprite_set_modulate: + +- void **set_modulate** **(** :ref:`Color` modulate **)** + +Set color modulation for the sprite. All sprite pixels are multiplied by this color. Color may contain rgb values above 1 to achieve a highlight effect. + +.. _class_Sprite_get_modulate: + +- :ref:`Color` **get_modulate** **(** **)** const + +Return color modulation for the sprite. All sprite pixels are multiplied by this color. + + diff --git a/classes/class_sprite3d.rst b/classes/class_sprite3d.rst new file mode 100644 index 000000000..0f96343d4 --- /dev/null +++ b/classes/class_sprite3d.rst @@ -0,0 +1,102 @@ +.. _class_Sprite3D: + +Sprite3D +======== + +Inherits: :ref:`SpriteBase3D` +------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------------+-----------------------------------------------------------------------------------------------------+ +| void | :ref:`set_texture` **(** :ref:`Texture` texture **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_texture` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------+ +| void | :ref:`set_region` **(** :ref:`bool` enabled **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_region` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------+ +| void | :ref:`set_region_rect` **(** :ref:`Rect2` rect **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`get_region_rect` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------+ +| void | :ref:`set_frame` **(** :ref:`int` frame **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_frame` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------+ +| void | :ref:`set_vframes` **(** :ref:`int` vframes **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_vframes` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------+ +| void | :ref:`set_hframes` **(** :ref:`int` hframes **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_hframes` **(** **)** const | ++--------------------------------+-----------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **frame_changed** **(** **)** + +Member Function Description +--------------------------- + +.. _class_Sprite3D_set_texture: + +- void **set_texture** **(** :ref:`Texture` texture **)** + +.. _class_Sprite3D_get_texture: + +- :ref:`Texture` **get_texture** **(** **)** const + +.. _class_Sprite3D_set_region: + +- void **set_region** **(** :ref:`bool` enabled **)** + +.. _class_Sprite3D_is_region: + +- :ref:`bool` **is_region** **(** **)** const + +.. _class_Sprite3D_set_region_rect: + +- void **set_region_rect** **(** :ref:`Rect2` rect **)** + +.. _class_Sprite3D_get_region_rect: + +- :ref:`Rect2` **get_region_rect** **(** **)** const + +.. _class_Sprite3D_set_frame: + +- void **set_frame** **(** :ref:`int` frame **)** + +.. _class_Sprite3D_get_frame: + +- :ref:`int` **get_frame** **(** **)** const + +.. _class_Sprite3D_set_vframes: + +- void **set_vframes** **(** :ref:`int` vframes **)** + +.. _class_Sprite3D_get_vframes: + +- :ref:`int` **get_vframes** **(** **)** const + +.. _class_Sprite3D_set_hframes: + +- void **set_hframes** **(** :ref:`int` hframes **)** + +.. _class_Sprite3D_get_hframes: + +- :ref:`int` **get_hframes** **(** **)** const + + diff --git a/classes/class_spritebase3d.rst b/classes/class_spritebase3d.rst new file mode 100644 index 000000000..11955209d --- /dev/null +++ b/classes/class_spritebase3d.rst @@ -0,0 +1,161 @@ +.. _class_SpriteBase3D: + +SpriteBase3D +============ + +Inherits: :ref:`GeometryInstance` +--------------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_centered` **(** :ref:`bool` centered **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_centered` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_offset` **(** :ref:`Vector2` offset **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_offset` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_flip_h` **(** :ref:`bool` flip_h **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_flipped_h` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_flip_v` **(** :ref:`bool` flip_v **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_flipped_v` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_modulate` **(** :ref:`Color` modulate **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_modulate` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_opacity` **(** :ref:`float` opacity **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_opacity` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_pixel_size` **(** :ref:`float` pixel_size **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_pixel_size` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_axis` **(** :ref:`int` axis **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_axis` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_draw_flag` **(** :ref:`int` flag, :ref:`bool` enabled **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_draw_flag` **(** :ref:`int` flag **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_alpha_cut_mode` **(** :ref:`int` mode **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_alpha_cut_mode` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`get_item_rect` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **FLAG_TRANSPARENT** = **0** +- **FLAG_SHADED** = **1** +- **FLAG_MAX** = **2** +- **ALPHA_CUT_DISABLED** = **0** +- **ALPHA_CUT_DISCARD** = **1** +- **ALPHA_CUT_OPAQUE_PREPASS** = **2** + +Member Function Description +--------------------------- + +.. _class_SpriteBase3D_set_centered: + +- void **set_centered** **(** :ref:`bool` centered **)** + +.. _class_SpriteBase3D_is_centered: + +- :ref:`bool` **is_centered** **(** **)** const + +.. _class_SpriteBase3D_set_offset: + +- void **set_offset** **(** :ref:`Vector2` offset **)** + +.. _class_SpriteBase3D_get_offset: + +- :ref:`Vector2` **get_offset** **(** **)** const + +.. _class_SpriteBase3D_set_flip_h: + +- void **set_flip_h** **(** :ref:`bool` flip_h **)** + +.. _class_SpriteBase3D_is_flipped_h: + +- :ref:`bool` **is_flipped_h** **(** **)** const + +.. _class_SpriteBase3D_set_flip_v: + +- void **set_flip_v** **(** :ref:`bool` flip_v **)** + +.. _class_SpriteBase3D_is_flipped_v: + +- :ref:`bool` **is_flipped_v** **(** **)** const + +.. _class_SpriteBase3D_set_modulate: + +- void **set_modulate** **(** :ref:`Color` modulate **)** + +.. _class_SpriteBase3D_get_modulate: + +- :ref:`Color` **get_modulate** **(** **)** const + +.. _class_SpriteBase3D_set_opacity: + +- void **set_opacity** **(** :ref:`float` opacity **)** + +.. _class_SpriteBase3D_get_opacity: + +- :ref:`float` **get_opacity** **(** **)** const + +.. _class_SpriteBase3D_set_pixel_size: + +- void **set_pixel_size** **(** :ref:`float` pixel_size **)** + +.. _class_SpriteBase3D_get_pixel_size: + +- :ref:`float` **get_pixel_size** **(** **)** const + +.. _class_SpriteBase3D_set_axis: + +- void **set_axis** **(** :ref:`int` axis **)** + +.. _class_SpriteBase3D_get_axis: + +- :ref:`int` **get_axis** **(** **)** const + +.. _class_SpriteBase3D_set_draw_flag: + +- void **set_draw_flag** **(** :ref:`int` flag, :ref:`bool` enabled **)** + +.. _class_SpriteBase3D_get_draw_flag: + +- :ref:`bool` **get_draw_flag** **(** :ref:`int` flag **)** const + +.. _class_SpriteBase3D_set_alpha_cut_mode: + +- void **set_alpha_cut_mode** **(** :ref:`int` mode **)** + +.. _class_SpriteBase3D_get_alpha_cut_mode: + +- :ref:`int` **get_alpha_cut_mode** **(** **)** const + +.. _class_SpriteBase3D_get_item_rect: + +- :ref:`Rect2` **get_item_rect** **(** **)** const + + diff --git a/classes/class_spriteframes.rst b/classes/class_spriteframes.rst new file mode 100644 index 000000000..2b907f557 --- /dev/null +++ b/classes/class_spriteframes.rst @@ -0,0 +1,76 @@ +.. _class_SpriteFrames: + +SpriteFrames +============ + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Sprite frame library for AnimatedSprite. + +Member Functions +---------------- + ++------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_frame` **(** :ref:`Object` frame, :ref:`int` atpos=-1 **)** | ++------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_frame_count` **(** **)** const | ++------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_frame` **(** :ref:`int` idx **)** const | ++------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_frame` **(** :ref:`int` idx, :ref:`Object` txt **)** | ++------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_frame` **(** :ref:`int` idx **)** | ++------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Sprite frame library for :ref:`AnimatedSprite`. + +Member Function Description +--------------------------- + +.. _class_SpriteFrames_add_frame: + +- void **add_frame** **(** :ref:`Object` frame, :ref:`int` atpos=-1 **)** + +Add a frame (texture). + +.. _class_SpriteFrames_get_frame_count: + +- :ref:`int` **get_frame_count** **(** **)** const + +Return the amount of frames. + +.. _class_SpriteFrames_get_frame: + +- :ref:`Object` **get_frame** **(** :ref:`int` idx **)** const + +Return a texture (frame). + +.. _class_SpriteFrames_set_frame: + +- void **set_frame** **(** :ref:`int` idx, :ref:`Object` txt **)** + +.. _class_SpriteFrames_remove_frame: + +- void **remove_frame** **(** :ref:`int` idx **)** + +Remove a frame + +.. _class_SpriteFrames_clear: + +- void **clear** **(** **)** + +Clear the frames. + + diff --git a/classes/class_staticbody.rst b/classes/class_staticbody.rst new file mode 100644 index 000000000..cb363dd59 --- /dev/null +++ b/classes/class_staticbody.rst @@ -0,0 +1,78 @@ +.. _class_StaticBody: + +StaticBody +========== + +Inherits: :ref:`PhysicsBody` +----------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +PhysicsBody for static collision objects. + +Member Functions +---------------- + ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_constant_linear_velocity` **(** :ref:`Vector3` vel **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_constant_angular_velocity` **(** :ref:`Vector3` vel **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_constant_linear_velocity` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_constant_angular_velocity` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_friction` **(** :ref:`float` friction **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_friction` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_bounce` **(** :ref:`float` bounce **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_bounce` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +StaticBody implements a static collision :ref:`Node`, by utilizing a rigid body in the :ref:`PhysicsServer`. Static bodies are used for static collision. For more information on physics body nodes, see :ref:`PhysicsBody`. + +Member Function Description +--------------------------- + +.. _class_StaticBody_set_constant_linear_velocity: + +- void **set_constant_linear_velocity** **(** :ref:`Vector3` vel **)** + +.. _class_StaticBody_set_constant_angular_velocity: + +- void **set_constant_angular_velocity** **(** :ref:`Vector3` vel **)** + +.. _class_StaticBody_get_constant_linear_velocity: + +- :ref:`Vector3` **get_constant_linear_velocity** **(** **)** const + +.. _class_StaticBody_get_constant_angular_velocity: + +- :ref:`Vector3` **get_constant_angular_velocity** **(** **)** const + +.. _class_StaticBody_set_friction: + +- void **set_friction** **(** :ref:`float` friction **)** + +.. _class_StaticBody_get_friction: + +- :ref:`float` **get_friction** **(** **)** const + +.. _class_StaticBody_set_bounce: + +- void **set_bounce** **(** :ref:`float` bounce **)** + +.. _class_StaticBody_get_bounce: + +- :ref:`float` **get_bounce** **(** **)** const + + diff --git a/classes/class_staticbody2d.rst b/classes/class_staticbody2d.rst new file mode 100644 index 000000000..ae8c5fe2c --- /dev/null +++ b/classes/class_staticbody2d.rst @@ -0,0 +1,98 @@ +.. _class_StaticBody2D: + +StaticBody2D +============ + +Inherits: :ref:`PhysicsBody2D` +--------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Static body for 2D Physics. + +Member Functions +---------------- + ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_constant_linear_velocity` **(** :ref:`Vector2` vel **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_constant_angular_velocity` **(** :ref:`float` vel **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_constant_linear_velocity` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_constant_angular_velocity` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_friction` **(** :ref:`float` friction **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_friction` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_bounce` **(** :ref:`float` bounce **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_bounce` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Static body for 2D Physics. A static body is a simple body that is not intended to move. They don't consume any CPU resources in contrast to a :ref:`RigidBody2D` so they are great for scenaro collision. + +A static body can also be animated by using simulated motion mode. This is useful for implementing functionalities such as moving platforms. When this mode is active the body can be animated and automatically computes linear and angular velocity to apply in that frame and to influence other bodies. + +Alternatively, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels). + +Member Function Description +--------------------------- + +.. _class_StaticBody2D_set_constant_linear_velocity: + +- void **set_constant_linear_velocity** **(** :ref:`Vector2` vel **)** + +Set a constant linear velocity for the body. This does not move the body, but affects other bodies touching it, as if it was moving. + +.. _class_StaticBody2D_set_constant_angular_velocity: + +- void **set_constant_angular_velocity** **(** :ref:`float` vel **)** + +Set a constant angular velocity for the body. + +.. _class_StaticBody2D_get_constant_linear_velocity: + +- :ref:`Vector2` **get_constant_linear_velocity** **(** **)** const + +Return the constant linear velocity for the body. This does not rotate the body, but affects other bodies touching it, as if it was rotating. + +.. _class_StaticBody2D_get_constant_angular_velocity: + +- :ref:`float` **get_constant_angular_velocity** **(** **)** const + +Return the constant angular velocity for the body. + +.. _class_StaticBody2D_set_friction: + +- void **set_friction** **(** :ref:`float` friction **)** + +Set the body friction, from 0 (frictionless) to 1 (full friction). + +.. _class_StaticBody2D_get_friction: + +- :ref:`float` **get_friction** **(** **)** const + +Return the body friction. + +.. _class_StaticBody2D_set_bounce: + +- void **set_bounce** **(** :ref:`float` bounce **)** + +Set the body bounciness, from 0 (not bouncy) to 1 (bouncy). + +.. _class_StaticBody2D_get_bounce: + +- :ref:`float` **get_bounce** **(** **)** const + +Return the body bounciness. + + diff --git a/classes/class_streampeer.rst b/classes/class_streampeer.rst new file mode 100644 index 000000000..371d7de5c --- /dev/null +++ b/classes/class_streampeer.rst @@ -0,0 +1,230 @@ +.. _class_StreamPeer: + +StreamPeer +========== + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Abstraction and base class for stream-based protocols. + +Member Functions +---------------- + ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`put_data` **(** :ref:`RawArray` data **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`put_partial_data` **(** :ref:`RawArray` data **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_data` **(** :ref:`int` bytes **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_partial_data` **(** :ref:`int` bytes **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_available_bytes` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_big_endian` **(** :ref:`bool` enable **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_big_endian_enabled` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`put_8` **(** :ref:`int` val **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`put_u8` **(** :ref:`int` val **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`put_16` **(** :ref:`int` val **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`put_u16` **(** :ref:`int` val **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`put_32` **(** :ref:`int` val **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`put_u32` **(** :ref:`int` val **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`put_64` **(** :ref:`int` val **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`put_u64` **(** :ref:`int` val **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`put_float` **(** :ref:`float` val **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`put_double` **(** :ref:`float` val **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`put_utf8_string` **(** :ref:`String` val **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`put_var` **(** Variant val **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_8` **(** **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_u8` **(** **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_16` **(** **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_u16` **(** **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_32` **(** **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_u32` **(** **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_64` **(** **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_u64` **(** **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_float` **(** **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_double` **(** **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_string` **(** :ref:`int` bytes **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_utf8_string` **(** :ref:`int` bytes **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ +| Variant | :ref:`get_var` **(** **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +StreamPeer is an abstration and base class for stream-based protocols (such as TCP or Unix Sockets). It provides an API for sending and receiving data through streams as raw data or strings. + +Member Function Description +--------------------------- + +.. _class_StreamPeer_put_data: + +- :ref:`int` **put_data** **(** :ref:`RawArray` data **)** + +Send a chunk of data through the connection, blocking if necesary until the data is done sending. This function returns an :ref:`Error` code. + +.. _class_StreamPeer_put_partial_data: + +- :ref:`Array` **put_partial_data** **(** :ref:`RawArray` data **)** + +Send a chunk of data through the connection, if all the data could not be sent at once, only part of it will. This function returns two values, an :ref:`Error` code and an integer, describing how much data was actually sent. + +.. _class_StreamPeer_get_data: + +- :ref:`Array` **get_data** **(** :ref:`int` bytes **)** + +Return a chunk data with the received bytes. The amount of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will block until the desired amount is received. This function returns two values, an :ref:`Error` code and a data array. + +.. _class_StreamPeer_get_partial_data: + +- :ref:`Array` **get_partial_data** **(** :ref:`int` bytes **)** + +Return a chunk data with the received bytes. The amount of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will return how many were actually received. This function returns two values, an :ref:`Error` code, and a data array. + +.. _class_StreamPeer_get_available_bytes: + +- :ref:`int` **get_available_bytes** **(** **)** const + +.. _class_StreamPeer_set_big_endian: + +- void **set_big_endian** **(** :ref:`bool` enable **)** + +.. _class_StreamPeer_is_big_endian_enabled: + +- :ref:`bool` **is_big_endian_enabled** **(** **)** const + +.. _class_StreamPeer_put_8: + +- void **put_8** **(** :ref:`int` val **)** + +.. _class_StreamPeer_put_u8: + +- void **put_u8** **(** :ref:`int` val **)** + +.. _class_StreamPeer_put_16: + +- void **put_16** **(** :ref:`int` val **)** + +.. _class_StreamPeer_put_u16: + +- void **put_u16** **(** :ref:`int` val **)** + +.. _class_StreamPeer_put_32: + +- void **put_32** **(** :ref:`int` val **)** + +.. _class_StreamPeer_put_u32: + +- void **put_u32** **(** :ref:`int` val **)** + +.. _class_StreamPeer_put_64: + +- void **put_64** **(** :ref:`int` val **)** + +.. _class_StreamPeer_put_u64: + +- void **put_u64** **(** :ref:`int` val **)** + +.. _class_StreamPeer_put_float: + +- void **put_float** **(** :ref:`float` val **)** + +.. _class_StreamPeer_put_double: + +- void **put_double** **(** :ref:`float` val **)** + +.. _class_StreamPeer_put_utf8_string: + +- void **put_utf8_string** **(** :ref:`String` val **)** + +.. _class_StreamPeer_put_var: + +- void **put_var** **(** Variant val **)** + +.. _class_StreamPeer_get_8: + +- :ref:`int` **get_8** **(** **)** + +.. _class_StreamPeer_get_u8: + +- :ref:`int` **get_u8** **(** **)** + +.. _class_StreamPeer_get_16: + +- :ref:`int` **get_16** **(** **)** + +.. _class_StreamPeer_get_u16: + +- :ref:`int` **get_u16** **(** **)** + +.. _class_StreamPeer_get_32: + +- :ref:`int` **get_32** **(** **)** + +.. _class_StreamPeer_get_u32: + +- :ref:`int` **get_u32** **(** **)** + +.. _class_StreamPeer_get_64: + +- :ref:`int` **get_64** **(** **)** + +.. _class_StreamPeer_get_u64: + +- :ref:`int` **get_u64** **(** **)** + +.. _class_StreamPeer_get_float: + +- :ref:`float` **get_float** **(** **)** + +.. _class_StreamPeer_get_double: + +- :ref:`float` **get_double** **(** **)** + +.. _class_StreamPeer_get_string: + +- :ref:`String` **get_string** **(** :ref:`int` bytes **)** + +.. _class_StreamPeer_get_utf8_string: + +- :ref:`String` **get_utf8_string** **(** :ref:`int` bytes **)** + +.. _class_StreamPeer_get_var: + +- Variant **get_var** **(** **)** + + diff --git a/classes/class_streampeerssl.rst b/classes/class_streampeerssl.rst new file mode 100644 index 000000000..e78f07702 --- /dev/null +++ b/classes/class_streampeerssl.rst @@ -0,0 +1,57 @@ +.. _class_StreamPeerSSL: + +StreamPeerSSL +============= + +Inherits: :ref:`StreamPeer` +--------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Error | :ref:`accept` **(** :ref:`StreamPeer` stream **)** | ++------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Error | :ref:`connect` **(** :ref:`StreamPeer` stream, :ref:`bool` validate_certs=false, :ref:`String` for_hostname="" **)** | ++------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_status` **(** **)** const | ++------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`disconnect` **(** **)** | ++------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **STATUS_DISCONNECTED** = **0** +- **STATUS_CONNECTED** = **1** +- **STATUS_ERROR_NO_CERTIFICATE** = **2** +- **STATUS_ERROR_HOSTNAME_MISMATCH** = **3** + +Member Function Description +--------------------------- + +.. _class_StreamPeerSSL_accept: + +- Error **accept** **(** :ref:`StreamPeer` stream **)** + +.. _class_StreamPeerSSL_connect: + +- Error **connect** **(** :ref:`StreamPeer` stream, :ref:`bool` validate_certs=false, :ref:`String` for_hostname="" **)** + +.. _class_StreamPeerSSL_get_status: + +- :ref:`int` **get_status** **(** **)** const + +.. _class_StreamPeerSSL_disconnect: + +- void **disconnect** **(** **)** + + diff --git a/classes/class_streampeertcp.rst b/classes/class_streampeertcp.rst new file mode 100644 index 000000000..c73326f26 --- /dev/null +++ b/classes/class_streampeertcp.rst @@ -0,0 +1,74 @@ +.. _class_StreamPeerTCP: + +StreamPeerTCP +============= + +Inherits: :ref:`StreamPeer` +--------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +TCP Stream peer. + +Member Functions +---------------- + ++------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`connect` **(** :ref:`String` host, :ref:`int` port **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_connected` **(** **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_status` **(** **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_connected_host` **(** **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_connected_port` **(** **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`disconnect` **(** **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **STATUS_NONE** = **0** +- **STATUS_CONNECTING** = **1** +- **STATUS_CONNECTED** = **2** +- **STATUS_ERROR** = **3** + +Description +----------- + +TCP Stream peer. This object can be used to connect to TCP servers, or also is returned by a tcp server. + +Member Function Description +--------------------------- + +.. _class_StreamPeerTCP_connect: + +- :ref:`int` **connect** **(** :ref:`String` host, :ref:`int` port **)** + +.. _class_StreamPeerTCP_is_connected: + +- :ref:`bool` **is_connected** **(** **)** const + +.. _class_StreamPeerTCP_get_status: + +- :ref:`int` **get_status** **(** **)** const + +.. _class_StreamPeerTCP_get_connected_host: + +- :ref:`String` **get_connected_host** **(** **)** const + +.. _class_StreamPeerTCP_get_connected_port: + +- :ref:`int` **get_connected_port** **(** **)** const + +.. _class_StreamPeerTCP_disconnect: + +- void **disconnect** **(** **)** + + diff --git a/classes/class_streamplayer.rst b/classes/class_streamplayer.rst new file mode 100644 index 000000000..72e7a1cdb --- /dev/null +++ b/classes/class_streamplayer.rst @@ -0,0 +1,229 @@ +.. _class_StreamPlayer: + +StreamPlayer +============ + +Inherits: :ref:`Node` +--------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Base class for audio stream playback. + +Member Functions +---------------- + ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_stream` **(** Stream stream **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| Stream | :ref:`get_stream` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`play` **(** :ref:`float` offset=0 **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`stop` **(** **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_playing` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_paused` **(** :ref:`bool` paused **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_paused` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_loop` **(** :ref:`bool` enabled **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_loop` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_volume` **(** :ref:`float` volume **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_volume` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_volume_db` **(** :ref:`float` db **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_volume_db` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_buffering_msec` **(** :ref:`int` msec **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_buffering_msec` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_loop_restart_time` **(** :ref:`float` secs **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_loop_restart_time` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_stream_name` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_loop_count` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_pos` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`seek_pos` **(** :ref:`float` time **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_autoplay` **(** :ref:`bool` enabled **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_autoplay` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_length` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **finished** **(** **)** + +Description +----------- + +Base class for audio stream playback. Audio stream players inherit from it. + +Member Function Description +--------------------------- + +.. _class_StreamPlayer_set_stream: + +- void **set_stream** **(** Stream stream **)** + +Set the :ref:`EventStream` this player will play. + +.. _class_StreamPlayer_get_stream: + +- Stream **get_stream** **(** **)** const + +Return the currently assigned stream. + +.. _class_StreamPlayer_play: + +- void **play** **(** :ref:`float` offset=0 **)** + +Play the currently assigned stream, starting from a given position (in seconds). + +.. _class_StreamPlayer_stop: + +- void **stop** **(** **)** + +Stop the playback. + +.. _class_StreamPlayer_is_playing: + +- :ref:`bool` **is_playing** **(** **)** const + +Return whether this player is playing. + +.. _class_StreamPlayer_set_paused: + +- void **set_paused** **(** :ref:`bool` paused **)** + +Pause stream playback. + +.. _class_StreamPlayer_is_paused: + +- :ref:`bool` **is_paused** **(** **)** const + +Return whether the playback is currently paused. + +.. _class_StreamPlayer_set_loop: + +- void **set_loop** **(** :ref:`bool` enabled **)** + +Set whether the stream will be restarted at the end. + +.. _class_StreamPlayer_has_loop: + +- :ref:`bool` **has_loop** **(** **)** const + +Return whether the stream will be restarted at the end. + +.. _class_StreamPlayer_set_volume: + +- void **set_volume** **(** :ref:`float` volume **)** + +Set the playback volume for this player. This is a float between 0.0 (silent) and 1.0 (full volume). Values over 1.0 will amplify sound even more, but may introduce distortion. Negative values will just invert the output waveform, which produces no audible difference. + +.. _class_StreamPlayer_get_volume: + +- :ref:`float` **get_volume** **(** **)** const + +Return the playback volume for this player. + +.. _class_StreamPlayer_set_volume_db: + +- void **set_volume_db** **(** :ref:`float` db **)** + +Set the playback volume for this player, in decibels. This is a float between -80.0 (silent) and 0.0 (full volume). Values under -79.0 get truncated to -80, but values over 0.0 do not, so the warnings for overamplifying (see :ref:`set_volume`) still apply. + +.. _class_StreamPlayer_get_volume_db: + +- :ref:`float` **get_volume_db** **(** **)** const + +Return the playback volume for this player, in decibels. + +.. _class_StreamPlayer_set_buffering_msec: + +- void **set_buffering_msec** **(** :ref:`int` msec **)** + +Set the size (in milliseconds) of the audio buffer. A long audio buffer protects better against slowdowns, but responds worse to changes (in volume, stream played...). A shorter buffer takes less time to respond to changes, but may stutter if the application suffers some slowdown. + +Default is 500 milliseconds. + +.. _class_StreamPlayer_get_buffering_msec: + +- :ref:`int` **get_buffering_msec** **(** **)** const + +Return the size of the audio buffer. + +.. _class_StreamPlayer_set_loop_restart_time: + +- void **set_loop_restart_time** **(** :ref:`float` secs **)** + +Set the point in time the stream will rewind to, when looping. + +.. _class_StreamPlayer_get_loop_restart_time: + +- :ref:`float` **get_loop_restart_time** **(** **)** const + +Return the point in time the stream will rewind to, when looping. + +.. _class_StreamPlayer_get_stream_name: + +- :ref:`String` **get_stream_name** **(** **)** const + +Return the name of the currently assigned stream. This is not the file name, but a field inside the file. If no stream is assigned, if returns "". + +.. _class_StreamPlayer_get_loop_count: + +- :ref:`int` **get_loop_count** **(** **)** const + +Return the number of times the playback has looped. + +.. _class_StreamPlayer_get_pos: + +- :ref:`float` **get_pos** **(** **)** const + +Return the playback position, in seconds. + +.. _class_StreamPlayer_seek_pos: + +- void **seek_pos** **(** :ref:`float` time **)** + +Set the playback position, in seconds. + +.. _class_StreamPlayer_set_autoplay: + +- void **set_autoplay** **(** :ref:`bool` enabled **)** + +Set whether this player will start playing as soon as it enters the scene tree. + +.. _class_StreamPlayer_has_autoplay: + +- :ref:`bool` **has_autoplay** **(** **)** const + +Return whether this player will start playing as soon as it enters the scene tree. + +.. _class_StreamPlayer_get_length: + +- :ref:`float` **get_length** **(** **)** const + +Return the length of the stream, in seconds. + + diff --git a/classes/class_string.rst b/classes/class_string.rst new file mode 100644 index 000000000..4577bcc39 --- /dev/null +++ b/classes/class_string.rst @@ -0,0 +1,437 @@ +.. _class_String: + +String +====== + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + +Built-in string class. + +Member Functions +---------------- + ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`basename` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`begins_with` **(** :ref:`String` text **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`c_escape` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`c_unescape` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`capitalize` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`casecmp_to` **(** :ref:`String` to **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`empty` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`extension` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`find` **(** :ref:`String` what, :ref:`int` from=0 **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`find_last` **(** :ref:`String` what **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`findn` **(** :ref:`String` what, :ref:`int` from=0 **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_base_dir` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_file` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`hash` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`hex_to_int` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`insert` **(** :ref:`int` pos, :ref:`String` what **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_abs_path` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_rel_path` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_valid_float` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_valid_html_color` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_valid_identifier` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_valid_integer` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_valid_ip_address` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`json_escape` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`left` **(** :ref:`int` pos **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`length` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`match` **(** :ref:`String` expr **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`matchn` **(** :ref:`String` expr **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RawArray` | :ref:`md5_buffer` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`md5_text` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`nocasecmp_to` **(** :ref:`String` to **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`ord_at` **(** :ref:`int` at **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`pad_decimals` **(** :ref:`int` digits **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`pad_zeros` **(** :ref:`int` digits **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`percent_decode` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`percent_encode` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`plus_file` **(** :ref:`String` file **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`replace` **(** :ref:`String` what, :ref:`String` forwhat **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`replacen` **(** :ref:`String` what, :ref:`String` forwhat **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`rfind` **(** :ref:`String` what, :ref:`int` from=-1 **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`rfindn` **(** :ref:`String` what, :ref:`int` from=-1 **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`right` **(** :ref:`int` pos **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`split` **(** :ref:`String` divisor, :ref:`bool` allow_empty=True **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RealArray` | :ref:`split_floats` **(** :ref:`String` divisor, :ref:`bool` allow_empty=True **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`strip_edges` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`substr` **(** :ref:`int` from, :ref:`int` len **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RawArray` | :ref:`to_ascii` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`to_float` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`to_int` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`to_lower` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`to_upper` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RawArray` | :ref:`to_utf8` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`xml_escape` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`xml_unescape` **(** **)** | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +This is the built-in string class (and the one used by GDScript). It supports Unicode and provides all necesary means for string handling. Strings are reference counted and use a copy-on-write approach, so passing them around is cheap in resources. + +Member Function Description +--------------------------- + +.. _class_String_basename: + +- :ref:`String` **basename** **(** **)** + +If the string is a path to a file, return the path to the file without the extension. + +.. _class_String_begins_with: + +- :ref:`bool` **begins_with** **(** :ref:`String` text **)** + +Return true if the strings begins with the given string. + +.. _class_String_c_escape: + +- :ref:`String` **c_escape** **(** **)** + +.. _class_String_c_unescape: + +- :ref:`String` **c_unescape** **(** **)** + +.. _class_String_capitalize: + +- :ref:`String` **capitalize** **(** **)** + +Return the string in uppercase. + +.. _class_String_casecmp_to: + +- :ref:`int` **casecmp_to** **(** :ref:`String` to **)** + +Perform a case-sensitive comparison to antoher string, return -1 if less, 0 if equal and +1 if greater. + +.. _class_String_empty: + +- :ref:`bool` **empty** **(** **)** + +Return true if the string is empty. + +.. _class_String_extension: + +- :ref:`String` **extension** **(** **)** + +If the string is a path to a file, return the extension. + +.. _class_String_find: + +- :ref:`int` **find** **(** :ref:`String` what, :ref:`int` from=0 **)** + +Find the first occurence of a substring, return the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed. + +.. _class_String_find_last: + +- :ref:`int` **find_last** **(** :ref:`String` what **)** + +Find the last occurence of a substring, return the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed. + +.. _class_String_findn: + +- :ref:`int` **findn** **(** :ref:`String` what, :ref:`int` from=0 **)** + +Find the first occurence of a substring but search as case-insensitive, return the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed. + +.. _class_String_get_base_dir: + +- :ref:`String` **get_base_dir** **(** **)** + +If the string is a path to a file, return the base directory. + +.. _class_String_get_file: + +- :ref:`String` **get_file** **(** **)** + +If the string is a path to a file, return the file and ignore the base directory. + +.. _class_String_hash: + +- :ref:`int` **hash** **(** **)** + +Hash the string and return a 32 bits integer. + +.. _class_String_hex_to_int: + +- :ref:`int` **hex_to_int** **(** **)** + +Convert a string containing an hexadecimal number into an int. + +.. _class_String_insert: + +- :ref:`String` **insert** **(** :ref:`int` pos, :ref:`String` what **)** + +Insert a substring at a given position. + +.. _class_String_is_abs_path: + +- :ref:`bool` **is_abs_path** **(** **)** + +If the string is a path to a file or directory, return true if the path is absolute. + +.. _class_String_is_rel_path: + +- :ref:`bool` **is_rel_path** **(** **)** + +If the string is a path to a file or directory, return true if the path is relative. + +.. _class_String_is_valid_float: + +- :ref:`bool` **is_valid_float** **(** **)** + +Check whether the string contains a valid float. + +.. _class_String_is_valid_html_color: + +- :ref:`bool` **is_valid_html_color** **(** **)** + +Check whether the string contains a valid color in HTML notation. + +.. _class_String_is_valid_identifier: + +- :ref:`bool` **is_valid_identifier** **(** **)** + +.. _class_String_is_valid_integer: + +- :ref:`bool` **is_valid_integer** **(** **)** + +Check whether the string contains a valid integer. + +.. _class_String_is_valid_ip_address: + +- :ref:`bool` **is_valid_ip_address** **(** **)** + +Check whether the string contains a valid IP address. + +.. _class_String_json_escape: + +- :ref:`String` **json_escape** **(** **)** + +.. _class_String_left: + +- :ref:`String` **left** **(** :ref:`int` pos **)** + +Return an amount of characters from the left of the string. + +.. _class_String_length: + +- :ref:`int` **length** **(** **)** + +Return the length of the string in characters. + +.. _class_String_match: + +- :ref:`bool` **match** **(** :ref:`String` expr **)** + +Do a simple expression matching, using ? and * wildcards. + +.. _class_String_matchn: + +- :ref:`bool` **matchn** **(** :ref:`String` expr **)** + +Do a simple, case insensitive, expression matching, using ? and * wildcards. + +.. _class_String_md5_buffer: + +- :ref:`RawArray` **md5_buffer** **(** **)** + +.. _class_String_md5_text: + +- :ref:`String` **md5_text** **(** **)** + +.. _class_String_nocasecmp_to: + +- :ref:`int` **nocasecmp_to** **(** :ref:`String` to **)** + +Perform a case-insensitive comparison to antoher string, return -1 if less, 0 if equal and +1 if greater. + +.. _class_String_ord_at: + +- :ref:`String` **ord_at** **(** :ref:`int` at **)** + +Return the character code at position "at". + +.. _class_String_pad_decimals: + +- :ref:`String` **pad_decimals** **(** :ref:`int` digits **)** + +.. _class_String_pad_zeros: + +- :ref:`String` **pad_zeros** **(** :ref:`int` digits **)** + +.. _class_String_percent_decode: + +- :ref:`String` **percent_decode** **(** **)** + +.. _class_String_percent_encode: + +- :ref:`String` **percent_encode** **(** **)** + +.. _class_String_plus_file: + +- :ref:`String` **plus_file** **(** :ref:`String` file **)** + +.. _class_String_replace: + +- :ref:`String` **replace** **(** :ref:`String` what, :ref:`String` forwhat **)** + +Replace occurrences of a substring for different ones inside the string. + +.. _class_String_replacen: + +- :ref:`String` **replacen** **(** :ref:`String` what, :ref:`String` forwhat **)** + +Replace occurrences of a substring for different ones inside the string, but search case-insensitive. + +.. _class_String_rfind: + +- :ref:`int` **rfind** **(** :ref:`String` what, :ref:`int` from=-1 **)** + +Perform a search for a substring, but start from the end of the string instead of the begining. + +.. _class_String_rfindn: + +- :ref:`int` **rfindn** **(** :ref:`String` what, :ref:`int` from=-1 **)** + +Perform a search for a substring, but start from the end of the string instead of the begining. Also search case-insensitive. + +.. _class_String_right: + +- :ref:`String` **right** **(** :ref:`int` pos **)** + +Return the right side of the string from a given position. + +.. _class_String_split: + +- :ref:`StringArray` **split** **(** :ref:`String` divisor, :ref:`bool` allow_empty=True **)** + +Split the string by a divisor string, return an array of the substrings. Example "One,Two,Three" will return :ref:`"One","Two","Three"` if split by ",". + +.. _class_String_split_floats: + +- :ref:`RealArray` **split_floats** **(** :ref:`String` divisor, :ref:`bool` allow_empty=True **)** + +Split the string in floats by using a divisor string, return an array of the substrings. Example "1,2.5,3" will return :ref:`1,2.5,3` if split by ",". + +.. _class_String_strip_edges: + +- :ref:`String` **strip_edges** **(** **)** + +Return a copy of the string stripped of any non-printable character at the begining and the end. + +.. _class_String_substr: + +- :ref:`String` **substr** **(** :ref:`int` from, :ref:`int` len **)** + +Return part of the string from "from", with length "len". + +.. _class_String_to_ascii: + +- :ref:`RawArray` **to_ascii** **(** **)** + +Convert the String (which is a character array) to RawArray (which is an array of bytes). The conversion is speeded up in comparison to to_utf8() with the assumption that all the characters the String contains are only ASCII characters. + +.. _class_String_to_float: + +- :ref:`float` **to_float** **(** **)** + +Convert a string, containing a decimal number, into a float. + +.. _class_String_to_int: + +- :ref:`int` **to_int** **(** **)** + +Convert a string, containing an integer number, into an int. + +.. _class_String_to_lower: + +- :ref:`String` **to_lower** **(** **)** + +Return the string converted to lowercase. + +.. _class_String_to_upper: + +- :ref:`String` **to_upper** **(** **)** + +Return the string converted to uppercase. + +.. _class_String_to_utf8: + +- :ref:`RawArray` **to_utf8** **(** **)** + +Convert the String (which is an array of characters) to RawArray (which is an array of bytes). The conversion is a bit slower than to_ascii(), but supports all UTF-8 characters. Therefore, you should prefer this function over to_ascii(). + +.. _class_String_xml_escape: + +- :ref:`String` **xml_escape** **(** **)** + +Perform XML escaping on the string. + +.. _class_String_xml_unescape: + +- :ref:`String` **xml_unescape** **(** **)** + +Perform XML un-escaping of the string. + + diff --git a/classes/class_stringarray.rst b/classes/class_stringarray.rst new file mode 100644 index 000000000..8c5e2814a --- /dev/null +++ b/classes/class_stringarray.rst @@ -0,0 +1,57 @@ +.. _class_StringArray: + +StringArray +=========== + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + +String Array. + +Member Functions +---------------- + ++----------------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`push_back` **(** :ref:`String` string **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`resize` **(** :ref:`int` idx **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set` **(** :ref:`int` idx, :ref:`String` string **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`size` **(** **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`StringArray` **(** :ref:`Array` from **)** | ++----------------------------------------+---------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +String Array. Array of strings. Can only contain strings. Optimized for memory usage, can't fragment the memory. + +Member Function Description +--------------------------- + +.. _class_StringArray_push_back: + +- void **push_back** **(** :ref:`String` string **)** + +.. _class_StringArray_resize: + +- void **resize** **(** :ref:`int` idx **)** + +.. _class_StringArray_set: + +- void **set** **(** :ref:`int` idx, :ref:`String` string **)** + +.. _class_StringArray_size: + +- :ref:`int` **size** **(** **)** + +.. _class_StringArray_StringArray: + +- :ref:`StringArray` **StringArray** **(** :ref:`Array` from **)** + + diff --git a/classes/class_stylebox.rst b/classes/class_stylebox.rst new file mode 100644 index 000000000..4812c29c2 --- /dev/null +++ b/classes/class_stylebox.rst @@ -0,0 +1,90 @@ +.. _class_StyleBox: + +StyleBox +======== + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Base class for drawing stylized boxes for the UI. + +Member Functions +---------------- + ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`test_mask` **(** :ref:`Vector2` point, :ref:`Rect2` rect **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_default_margin` **(** :ref:`int` margin, :ref:`float` offset **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_default_margin` **(** :ref:`int` margin **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_margin` **(** :ref:`int` margin **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_minimum_size` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_center_size` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_offset` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw` **(** :ref:`RID` canvas_item, :ref:`Rect2` rect **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +StyleBox is :ref:`Resource` that provides an abstract base class for drawing stylized boxes for the UI. StyleBoxes are used for drawing the styles of buttons, line edit backgrounds, tree backgrounds, etc. and also for testing a transparency mask for pointer signals. If mask test fails on a StyleBox assigned as mask to a control, clicks and motion signals will go through it to the one below. + +Member Function Description +--------------------------- + +.. _class_StyleBox_test_mask: + +- :ref:`bool` **test_mask** **(** :ref:`Vector2` point, :ref:`Rect2` rect **)** const + +Test a position in a rectangle, return wether it pases the mask test. + +.. _class_StyleBox_set_default_margin: + +- void **set_default_margin** **(** :ref:`int` margin, :ref:`float` offset **)** + +Set the default offset "offset" of the margin "margin" (see MARGIN_* enum) for a StyleBox, Controls that draw styleboxes with context inside need to know the margin, so the border of the stylebox is not occluded. + +.. _class_StyleBox_get_default_margin: + +- :ref:`float` **get_default_margin** **(** :ref:`int` margin **)** const + +Return the default offset of the margin "margin" (see MARGIN_* enum) of a StyleBox, Controls that draw styleboxes with context inside need to know the margin, so the border of the stylebox is not occluded. + +.. _class_StyleBox_get_margin: + +- :ref:`float` **get_margin** **(** :ref:`int` margin **)** const + +Return the offset of margin "margin" (see MARGIN_* enum). + +.. _class_StyleBox_get_minimum_size: + +- :ref:`Vector2` **get_minimum_size** **(** **)** const + +Return the minimum size that this stylebox can be shrunk to. + +.. _class_StyleBox_get_center_size: + +- :ref:`Vector2` **get_center_size** **(** **)** const + +.. _class_StyleBox_get_offset: + +- :ref:`Vector2` **get_offset** **(** **)** const + +Return the "offset" of a stylebox, this is a helper function, like writing Point2( style.get_margin(MARGIN_LEFT), style.get_margin(MARGIN_TOP) ) + +.. _class_StyleBox_draw: + +- void **draw** **(** :ref:`RID` canvas_item, :ref:`Rect2` rect **)** const + + diff --git a/classes/class_styleboxempty.rst b/classes/class_styleboxempty.rst new file mode 100644 index 000000000..d3c772705 --- /dev/null +++ b/classes/class_styleboxempty.rst @@ -0,0 +1,21 @@ +.. _class_StyleBoxEmpty: + +StyleBoxEmpty +============= + +Inherits: :ref:`StyleBox` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Empty stylebox (does not display anything). + +Description +----------- + +Empty stylebox (really does not display anything). + diff --git a/classes/class_styleboxflat.rst b/classes/class_styleboxflat.rst new file mode 100644 index 000000000..e12243d75 --- /dev/null +++ b/classes/class_styleboxflat.rst @@ -0,0 +1,102 @@ +.. _class_StyleBoxFlat: + +StyleBoxFlat +============ + +Inherits: :ref:`StyleBox` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Stylebox of a single color. + +Member Functions +---------------- + ++----------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_bg_color` **(** :ref:`Color` color **)** | ++----------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_bg_color` **(** **)** const | ++----------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_light_color` **(** :ref:`Color` color **)** | ++----------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_light_color` **(** **)** const | ++----------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_dark_color` **(** :ref:`Color` color **)** | ++----------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_dark_color` **(** **)** const | ++----------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_border_size` **(** :ref:`int` size **)** | ++----------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_border_size` **(** **)** const | ++----------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_border_blend` **(** :ref:`bool` blend **)** | ++----------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_border_blend` **(** **)** const | ++----------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_draw_center` **(** :ref:`bool` size **)** | ++----------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_draw_center` **(** **)** const | ++----------------------------+----------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Stylebox of a single color. Displays the stylebox of a single color, alternatively a border with light/dark colors can be assigned. + +Member Function Description +--------------------------- + +.. _class_StyleBoxFlat_set_bg_color: + +- void **set_bg_color** **(** :ref:`Color` color **)** + +.. _class_StyleBoxFlat_get_bg_color: + +- :ref:`Color` **get_bg_color** **(** **)** const + +.. _class_StyleBoxFlat_set_light_color: + +- void **set_light_color** **(** :ref:`Color` color **)** + +.. _class_StyleBoxFlat_get_light_color: + +- :ref:`Color` **get_light_color** **(** **)** const + +.. _class_StyleBoxFlat_set_dark_color: + +- void **set_dark_color** **(** :ref:`Color` color **)** + +.. _class_StyleBoxFlat_get_dark_color: + +- :ref:`Color` **get_dark_color** **(** **)** const + +.. _class_StyleBoxFlat_set_border_size: + +- void **set_border_size** **(** :ref:`int` size **)** + +.. _class_StyleBoxFlat_get_border_size: + +- :ref:`int` **get_border_size** **(** **)** const + +.. _class_StyleBoxFlat_set_border_blend: + +- void **set_border_blend** **(** :ref:`bool` blend **)** + +.. _class_StyleBoxFlat_get_border_blend: + +- :ref:`bool` **get_border_blend** **(** **)** const + +.. _class_StyleBoxFlat_set_draw_center: + +- void **set_draw_center** **(** :ref:`bool` size **)** + +.. _class_StyleBoxFlat_get_draw_center: + +- :ref:`bool` **get_draw_center** **(** **)** const + + diff --git a/classes/class_styleboximagemask.rst b/classes/class_styleboximagemask.rst new file mode 100644 index 000000000..753a19043 --- /dev/null +++ b/classes/class_styleboximagemask.rst @@ -0,0 +1,78 @@ +.. _class_StyleBoxImageMask: + +StyleBoxImageMask +================= + +Inherits: :ref:`StyleBox` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Image mask based StyleBox, for mask test. + +Member Functions +---------------- + ++----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_image` **(** :ref:`Image` image **)** | ++----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Image` | :ref:`get_image` **(** **)** const | ++----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_expand` **(** :ref:`bool` expand **)** | ++----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_expand` **(** **)** const | ++----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_expand_margin_size` **(** :ref:`int` margin, :ref:`float` size **)** | ++----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_expand_margin_size` **(** :ref:`int` margin **)** const | ++----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +This StyleBox is similar to :ref:`StyleBoxTexture`, but only meant to be used for mask testing. It takes an image and applies stretch rules to determine if the poit clicked is masked or not. + +Member Function Description +--------------------------- + +.. _class_StyleBoxImageMask_set_image: + +- void **set_image** **(** :ref:`Image` image **)** + +Set the image used for mask testing. Pixels (converted to grey) that have a value, less than 0.5 will fail the test. + +.. _class_StyleBoxImageMask_get_image: + +- :ref:`Image` **get_image** **(** **)** const + +Return the image used for mask testing. (see :ref:`set_imag`). + +.. _class_StyleBoxImageMask_set_expand: + +- void **set_expand** **(** :ref:`bool` expand **)** + +Set the expand property (default). When expanding, the image will use the same rules as :ref:`StyleBoxTexture` for expand. If not expanding, the image will always be tested at its original size. + +.. _class_StyleBoxImageMask_get_expand: + +- :ref:`bool` **get_expand** **(** **)** const + +Return wether the expand property is set(default). When expanding, the image will use the same rules as :ref:`StyleBoxTexture` for expand. If not expanding, the image will always be tested at its original size. + +.. _class_StyleBoxImageMask_set_expand_margin_size: + +- void **set_expand_margin_size** **(** :ref:`int` margin, :ref:`float` size **)** + +Set an expand margin size (from enum MARGIN_*). Parts of the image below the size of the margin (and in the direction of the margin) will not expand. + +.. _class_StyleBoxImageMask_get_expand_margin_size: + +- :ref:`float` **get_expand_margin_size** **(** :ref:`int` margin **)** const + +Return the expand margin size (from enum MARGIN_*). Parts of the image below the size of the margin (and in the direction of the margin) will not expand. + + diff --git a/classes/class_styleboxtexture.rst b/classes/class_styleboxtexture.rst new file mode 100644 index 000000000..b3059561c --- /dev/null +++ b/classes/class_styleboxtexture.rst @@ -0,0 +1,78 @@ +.. _class_StyleBoxTexture: + +StyleBoxTexture +=============== + +Inherits: :ref:`StyleBox` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Texture Based 3x3 scale style. + +Member Functions +---------------- + ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_texture` **(** :ref:`Texture` texture **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_texture` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_margin_size` **(** :ref:`int` margin, :ref:`float` size **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_margin_size` **(** :ref:`int` margin **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_expand_margin_size` **(** :ref:`int` margin, :ref:`float` size **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_expand_margin_size` **(** :ref:`int` margin **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_draw_center` **(** :ref:`bool` enable **)** | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_draw_center` **(** **)** const | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Texture Based 3x3 scale style. This stylebox performs a 3x3 scaling of a texture, where only the center cell is fully stretched. This allows for the easy creation of bordered styles. + +Member Function Description +--------------------------- + +.. _class_StyleBoxTexture_set_texture: + +- void **set_texture** **(** :ref:`Texture` texture **)** + +.. _class_StyleBoxTexture_get_texture: + +- :ref:`Texture` **get_texture** **(** **)** const + +.. _class_StyleBoxTexture_set_margin_size: + +- void **set_margin_size** **(** :ref:`int` margin, :ref:`float` size **)** + +.. _class_StyleBoxTexture_get_margin_size: + +- :ref:`float` **get_margin_size** **(** :ref:`int` margin **)** const + +.. _class_StyleBoxTexture_set_expand_margin_size: + +- void **set_expand_margin_size** **(** :ref:`int` margin, :ref:`float` size **)** + +.. _class_StyleBoxTexture_get_expand_margin_size: + +- :ref:`float` **get_expand_margin_size** **(** :ref:`int` margin **)** const + +.. _class_StyleBoxTexture_set_draw_center: + +- void **set_draw_center** **(** :ref:`bool` enable **)** + +.. _class_StyleBoxTexture_get_draw_center: + +- :ref:`bool` **get_draw_center** **(** **)** const + + diff --git a/classes/class_surfacetool.rst b/classes/class_surfacetool.rst new file mode 100644 index 000000000..f9c2d0cd2 --- /dev/null +++ b/classes/class_surfacetool.rst @@ -0,0 +1,126 @@ +.. _class_SurfaceTool: + +SurfaceTool +=========== + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Helper tool to create geometry. + +Member Functions +---------------- + ++--------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`begin` **(** :ref:`int` primitive **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_vertex` **(** :ref:`Vector3` vertex **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_color` **(** :ref:`Color` color **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_normal` **(** :ref:`Vector3` normal **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_tangent` **(** :ref:`Plane` tangent **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_uv` **(** :ref:`Vector2` uv **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_uv2` **(** :ref:`Vector2` uv2 **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_bones` **(** :ref:`IntArray` bones **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_weights` **(** :ref:`RealArray` weights **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_smooth_group` **(** :ref:`bool` smooth **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_material` **(** :ref:`Material` material **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`index` **(** **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`deindex` **(** **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`generate_normals` **(** **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------+ +| :ref:`Mesh` | :ref:`commit` **(** :ref:`Mesh` existing=Object() **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Helper tool to create geometry. + +Member Function Description +--------------------------- + +.. _class_SurfaceTool_begin: + +- void **begin** **(** :ref:`int` primitive **)** + +.. _class_SurfaceTool_add_vertex: + +- void **add_vertex** **(** :ref:`Vector3` vertex **)** + +.. _class_SurfaceTool_add_color: + +- void **add_color** **(** :ref:`Color` color **)** + +.. _class_SurfaceTool_add_normal: + +- void **add_normal** **(** :ref:`Vector3` normal **)** + +.. _class_SurfaceTool_add_tangent: + +- void **add_tangent** **(** :ref:`Plane` tangent **)** + +.. _class_SurfaceTool_add_uv: + +- void **add_uv** **(** :ref:`Vector2` uv **)** + +.. _class_SurfaceTool_add_uv2: + +- void **add_uv2** **(** :ref:`Vector2` uv2 **)** + +.. _class_SurfaceTool_add_bones: + +- void **add_bones** **(** :ref:`IntArray` bones **)** + +.. _class_SurfaceTool_add_weights: + +- void **add_weights** **(** :ref:`RealArray` weights **)** + +.. _class_SurfaceTool_add_smooth_group: + +- void **add_smooth_group** **(** :ref:`bool` smooth **)** + +.. _class_SurfaceTool_set_material: + +- void **set_material** **(** :ref:`Material` material **)** + +.. _class_SurfaceTool_index: + +- void **index** **(** **)** + +.. _class_SurfaceTool_deindex: + +- void **deindex** **(** **)** + +.. _class_SurfaceTool_generate_normals: + +- void **generate_normals** **(** **)** + +.. _class_SurfaceTool_commit: + +- :ref:`Mesh` **commit** **(** :ref:`Mesh` existing=Object() **)** + +.. _class_SurfaceTool_clear: + +- void **clear** **(** **)** + + diff --git a/classes/class_tabcontainer.rst b/classes/class_tabcontainer.rst new file mode 100644 index 000000000..04beee4c5 --- /dev/null +++ b/classes/class_tabcontainer.rst @@ -0,0 +1,148 @@ +.. _class_TabContainer: + +TabContainer +============ + +Inherits: :ref:`Control` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Tabbed Container. + +Member Functions +---------------- + ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_tab_count` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_current_tab` **(** :ref:`int` tab_idx **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_current_tab` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Control` | :ref:`get_current_tab_control` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Control` | :ref:`get_tab_control` **(** :ref:`int` idx **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_tab_align` **(** :ref:`int` align **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_tab_align` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_tabs_visible` **(** :ref:`bool` visible **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`are_tabs_visible` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_tab_title` **(** :ref:`int` tab_idx, :ref:`String` title **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_tab_title` **(** :ref:`int` tab_idx **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_tab_icon` **(** :ref:`int` tab_idx, :ref:`Texture` icon **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_tab_icon` **(** :ref:`int` tab_idx **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_popup` **(** :ref:`Popup` popup **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Popup` | :ref:`get_popup` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **pre_popup_pressed** **(** **)** +- **tab_changed** **(** :ref:`int` tab **)** + +Description +----------- + +Tabbed Container. Contains several children controls, but shows only one at the same time. Clicking on the top tabs allows to change the currently visible one. + +Children controls of this one automatically. + +Member Function Description +--------------------------- + +.. _class_TabContainer_get_tab_count: + +- :ref:`int` **get_tab_count** **(** **)** const + +Return the amount of tabs. + +.. _class_TabContainer_set_current_tab: + +- void **set_current_tab** **(** :ref:`int` tab_idx **)** + +Bring a tab (and the Control it represents) to the front, and hide the rest. + +.. _class_TabContainer_get_current_tab: + +- :ref:`int` **get_current_tab** **(** **)** const + +Return the current tab that is being showed. + +.. _class_TabContainer_get_current_tab_control: + +- :ref:`Control` **get_current_tab_control** **(** **)** const + +.. _class_TabContainer_get_tab_control: + +- :ref:`Control` **get_tab_control** **(** :ref:`int` idx **)** const + +.. _class_TabContainer_set_tab_align: + +- void **set_tab_align** **(** :ref:`int` align **)** + +Set tab alignment, from the ALIGN_* enum. Moves tabs to the left, right or center. + +.. _class_TabContainer_get_tab_align: + +- :ref:`int` **get_tab_align** **(** **)** const + +Return tab alignment, from the ALIGN_* enum. + +.. _class_TabContainer_set_tabs_visible: + +- void **set_tabs_visible** **(** :ref:`bool` visible **)** + +Set whether the tabs should be visible or hidden. + +.. _class_TabContainer_are_tabs_visible: + +- :ref:`bool` **are_tabs_visible** **(** **)** const + +Return whether the tabs should be visible or hidden. + +.. _class_TabContainer_set_tab_title: + +- void **set_tab_title** **(** :ref:`int` tab_idx, :ref:`String` title **)** + +Set a title for the tab. Tab titles are by default the children node name, but this can be overriden. + +.. _class_TabContainer_get_tab_title: + +- :ref:`String` **get_tab_title** **(** :ref:`int` tab_idx **)** const + +Return the title for the tab. Tab titles are by default the children node name, but this can be overriden. + +.. _class_TabContainer_set_tab_icon: + +- void **set_tab_icon** **(** :ref:`int` tab_idx, :ref:`Texture` icon **)** + +Set an icon for a tab. + +.. _class_TabContainer_get_tab_icon: + +- :ref:`Texture` **get_tab_icon** **(** :ref:`int` tab_idx **)** const + +.. _class_TabContainer_set_popup: + +- void **set_popup** **(** :ref:`Popup` popup **)** + +.. _class_TabContainer_get_popup: + +- :ref:`Popup` **get_popup** **(** **)** const + + diff --git a/classes/class_tabs.rst b/classes/class_tabs.rst new file mode 100644 index 000000000..d314a243e --- /dev/null +++ b/classes/class_tabs.rst @@ -0,0 +1,119 @@ +.. _class_Tabs: + +Tabs +==== + +Inherits: :ref:`Control` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Tabs Control. + +Member Functions +---------------- + ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_tab_count` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_current_tab` **(** :ref:`int` tab_idx **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_current_tab` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_tab_title` **(** :ref:`int` tab_idx, :ref:`String` title **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_tab_title` **(** :ref:`int` tab_idx **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_tab_icon` **(** :ref:`int` tab_idx, :ref:`Texture` icon **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_tab_icon` **(** :ref:`int` tab_idx **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_tab` **(** :ref:`int` tab_idx **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_tab` **(** :ref:`String` title, :ref:`Texture` icon **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_tab_align` **(** :ref:`int` align **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_tab_align` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`ensure_tab_visible` **(** :ref:`int` idx **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **tab_close** **(** :ref:`int` tab **)** +- **right_button_pressed** **(** :ref:`int` tab **)** +- **tab_changed** **(** :ref:`int` tab **)** + +Numeric Constants +----------------- + +- **ALIGN_LEFT** = **0** +- **ALIGN_CENTER** = **1** +- **ALIGN_RIGHT** = **2** +- **CLOSE_BUTTON_SHOW_ACTIVE_ONLY** = **1** +- **CLOSE_BUTTON_SHOW_ALWAYS** = **2** +- **CLOSE_BUTTON_SHOW_NEVER** = **0** + +Description +----------- + +Simple tabs control, similar to :ref:`TabContainer` but is only in charge of drawing tabs, not interact with children. + +Member Function Description +--------------------------- + +.. _class_Tabs_get_tab_count: + +- :ref:`int` **get_tab_count** **(** **)** const + +.. _class_Tabs_set_current_tab: + +- void **set_current_tab** **(** :ref:`int` tab_idx **)** + +.. _class_Tabs_get_current_tab: + +- :ref:`int` **get_current_tab** **(** **)** const + +.. _class_Tabs_set_tab_title: + +- void **set_tab_title** **(** :ref:`int` tab_idx, :ref:`String` title **)** + +.. _class_Tabs_get_tab_title: + +- :ref:`String` **get_tab_title** **(** :ref:`int` tab_idx **)** const + +.. _class_Tabs_set_tab_icon: + +- void **set_tab_icon** **(** :ref:`int` tab_idx, :ref:`Texture` icon **)** + +.. _class_Tabs_get_tab_icon: + +- :ref:`Texture` **get_tab_icon** **(** :ref:`int` tab_idx **)** const + +.. _class_Tabs_remove_tab: + +- void **remove_tab** **(** :ref:`int` tab_idx **)** + +.. _class_Tabs_add_tab: + +- void **add_tab** **(** :ref:`String` title, :ref:`Texture` icon **)** + +.. _class_Tabs_set_tab_align: + +- void **set_tab_align** **(** :ref:`int` align **)** + +.. _class_Tabs_get_tab_align: + +- :ref:`int` **get_tab_align** **(** **)** const + +.. _class_Tabs_ensure_tab_visible: + +- void **ensure_tab_visible** **(** :ref:`int` idx **)** + + diff --git a/classes/class_tcp_server.rst b/classes/class_tcp_server.rst new file mode 100644 index 000000000..df7b983e9 --- /dev/null +++ b/classes/class_tcp_server.rst @@ -0,0 +1,62 @@ +.. _class_TCP_Server: + +TCP_Server +========== + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +TCP Server. + +Member Functions +---------------- + ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`listen` **(** :ref:`int` port, :ref:`StringArray` accepted_hosts=StringArray() **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_connection_available` **(** **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`take_connection` **(** **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`stop` **(** **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +TCP Server class. Listens to connections on a port and returns a :ref:`StreamPeerTCP` when got a connection. + +Member Function Description +--------------------------- + +.. _class_TCP_Server_listen: + +- :ref:`int` **listen** **(** :ref:`int` port, :ref:`StringArray` accepted_hosts=StringArray() **)** + +Listen on a port, alternatively give a white-list of accepted hosts. + +.. _class_TCP_Server_is_connection_available: + +- :ref:`bool` **is_connection_available** **(** **)** const + +Return true if a connection is available for taking. + +.. _class_TCP_Server_take_connection: + +- :ref:`Object` **take_connection** **(** **)** + +If a connection is available, return a StreamPeerTCP with the connection/ + +.. _class_TCP_Server_stop: + +- void **stop** **(** **)** + +Stop listening. + + diff --git a/classes/class_testcube.rst b/classes/class_testcube.rst new file mode 100644 index 000000000..4b07765da --- /dev/null +++ b/classes/class_testcube.rst @@ -0,0 +1,16 @@ +.. _class_TestCube: + +TestCube +======== + +Inherits: :ref:`GeometryInstance` +--------------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + diff --git a/classes/class_textedit.rst b/classes/class_textedit.rst new file mode 100644 index 000000000..7f7c58e02 --- /dev/null +++ b/classes/class_textedit.rst @@ -0,0 +1,318 @@ +.. _class_TextEdit: + +TextEdit +======== + +Inherits: :ref:`Control` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Multiline text editing control. + +Member Functions +---------------- + ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_text` **(** :ref:`String` text **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`insert_text_at_cursor` **(** :ref:`String` text **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_line_count` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_text` **(** **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_line` **(** :ref:`int` line **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`cursor_set_column` **(** :ref:`int` column, :ref:`bool` adjust_viewport=false **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`cursor_set_line` **(** :ref:`int` line, :ref:`bool` adjust_viewport=false **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`cursor_get_column` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`cursor_get_line` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_readonly` **(** :ref:`bool` enable **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_wrap` **(** :ref:`bool` enable **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_max_chars` **(** :ref:`int` amount **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`cut` **(** **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`copy` **(** **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`paste` **(** **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`select_all` **(** **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`select` **(** :ref:`int` from_line, :ref:`int` from_column, :ref:`int` to_line, :ref:`int` to_column **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_selection_active` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_selection_from_line` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_selection_from_column` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_selection_to_line` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_selection_to_column` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_selection_text` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_word_under_cursor` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`IntArray` | :ref:`search` **(** :ref:`String` flags, :ref:`int` from_line, :ref:`int` from_column, :ref:`int` to_line **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`undo` **(** **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`redo` **(** **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_undo_history` **(** **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_syntax_coloring` **(** :ref:`bool` enable **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_syntax_coloring_enabled` **(** **)** const | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_keyword_color` **(** :ref:`String` keyword, :ref:`Color` color **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_color_region` **(** :ref:`String` begin_key, :ref:`String` end_key, :ref:`Color` color, :ref:`bool` line_only=false **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_symbol_color` **(** :ref:`Color` color **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_custom_bg_color` **(** :ref:`Color` color **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_colors` **(** **)** | ++----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **text_changed** **(** **)** +- **cursor_changed** **(** **)** +- **request_completion** **(** **)** + +Numeric Constants +----------------- + +- **SEARCH_MATCH_CASE** = **1** --- Match case when searching. +- **SEARCH_WHOLE_WORDS** = **2** --- Match whole words when searching. +- **SEARCH_BACKWARDS** = **4** --- Search from end to begining. + +Description +----------- + +TextEdit is meant for editing large, multiline text. It also has facilities for editing code, such as syntax highlighting support and multiple levels of undo/redo. + +Member Function Description +--------------------------- + +.. _class_TextEdit_set_text: + +- void **set_text** **(** :ref:`String` text **)** + +Set the entire text. + +.. _class_TextEdit_insert_text_at_cursor: + +- void **insert_text_at_cursor** **(** :ref:`String` text **)** + +Insert a given text at the cursor position. + +.. _class_TextEdit_get_line_count: + +- :ref:`int` **get_line_count** **(** **)** const + +Return the amount of total lines in the text. + +.. _class_TextEdit_get_text: + +- :ref:`String` **get_text** **(** **)** + +Return the whole text. + +.. _class_TextEdit_get_line: + +- :ref:`String` **get_line** **(** :ref:`int` line **)** const + +Return the text of a specific line. + +.. _class_TextEdit_cursor_set_column: + +- void **cursor_set_column** **(** :ref:`int` column, :ref:`bool` adjust_viewport=false **)** + +.. _class_TextEdit_cursor_set_line: + +- void **cursor_set_line** **(** :ref:`int` line, :ref:`bool` adjust_viewport=false **)** + +.. _class_TextEdit_cursor_get_column: + +- :ref:`int` **cursor_get_column** **(** **)** const + +Return the column the editing cursor is at. + +.. _class_TextEdit_cursor_get_line: + +- :ref:`int` **cursor_get_line** **(** **)** const + +Return the line the editing cursor is at. + +.. _class_TextEdit_set_readonly: + +- void **set_readonly** **(** :ref:`bool` enable **)** + +Set the text editor as read-only. Text can be displayed but not edited. + +.. _class_TextEdit_set_wrap: + +- void **set_wrap** **(** :ref:`bool` enable **)** + +Enable text wrapping when it goes beyond he edge of what is visible. + +.. _class_TextEdit_set_max_chars: + +- void **set_max_chars** **(** :ref:`int` amount **)** + +Set the maximum amount of characters editable. + +.. _class_TextEdit_cut: + +- void **cut** **(** **)** + +Cut the current selection. + +.. _class_TextEdit_copy: + +- void **copy** **(** **)** + +Copy the current selection. + +.. _class_TextEdit_paste: + +- void **paste** **(** **)** + +Paste the current selection. + +.. _class_TextEdit_select_all: + +- void **select_all** **(** **)** + +Select all the text. + +.. _class_TextEdit_select: + +- void **select** **(** :ref:`int` from_line, :ref:`int` from_column, :ref:`int` to_line, :ref:`int` to_column **)** + +Perform selection, from line/column to line/column. + +.. _class_TextEdit_is_selection_active: + +- :ref:`bool` **is_selection_active** **(** **)** const + +Return true if the selection is active. + +.. _class_TextEdit_get_selection_from_line: + +- :ref:`int` **get_selection_from_line** **(** **)** const + +Return the selection begin line. + +.. _class_TextEdit_get_selection_from_column: + +- :ref:`int` **get_selection_from_column** **(** **)** const + +Return the selection begin column. + +.. _class_TextEdit_get_selection_to_line: + +- :ref:`int` **get_selection_to_line** **(** **)** const + +Return the selection end line. + +.. _class_TextEdit_get_selection_to_column: + +- :ref:`int` **get_selection_to_column** **(** **)** const + +Return the selection end column. + +.. _class_TextEdit_get_selection_text: + +- :ref:`String` **get_selection_text** **(** **)** const + +Return the text inside the selection. + +.. _class_TextEdit_get_word_under_cursor: + +- :ref:`String` **get_word_under_cursor** **(** **)** const + +.. _class_TextEdit_search: + +- :ref:`IntArray` **search** **(** :ref:`String` flags, :ref:`int` from_line, :ref:`int` from_column, :ref:`int` to_line **)** const + +Perform a search inside the text. Search flags can be specified in the SEARCH_* enum. + +.. _class_TextEdit_undo: + +- void **undo** **(** **)** + +Perform undo operation. + +.. _class_TextEdit_redo: + +- void **redo** **(** **)** + +Perform redo operation. + +.. _class_TextEdit_clear_undo_history: + +- void **clear_undo_history** **(** **)** + +Clear the undo history. + +.. _class_TextEdit_set_syntax_coloring: + +- void **set_syntax_coloring** **(** :ref:`bool` enable **)** + +Set to enable the syntax coloring. + +.. _class_TextEdit_is_syntax_coloring_enabled: + +- :ref:`bool` **is_syntax_coloring_enabled** **(** **)** const + +Return true if the syntax coloring is enabled. + +.. _class_TextEdit_add_keyword_color: + +- void **add_keyword_color** **(** :ref:`String` keyword, :ref:`Color` color **)** + +Add a keyword and its color. + +.. _class_TextEdit_add_color_region: + +- void **add_color_region** **(** :ref:`String` begin_key, :ref:`String` end_key, :ref:`Color` color, :ref:`bool` line_only=false **)** + +Add color region (given the delimiters) and its colors. + +.. _class_TextEdit_set_symbol_color: + +- void **set_symbol_color** **(** :ref:`Color` color **)** + +Set the color for symbols. + +.. _class_TextEdit_set_custom_bg_color: + +- void **set_custom_bg_color** **(** :ref:`Color` color **)** + +Set a custom background color. A background color with alpha==0 disables this. + +.. _class_TextEdit_clear_colors: + +- void **clear_colors** **(** **)** + +Clear all the syntax coloring information. + + diff --git a/classes/class_texture.rst b/classes/class_texture.rst new file mode 100644 index 000000000..7b84685fe --- /dev/null +++ b/classes/class_texture.rst @@ -0,0 +1,114 @@ +.. _class_Texture: + +Texture +======= + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Texture for 2D and 3D. + +Member Functions +---------------- + ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_width` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_height` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_size` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_rid` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_alpha` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_flags` **(** :ref:`int` flags **)** | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_flags` **(** **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`Color` modulate=Color(1,1,1,1), :ref:`bool` transpose=false **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw_rect` **(** :ref:`RID` canvas_item, :ref:`Rect2` rect, :ref:`bool` tile, :ref:`Color` modulate=Color(1,1,1,1), :ref:`bool` transpose=false **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw_rect_region` **(** :ref:`RID` canvas_item, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1,1,1,1), :ref:`bool` transpose=false **)** const | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **FLAG_MIPMAPS** = **1** --- Generate mipmaps, to enable smooth zooming out of the texture. +- **FLAG_REPEAT** = **2** --- Repeat (instead of clamp to edge). +- **FLAG_FILTER** = **4** --- Turn on magnifying filter, to enable smooth zooming in of the texture. +- **FLAG_VIDEO_SURFACE** = **4096** --- Texture is a video surface. +- **FLAGS_DEFAULT** = **7** --- Default flags. Generate mipmaps, repeat, and filter are enabled. +- **FLAG_ANISOTROPIC_FILTER** = **8** +- **FLAG_CONVERT_TO_LINEAR** = **16** +- **FLAG_MIRRORED_REPEAT** = **32** + +Description +----------- + +A texture works by registering an image in the video hardware, which then can be used in 3D models or 2D :ref:`Sprite` or GUI :ref:`Control`s. + +Member Function Description +--------------------------- + +.. _class_Texture_get_width: + +- :ref:`int` **get_width** **(** **)** const + +Return the texture width. + +.. _class_Texture_get_height: + +- :ref:`int` **get_height** **(** **)** const + +Return the texture height. + +.. _class_Texture_get_size: + +- :ref:`Vector2` **get_size** **(** **)** const + +Return the texture size. + +.. _class_Texture_get_rid: + +- :ref:`RID` **get_rid** **(** **)** const + +Return the texture RID as used in the :ref:`VisualServer`. + +.. _class_Texture_has_alpha: + +- :ref:`bool` **has_alpha** **(** **)** const + +.. _class_Texture_set_flags: + +- void **set_flags** **(** :ref:`int` flags **)** + +Change the texture flags. + +.. _class_Texture_get_flags: + +- :ref:`int` **get_flags** **(** **)** const + +Return the current texture flags. + +.. _class_Texture_draw: + +- void **draw** **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`Color` modulate=Color(1,1,1,1), :ref:`bool` transpose=false **)** const + +.. _class_Texture_draw_rect: + +- void **draw_rect** **(** :ref:`RID` canvas_item, :ref:`Rect2` rect, :ref:`bool` tile, :ref:`Color` modulate=Color(1,1,1,1), :ref:`bool` transpose=false **)** const + +.. _class_Texture_draw_rect_region: + +- void **draw_rect_region** **(** :ref:`RID` canvas_item, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1,1,1,1), :ref:`bool` transpose=false **)** const + + diff --git a/classes/class_texturebutton.rst b/classes/class_texturebutton.rst new file mode 100644 index 000000000..a6ca57833 --- /dev/null +++ b/classes/class_texturebutton.rst @@ -0,0 +1,128 @@ +.. _class_TextureButton: + +TextureButton +============= + +Inherits: :ref:`BaseButton` +--------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Button that can be themed with textures. + +Member Functions +---------------- + ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_normal_texture` **(** :ref:`Texture` texture **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_pressed_texture` **(** :ref:`Texture` texture **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_hover_texture` **(** :ref:`Texture` texture **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_disabled_texture` **(** :ref:`Texture` texture **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_focused_texture` **(** :ref:`Texture` texture **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_click_mask` **(** :ref:`BitMap` mask **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_texture_scale` **(** :ref:`Vector2` scale **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_modulate` **(** :ref:`Color` color **)** | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_normal_texture` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_pressed_texture` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_hover_texture` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_disabled_texture` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_focused_texture` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| :ref:`BitMap` | :ref:`get_click_mask` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_texture_scale` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_modulate` **(** **)** const | ++--------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Button that can be themed with textures. This is like a regular :ref:`Button` but can be themed by assigning textures to it. This button is intended to be easy to theme, however a regular button can expand (that uses styleboxes) and still be better if the interface is expect to have internationalization of texts. + +Only the normal texture is required, the others are optional. + +Member Function Description +--------------------------- + +.. _class_TextureButton_set_normal_texture: + +- void **set_normal_texture** **(** :ref:`Texture` texture **)** + +.. _class_TextureButton_set_pressed_texture: + +- void **set_pressed_texture** **(** :ref:`Texture` texture **)** + +.. _class_TextureButton_set_hover_texture: + +- void **set_hover_texture** **(** :ref:`Texture` texture **)** + +.. _class_TextureButton_set_disabled_texture: + +- void **set_disabled_texture** **(** :ref:`Texture` texture **)** + +.. _class_TextureButton_set_focused_texture: + +- void **set_focused_texture** **(** :ref:`Texture` texture **)** + +.. _class_TextureButton_set_click_mask: + +- void **set_click_mask** **(** :ref:`BitMap` mask **)** + +.. _class_TextureButton_set_texture_scale: + +- void **set_texture_scale** **(** :ref:`Vector2` scale **)** + +.. _class_TextureButton_set_modulate: + +- void **set_modulate** **(** :ref:`Color` color **)** + +.. _class_TextureButton_get_normal_texture: + +- :ref:`Texture` **get_normal_texture** **(** **)** const + +.. _class_TextureButton_get_pressed_texture: + +- :ref:`Texture` **get_pressed_texture** **(** **)** const + +.. _class_TextureButton_get_hover_texture: + +- :ref:`Texture` **get_hover_texture** **(** **)** const + +.. _class_TextureButton_get_disabled_texture: + +- :ref:`Texture` **get_disabled_texture** **(** **)** const + +.. _class_TextureButton_get_focused_texture: + +- :ref:`Texture` **get_focused_texture** **(** **)** const + +.. _class_TextureButton_get_click_mask: + +- :ref:`BitMap` **get_click_mask** **(** **)** const + +.. _class_TextureButton_get_texture_scale: + +- :ref:`Vector2` **get_texture_scale** **(** **)** const + +.. _class_TextureButton_get_modulate: + +- :ref:`Color` **get_modulate** **(** **)** const + + diff --git a/classes/class_textureframe.rst b/classes/class_textureframe.rst new file mode 100644 index 000000000..5fe940d2d --- /dev/null +++ b/classes/class_textureframe.rst @@ -0,0 +1,66 @@ +.. _class_TextureFrame: + +TextureFrame +============ + +Inherits: :ref:`Control` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Control Frame that draws a texture. + +Member Functions +---------------- + ++------------------------------+-------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_texture` **(** :ref:`Object` texture **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_texture` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_modulate` **(** :ref:`Color` modulate **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_modulate` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_expand` **(** :ref:`bool` enable **)** | ++------------------------------+-------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_expand` **(** **)** const | ++------------------------------+-------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Control frame that simply draws an assigned texture. It can stretch or not. It's a simple way to just show an image in a UI. + +Member Function Description +--------------------------- + +.. _class_TextureFrame_set_texture: + +- void **set_texture** **(** :ref:`Object` texture **)** + +.. _class_TextureFrame_get_texture: + +- :ref:`Object` **get_texture** **(** **)** const + +.. _class_TextureFrame_set_modulate: + +- void **set_modulate** **(** :ref:`Color` modulate **)** + +.. _class_TextureFrame_get_modulate: + +- :ref:`Color` **get_modulate** **(** **)** const + +.. _class_TextureFrame_set_expand: + +- void **set_expand** **(** :ref:`bool` enable **)** + +.. _class_TextureFrame_has_expand: + +- :ref:`bool` **has_expand** **(** **)** const + + diff --git a/classes/class_textureprogress.rst b/classes/class_textureprogress.rst new file mode 100644 index 000000000..ad427f098 --- /dev/null +++ b/classes/class_textureprogress.rst @@ -0,0 +1,124 @@ +.. _class_TextureProgress: + +TextureProgress +=============== + +Inherits: :ref:`Range` +----------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Textured progress bar implementation. + +Member Functions +---------------- + ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_under_texture` **(** :ref:`Object` tex **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_under_texture` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_progress_texture` **(** :ref:`Object` tex **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_progress_texture` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_over_texture` **(** :ref:`Object` tex **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_over_texture` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_fill_mode` **(** :ref:`int` mode **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_fill_mode` **(** **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_radial_initial_angle` **(** :ref:`float` mode **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_radial_initial_angle` **(** **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_radial_center_offset` **(** :ref:`Vector2` mode **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_radial_center_offset` **(** **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_fill_degrees` **(** :ref:`float` mode **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_fill_degrees` **(** **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **FILL_LEFT_TO_RIGHT** = **0** +- **FILL_RIGHT_TO_LEFT** = **1** +- **FILL_TOP_TO_BOTTOM** = **2** +- **FILL_BOTTOM_TO_TOP** = **3** +- **FILL_CLOCKWISE** = **4** +- **FILL_COUNTER_CLOCKWISE** = **5** + +Description +----------- + +:ref:`ProgressBar` implementation that is easier to theme (by just passing a few textures). + +Member Function Description +--------------------------- + +.. _class_TextureProgress_set_under_texture: + +- void **set_under_texture** **(** :ref:`Object` tex **)** + +.. _class_TextureProgress_get_under_texture: + +- :ref:`Object` **get_under_texture** **(** **)** const + +.. _class_TextureProgress_set_progress_texture: + +- void **set_progress_texture** **(** :ref:`Object` tex **)** + +.. _class_TextureProgress_get_progress_texture: + +- :ref:`Object` **get_progress_texture** **(** **)** const + +.. _class_TextureProgress_set_over_texture: + +- void **set_over_texture** **(** :ref:`Object` tex **)** + +.. _class_TextureProgress_get_over_texture: + +- :ref:`Object` **get_over_texture** **(** **)** const + +.. _class_TextureProgress_set_fill_mode: + +- void **set_fill_mode** **(** :ref:`int` mode **)** + +.. _class_TextureProgress_get_fill_mode: + +- :ref:`int` **get_fill_mode** **(** **)** + +.. _class_TextureProgress_set_radial_initial_angle: + +- void **set_radial_initial_angle** **(** :ref:`float` mode **)** + +.. _class_TextureProgress_get_radial_initial_angle: + +- :ref:`float` **get_radial_initial_angle** **(** **)** + +.. _class_TextureProgress_set_radial_center_offset: + +- void **set_radial_center_offset** **(** :ref:`Vector2` mode **)** + +.. _class_TextureProgress_get_radial_center_offset: + +- :ref:`Vector2` **get_radial_center_offset** **(** **)** + +.. _class_TextureProgress_set_fill_degrees: + +- void **set_fill_degrees** **(** :ref:`float` mode **)** + +.. _class_TextureProgress_get_fill_degrees: + +- :ref:`float` **get_fill_degrees** **(** **)** + + diff --git a/classes/class_theme.rst b/classes/class_theme.rst new file mode 100644 index 000000000..3326aff0e --- /dev/null +++ b/classes/class_theme.rst @@ -0,0 +1,206 @@ +.. _class_Theme: + +Theme +===== + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Theme for controls. + +Member Functions +---------------- + ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_icon` **(** :ref:`String` name, :ref:`String` type, :ref:`Texture` texture **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_icon` **(** :ref:`String` name, :ref:`String` type **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_icon` **(** :ref:`String` name, :ref:`String` type **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_icon` **(** :ref:`String` name, :ref:`String` type **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_icon_list` **(** :ref:`String` type **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_stylebox` **(** :ref:`String` name, :ref:`String` type, :ref:`StyleBox` texture **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StyleBox` | :ref:`get_stylebox` **(** :ref:`String` name, :ref:`String` type **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_stylebox` **(** :ref:`String` name, :ref:`String` type **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_stylebox` **(** :ref:`String` name, :ref:`String` type **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_stylebox_list` **(** :ref:`String` type **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_font` **(** :ref:`String` name, :ref:`String` type, :ref:`Font` font **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Font` | :ref:`get_font` **(** :ref:`String` name, :ref:`String` type **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_font` **(** :ref:`String` name, :ref:`String` type **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_font` **(** :ref:`String` name, :ref:`String` type **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_font_list` **(** :ref:`String` type **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_color` **(** :ref:`String` name, :ref:`String` type, :ref:`Color` color **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_color` **(** :ref:`String` name, :ref:`String` type **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_color` **(** :ref:`String` name, :ref:`String` type **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_color` **(** :ref:`String` name, :ref:`String` type **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_color_list` **(** :ref:`String` type **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_constant` **(** :ref:`String` name, :ref:`String` type, :ref:`int` constant **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_constant` **(** :ref:`String` name, :ref:`String` type **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_constant` **(** :ref:`String` name, :ref:`String` type **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_constant` **(** :ref:`String` name, :ref:`String` type **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_constant_list` **(** :ref:`String` type **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_default_font` **(** :ref:`Object` font **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_default_font` **(** **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_type_list` **(** :ref:`String` type **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`copy_default_theme` **(** **)** | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Theme for skinning controls. Controls can be skinned individually, but for complex applications it's more efficient to just create a global theme that defines everything. This theme can be applied to any :ref:`Control`, and it and its children will automatically use it. + +Theme resources can be alternatively loaded by writing them in a .theme file, see wiki for more info. + +Member Function Description +--------------------------- + +.. _class_Theme_set_icon: + +- void **set_icon** **(** :ref:`String` name, :ref:`String` type, :ref:`Texture` texture **)** + +.. _class_Theme_get_icon: + +- :ref:`Texture` **get_icon** **(** :ref:`String` name, :ref:`String` type **)** const + +.. _class_Theme_has_icon: + +- :ref:`bool` **has_icon** **(** :ref:`String` name, :ref:`String` type **)** const + +.. _class_Theme_clear_icon: + +- void **clear_icon** **(** :ref:`String` name, :ref:`String` type **)** + +.. _class_Theme_get_icon_list: + +- :ref:`StringArray` **get_icon_list** **(** :ref:`String` type **)** const + +.. _class_Theme_set_stylebox: + +- void **set_stylebox** **(** :ref:`String` name, :ref:`String` type, :ref:`StyleBox` texture **)** + +.. _class_Theme_get_stylebox: + +- :ref:`StyleBox` **get_stylebox** **(** :ref:`String` name, :ref:`String` type **)** const + +.. _class_Theme_has_stylebox: + +- :ref:`bool` **has_stylebox** **(** :ref:`String` name, :ref:`String` type **)** const + +.. _class_Theme_clear_stylebox: + +- void **clear_stylebox** **(** :ref:`String` name, :ref:`String` type **)** + +.. _class_Theme_get_stylebox_list: + +- :ref:`StringArray` **get_stylebox_list** **(** :ref:`String` type **)** const + +.. _class_Theme_set_font: + +- void **set_font** **(** :ref:`String` name, :ref:`String` type, :ref:`Font` font **)** + +.. _class_Theme_get_font: + +- :ref:`Font` **get_font** **(** :ref:`String` name, :ref:`String` type **)** const + +.. _class_Theme_has_font: + +- :ref:`bool` **has_font** **(** :ref:`String` name, :ref:`String` type **)** const + +.. _class_Theme_clear_font: + +- void **clear_font** **(** :ref:`String` name, :ref:`String` type **)** + +.. _class_Theme_get_font_list: + +- :ref:`StringArray` **get_font_list** **(** :ref:`String` type **)** const + +.. _class_Theme_set_color: + +- void **set_color** **(** :ref:`String` name, :ref:`String` type, :ref:`Color` color **)** + +.. _class_Theme_get_color: + +- :ref:`Color` **get_color** **(** :ref:`String` name, :ref:`String` type **)** const + +.. _class_Theme_has_color: + +- :ref:`bool` **has_color** **(** :ref:`String` name, :ref:`String` type **)** const + +.. _class_Theme_clear_color: + +- void **clear_color** **(** :ref:`String` name, :ref:`String` type **)** + +.. _class_Theme_get_color_list: + +- :ref:`StringArray` **get_color_list** **(** :ref:`String` type **)** const + +.. _class_Theme_set_constant: + +- void **set_constant** **(** :ref:`String` name, :ref:`String` type, :ref:`int` constant **)** + +.. _class_Theme_get_constant: + +- :ref:`int` **get_constant** **(** :ref:`String` name, :ref:`String` type **)** const + +.. _class_Theme_has_constant: + +- :ref:`bool` **has_constant** **(** :ref:`String` name, :ref:`String` type **)** const + +.. _class_Theme_clear_constant: + +- void **clear_constant** **(** :ref:`String` name, :ref:`String` type **)** + +.. _class_Theme_get_constant_list: + +- :ref:`StringArray` **get_constant_list** **(** :ref:`String` type **)** const + +.. _class_Theme_set_default_font: + +- void **set_default_font** **(** :ref:`Object` font **)** + +.. _class_Theme_get_default_font: + +- :ref:`Object` **get_default_font** **(** **)** const + +.. _class_Theme_get_type_list: + +- :ref:`StringArray` **get_type_list** **(** :ref:`String` type **)** const + +.. _class_Theme_copy_default_theme: + +- void **copy_default_theme** **(** **)** + + diff --git a/classes/class_thread.rst b/classes/class_thread.rst new file mode 100644 index 000000000..e45ef1da4 --- /dev/null +++ b/classes/class_thread.rst @@ -0,0 +1,56 @@ +.. _class_Thread: + +Thread +====== + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Error | :ref:`start` **(** :ref:`Object` instance, :ref:`String` method, var userdata=NULL, :ref:`int` priority=1 **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_id` **(** **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_active` **(** **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Variant | :ref:`wait_to_finish` **(** **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **PRIORITY_LOW** = **0** +- **PRIORITY_NORMAL** = **1** +- **PRIORITY_HIGH** = **2** + +Member Function Description +--------------------------- + +.. _class_Thread_start: + +- Error **start** **(** :ref:`Object` instance, :ref:`String` method, var userdata=NULL, :ref:`int` priority=1 **)** + +.. _class_Thread_get_id: + +- :ref:`String` **get_id** **(** **)** const + +.. _class_Thread_is_active: + +- :ref:`bool` **is_active** **(** **)** const + +.. _class_Thread_wait_to_finish: + +- Variant **wait_to_finish** **(** **)** + + diff --git a/classes/class_tilemap.rst b/classes/class_tilemap.rst new file mode 100644 index 000000000..e902ccec3 --- /dev/null +++ b/classes/class_tilemap.rst @@ -0,0 +1,406 @@ +.. _class_TileMap: + +TileMap +======= + +Inherits: :ref:`Node2D` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Node for 2D tile-based games. + +Member Functions +---------------- + ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_tileset` **(** :ref:`TileSet` tileset **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TileSet` | :ref:`get_tileset` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_mode` **(** :ref:`int` mode **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_mode` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_half_offset` **(** :ref:`int` half_offset **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_half_offset` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_custom_transform` **(** :ref:`Matrix32` custom_transform **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`get_custom_transform` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_cell_size` **(** :ref:`Vector2` size **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_cell_size` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_quadrant_size` **(** :ref:`int` size **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_quadrant_size` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_tile_origin` **(** :ref:`int` origin **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_tile_origin` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_center_x` **(** :ref:`bool` enable **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_center_x` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_center_y` **(** :ref:`bool` enable **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_center_y` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_y_sort_mode` **(** :ref:`bool` enable **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_y_sort_mode_enabled` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_use_kinematic` **(** :ref:`bool` use_kinematic **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_collision_use_kinematic` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_layer` **(** :ref:`int` mask **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_collision_layer` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_mask` **(** :ref:`int` mask **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_collision_mask` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_friction` **(** :ref:`float` value **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_collision_friction` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collision_bounce` **(** :ref:`float` value **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_collision_bounce` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_occluder_light_mask` **(** :ref:`int` mask **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_occluder_light_mask` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_cell` **(** :ref:`int` x, :ref:`int` y, :ref:`int` tile, :ref:`bool` flip_x=false, :ref:`bool` flip_y=false, :ref:`bool` transpose=false **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_cellv` **(** :ref:`Vector2` pos, :ref:`int` tile, :ref:`bool` flip_x=false, :ref:`bool` flip_y=false, :ref:`bool` transpose=false **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_cell` **(** :ref:`int` x, :ref:`int` y **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_cellv` **(** :ref:`Vector2` pos **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_cell_x_flipped` **(** :ref:`int` x, :ref:`int` y **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_cell_y_flipped` **(** :ref:`int` x, :ref:`int` y **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_used_cells` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`map_to_world` **(** :ref:`Vector2` mappos, :ref:`bool` ignore_half_ofs=false **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`world_to_map` **(** :ref:`Vector2` worldpos **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **settings_changed** **(** **)** + +Numeric Constants +----------------- + +- **INVALID_CELL** = **-1** --- Returned when a cell doesn't exist. +- **MODE_SQUARE** = **0** --- Orthogonal orientation mode. +- **MODE_ISOMETRIC** = **1** --- Isometric orientation mode. +- **MODE_CUSTOM** = **2** --- Custom orientation mode. +- **HALF_OFFSET_X** = **0** --- Half offset on the X coordinate. +- **HALF_OFFSET_Y** = **1** --- Half offset on the Y coordinate. +- **HALF_OFFSET_DISABLED** = **2** --- Half offset disabled. +- **TILE_ORIGIN_TOP_LEFT** = **0** --- Tile origin at its top-left corner. +- **TILE_ORIGIN_CENTER** = **1** --- Tile origin at its center. + +Description +----------- + +Node for 2D tile-based games. Tilemaps use a :ref:`TileSet` which contain a list of tiles (textures, their rect and a collision) and are used to create complex grid-based maps. + +To optimize drawing and culling (sort of like :ref:`GridMap`), you can specify a quadrant size, so chunks of the map will be batched together at drawing time. + +Member Function Description +--------------------------- + +.. _class_TileMap_set_tileset: + +- void **set_tileset** **(** :ref:`TileSet` tileset **)** + +Set the current tileset. + +.. _class_TileMap_get_tileset: + +- :ref:`TileSet` **get_tileset** **(** **)** const + +Return the current tileset. + +.. _class_TileMap_set_mode: + +- void **set_mode** **(** :ref:`int` mode **)** + +Set the orientation mode as square, isometric or custom (use MODE_* constants as argument). + +.. _class_TileMap_get_mode: + +- :ref:`int` **get_mode** **(** **)** const + +Return the orientation mode. + +.. _class_TileMap_set_half_offset: + +- void **set_half_offset** **(** :ref:`int` half_offset **)** + +Set an half offset on the X coordinate, Y coordinate, or none (use HALF_OFFSET_* constants as argument). + +Half offset sets every other tile off by a half tile size in the specified direction. + +.. _class_TileMap_get_half_offset: + +- :ref:`int` **get_half_offset** **(** **)** const + +Return the current half offset configuration. + +.. _class_TileMap_set_custom_transform: + +- void **set_custom_transform** **(** :ref:`Matrix32` custom_transform **)** + +Set custom transform matrix, to use in combination with the custom orientation mode. + +.. _class_TileMap_get_custom_transform: + +- :ref:`Matrix32` **get_custom_transform** **(** **)** const + +Return the custom transform matrix. + +.. _class_TileMap_set_cell_size: + +- void **set_cell_size** **(** :ref:`Vector2` size **)** + +Set the cell size. + +.. _class_TileMap_get_cell_size: + +- :ref:`Vector2` **get_cell_size** **(** **)** const + +Return the cell size. + +.. _class_TileMap_set_quadrant_size: + +- void **set_quadrant_size** **(** :ref:`int` size **)** + +Set the quadrant size, this optimizes drawing by batching chunks of map at draw/cull time. + +Allowed values are integers ranging from 1 to 128. + +.. _class_TileMap_get_quadrant_size: + +- :ref:`int` **get_quadrant_size** **(** **)** const + +Return the quadrant size. + +.. _class_TileMap_set_tile_origin: + +- void **set_tile_origin** **(** :ref:`int` origin **)** + +Set the tile origin to the tile center or its top-left corner (use TILE_ORIGIN_* constants as argument). + +.. _class_TileMap_get_tile_origin: + +- :ref:`int` **get_tile_origin** **(** **)** const + +Return the tile origin configuration. + +.. _class_TileMap_set_center_x: + +- void **set_center_x** **(** :ref:`bool` enable **)** + +Set tiles to be centered in x coordinate. (by default this is false and they are drawn from upper left cell corner). + +.. _class_TileMap_get_center_x: + +- :ref:`bool` **get_center_x** **(** **)** const + +Return true if tiles are to be centered in x coordinate (by default this is false and they are drawn from upper left cell corner). + +.. _class_TileMap_set_center_y: + +- void **set_center_y** **(** :ref:`bool` enable **)** + +Set tiles to be centered in y coordinate. (by default this is false and they are drawn from upper left cell corner). + +.. _class_TileMap_get_center_y: + +- :ref:`bool` **get_center_y** **(** **)** const + +Return true if tiles are to be centered in y coordinate (by default this is false and they are drawn from upper left cell corner). + +.. _class_TileMap_set_y_sort_mode: + +- void **set_y_sort_mode** **(** :ref:`bool` enable **)** + +Set the Y sort mode. Enabled Y sort mode means that children of the tilemap will be drawn in the order defined by their Y coordinate. + +A tile with a higher Y coordinate will therefore be drawn later, potentially covering up the tile(s) above it if its sprite is higher than its cell size. + +.. _class_TileMap_is_y_sort_mode_enabled: + +- :ref:`bool` **is_y_sort_mode_enabled** **(** **)** const + +Return the Y sort mode. + +.. _class_TileMap_set_collision_use_kinematic: + +- void **set_collision_use_kinematic** **(** :ref:`bool` use_kinematic **)** + +Set the tilemap to handle collisions as a kinematic body (enabled) or a static body (disabled). + +.. _class_TileMap_get_collision_use_kinematic: + +- :ref:`bool` **get_collision_use_kinematic** **(** **)** const + +Return whether the tilemap handles collisions as a kinematic body. + +.. _class_TileMap_set_collision_layer: + +- void **set_collision_layer** **(** :ref:`int` mask **)** + +Set the collision layer. + +Layers are referenced by binary indexes, so allowable values to describe the 20 available layers range from 0 to 2^20-1. + +.. _class_TileMap_get_collision_layer: + +- :ref:`int` **get_collision_layer** **(** **)** const + +Return the collision layer. + +.. _class_TileMap_set_collision_mask: + +- void **set_collision_mask** **(** :ref:`int` mask **)** + +Set the collision masks. + +Masks are referenced by binary indexes, so allowable values to describe the 20 available masks range from 0 to 2^20-1. + +.. _class_TileMap_get_collision_mask: + +- :ref:`int` **get_collision_mask** **(** **)** const + +Return the collision mask. + +.. _class_TileMap_set_collision_friction: + +- void **set_collision_friction** **(** :ref:`float` value **)** + +Set the collision friction parameter. + +Allowable values range from 0 to 1. + +.. _class_TileMap_get_collision_friction: + +- :ref:`float` **get_collision_friction** **(** **)** const + +Return the collision friction parameter. + +.. _class_TileMap_set_collision_bounce: + +- void **set_collision_bounce** **(** :ref:`float` value **)** + +Set the collision bounce parameter. + +Allowable values range from 0 to 1. + +.. _class_TileMap_get_collision_bounce: + +- :ref:`float` **get_collision_bounce** **(** **)** const + +Return the collision bounce parameter. + +.. _class_TileMap_set_occluder_light_mask: + +- void **set_occluder_light_mask** **(** :ref:`int` mask **)** + +.. _class_TileMap_get_occluder_light_mask: + +- :ref:`int` **get_occluder_light_mask** **(** **)** const + +.. _class_TileMap_set_cell: + +- void **set_cell** **(** :ref:`int` x, :ref:`int` y, :ref:`int` tile, :ref:`bool` flip_x=false, :ref:`bool` flip_y=false, :ref:`bool` transpose=false **)** + +Set the tile index for the cell referenced by its grid-based X and Y coordinates. + +A tile index of -1 clears the cell. + +Optionally, the tile can also be flipped over the X and Y coordinates or transposed. + +.. _class_TileMap_set_cellv: + +- void **set_cellv** **(** :ref:`Vector2` pos, :ref:`int` tile, :ref:`bool` flip_x=false, :ref:`bool` flip_y=false, :ref:`bool` transpose=false **)** + +Set the tile index for the cell referenced by a Vector2 of grid-based coordinates. + +A tile index of -1 clears the cell. + +Optionally, the tile can also be flipped over the X and Y axes or transposed. + +.. _class_TileMap_get_cell: + +- :ref:`int` **get_cell** **(** :ref:`int` x, :ref:`int` y **)** const + +Return the tile index of the referenced cell. + +.. _class_TileMap_get_cellv: + +- :ref:`int` **get_cellv** **(** :ref:`Vector2` pos **)** const + +Return the tile index of the cell referenced by a Vector2. + +.. _class_TileMap_is_cell_x_flipped: + +- :ref:`bool` **is_cell_x_flipped** **(** :ref:`int` x, :ref:`int` y **)** const + +Return whether the referenced cell is flipped over the X axis. + +.. _class_TileMap_is_cell_y_flipped: + +- :ref:`bool` **is_cell_y_flipped** **(** :ref:`int` x, :ref:`int` y **)** const + +Return whether the referenced cell is flipped over the Y axis. + +.. _class_TileMap_clear: + +- void **clear** **(** **)** + +Clear all cells. + +.. _class_TileMap_get_used_cells: + +- :ref:`Array` **get_used_cells** **(** **)** const + +Return an array of all cells containing a tile from the tileset (i.e. a tile index different from -1). + +.. _class_TileMap_map_to_world: + +- :ref:`Vector2` **map_to_world** **(** :ref:`Vector2` mappos, :ref:`bool` ignore_half_ofs=false **)** const + +Return the absolute world position corresponding to the tilemap (grid-based) coordinates given as an argument. + +Optionally, the tilemap's potential half offset can be ignored. + +.. _class_TileMap_world_to_map: + +- :ref:`Vector2` **world_to_map** **(** :ref:`Vector2` worldpos **)** const + +Return the tilemap (grid-based) coordinates corresponding to the absolute world position given as an argument. + + diff --git a/classes/class_tileset.rst b/classes/class_tileset.rst new file mode 100644 index 000000000..a38c80a2e --- /dev/null +++ b/classes/class_tileset.rst @@ -0,0 +1,272 @@ +.. _class_TileSet: + +TileSet +======= + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Tile library for tilemaps. + +Member Functions +---------------- + ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`create_tile` **(** :ref:`int` id **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`tile_set_name` **(** :ref:`int` id, :ref:`String` name **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`tile_get_name` **(** :ref:`int` id **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`tile_set_texture` **(** :ref:`int` id, :ref:`Texture` texture **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`tile_get_texture` **(** :ref:`int` id **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`tile_set_material` **(** :ref:`int` id, :ref:`CanvasItemMaterial` material **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`CanvasItemMaterial` | :ref:`tile_get_material` **(** :ref:`int` id **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`tile_set_texture_offset` **(** :ref:`int` id, :ref:`Vector2` texture_offset **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`tile_get_texture_offset` **(** :ref:`int` id **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`tile_set_shape_offset` **(** :ref:`int` id, :ref:`Vector2` shape_offset **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`tile_get_shape_offset` **(** :ref:`int` id **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`tile_set_region` **(** :ref:`int` id, :ref:`Rect2` region **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`tile_get_region` **(** :ref:`int` id **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`tile_set_shape` **(** :ref:`int` id, :ref:`Shape2D` shape **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Shape2D` | :ref:`tile_get_shape` **(** :ref:`int` id **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`tile_set_shapes` **(** :ref:`int` id, :ref:`Array` shapes **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`tile_get_shapes` **(** :ref:`int` id **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`tile_set_navigation_polygon` **(** :ref:`int` id, :ref:`NavigationPolygon` navigation_polygon **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`NavigationPolygon` | :ref:`tile_get_navigation_polygon` **(** :ref:`int` id **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`tile_set_navigation_polygon_offset` **(** :ref:`int` id, :ref:`Vector2` navigation_polygon_offset **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`tile_get_navigation_polygon_offset` **(** :ref:`int` id **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`tile_set_light_occluder` **(** :ref:`int` id, :ref:`OccluderPolygon2D` light_occluder **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`OccluderPolygon2D` | :ref:`tile_get_light_occluder` **(** :ref:`int` id **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`tile_set_occluder_offset` **(** :ref:`int` id, :ref:`Vector2` occluder_offset **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`tile_get_occluder_offset` **(** :ref:`int` id **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_tile` **(** :ref:`int` id **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_last_unused_tile_id` **(** **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`find_tile_by_name` **(** :ref:`String` name **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_tiles_ids` **(** **)** const | ++------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +A TileSet is a library of tiles for a :ref:`TileMap`. It contains a list of tiles, each consisting of a sprite and optional collision shapes. + +Tiles are referenced by a unique integer ID. + +Member Function Description +--------------------------- + +.. _class_TileSet_create_tile: + +- void **create_tile** **(** :ref:`int` id **)** + +Create a new tile which will be referenced by the given ID. + +.. _class_TileSet_tile_set_name: + +- void **tile_set_name** **(** :ref:`int` id, :ref:`String` name **)** + +Set the name of the tile, for descriptive purposes. + +.. _class_TileSet_tile_get_name: + +- :ref:`String` **tile_get_name** **(** :ref:`int` id **)** const + +Return the name of the tile. + +.. _class_TileSet_tile_set_texture: + +- void **tile_set_texture** **(** :ref:`int` id, :ref:`Texture` texture **)** + +Set the texture of the tile. + +.. _class_TileSet_tile_get_texture: + +- :ref:`Texture` **tile_get_texture** **(** :ref:`int` id **)** const + +Return the texture of the tile. + +.. _class_TileSet_tile_set_material: + +- void **tile_set_material** **(** :ref:`int` id, :ref:`CanvasItemMaterial` material **)** + +Set the material of the tile. + +.. _class_TileSet_tile_get_material: + +- :ref:`CanvasItemMaterial` **tile_get_material** **(** :ref:`int` id **)** const + +Return the material of the tile. + +.. _class_TileSet_tile_set_texture_offset: + +- void **tile_set_texture_offset** **(** :ref:`int` id, :ref:`Vector2` texture_offset **)** + +Set the texture offset of the tile. + +.. _class_TileSet_tile_get_texture_offset: + +- :ref:`Vector2` **tile_get_texture_offset** **(** :ref:`int` id **)** const + +Return the texture offset of the tile. + +.. _class_TileSet_tile_set_shape_offset: + +- void **tile_set_shape_offset** **(** :ref:`int` id, :ref:`Vector2` shape_offset **)** + +Set the shape offset of the tile. + +.. _class_TileSet_tile_get_shape_offset: + +- :ref:`Vector2` **tile_get_shape_offset** **(** :ref:`int` id **)** const + +Return the shape offset of the tile. + +.. _class_TileSet_tile_set_region: + +- void **tile_set_region** **(** :ref:`int` id, :ref:`Rect2` region **)** + +Set the tile sub-region in the texture. This is common in texture atlases. + +.. _class_TileSet_tile_get_region: + +- :ref:`Rect2` **tile_get_region** **(** :ref:`int` id **)** const + +Return the tile sub-region in the texture. + +.. _class_TileSet_tile_set_shape: + +- void **tile_set_shape** **(** :ref:`int` id, :ref:`Shape2D` shape **)** + +Set a shape for the tile, enabling physics to collide with it. + +.. _class_TileSet_tile_get_shape: + +- :ref:`Shape2D` **tile_get_shape** **(** :ref:`int` id **)** const + +Return the shape of the tile. + +.. _class_TileSet_tile_set_shapes: + +- void **tile_set_shapes** **(** :ref:`int` id, :ref:`Array` shapes **)** + +Set an array of shapes for the tile, enabling physics to collide with it. + +.. _class_TileSet_tile_get_shapes: + +- :ref:`Array` **tile_get_shapes** **(** :ref:`int` id **)** const + +Return the array of shapes of the tile. + +.. _class_TileSet_tile_set_navigation_polygon: + +- void **tile_set_navigation_polygon** **(** :ref:`int` id, :ref:`NavigationPolygon` navigation_polygon **)** + +Set a navigation polygon for the tile. + +.. _class_TileSet_tile_get_navigation_polygon: + +- :ref:`NavigationPolygon` **tile_get_navigation_polygon** **(** :ref:`int` id **)** const + +Return the navigation polygon of the tile. + +.. _class_TileSet_tile_set_navigation_polygon_offset: + +- void **tile_set_navigation_polygon_offset** **(** :ref:`int` id, :ref:`Vector2` navigation_polygon_offset **)** + +Set an offset for the tile's navigation polygon. + +.. _class_TileSet_tile_get_navigation_polygon_offset: + +- :ref:`Vector2` **tile_get_navigation_polygon_offset** **(** :ref:`int` id **)** const + +Return the offset of the tile's navigation polygon. + +.. _class_TileSet_tile_set_light_occluder: + +- void **tile_set_light_occluder** **(** :ref:`int` id, :ref:`OccluderPolygon2D` light_occluder **)** + +Set a light occluder for the tile. + +.. _class_TileSet_tile_get_light_occluder: + +- :ref:`OccluderPolygon2D` **tile_get_light_occluder** **(** :ref:`int` id **)** const + +Return the light occluder of the tile. + +.. _class_TileSet_tile_set_occluder_offset: + +- void **tile_set_occluder_offset** **(** :ref:`int` id, :ref:`Vector2` occluder_offset **)** + +Set an offset for the tile's light occluder. + +.. _class_TileSet_tile_get_occluder_offset: + +- :ref:`Vector2` **tile_get_occluder_offset** **(** :ref:`int` id **)** const + +Return the offset of the tile's light occluder. + +.. _class_TileSet_remove_tile: + +- void **remove_tile** **(** :ref:`int` id **)** + +Remove the tile referenced by the given ID. + +.. _class_TileSet_clear: + +- void **clear** **(** **)** + +Clear all tiles. + +.. _class_TileSet_get_last_unused_tile_id: + +- :ref:`int` **get_last_unused_tile_id** **(** **)** const + +Return the ID following the last currently used ID, useful when creating a new tile. + +.. _class_TileSet_find_tile_by_name: + +- :ref:`int` **find_tile_by_name** **(** :ref:`String` name **)** const + +Find the first tile matching the given name. + +.. _class_TileSet_get_tiles_ids: + +- :ref:`Array` **get_tiles_ids** **(** **)** const + +Return an array of all currently used tile IDs. + + diff --git a/classes/class_timer.rst b/classes/class_timer.rst new file mode 100644 index 000000000..d3e2070ca --- /dev/null +++ b/classes/class_timer.rst @@ -0,0 +1,129 @@ +.. _class_Timer: + +Timer +===== + +Inherits: :ref:`Node` +--------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_wait_time` **(** :ref:`float` time_sec **)** | ++----------------------------+------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_wait_time` **(** **)** const | ++----------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_one_shot` **(** :ref:`bool` enable **)** | ++----------------------------+------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_one_shot` **(** **)** const | ++----------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_autostart` **(** :ref:`bool` enable **)** | ++----------------------------+------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_autostart` **(** **)** const | ++----------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`start` **(** **)** | ++----------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`stop` **(** **)** | ++----------------------------+------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_time_left` **(** **)** const | ++----------------------------+------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_timer_process_mode` **(** :ref:`int` mode **)** | ++----------------------------+------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_timer_process_mode` **(** **)** const | ++----------------------------+------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **timeout** **(** **)** + +Numeric Constants +----------------- + +- **TIMER_PROCESS_FIXED** = **0** --- Update the timer at fixed intervals (framerate processing). +- **TIMER_PROCESS_IDLE** = **1** --- Update the timer during the idle time at each frame. + +Description +----------- + +Timer node. This is a simple node that will emit a timeout callback when the timer runs out. It can optionally be set to loop. + +Member Function Description +--------------------------- + +.. _class_Timer_set_wait_time: + +- void **set_wait_time** **(** :ref:`float` time_sec **)** + +Set wait time in seconds. When the time is over, it will emit the timeout signal. + +.. _class_Timer_get_wait_time: + +- :ref:`float` **get_wait_time** **(** **)** const + +Return the wait time in seconds. + +.. _class_Timer_set_one_shot: + +- void **set_one_shot** **(** :ref:`bool` enable **)** + +Set as one-shot. If enabled, the timer will stop after timeout, otherwise it will automatically restart. + +.. _class_Timer_is_one_shot: + +- :ref:`bool` **is_one_shot** **(** **)** const + +Return true if configured as one-shot. + +.. _class_Timer_set_autostart: + +- void **set_autostart** **(** :ref:`bool` enable **)** + +Set to automatically start when entering the scene. + +.. _class_Timer_has_autostart: + +- :ref:`bool` **has_autostart** **(** **)** const + +Return true if set to automatically start when entering the scene. + +.. _class_Timer_start: + +- void **start** **(** **)** + +Start the timer. + +.. _class_Timer_stop: + +- void **stop** **(** **)** + +Stop (cancel) the timer. + +.. _class_Timer_get_time_left: + +- :ref:`float` **get_time_left** **(** **)** const + +Return the time left for timeout in seconds if the timer is active, 0 otherwise. + +.. _class_Timer_set_timer_process_mode: + +- void **set_timer_process_mode** **(** :ref:`int` mode **)** + +Set the timer's processing mode (fixed or idle, use TIMER_PROCESS_* constants as argument). + +.. _class_Timer_get_timer_process_mode: + +- :ref:`int` **get_timer_process_mode** **(** **)** const + +Return the timer's processing mode. + + diff --git a/classes/class_toolbutton.rst b/classes/class_toolbutton.rst new file mode 100644 index 000000000..234da4945 --- /dev/null +++ b/classes/class_toolbutton.rst @@ -0,0 +1,16 @@ +.. _class_ToolButton: + +ToolButton +========== + +Inherits: :ref:`Button` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + diff --git a/classes/class_touchscreenbutton.rst b/classes/class_touchscreenbutton.rst new file mode 100644 index 000000000..9bfb68bac --- /dev/null +++ b/classes/class_touchscreenbutton.rst @@ -0,0 +1,109 @@ +.. _class_TouchScreenButton: + +TouchScreenButton +================= + +Inherits: :ref:`Node2D` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_texture` **(** :ref:`Object` texture **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_texture` **(** **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_texture_pressed` **(** :ref:`Object` texture_pressed **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_texture_pressed` **(** **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_bitmask` **(** :ref:`Object` bitmask **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`get_bitmask` **(** **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_action` **(** :ref:`String` action **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_action` **(** **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_visibility_mode` **(** :ref:`int` mode **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_visibility_mode` **(** **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_passby_press` **(** :ref:`bool` enabled **)** | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_passby_press_enabled` **(** **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_pressed` **(** **)** const | ++------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **released** **(** **)** +- **pressed** **(** **)** + +Member Function Description +--------------------------- + +.. _class_TouchScreenButton_set_texture: + +- void **set_texture** **(** :ref:`Object` texture **)** + +.. _class_TouchScreenButton_get_texture: + +- :ref:`Object` **get_texture** **(** **)** const + +.. _class_TouchScreenButton_set_texture_pressed: + +- void **set_texture_pressed** **(** :ref:`Object` texture_pressed **)** + +.. _class_TouchScreenButton_get_texture_pressed: + +- :ref:`Object` **get_texture_pressed** **(** **)** const + +.. _class_TouchScreenButton_set_bitmask: + +- void **set_bitmask** **(** :ref:`Object` bitmask **)** + +.. _class_TouchScreenButton_get_bitmask: + +- :ref:`Object` **get_bitmask** **(** **)** const + +.. _class_TouchScreenButton_set_action: + +- void **set_action** **(** :ref:`String` action **)** + +.. _class_TouchScreenButton_get_action: + +- :ref:`String` **get_action** **(** **)** const + +.. _class_TouchScreenButton_set_visibility_mode: + +- void **set_visibility_mode** **(** :ref:`int` mode **)** + +.. _class_TouchScreenButton_get_visibility_mode: + +- :ref:`int` **get_visibility_mode** **(** **)** const + +.. _class_TouchScreenButton_set_passby_press: + +- void **set_passby_press** **(** :ref:`bool` enabled **)** + +.. _class_TouchScreenButton_is_passby_press_enabled: + +- :ref:`bool` **is_passby_press_enabled** **(** **)** const + +.. _class_TouchScreenButton_is_pressed: + +- :ref:`bool` **is_pressed** **(** **)** const + + diff --git a/classes/class_transform.rst b/classes/class_transform.rst new file mode 100644 index 000000000..c2767da20 --- /dev/null +++ b/classes/class_transform.rst @@ -0,0 +1,123 @@ +.. _class_Transform: + +Transform +========= + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + +3D Transformation. + +Member Functions +---------------- + ++------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`affine_inverse` **(** **)** | ++------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`inverse` **(** **)** | ++------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`looking_at` **(** :ref:`Vector3` target, :ref:`Vector3` up **)** | ++------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`orthonormalized` **(** **)** | ++------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`rotated` **(** :ref:`Vector3` axis, :ref:`float` phi **)** | ++------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`scaled` **(** :ref:`Vector3` scale **)** | ++------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`translated` **(** :ref:`Vector3` ofs **)** | ++------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| var | :ref:`xform` **(** var v **)** | ++------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| var | :ref:`xform_inv` **(** var v **)** | ++------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`Transform` **(** :ref:`Vector3` x_axis, :ref:`Vector3` y_axis, :ref:`Vector3` z_axis, :ref:`Vector3` origin **)** | ++------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`Transform` **(** :ref:`Matrix3` basis, :ref:`Vector3` origin **)** | ++------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`Transform` **(** :ref:`Matrix32` from **)** | ++------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`Transform` **(** :ref:`Quat` from **)** | ++------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`Transform` **(** :ref:`Matrix3` from **)** | ++------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Variables +---------------- + +- :ref:`Matrix3` **basis** +- :ref:`Vector3` **origin** + +Description +----------- + +Transform is used to store transformations, including translations. It consists of a Matrix3 "basis" and Vector3 "origin". Transform is used to represent transformations of any object in space. It is similar to a 4x3 matrix. + +Member Function Description +--------------------------- + +.. _class_Transform_affine_inverse: + +- :ref:`Transform` **affine_inverse** **(** **)** + +.. _class_Transform_inverse: + +- :ref:`Transform` **inverse** **(** **)** + +Returns the inverse of the transform. + +.. _class_Transform_looking_at: + +- :ref:`Transform` **looking_at** **(** :ref:`Vector3` target, :ref:`Vector3` up **)** + +.. _class_Transform_orthonormalized: + +- :ref:`Transform` **orthonormalized** **(** **)** + +.. _class_Transform_rotated: + +- :ref:`Transform` **rotated** **(** :ref:`Vector3` axis, :ref:`float` phi **)** + +.. _class_Transform_scaled: + +- :ref:`Transform` **scaled** **(** :ref:`Vector3` scale **)** + +.. _class_Transform_translated: + +- :ref:`Transform` **translated** **(** :ref:`Vector3` ofs **)** + +.. _class_Transform_xform: + +- var **xform** **(** var v **)** + +Transforms vector "v" by this transform. + +.. _class_Transform_xform_inv: + +- var **xform_inv** **(** var v **)** + +Inverse-transforms vector "v" by this transform. + +.. _class_Transform_Transform: + +- :ref:`Transform` **Transform** **(** :ref:`Vector3` x_axis, :ref:`Vector3` y_axis, :ref:`Vector3` z_axis, :ref:`Vector3` origin **)** + +.. _class_Transform_Transform: + +- :ref:`Transform` **Transform** **(** :ref:`Matrix3` basis, :ref:`Vector3` origin **)** + +.. _class_Transform_Transform: + +- :ref:`Transform` **Transform** **(** :ref:`Matrix32` from **)** + +.. _class_Transform_Transform: + +- :ref:`Transform` **Transform** **(** :ref:`Quat` from **)** + +.. _class_Transform_Transform: + +- :ref:`Transform` **Transform** **(** :ref:`Matrix3` from **)** + + diff --git a/classes/class_translation.rst b/classes/class_translation.rst new file mode 100644 index 000000000..a8581d646 --- /dev/null +++ b/classes/class_translation.rst @@ -0,0 +1,84 @@ +.. _class_Translation: + +Translation +=========== + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Language Translation. + +Member Functions +---------------- + ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_locale` **(** :ref:`String` locale **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_locale` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_message` **(** :ref:`String` src_message, :ref:`String` xlated_message **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_message` **(** :ref:`String` src_message **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`erase_message` **(** :ref:`String` src_message **)** | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringArray` | :ref:`get_message_list` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_message_count` **(** **)** const | ++----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Translations are resources that can be loaded/unloaded on demand. They map a string to another string. + +Member Function Description +--------------------------- + +.. _class_Translation_set_locale: + +- void **set_locale** **(** :ref:`String` locale **)** + +Set the locale of the translation. + +.. _class_Translation_get_locale: + +- :ref:`String` **get_locale** **(** **)** const + +Return the locale of the translation. + +.. _class_Translation_add_message: + +- void **add_message** **(** :ref:`String` src_message, :ref:`String` xlated_message **)** + +Add a message for translation. + +.. _class_Translation_get_message: + +- :ref:`String` **get_message** **(** :ref:`String` src_message **)** const + +Return a message for translation. + +.. _class_Translation_erase_message: + +- void **erase_message** **(** :ref:`String` src_message **)** + +Erase a message. + +.. _class_Translation_get_message_list: + +- :ref:`StringArray` **get_message_list** **(** **)** const + +Return all the messages (keys). + +.. _class_Translation_get_message_count: + +- :ref:`int` **get_message_count** **(** **)** const + + diff --git a/classes/class_translationserver.rst b/classes/class_translationserver.rst new file mode 100644 index 000000000..ead98f90c --- /dev/null +++ b/classes/class_translationserver.rst @@ -0,0 +1,61 @@ +.. _class_TranslationServer: + +TranslationServer +================= + +Inherits: :ref:`Object` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Server that manages all translations. Translations can be set to it and removed from it. + +Member Functions +---------------- + ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_locale` **(** :ref:`String` locale **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_locale` **(** **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`translate` **(** :ref:`String` message **)** const | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_translation` **(** :ref:`Translation` translation **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_translation` **(** :ref:`Translation` translation **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_TranslationServer_set_locale: + +- void **set_locale** **(** :ref:`String` locale **)** + +.. _class_TranslationServer_get_locale: + +- :ref:`String` **get_locale** **(** **)** const + +.. _class_TranslationServer_translate: + +- :ref:`String` **translate** **(** :ref:`String` message **)** const + +.. _class_TranslationServer_add_translation: + +- void **add_translation** **(** :ref:`Translation` translation **)** + +.. _class_TranslationServer_remove_translation: + +- void **remove_translation** **(** :ref:`Translation` translation **)** + +.. _class_TranslationServer_clear: + +- void **clear** **(** **)** + + diff --git a/classes/class_tree.rst b/classes/class_tree.rst new file mode 100644 index 000000000..7e0df2ae9 --- /dev/null +++ b/classes/class_tree.rst @@ -0,0 +1,200 @@ +.. _class_Tree: + +Tree +==== + +Inherits: :ref:`Control` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TreeItem` | :ref:`create_item` **(** :ref:`TreeItem` parent=Object() **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TreeItem` | :ref:`get_root` **(** **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_column_min_width` **(** :ref:`int` column, :ref:`int` min_width **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_column_expand` **(** :ref:`int` column, :ref:`bool` expand **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_column_width` **(** :ref:`int` column **)** const | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_hide_root` **(** :ref:`bool` enable **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TreeItem` | :ref:`get_next_selected` **(** :ref:`TreeItem` from **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TreeItem` | :ref:`get_selected` **(** **)** const | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_selected_column` **(** **)** const | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_pressed_button` **(** **)** const | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_select_mode` **(** :ref:`int` mode **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_columns` **(** :ref:`int` amount **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_columns` **(** **)** const | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TreeItem` | :ref:`get_edited` **(** **)** const | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_edited_column` **(** **)** const | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`get_custom_popup_rect` **(** **)** const | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`get_item_area_rect` **(** :ref:`TreeItem` item, :ref:`int` column=-1 **)** const | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`ensure_cursor_is_visible` **(** **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_column_titles_visible` **(** :ref:`bool` visible **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`are_column_titles_visible` **(** **)** const | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_column_title` **(** :ref:`int` column, :ref:`String` title **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_column_title` **(** :ref:`int` column **)** const | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_scroll` **(** **)** const | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_hide_folding` **(** :ref:`bool` hide **)** | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_folding_hidden` **(** **)** const | ++----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **item_activated** **(** **)** +- **multi_selected** **(** :ref:`Object` item, :ref:`int` column, :ref:`bool` selected **)** +- **custom_popup_edited** **(** :ref:`bool` arrow_clicked **)** +- **item_collapsed** **(** :ref:`Object` item **)** +- **item_edited** **(** **)** +- **item_selected** **(** **)** +- **cell_selected** **(** **)** +- **button_pressed** **(** :ref:`Object` item, :ref:`int` column, :ref:`int` id **)** + +Numeric Constants +----------------- + +- **SELECT_SINGLE** = **0** +- **SELECT_ROW** = **1** +- **SELECT_MULTI** = **2** + +Member Function Description +--------------------------- + +.. _class_Tree_clear: + +- void **clear** **(** **)** + +.. _class_Tree_create_item: + +- :ref:`TreeItem` **create_item** **(** :ref:`TreeItem` parent=Object() **)** + +.. _class_Tree_get_root: + +- :ref:`TreeItem` **get_root** **(** **)** + +.. _class_Tree_set_column_min_width: + +- void **set_column_min_width** **(** :ref:`int` column, :ref:`int` min_width **)** + +.. _class_Tree_set_column_expand: + +- void **set_column_expand** **(** :ref:`int` column, :ref:`bool` expand **)** + +.. _class_Tree_get_column_width: + +- :ref:`int` **get_column_width** **(** :ref:`int` column **)** const + +.. _class_Tree_set_hide_root: + +- void **set_hide_root** **(** :ref:`bool` enable **)** + +.. _class_Tree_get_next_selected: + +- :ref:`TreeItem` **get_next_selected** **(** :ref:`TreeItem` from **)** + +.. _class_Tree_get_selected: + +- :ref:`TreeItem` **get_selected** **(** **)** const + +.. _class_Tree_get_selected_column: + +- :ref:`int` **get_selected_column** **(** **)** const + +.. _class_Tree_get_pressed_button: + +- :ref:`int` **get_pressed_button** **(** **)** const + +.. _class_Tree_set_select_mode: + +- void **set_select_mode** **(** :ref:`int` mode **)** + +.. _class_Tree_set_columns: + +- void **set_columns** **(** :ref:`int` amount **)** + +.. _class_Tree_get_columns: + +- :ref:`int` **get_columns** **(** **)** const + +.. _class_Tree_get_edited: + +- :ref:`TreeItem` **get_edited** **(** **)** const + +.. _class_Tree_get_edited_column: + +- :ref:`int` **get_edited_column** **(** **)** const + +.. _class_Tree_get_custom_popup_rect: + +- :ref:`Rect2` **get_custom_popup_rect** **(** **)** const + +.. _class_Tree_get_item_area_rect: + +- :ref:`Rect2` **get_item_area_rect** **(** :ref:`TreeItem` item, :ref:`int` column=-1 **)** const + +.. _class_Tree_ensure_cursor_is_visible: + +- void **ensure_cursor_is_visible** **(** **)** + +.. _class_Tree_set_column_titles_visible: + +- void **set_column_titles_visible** **(** :ref:`bool` visible **)** + +.. _class_Tree_are_column_titles_visible: + +- :ref:`bool` **are_column_titles_visible** **(** **)** const + +.. _class_Tree_set_column_title: + +- void **set_column_title** **(** :ref:`int` column, :ref:`String` title **)** + +.. _class_Tree_get_column_title: + +- :ref:`String` **get_column_title** **(** :ref:`int` column **)** const + +.. _class_Tree_get_scroll: + +- :ref:`Vector2` **get_scroll** **(** **)** const + +.. _class_Tree_set_hide_folding: + +- void **set_hide_folding** **(** :ref:`bool` hide **)** + +.. _class_Tree_is_folding_hidden: + +- :ref:`bool` **is_folding_hidden** **(** **)** const + + diff --git a/classes/class_treeitem.rst b/classes/class_treeitem.rst new file mode 100644 index 000000000..88c590275 --- /dev/null +++ b/classes/class_treeitem.rst @@ -0,0 +1,328 @@ +.. _class_TreeItem: + +TreeItem +======== + +Inherits: :ref:`Object` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_cell_mode` **(** :ref:`int` column, :ref:`int` mode **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_cell_mode` **(** :ref:`int` column **)** const | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_checked` **(** :ref:`int` column, :ref:`bool` checked **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_checked` **(** :ref:`int` column **)** const | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_text` **(** :ref:`int` column, :ref:`String` text **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_text` **(** :ref:`int` column **)** const | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_icon` **(** :ref:`int` column, :ref:`Texture` texture **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_icon` **(** :ref:`int` column **)** const | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_icon_region` **(** :ref:`int` column, :ref:`Rect2` region **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`get_icon_region` **(** :ref:`int` column **)** const | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_icon_max_width` **(** :ref:`int` column, :ref:`int` width **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_icon_max_width` **(** :ref:`int` column **)** const | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_range` **(** :ref:`int` column, :ref:`float` value **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_range` **(** :ref:`int` column **)** const | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_range_config` **(** :ref:`int` column, :ref:`float` min, :ref:`float` max, :ref:`float` step, :ref:`bool` expr=false **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`get_range_config` **(** :ref:`int` column **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_metadata` **(** :ref:`int` column, var meta **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`get_metadata` **(** :ref:`int` column **)** const | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_custom_draw` **(** :ref:`int` column, :ref:`Object` object, :ref:`String` callback **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_collapsed` **(** :ref:`bool` enable **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_collapsed` **(** **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TreeItem` | :ref:`get_next` **(** **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TreeItem` | :ref:`get_prev` **(** **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TreeItem` | :ref:`get_parent` **(** **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TreeItem` | :ref:`get_children` **(** **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TreeItem` | :ref:`get_next_visible` **(** **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TreeItem` | :ref:`get_prev_visible` **(** **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TreeItem` | :ref:`remove_child` **(** :ref:`Object` child **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_selectable` **(** :ref:`int` column, :ref:`bool` selectable **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_selectable` **(** :ref:`int` column **)** const | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_selected` **(** :ref:`int` column **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`select` **(** :ref:`int` column **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`deselect` **(** :ref:`int` column **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_editable` **(** :ref:`int` column, :ref:`bool` enabled **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_editable` **(** :ref:`int` column **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_custom_color` **(** :ref:`int` column, :ref:`Color` color **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_custom_color` **(** :ref:`int` column **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_custom_bg_color` **(** :ref:`int` column, :ref:`Color` color **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_custom_bg_color` **(** :ref:`int` column **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_custom_bg_color` **(** :ref:`int` column **)** const | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_button` **(** :ref:`int` column, :ref:`Texture` button, :ref:`int` button_idx=-1, :ref:`bool` disabled=false **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_button_count` **(** :ref:`int` column **)** const | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_button` **(** :ref:`int` column, :ref:`int` button_idx **)** const | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`erase_button` **(** :ref:`int` column, :ref:`int` button_idx **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_button_disabled` **(** :ref:`int` column, :ref:`int` button_idx **)** const | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_tooltip` **(** :ref:`int` column, :ref:`String` tooltip **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_tooltip` **(** :ref:`int` column **)** const | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`move_to_top` **(** **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`move_to_bottom` **(** **)** | ++--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **CELL_MODE_STRING** = **0** +- **CELL_MODE_CHECK** = **1** +- **CELL_MODE_RANGE** = **2** +- **CELL_MODE_ICON** = **3** +- **CELL_MODE_CUSTOM** = **4** + +Member Function Description +--------------------------- + +.. _class_TreeItem_set_cell_mode: + +- void **set_cell_mode** **(** :ref:`int` column, :ref:`int` mode **)** + +.. _class_TreeItem_get_cell_mode: + +- :ref:`int` **get_cell_mode** **(** :ref:`int` column **)** const + +.. _class_TreeItem_set_checked: + +- void **set_checked** **(** :ref:`int` column, :ref:`bool` checked **)** + +.. _class_TreeItem_is_checked: + +- :ref:`bool` **is_checked** **(** :ref:`int` column **)** const + +.. _class_TreeItem_set_text: + +- void **set_text** **(** :ref:`int` column, :ref:`String` text **)** + +.. _class_TreeItem_get_text: + +- :ref:`String` **get_text** **(** :ref:`int` column **)** const + +.. _class_TreeItem_set_icon: + +- void **set_icon** **(** :ref:`int` column, :ref:`Texture` texture **)** + +.. _class_TreeItem_get_icon: + +- :ref:`Texture` **get_icon** **(** :ref:`int` column **)** const + +.. _class_TreeItem_set_icon_region: + +- void **set_icon_region** **(** :ref:`int` column, :ref:`Rect2` region **)** + +.. _class_TreeItem_get_icon_region: + +- :ref:`Rect2` **get_icon_region** **(** :ref:`int` column **)** const + +.. _class_TreeItem_set_icon_max_width: + +- void **set_icon_max_width** **(** :ref:`int` column, :ref:`int` width **)** + +.. _class_TreeItem_get_icon_max_width: + +- :ref:`int` **get_icon_max_width** **(** :ref:`int` column **)** const + +.. _class_TreeItem_set_range: + +- void **set_range** **(** :ref:`int` column, :ref:`float` value **)** + +.. _class_TreeItem_get_range: + +- :ref:`float` **get_range** **(** :ref:`int` column **)** const + +.. _class_TreeItem_set_range_config: + +- void **set_range_config** **(** :ref:`int` column, :ref:`float` min, :ref:`float` max, :ref:`float` step, :ref:`bool` expr=false **)** + +.. _class_TreeItem_get_range_config: + +- :ref:`Dictionary` **get_range_config** **(** :ref:`int` column **)** + +.. _class_TreeItem_set_metadata: + +- void **set_metadata** **(** :ref:`int` column, var meta **)** + +.. _class_TreeItem_get_metadata: + +- void **get_metadata** **(** :ref:`int` column **)** const + +.. _class_TreeItem_set_custom_draw: + +- void **set_custom_draw** **(** :ref:`int` column, :ref:`Object` object, :ref:`String` callback **)** + +.. _class_TreeItem_set_collapsed: + +- void **set_collapsed** **(** :ref:`bool` enable **)** + +.. _class_TreeItem_is_collapsed: + +- :ref:`bool` **is_collapsed** **(** **)** + +.. _class_TreeItem_get_next: + +- :ref:`TreeItem` **get_next** **(** **)** + +.. _class_TreeItem_get_prev: + +- :ref:`TreeItem` **get_prev** **(** **)** + +.. _class_TreeItem_get_parent: + +- :ref:`TreeItem` **get_parent** **(** **)** + +.. _class_TreeItem_get_children: + +- :ref:`TreeItem` **get_children** **(** **)** + +.. _class_TreeItem_get_next_visible: + +- :ref:`TreeItem` **get_next_visible** **(** **)** + +.. _class_TreeItem_get_prev_visible: + +- :ref:`TreeItem` **get_prev_visible** **(** **)** + +.. _class_TreeItem_remove_child: + +- :ref:`TreeItem` **remove_child** **(** :ref:`Object` child **)** + +.. _class_TreeItem_set_selectable: + +- void **set_selectable** **(** :ref:`int` column, :ref:`bool` selectable **)** + +.. _class_TreeItem_is_selectable: + +- :ref:`bool` **is_selectable** **(** :ref:`int` column **)** const + +.. _class_TreeItem_is_selected: + +- :ref:`bool` **is_selected** **(** :ref:`int` column **)** + +.. _class_TreeItem_select: + +- void **select** **(** :ref:`int` column **)** + +.. _class_TreeItem_deselect: + +- void **deselect** **(** :ref:`int` column **)** + +.. _class_TreeItem_set_editable: + +- void **set_editable** **(** :ref:`int` column, :ref:`bool` enabled **)** + +.. _class_TreeItem_is_editable: + +- :ref:`bool` **is_editable** **(** :ref:`int` column **)** + +.. _class_TreeItem_set_custom_color: + +- void **set_custom_color** **(** :ref:`int` column, :ref:`Color` color **)** + +.. _class_TreeItem_clear_custom_color: + +- void **clear_custom_color** **(** :ref:`int` column **)** + +.. _class_TreeItem_set_custom_bg_color: + +- void **set_custom_bg_color** **(** :ref:`int` column, :ref:`Color` color **)** + +.. _class_TreeItem_clear_custom_bg_color: + +- void **clear_custom_bg_color** **(** :ref:`int` column **)** + +.. _class_TreeItem_get_custom_bg_color: + +- :ref:`Color` **get_custom_bg_color** **(** :ref:`int` column **)** const + +.. _class_TreeItem_add_button: + +- void **add_button** **(** :ref:`int` column, :ref:`Texture` button, :ref:`int` button_idx=-1, :ref:`bool` disabled=false **)** + +.. _class_TreeItem_get_button_count: + +- :ref:`int` **get_button_count** **(** :ref:`int` column **)** const + +.. _class_TreeItem_get_button: + +- :ref:`Texture` **get_button** **(** :ref:`int` column, :ref:`int` button_idx **)** const + +.. _class_TreeItem_erase_button: + +- void **erase_button** **(** :ref:`int` column, :ref:`int` button_idx **)** + +.. _class_TreeItem_is_button_disabled: + +- :ref:`bool` **is_button_disabled** **(** :ref:`int` column, :ref:`int` button_idx **)** const + +.. _class_TreeItem_set_tooltip: + +- void **set_tooltip** **(** :ref:`int` column, :ref:`String` tooltip **)** + +.. _class_TreeItem_get_tooltip: + +- :ref:`String` **get_tooltip** **(** :ref:`int` column **)** const + +.. _class_TreeItem_move_to_top: + +- void **move_to_top** **(** **)** + +.. _class_TreeItem_move_to_bottom: + +- void **move_to_bottom** **(** **)** + + diff --git a/classes/class_tween.rst b/classes/class_tween.rst new file mode 100644 index 000000000..d563f74c5 --- /dev/null +++ b/classes/class_tween.rst @@ -0,0 +1,221 @@ +.. _class_Tween: + +Tween +===== + +Inherits: :ref:`Node` +--------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_active` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_active` **(** :ref:`bool` active **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_repeat` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_repeat` **(** :ref:`bool` repeat **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_speed` **(** :ref:`float` speed **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_speed` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_tween_process_mode` **(** :ref:`int` mode **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_tween_process_mode` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`start` **(** **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`reset` **(** :ref:`Object` object, :ref:`String` key **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`reset_all` **(** **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`stop` **(** :ref:`Object` object, :ref:`String` key **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`stop_all` **(** **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`resume` **(** :ref:`Object` object, :ref:`String` key **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`resume_all` **(** **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`remove` **(** :ref:`Object` object, :ref:`String` key **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`remove_all` **(** **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`seek` **(** :ref:`float` time **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`tell` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_runtime` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`interpolate_property` **(** :ref:`Object` object, :ref:`String` property, var initial_val, var final_val, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`interpolate_method` **(** :ref:`Object` object, :ref:`String` method, var initial_val, var final_val, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`interpolate_callback` **(** :ref:`Object` object, :ref:`float` times_in_sec, :ref:`String` callback, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL, var arg5=NULL **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`interpolate_deferred_callback` **(** :ref:`Object` object, :ref:`float` times_in_sec, :ref:`String` callback, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL, var arg5=NULL **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`follow_property` **(** :ref:`Object` object, :ref:`String` property, var initial_val, :ref:`Object` target, :ref:`String` target_property, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`follow_method` **(** :ref:`Object` object, :ref:`String` method, var initial_val, :ref:`Object` target, :ref:`String` target_method, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`targeting_property` **(** :ref:`Object` object, :ref:`String` property, :ref:`Object` initial, :ref:`String` initial_val, var final_val, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`targeting_method` **(** :ref:`Object` object, :ref:`String` method, :ref:`Object` initial, :ref:`String` initial_method, var final_val, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **tween_complete** **(** :ref:`Object` object, :ref:`String` key **)** +- **tween_step** **(** :ref:`Object` object, :ref:`String` key, :ref:`float` elapsed, :ref:`Object` value **)** +- **tween_start** **(** :ref:`Object` object, :ref:`String` key **)** + +Numeric Constants +----------------- + +- **TWEEN_PROCESS_FIXED** = **0** +- **TWEEN_PROCESS_IDLE** = **1** +- **TRANS_LINEAR** = **0** +- **TRANS_SINE** = **1** +- **TRANS_QUINT** = **2** +- **TRANS_QUART** = **3** +- **TRANS_QUAD** = **4** +- **TRANS_EXPO** = **5** +- **TRANS_ELASTIC** = **6** +- **TRANS_CUBIC** = **7** +- **TRANS_CIRC** = **8** +- **TRANS_BOUNCE** = **9** +- **TRANS_BACK** = **10** +- **EASE_IN** = **0** +- **EASE_OUT** = **1** +- **EASE_IN_OUT** = **2** +- **EASE_OUT_IN** = **3** + +Member Function Description +--------------------------- + +.. _class_Tween_is_active: + +- :ref:`bool` **is_active** **(** **)** const + +.. _class_Tween_set_active: + +- void **set_active** **(** :ref:`bool` active **)** + +.. _class_Tween_is_repeat: + +- :ref:`bool` **is_repeat** **(** **)** const + +.. _class_Tween_set_repeat: + +- void **set_repeat** **(** :ref:`bool` repeat **)** + +.. _class_Tween_set_speed: + +- void **set_speed** **(** :ref:`float` speed **)** + +.. _class_Tween_get_speed: + +- :ref:`float` **get_speed** **(** **)** const + +.. _class_Tween_set_tween_process_mode: + +- void **set_tween_process_mode** **(** :ref:`int` mode **)** + +.. _class_Tween_get_tween_process_mode: + +- :ref:`int` **get_tween_process_mode** **(** **)** const + +.. _class_Tween_start: + +- :ref:`bool` **start** **(** **)** + +.. _class_Tween_reset: + +- :ref:`bool` **reset** **(** :ref:`Object` object, :ref:`String` key **)** + +.. _class_Tween_reset_all: + +- :ref:`bool` **reset_all** **(** **)** + +.. _class_Tween_stop: + +- :ref:`bool` **stop** **(** :ref:`Object` object, :ref:`String` key **)** + +.. _class_Tween_stop_all: + +- :ref:`bool` **stop_all** **(** **)** + +.. _class_Tween_resume: + +- :ref:`bool` **resume** **(** :ref:`Object` object, :ref:`String` key **)** + +.. _class_Tween_resume_all: + +- :ref:`bool` **resume_all** **(** **)** + +.. _class_Tween_remove: + +- :ref:`bool` **remove** **(** :ref:`Object` object, :ref:`String` key **)** + +.. _class_Tween_remove_all: + +- :ref:`bool` **remove_all** **(** **)** + +.. _class_Tween_seek: + +- :ref:`bool` **seek** **(** :ref:`float` time **)** + +.. _class_Tween_tell: + +- :ref:`float` **tell** **(** **)** const + +.. _class_Tween_get_runtime: + +- :ref:`float` **get_runtime** **(** **)** const + +.. _class_Tween_interpolate_property: + +- :ref:`bool` **interpolate_property** **(** :ref:`Object` object, :ref:`String` property, var initial_val, var final_val, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** + +.. _class_Tween_interpolate_method: + +- :ref:`bool` **interpolate_method** **(** :ref:`Object` object, :ref:`String` method, var initial_val, var final_val, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** + +.. _class_Tween_interpolate_callback: + +- :ref:`bool` **interpolate_callback** **(** :ref:`Object` object, :ref:`float` times_in_sec, :ref:`String` callback, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL, var arg5=NULL **)** + +.. _class_Tween_interpolate_deferred_callback: + +- :ref:`bool` **interpolate_deferred_callback** **(** :ref:`Object` object, :ref:`float` times_in_sec, :ref:`String` callback, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL, var arg5=NULL **)** + +.. _class_Tween_follow_property: + +- :ref:`bool` **follow_property** **(** :ref:`Object` object, :ref:`String` property, var initial_val, :ref:`Object` target, :ref:`String` target_property, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** + +.. _class_Tween_follow_method: + +- :ref:`bool` **follow_method** **(** :ref:`Object` object, :ref:`String` method, var initial_val, :ref:`Object` target, :ref:`String` target_method, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** + +.. _class_Tween_targeting_property: + +- :ref:`bool` **targeting_property** **(** :ref:`Object` object, :ref:`String` property, :ref:`Object` initial, :ref:`String` initial_val, var final_val, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** + +.. _class_Tween_targeting_method: + +- :ref:`bool` **targeting_method** **(** :ref:`Object` object, :ref:`String` method, :ref:`Object` initial, :ref:`String` initial_method, var final_val, :ref:`float` times_in_sec, :ref:`int` trans_type, :ref:`int` ease_type, :ref:`float` delay=0 **)** + + diff --git a/classes/class_undoredo.rst b/classes/class_undoredo.rst new file mode 100644 index 000000000..a62bd9839 --- /dev/null +++ b/classes/class_undoredo.rst @@ -0,0 +1,91 @@ +.. _class_UndoRedo: + +UndoRedo +======== + +Inherits: :ref:`Object` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`create_action` **(** :ref:`String` name, :ref:`bool` mergeable=false **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`commit_action` **(** **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_do_method` **(** :ref:`Object` object, :ref:`String` method, var arg0=NULL, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_undo_method` **(** :ref:`Object` object, :ref:`String` method, var arg0=NULL, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_do_property` **(** :ref:`Object` object, :ref:`String` property, Variant value **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_undo_property` **(** :ref:`Object` object, :ref:`String` property, Variant value **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_do_reference` **(** :ref:`Object` object **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_undo_reference` **(** :ref:`Object` object **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_history` **(** **)** | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_current_action_name` **(** **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_version` **(** **)** const | ++------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_UndoRedo_create_action: + +- void **create_action** **(** :ref:`String` name, :ref:`bool` mergeable=false **)** + +.. _class_UndoRedo_commit_action: + +- void **commit_action** **(** **)** + +.. _class_UndoRedo_add_do_method: + +- void **add_do_method** **(** :ref:`Object` object, :ref:`String` method, var arg0=NULL, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL **)** + +.. _class_UndoRedo_add_undo_method: + +- void **add_undo_method** **(** :ref:`Object` object, :ref:`String` method, var arg0=NULL, var arg1=NULL, var arg2=NULL, var arg3=NULL, var arg4=NULL **)** + +.. _class_UndoRedo_add_do_property: + +- void **add_do_property** **(** :ref:`Object` object, :ref:`String` property, Variant value **)** + +.. _class_UndoRedo_add_undo_property: + +- void **add_undo_property** **(** :ref:`Object` object, :ref:`String` property, Variant value **)** + +.. _class_UndoRedo_add_do_reference: + +- void **add_do_reference** **(** :ref:`Object` object **)** + +.. _class_UndoRedo_add_undo_reference: + +- void **add_undo_reference** **(** :ref:`Object` object **)** + +.. _class_UndoRedo_clear_history: + +- void **clear_history** **(** **)** + +.. _class_UndoRedo_get_current_action_name: + +- :ref:`String` **get_current_action_name** **(** **)** const + +.. _class_UndoRedo_get_version: + +- :ref:`int` **get_version** **(** **)** const + + diff --git a/classes/class_vboxcontainer.rst b/classes/class_vboxcontainer.rst new file mode 100644 index 000000000..e13f66b8b --- /dev/null +++ b/classes/class_vboxcontainer.rst @@ -0,0 +1,21 @@ +.. _class_VBoxContainer: + +VBoxContainer +============= + +Inherits: :ref:`BoxContainer` +------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Vertical box container. + +Description +----------- + +Vertical box container. See :ref:`BoxContainer`. + diff --git a/classes/class_vbuttonarray.rst b/classes/class_vbuttonarray.rst new file mode 100644 index 000000000..1a6c35825 --- /dev/null +++ b/classes/class_vbuttonarray.rst @@ -0,0 +1,21 @@ +.. _class_VButtonArray: + +VButtonArray +============ + +Inherits: :ref:`ButtonArray` +----------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Vertical button array. + +Description +----------- + +Vertical button array. See :ref:`ButtonArray`. + diff --git a/classes/class_vector2.rst b/classes/class_vector2.rst new file mode 100644 index 000000000..b66257d85 --- /dev/null +++ b/classes/class_vector2.rst @@ -0,0 +1,190 @@ +.. _class_Vector2: + +Vector2 +======= + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + +Vector used for 2D Math. + +Member Functions +---------------- + ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`angle` **(** **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`angle_to` **(** :ref:`Vector2` to **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`angle_to_point` **(** :ref:`Vector2` to **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`cubic_interpolate` **(** :ref:`Vector2` b, :ref:`Vector2` pre_a, :ref:`Vector2` post_b, :ref:`float` t **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`distance_squared_to` **(** :ref:`Vector2` to **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`distance_to` **(** :ref:`Vector2` to **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`dot` **(** :ref:`Vector2` with **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`floor` **(** **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`floorf` **(** **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_aspect` **(** **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`length` **(** **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`length_squared` **(** **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`linear_interpolate` **(** :ref:`Vector2` b, :ref:`float` t **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`normalized` **(** **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`reflect` **(** :ref:`Vector2` vec **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`rotated` **(** :ref:`float` phi **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`slide` **(** :ref:`Vector2` vec **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`snapped` **(** :ref:`Vector2` by **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`tangent` **(** **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`Vector2` **(** :ref:`float` x, :ref:`float` y **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Variables +---------------- + +- :ref:`float` **x** +- :ref:`float` **y** +- :ref:`float` **width** +- :ref:`float` **height** + +Member Function Description +--------------------------- + +.. _class_Vector2_angle: + +- :ref:`float` **angle** **(** **)** + +Returns the result of atan2 when called with the Vector's x and y as parameters (Math::atan2(x,y)). + +Be aware that it therefore returns an angle oriented clockwise with regard to the (0, 1) unit vector, and not an angle oriented counter-clockwise with regard to the (1, 0) unit vector (which would be the typical trigonometric representation of the angle when calling Math::atan2(y,x)). + +.. _class_Vector2_angle_to: + +- :ref:`float` **angle_to** **(** :ref:`Vector2` to **)** + +Returns the angle in radians between the two vectors. + +.. _class_Vector2_angle_to_point: + +- :ref:`float` **angle_to_point** **(** :ref:`Vector2` to **)** + +Returns the angle in radians between the line connecting the two points and the x coordinate. + +.. _class_Vector2_cubic_interpolate: + +- :ref:`Vector2` **cubic_interpolate** **(** :ref:`Vector2` b, :ref:`Vector2` pre_a, :ref:`Vector2` post_b, :ref:`float` t **)** + +Cubicly interpolates between this Vector and "b", using "pre_a" and "post_b" as handles, and returning the result at position "t". + +.. _class_Vector2_distance_squared_to: + +- :ref:`float` **distance_squared_to** **(** :ref:`Vector2` to **)** + +Returns the squared distance to vector "b". Prefer this function over "distance_to" if you need to sort vectors or need the squared distance for some formula. + +.. _class_Vector2_distance_to: + +- :ref:`float` **distance_to** **(** :ref:`Vector2` to **)** + +Returns the distance to vector "b". + +.. _class_Vector2_dot: + +- :ref:`float` **dot** **(** :ref:`Vector2` with **)** + +Returns the dot product with vector "b". + +.. _class_Vector2_floor: + +- :ref:`Vector2` **floor** **(** **)** + +Remove the fractional part of x and y. + +.. _class_Vector2_floorf: + +- :ref:`Vector2` **floorf** **(** **)** + +.. _class_Vector2_get_aspect: + +- :ref:`float` **get_aspect** **(** **)** + +Returns the ratio of X to Y. + +.. _class_Vector2_length: + +- :ref:`float` **length** **(** **)** + +Returns the length of the vector. + +.. _class_Vector2_length_squared: + +- :ref:`float` **length_squared** **(** **)** + +Returns the squared length of the vector. Prefer this function over "length" if you need to sort vectors or need the squared length for some formula. + +.. _class_Vector2_linear_interpolate: + +- :ref:`Vector2` **linear_interpolate** **(** :ref:`Vector2` b, :ref:`float` t **)** + +Returns the result of the linear interpolation between this vector and "b", by amount "t". + +.. _class_Vector2_normalized: + +- :ref:`Vector2` **normalized** **(** **)** + +Returns a normalized vector to unit length. + +.. _class_Vector2_reflect: + +- :ref:`Vector2` **reflect** **(** :ref:`Vector2` vec **)** + +Like "slide", but reflects the Vector instead of continuing along the wall. + +.. _class_Vector2_rotated: + +- :ref:`Vector2` **rotated** **(** :ref:`float` phi **)** + +Rotates the vector by "phi" radians. + +.. _class_Vector2_slide: + +- :ref:`Vector2` **slide** **(** :ref:`Vector2` vec **)** + +Slides the vector by the other vector. + +.. _class_Vector2_snapped: + +- :ref:`Vector2` **snapped** **(** :ref:`Vector2` by **)** + +Snaps the vector to a grid with the given size. + +.. _class_Vector2_tangent: + +- :ref:`Vector2` **tangent** **(** **)** + +Returns a perpendicular vector. + +.. _class_Vector2_Vector2: + +- :ref:`Vector2` **Vector2** **(** :ref:`float` x, :ref:`float` y **)** + +Constructs a new Vector2 from the given x and y. + + diff --git a/classes/class_vector2array.rst b/classes/class_vector2array.rst new file mode 100644 index 000000000..bc83a8075 --- /dev/null +++ b/classes/class_vector2array.rst @@ -0,0 +1,67 @@ +.. _class_Vector2Array: + +Vector2Array +============ + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + +An Array of Vector2. + +Member Functions +---------------- + ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`push_back` **(** :ref:`Vector2` vector2 **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`resize` **(** :ref:`int` idx **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set` **(** :ref:`int` idx, :ref:`Vector2` vector2 **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`size` **(** **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2Array` | :ref:`Vector2Array` **(** :ref:`Array` from **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +An Array specifically designed to hold Vector2. + +Member Function Description +--------------------------- + +.. _class_Vector2Array_push_back: + +- void **push_back** **(** :ref:`Vector2` vector2 **)** + +Inserts a Vector2 at the end. + +.. _class_Vector2Array_resize: + +- void **resize** **(** :ref:`int` idx **)** + +Sets the size of the Vector2Array. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array. + +.. _class_Vector2Array_set: + +- void **set** **(** :ref:`int` idx, :ref:`Vector2` vector2 **)** + +Changes the Vector2 at the given index. + +.. _class_Vector2Array_size: + +- :ref:`int` **size** **(** **)** + +Returns the size of the array. + +.. _class_Vector2Array_Vector2Array: + +- :ref:`Vector2Array` **Vector2Array** **(** :ref:`Array` from **)** + +Constructs a new Vector2Array. Optionally, you can pass in an Array that will be converted. + + diff --git a/classes/class_vector3.rst b/classes/class_vector3.rst new file mode 100644 index 000000000..fea298376 --- /dev/null +++ b/classes/class_vector3.rst @@ -0,0 +1,201 @@ +.. _class_Vector3: + +Vector3 +======= + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + +Vector class, which performs basic 3D vector math operations. + +Member Functions +---------------- + ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`abs` **(** **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`ceil` **(** **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`cross` **(** :ref:`Vector3` b **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`cubic_interpolate` **(** :ref:`Vector3` b, :ref:`Vector3` pre_a, :ref:`Vector3` post_b, :ref:`float` t **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`distance_squared_to` **(** :ref:`Vector3` b **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`distance_to` **(** :ref:`Vector3` b **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`dot` **(** :ref:`Vector3` b **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`floor` **(** **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`inverse` **(** **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`length` **(** **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`length_squared` **(** **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`linear_interpolate` **(** :ref:`Vector3` b, :ref:`float` t **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`max_axis` **(** **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`min_axis` **(** **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`normalized` **(** **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`reflect` **(** :ref:`Vector3` by **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`rotated` **(** :ref:`Vector3` axis, :ref:`float` phi **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`slide` **(** :ref:`Vector3` by **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`snapped` **(** :ref:`float` by **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`Vector3` **(** :ref:`float` x, :ref:`float` y, :ref:`float` z **)** | ++--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Member Variables +---------------- + +- :ref:`float` **x** +- :ref:`float` **y** +- :ref:`float` **z** + +Numeric Constants +----------------- + +- **AXIS_X** = **0** --- Enumerated value for the X axis. Returned by functions like max_axis or min_axis. +- **AXIS_Y** = **1** --- Enumerated value for the Y axis. +- **AXIS_Z** = **2** --- Enumerated value for the Z axis. + +Description +----------- + +Vector3 is one of the core classes of the engine, and includes several built-in helper functions to perform basic vector math operations. + +Member Function Description +--------------------------- + +.. _class_Vector3_abs: + +- :ref:`Vector3` **abs** **(** **)** + +Returns a new vector with all components in absolute values (e.g. positive). + +.. _class_Vector3_ceil: + +- :ref:`Vector3` **ceil** **(** **)** + +Returns a new vector with all components rounded up. + +.. _class_Vector3_cross: + +- :ref:`Vector3` **cross** **(** :ref:`Vector3` b **)** + +Return the cross product with b. + +.. _class_Vector3_cubic_interpolate: + +- :ref:`Vector3` **cubic_interpolate** **(** :ref:`Vector3` b, :ref:`Vector3` pre_a, :ref:`Vector3` post_b, :ref:`float` t **)** + +Perform a cubic interpolation between vectors pre_a, a, b, post_b (a is current), by the given amount (t). + +.. _class_Vector3_distance_squared_to: + +- :ref:`float` **distance_squared_to** **(** :ref:`Vector3` b **)** + +Return the squared distance (distance minus the last square root) to b. Prefer this function over distance_to if you need to sort vectors or need the squared distance for some formula. + +.. _class_Vector3_distance_to: + +- :ref:`float` **distance_to** **(** :ref:`Vector3` b **)** + +Return the distance to b. + +.. _class_Vector3_dot: + +- :ref:`float` **dot** **(** :ref:`Vector3` b **)** + +Return the dot product with b. + +.. _class_Vector3_floor: + +- :ref:`Vector3` **floor** **(** **)** + +Returns a new vector with all components rounded down. + +.. _class_Vector3_inverse: + +- :ref:`Vector3` **inverse** **(** **)** + +Returns the inverse of the vector. This is the same as Vector3( 1.0 / v.x, 1.0 / v.y, 1.0 / v.z ) + +.. _class_Vector3_length: + +- :ref:`float` **length** **(** **)** + +Return the length of the vector. + +.. _class_Vector3_length_squared: + +- :ref:`float` **length_squared** **(** **)** + +Return the length of the vector, squared. Prefer this function over "length" if you need to sort vectors or need the squared length for some formula. + +.. _class_Vector3_linear_interpolate: + +- :ref:`Vector3` **linear_interpolate** **(** :ref:`Vector3` b, :ref:`float` t **)** + +Linearly interpolates the vector to a given one (b), by the given amount (t). + +.. _class_Vector3_max_axis: + +- :ref:`int` **max_axis** **(** **)** + +Returns AXIS_X, AXIS_Y or AXIS_Z depending on which axis is the largest. + +.. _class_Vector3_min_axis: + +- :ref:`int` **min_axis** **(** **)** + +Returns AXIS_X, AXIS_Y or AXIS_Z depending on which axis is the smallest. + +.. _class_Vector3_normalized: + +- :ref:`Vector3` **normalized** **(** **)** + +Return a copy of the normalized vector to unit length. This is the same as v / v.length(). + +.. _class_Vector3_reflect: + +- :ref:`Vector3` **reflect** **(** :ref:`Vector3` by **)** + +Like "slide", but reflects the Vector instead of continuing along the wall. + +.. _class_Vector3_rotated: + +- :ref:`Vector3` **rotated** **(** :ref:`Vector3` axis, :ref:`float` phi **)** + +Rotates the vector around some axis by phi radians. + +.. _class_Vector3_slide: + +- :ref:`Vector3` **slide** **(** :ref:`Vector3` by **)** + +Slides the vector along a wall. + +.. _class_Vector3_snapped: + +- :ref:`Vector3` **snapped** **(** :ref:`float` by **)** + +Return a copy of the vector, snapped to the lowest neared multiple. + +.. _class_Vector3_Vector3: + +- :ref:`Vector3` **Vector3** **(** :ref:`float` x, :ref:`float` y, :ref:`float` z **)** + +Returns a Vector3 with the given components. + + diff --git a/classes/class_vector3array.rst b/classes/class_vector3array.rst new file mode 100644 index 000000000..319cbadc9 --- /dev/null +++ b/classes/class_vector3array.rst @@ -0,0 +1,67 @@ +.. _class_Vector3Array: + +Vector3Array +============ + +Category: Built-In Types +------------------------ + +Brief Description +----------------- + +An Array of Vector3. + +Member Functions +---------------- + ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`push_back` **(** :ref:`Vector3` vector3 **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`resize` **(** :ref:`int` idx **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set` **(** :ref:`int` idx, :ref:`Vector3` vector3 **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`size` **(** **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3Array` | :ref:`Vector3Array` **(** :ref:`Array` from **)** | ++------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +An Array specifically designed to hold Vector3. + +Member Function Description +--------------------------- + +.. _class_Vector3Array_push_back: + +- void **push_back** **(** :ref:`Vector3` vector3 **)** + +Inserts a Vector3 at the end. + +.. _class_Vector3Array_resize: + +- void **resize** **(** :ref:`int` idx **)** + +Sets the size of the Vector3Array. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array. + +.. _class_Vector3Array_set: + +- void **set** **(** :ref:`int` idx, :ref:`Vector3` vector3 **)** + +Changes the Vector3 at the given index. + +.. _class_Vector3Array_size: + +- :ref:`int` **size** **(** **)** + +Returns the size of the array. + +.. _class_Vector3Array_Vector3Array: + +- :ref:`Vector3Array` **Vector3Array** **(** :ref:`Array` from **)** + +Constructs a new Vector3Array. Optionally, you can pass in an Array that will be converted. + + diff --git a/classes/class_vehiclebody.rst b/classes/class_vehiclebody.rst new file mode 100644 index 000000000..c3bc8a715 --- /dev/null +++ b/classes/class_vehiclebody.rst @@ -0,0 +1,85 @@ +.. _class_VehicleBody: + +VehicleBody +=========== + +Inherits: :ref:`PhysicsBody` +----------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------+------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_mass` **(** :ref:`float` mass **)** | ++----------------------------+------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_mass` **(** **)** const | ++----------------------------+------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_friction` **(** :ref:`float` friction **)** | ++----------------------------+------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_friction` **(** **)** const | ++----------------------------+------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_engine_force` **(** :ref:`float` engine_force **)** | ++----------------------------+------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_engine_force` **(** **)** const | ++----------------------------+------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_brake` **(** :ref:`float` brake **)** | ++----------------------------+------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_brake` **(** **)** const | ++----------------------------+------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_steering` **(** :ref:`float` steering **)** | ++----------------------------+------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_steering` **(** **)** const | ++----------------------------+------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_VehicleBody_set_mass: + +- void **set_mass** **(** :ref:`float` mass **)** + +.. _class_VehicleBody_get_mass: + +- :ref:`float` **get_mass** **(** **)** const + +.. _class_VehicleBody_set_friction: + +- void **set_friction** **(** :ref:`float` friction **)** + +.. _class_VehicleBody_get_friction: + +- :ref:`float` **get_friction** **(** **)** const + +.. _class_VehicleBody_set_engine_force: + +- void **set_engine_force** **(** :ref:`float` engine_force **)** + +.. _class_VehicleBody_get_engine_force: + +- :ref:`float` **get_engine_force** **(** **)** const + +.. _class_VehicleBody_set_brake: + +- void **set_brake** **(** :ref:`float` brake **)** + +.. _class_VehicleBody_get_brake: + +- :ref:`float` **get_brake** **(** **)** const + +.. _class_VehicleBody_set_steering: + +- void **set_steering** **(** :ref:`float` steering **)** + +.. _class_VehicleBody_get_steering: + +- :ref:`float` **get_steering** **(** **)** const + + diff --git a/classes/class_vehiclewheel.rst b/classes/class_vehiclewheel.rst new file mode 100644 index 000000000..428ef808c --- /dev/null +++ b/classes/class_vehiclewheel.rst @@ -0,0 +1,145 @@ +.. _class_VehicleWheel: + +VehicleWheel +============ + +Inherits: :ref:`Spatial` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_radius` **(** :ref:`float` length **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_radius` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_suspension_rest_length` **(** :ref:`float` length **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_suspension_rest_length` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_suspension_travel` **(** :ref:`float` length **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_suspension_travel` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_suspension_stiffness` **(** :ref:`float` length **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_suspension_stiffness` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_suspension_max_force` **(** :ref:`float` length **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_suspension_max_force` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_damping_compression` **(** :ref:`float` length **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_damping_compression` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_damping_relaxation` **(** :ref:`float` length **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_damping_relaxation` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_use_as_traction` **(** :ref:`bool` enable **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_used_as_traction` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_use_as_steering` **(** :ref:`bool` enable **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_used_as_steering` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_friction_slip` **(** :ref:`float` length **)** | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_friction_slip` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_VehicleWheel_set_radius: + +- void **set_radius** **(** :ref:`float` length **)** + +.. _class_VehicleWheel_get_radius: + +- :ref:`float` **get_radius** **(** **)** const + +.. _class_VehicleWheel_set_suspension_rest_length: + +- void **set_suspension_rest_length** **(** :ref:`float` length **)** + +.. _class_VehicleWheel_get_suspension_rest_length: + +- :ref:`float` **get_suspension_rest_length** **(** **)** const + +.. _class_VehicleWheel_set_suspension_travel: + +- void **set_suspension_travel** **(** :ref:`float` length **)** + +.. _class_VehicleWheel_get_suspension_travel: + +- :ref:`float` **get_suspension_travel** **(** **)** const + +.. _class_VehicleWheel_set_suspension_stiffness: + +- void **set_suspension_stiffness** **(** :ref:`float` length **)** + +.. _class_VehicleWheel_get_suspension_stiffness: + +- :ref:`float` **get_suspension_stiffness** **(** **)** const + +.. _class_VehicleWheel_set_suspension_max_force: + +- void **set_suspension_max_force** **(** :ref:`float` length **)** + +.. _class_VehicleWheel_get_suspension_max_force: + +- :ref:`float` **get_suspension_max_force** **(** **)** const + +.. _class_VehicleWheel_set_damping_compression: + +- void **set_damping_compression** **(** :ref:`float` length **)** + +.. _class_VehicleWheel_get_damping_compression: + +- :ref:`float` **get_damping_compression** **(** **)** const + +.. _class_VehicleWheel_set_damping_relaxation: + +- void **set_damping_relaxation** **(** :ref:`float` length **)** + +.. _class_VehicleWheel_get_damping_relaxation: + +- :ref:`float` **get_damping_relaxation** **(** **)** const + +.. _class_VehicleWheel_set_use_as_traction: + +- void **set_use_as_traction** **(** :ref:`bool` enable **)** + +.. _class_VehicleWheel_is_used_as_traction: + +- :ref:`bool` **is_used_as_traction** **(** **)** const + +.. _class_VehicleWheel_set_use_as_steering: + +- void **set_use_as_steering** **(** :ref:`bool` enable **)** + +.. _class_VehicleWheel_is_used_as_steering: + +- :ref:`bool` **is_used_as_steering** **(** **)** const + +.. _class_VehicleWheel_set_friction_slip: + +- void **set_friction_slip** **(** :ref:`float` length **)** + +.. _class_VehicleWheel_get_friction_slip: + +- :ref:`float` **get_friction_slip** **(** **)** const + + diff --git a/classes/class_videoplayer.rst b/classes/class_videoplayer.rst new file mode 100644 index 000000000..fa14b8052 --- /dev/null +++ b/classes/class_videoplayer.rst @@ -0,0 +1,157 @@ +.. _class_VideoPlayer: + +VideoPlayer +=========== + +Inherits: :ref:`Control` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_stream` **(** Stream stream **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| Stream | :ref:`get_stream` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`play` **(** **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`stop` **(** **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_playing` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_paused` **(** :ref:`bool` paused **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_paused` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_volume` **(** :ref:`float` volume **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_volume` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_volume_db` **(** :ref:`float` db **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_volume_db` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_audio_track` **(** :ref:`int` track **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_audio_track` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_stream_name` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_stream_pos` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_autoplay` **(** :ref:`bool` enabled **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_autoplay` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_expand` **(** :ref:`bool` enable **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_expand` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_buffering_msec` **(** :ref:`int` msec **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_buffering_msec` **(** **)** const | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_video_texutre` **(** **)** | ++--------------------------------+----------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_VideoPlayer_set_stream: + +- void **set_stream** **(** Stream stream **)** + +.. _class_VideoPlayer_get_stream: + +- Stream **get_stream** **(** **)** const + +.. _class_VideoPlayer_play: + +- void **play** **(** **)** + +.. _class_VideoPlayer_stop: + +- void **stop** **(** **)** + +.. _class_VideoPlayer_is_playing: + +- :ref:`bool` **is_playing** **(** **)** const + +.. _class_VideoPlayer_set_paused: + +- void **set_paused** **(** :ref:`bool` paused **)** + +.. _class_VideoPlayer_is_paused: + +- :ref:`bool` **is_paused** **(** **)** const + +.. _class_VideoPlayer_set_volume: + +- void **set_volume** **(** :ref:`float` volume **)** + +.. _class_VideoPlayer_get_volume: + +- :ref:`float` **get_volume** **(** **)** const + +.. _class_VideoPlayer_set_volume_db: + +- void **set_volume_db** **(** :ref:`float` db **)** + +.. _class_VideoPlayer_get_volume_db: + +- :ref:`float` **get_volume_db** **(** **)** const + +.. _class_VideoPlayer_set_audio_track: + +- void **set_audio_track** **(** :ref:`int` track **)** + +.. _class_VideoPlayer_get_audio_track: + +- :ref:`int` **get_audio_track** **(** **)** const + +.. _class_VideoPlayer_get_stream_name: + +- :ref:`String` **get_stream_name** **(** **)** const + +.. _class_VideoPlayer_get_stream_pos: + +- :ref:`float` **get_stream_pos** **(** **)** const + +.. _class_VideoPlayer_set_autoplay: + +- void **set_autoplay** **(** :ref:`bool` enabled **)** + +.. _class_VideoPlayer_has_autoplay: + +- :ref:`bool` **has_autoplay** **(** **)** const + +.. _class_VideoPlayer_set_expand: + +- void **set_expand** **(** :ref:`bool` enable **)** + +.. _class_VideoPlayer_has_expand: + +- :ref:`bool` **has_expand** **(** **)** const + +.. _class_VideoPlayer_set_buffering_msec: + +- void **set_buffering_msec** **(** :ref:`int` msec **)** + +.. _class_VideoPlayer_get_buffering_msec: + +- :ref:`int` **get_buffering_msec** **(** **)** const + +.. _class_VideoPlayer_get_video_texutre: + +- :ref:`Texture` **get_video_texutre** **(** **)** + + diff --git a/classes/class_videostream.rst b/classes/class_videostream.rst new file mode 100644 index 000000000..9bb802c12 --- /dev/null +++ b/classes/class_videostream.rst @@ -0,0 +1,16 @@ +.. _class_VideoStream: + +VideoStream +=========== + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + diff --git a/classes/class_videostreamtheora.rst b/classes/class_videostreamtheora.rst new file mode 100644 index 000000000..f87cd1179 --- /dev/null +++ b/classes/class_videostreamtheora.rst @@ -0,0 +1,16 @@ +.. _class_VideoStreamTheora: + +VideoStreamTheora +================= + +Inherits: :ref:`VideoStream` +----------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + diff --git a/classes/class_viewport.rst b/classes/class_viewport.rst new file mode 100644 index 000000000..96d5f3cc6 --- /dev/null +++ b/classes/class_viewport.rst @@ -0,0 +1,389 @@ +.. _class_Viewport: + +Viewport +======== + +Inherits: :ref:`Node` +--------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Creates a sub-view into the screen. + +Member Functions +---------------- + ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_rect` **(** :ref:`Rect2` rect **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`get_rect` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`World2D` | :ref:`find_world_2d` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_world` **(** :ref:`World` world **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`World` | :ref:`get_world` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`World` | :ref:`find_world` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_canvas_transform` **(** :ref:`Matrix32` xform **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`get_canvas_transform` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_global_canvas_transform` **(** :ref:`Matrix32` xform **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`get_global_canvas_transform` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Matrix32` | :ref:`get_final_transform` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`get_visible_rect` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_transparent_background` **(** :ref:`bool` enable **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_transparent_background` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_size_override` **(** :ref:`bool` enable, :ref:`Vector2` size=Vector2(-1,-1), :ref:`Vector2` margin=Vector2(0,0) **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_size_override` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_size_override_enabled` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_size_override_stretch` **(** :ref:`bool` enabled **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_size_override_stretch_enabled` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`queue_screen_capture` **(** **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Image` | :ref:`get_screen_capture` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_as_render_target` **(** :ref:`bool` enable **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_set_as_render_target` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_render_target_vflip` **(** :ref:`bool` enable **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_render_target_vflip` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_render_target_clear_on_new_frame` **(** :ref:`bool` enable **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_render_target_clear_on_new_frame` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`render_target_clear` **(** **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_render_target_filter` **(** :ref:`bool` enable **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_render_target_filter` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_render_target_gen_mipmaps` **(** :ref:`bool` enable **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_render_target_gen_mipmaps` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_render_target_update_mode` **(** :ref:`int` mode **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_render_target_update_mode` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RenderTargetTexture` | :ref:`get_render_target_texture` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_physics_object_picking` **(** :ref:`bool` enable **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_physics_object_picking` **(** **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_viewport` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`input` **(** :ref:`InputEvent` local_event **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`unhandled_input` **(** :ref:`InputEvent` local_event **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`update_worlds` **(** **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_use_own_world` **(** :ref:`bool` enable **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_using_own_world` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Camera` | :ref:`get_camera` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_as_audio_listener` **(** :ref:`bool` enable **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_audio_listener` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_as_audio_listener_2d` **(** :ref:`bool` enable **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_audio_listener_2d` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_render_target_to_screen_rect` **(** :ref:`Rect2` rect **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_mouse_pos` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`warp_mouse` **(** :ref:`Vector2` to_pos **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`gui_has_modal_stack` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_disable_input` **(** :ref:`bool` disable **)** | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_input_disabled` **(** **)** const | ++--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **size_changed** **(** **)** + +Numeric Constants +----------------- + +- **RENDER_TARGET_UPDATE_DISABLED** = **0** +- **RENDER_TARGET_UPDATE_ONCE** = **1** +- **RENDER_TARGET_UPDATE_WHEN_VISIBLE** = **2** +- **RENDER_TARGET_UPDATE_ALWAYS** = **3** + +Description +----------- + +A Viewport creates a different view into the screen, or a sub-view inside another viewport. Children 2D Nodes will display on it, and children Camera 3D nodes will render on it too. + +Optionally, a viewport can have its own 2D or 3D world, so they don't share what they draw with other viewports. + +If a viewport is a child of a :ref:`Control`, it will automatically take up its same rect and position, otherwise they must be set manually. + +Viewports can also choose to be audio listeners, so they generate positional audio depending on a 2D or 3D camera child of it. + +Also, viewports can be assigned to different screens in case the devices have multiple screens. + +Finally, viewports can also behave as render targets, in which case they will not be visible unless the associated texture is used to draw. + +Member Function Description +--------------------------- + +.. _class_Viewport_set_rect: + +- void **set_rect** **(** :ref:`Rect2` rect **)** + +Set the viewport rect. If the viewport is child of a control, it will use the same rect as the parent. + +.. _class_Viewport_get_rect: + +- :ref:`Rect2` **get_rect** **(** **)** const + +Return the viewport rect. If the viewport is child of a control, it will use the same rect as the parent. Otherwise, if the rect is empty, the viewport will use all the allowed space. + +.. _class_Viewport_find_world_2d: + +- :ref:`World2D` **find_world_2d** **(** **)** const + +.. _class_Viewport_set_world: + +- void **set_world** **(** :ref:`World` world **)** + +.. _class_Viewport_get_world: + +- :ref:`World` **get_world** **(** **)** const + +.. _class_Viewport_find_world: + +- :ref:`World` **find_world** **(** **)** const + +.. _class_Viewport_set_canvas_transform: + +- void **set_canvas_transform** **(** :ref:`Matrix32` xform **)** + +.. _class_Viewport_get_canvas_transform: + +- :ref:`Matrix32` **get_canvas_transform** **(** **)** const + +.. _class_Viewport_set_global_canvas_transform: + +- void **set_global_canvas_transform** **(** :ref:`Matrix32` xform **)** + +.. _class_Viewport_get_global_canvas_transform: + +- :ref:`Matrix32` **get_global_canvas_transform** **(** **)** const + +.. _class_Viewport_get_final_transform: + +- :ref:`Matrix32` **get_final_transform** **(** **)** const + +.. _class_Viewport_get_visible_rect: + +- :ref:`Rect2` **get_visible_rect** **(** **)** const + +Return the final, visuble rect in global screen coordinates. + +.. _class_Viewport_set_transparent_background: + +- void **set_transparent_background** **(** :ref:`bool` enable **)** + +If this viewport is a child of another viewport, keep the previously drawn background visible. + +.. _class_Viewport_has_transparent_background: + +- :ref:`bool` **has_transparent_background** **(** **)** const + +Reurn whether the viewport lets whatever is behind it to show. + +.. _class_Viewport_set_size_override: + +- void **set_size_override** **(** :ref:`bool` enable, :ref:`Vector2` size=Vector2(-1,-1), :ref:`Vector2` margin=Vector2(0,0) **)** + +.. _class_Viewport_get_size_override: + +- :ref:`Vector2` **get_size_override** **(** **)** const + +.. _class_Viewport_is_size_override_enabled: + +- :ref:`bool` **is_size_override_enabled** **(** **)** const + +.. _class_Viewport_set_size_override_stretch: + +- void **set_size_override_stretch** **(** :ref:`bool` enabled **)** + +.. _class_Viewport_is_size_override_stretch_enabled: + +- :ref:`bool` **is_size_override_stretch_enabled** **(** **)** const + +.. _class_Viewport_queue_screen_capture: + +- void **queue_screen_capture** **(** **)** + +.. _class_Viewport_get_screen_capture: + +- :ref:`Image` **get_screen_capture** **(** **)** const + +.. _class_Viewport_set_as_render_target: + +- void **set_as_render_target** **(** :ref:`bool` enable **)** + +.. _class_Viewport_is_set_as_render_target: + +- :ref:`bool` **is_set_as_render_target** **(** **)** const + +.. _class_Viewport_set_render_target_vflip: + +- void **set_render_target_vflip** **(** :ref:`bool` enable **)** + +.. _class_Viewport_get_render_target_vflip: + +- :ref:`bool` **get_render_target_vflip** **(** **)** const + +.. _class_Viewport_set_render_target_clear_on_new_frame: + +- void **set_render_target_clear_on_new_frame** **(** :ref:`bool` enable **)** + +.. _class_Viewport_get_render_target_clear_on_new_frame: + +- :ref:`bool` **get_render_target_clear_on_new_frame** **(** **)** const + +.. _class_Viewport_render_target_clear: + +- void **render_target_clear** **(** **)** + +.. _class_Viewport_set_render_target_filter: + +- void **set_render_target_filter** **(** :ref:`bool` enable **)** + +.. _class_Viewport_get_render_target_filter: + +- :ref:`bool` **get_render_target_filter** **(** **)** const + +.. _class_Viewport_set_render_target_gen_mipmaps: + +- void **set_render_target_gen_mipmaps** **(** :ref:`bool` enable **)** + +.. _class_Viewport_get_render_target_gen_mipmaps: + +- :ref:`bool` **get_render_target_gen_mipmaps** **(** **)** const + +.. _class_Viewport_set_render_target_update_mode: + +- void **set_render_target_update_mode** **(** :ref:`int` mode **)** + +.. _class_Viewport_get_render_target_update_mode: + +- :ref:`int` **get_render_target_update_mode** **(** **)** const + +.. _class_Viewport_get_render_target_texture: + +- :ref:`RenderTargetTexture` **get_render_target_texture** **(** **)** const + +.. _class_Viewport_set_physics_object_picking: + +- void **set_physics_object_picking** **(** :ref:`bool` enable **)** + +.. _class_Viewport_get_physics_object_picking: + +- :ref:`bool` **get_physics_object_picking** **(** **)** + +.. _class_Viewport_get_viewport: + +- :ref:`RID` **get_viewport** **(** **)** const + +Get the viewport RID from the visual server. + +.. _class_Viewport_input: + +- void **input** **(** :ref:`InputEvent` local_event **)** + +.. _class_Viewport_unhandled_input: + +- void **unhandled_input** **(** :ref:`InputEvent` local_event **)** + +.. _class_Viewport_update_worlds: + +- void **update_worlds** **(** **)** + +.. _class_Viewport_set_use_own_world: + +- void **set_use_own_world** **(** :ref:`bool` enable **)** + +.. _class_Viewport_is_using_own_world: + +- :ref:`bool` **is_using_own_world** **(** **)** const + +.. _class_Viewport_get_camera: + +- :ref:`Camera` **get_camera** **(** **)** const + +.. _class_Viewport_set_as_audio_listener: + +- void **set_as_audio_listener** **(** :ref:`bool` enable **)** + +.. _class_Viewport_is_audio_listener: + +- :ref:`bool` **is_audio_listener** **(** **)** const + +.. _class_Viewport_set_as_audio_listener_2d: + +- void **set_as_audio_listener_2d** **(** :ref:`bool` enable **)** + +.. _class_Viewport_is_audio_listener_2d: + +- :ref:`bool` **is_audio_listener_2d** **(** **)** const + +.. _class_Viewport_set_render_target_to_screen_rect: + +- void **set_render_target_to_screen_rect** **(** :ref:`Rect2` rect **)** + +.. _class_Viewport_get_mouse_pos: + +- :ref:`Vector2` **get_mouse_pos** **(** **)** const + +.. _class_Viewport_warp_mouse: + +- void **warp_mouse** **(** :ref:`Vector2` to_pos **)** + +.. _class_Viewport_gui_has_modal_stack: + +- :ref:`bool` **gui_has_modal_stack** **(** **)** const + +.. _class_Viewport_set_disable_input: + +- void **set_disable_input** **(** :ref:`bool` disable **)** + +.. _class_Viewport_is_input_disabled: + +- :ref:`bool` **is_input_disabled** **(** **)** const + + diff --git a/classes/class_viewportsprite.rst b/classes/class_viewportsprite.rst new file mode 100644 index 000000000..c59f14742 --- /dev/null +++ b/classes/class_viewportsprite.rst @@ -0,0 +1,73 @@ +.. _class_ViewportSprite: + +ViewportSprite +============== + +Inherits: :ref:`Node2D` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_viewport_path` **(** :ref:`NodePath` path **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`NodePath` | :ref:`get_viewport_path` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_centered` **(** :ref:`bool` centered **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_centered` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_offset` **(** :ref:`Vector2` offset **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_offset` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_modulate` **(** :ref:`Color` modulate **)** | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_modulate` **(** **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_ViewportSprite_set_viewport_path: + +- void **set_viewport_path** **(** :ref:`NodePath` path **)** + +.. _class_ViewportSprite_get_viewport_path: + +- :ref:`NodePath` **get_viewport_path** **(** **)** const + +.. _class_ViewportSprite_set_centered: + +- void **set_centered** **(** :ref:`bool` centered **)** + +.. _class_ViewportSprite_is_centered: + +- :ref:`bool` **is_centered** **(** **)** const + +.. _class_ViewportSprite_set_offset: + +- void **set_offset** **(** :ref:`Vector2` offset **)** + +.. _class_ViewportSprite_get_offset: + +- :ref:`Vector2` **get_offset** **(** **)** const + +.. _class_ViewportSprite_set_modulate: + +- void **set_modulate** **(** :ref:`Color` modulate **)** + +.. _class_ViewportSprite_get_modulate: + +- :ref:`Color` **get_modulate** **(** **)** const + + diff --git a/classes/class_visibilityenabler.rst b/classes/class_visibilityenabler.rst new file mode 100644 index 000000000..0ec6e5b0d --- /dev/null +++ b/classes/class_visibilityenabler.rst @@ -0,0 +1,44 @@ +.. _class_VisibilityEnabler: + +VisibilityEnabler +================= + +Inherits: :ref:`VisibilityNotifier` +------------------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_enabler` **(** :ref:`int` enabler, :ref:`bool` enabled **)** | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_enabler_enabled` **(** :ref:`int` enabler **)** const | ++--------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **ENABLER_FREEZE_BODIES** = **1** +- **ENABLER_PAUSE_ANIMATIONS** = **0** +- **ENABLER_MAX** = **2** + +Member Function Description +--------------------------- + +.. _class_VisibilityEnabler_set_enabler: + +- void **set_enabler** **(** :ref:`int` enabler, :ref:`bool` enabled **)** + +.. _class_VisibilityEnabler_is_enabler_enabled: + +- :ref:`bool` **is_enabler_enabled** **(** :ref:`int` enabler **)** const + + diff --git a/classes/class_visibilityenabler2d.rst b/classes/class_visibilityenabler2d.rst new file mode 100644 index 000000000..fe55756b7 --- /dev/null +++ b/classes/class_visibilityenabler2d.rst @@ -0,0 +1,47 @@ +.. _class_VisibilityEnabler2D: + +VisibilityEnabler2D +=================== + +Inherits: :ref:`VisibilityNotifier2D` +----------------------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_enabler` **(** :ref:`int` enabler, :ref:`bool` enabled **)** | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_enabler_enabled` **(** :ref:`int` enabler **)** const | ++--------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **ENABLER_FREEZE_BODIES** = **1** +- **ENABLER_PAUSE_ANIMATIONS** = **0** +- **ENABLER_PAUSE_PARTICLES** = **2** +- **ENABLER_PARENT_PROCESS** = **3** +- **ENABLER_PARENT_FIXED_PROCESS** = **4** +- **ENABLER_MAX** = **5** + +Member Function Description +--------------------------- + +.. _class_VisibilityEnabler2D_set_enabler: + +- void **set_enabler** **(** :ref:`int` enabler, :ref:`bool` enabled **)** + +.. _class_VisibilityEnabler2D_is_enabler_enabled: + +- :ref:`bool` **is_enabler_enabled** **(** :ref:`int` enabler **)** const + + diff --git a/classes/class_visibilitynotifier.rst b/classes/class_visibilitynotifier.rst new file mode 100644 index 000000000..75c171823 --- /dev/null +++ b/classes/class_visibilitynotifier.rst @@ -0,0 +1,51 @@ +.. _class_VisibilityNotifier: + +VisibilityNotifier +================== + +Inherits: :ref:`Spatial` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------+-----------------------------------------------------------------------------------------------+ +| void | :ref:`set_aabb` **(** :ref:`AABB` rect **)** | ++--------------------------+-----------------------------------------------------------------------------------------------+ +| :ref:`AABB` | :ref:`get_aabb` **(** **)** const | ++--------------------------+-----------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_on_screen` **(** **)** const | ++--------------------------+-----------------------------------------------------------------------------------------------+ + +Signals +------- + +- **enter_screen** **(** **)** +- **enter_camera** **(** :ref:`Object` camera **)** +- **exit_screen** **(** **)** +- **exit_camera** **(** :ref:`Object` camera **)** + +Member Function Description +--------------------------- + +.. _class_VisibilityNotifier_set_aabb: + +- void **set_aabb** **(** :ref:`AABB` rect **)** + +.. _class_VisibilityNotifier_get_aabb: + +- :ref:`AABB` **get_aabb** **(** **)** const + +.. _class_VisibilityNotifier_is_on_screen: + +- :ref:`bool` **is_on_screen** **(** **)** const + + diff --git a/classes/class_visibilitynotifier2d.rst b/classes/class_visibilitynotifier2d.rst new file mode 100644 index 000000000..0fbc3bd30 --- /dev/null +++ b/classes/class_visibilitynotifier2d.rst @@ -0,0 +1,51 @@ +.. _class_VisibilityNotifier2D: + +VisibilityNotifier2D +==================== + +Inherits: :ref:`Node2D` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------+---------------------------------------------------------------------------------------------------+ +| void | :ref:`set_rect` **(** :ref:`Rect2` rect **)** | ++----------------------------+---------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`get_rect` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_on_screen` **(** **)** const | ++----------------------------+---------------------------------------------------------------------------------------------------+ + +Signals +------- + +- **enter_screen** **(** **)** +- **enter_viewport** **(** :ref:`Object` viewport **)** +- **exit_screen** **(** **)** +- **exit_viewport** **(** :ref:`Object` viewport **)** + +Member Function Description +--------------------------- + +.. _class_VisibilityNotifier2D_set_rect: + +- void **set_rect** **(** :ref:`Rect2` rect **)** + +.. _class_VisibilityNotifier2D_get_rect: + +- :ref:`Rect2` **get_rect** **(** **)** const + +.. _class_VisibilityNotifier2D_is_on_screen: + +- :ref:`bool` **is_on_screen** **(** **)** const + + diff --git a/classes/class_visualinstance.rst b/classes/class_visualinstance.rst new file mode 100644 index 000000000..1deb0a4d5 --- /dev/null +++ b/classes/class_visualinstance.rst @@ -0,0 +1,43 @@ +.. _class_VisualInstance: + +VisualInstance +============== + +Inherits: :ref:`Spatial` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------+-----------------------------------------------------------------------------------------------------+ +| void | :ref:`set_base` **(** :ref:`RID` base **)** | ++------------------------+-----------------------------------------------------------------------------------------------------+ +| void | :ref:`set_layer_mask` **(** :ref:`int` mask **)** | ++------------------------+-----------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_layer_mask` **(** **)** const | ++------------------------+-----------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_VisualInstance_set_base: + +- void **set_base** **(** :ref:`RID` base **)** + +.. _class_VisualInstance_set_layer_mask: + +- void **set_layer_mask** **(** :ref:`int` mask **)** + +.. _class_VisualInstance_get_layer_mask: + +- :ref:`int` **get_layer_mask** **(** **)** const + + diff --git a/classes/class_visualserver.rst b/classes/class_visualserver.rst new file mode 100644 index 000000000..a189cd841 --- /dev/null +++ b/classes/class_visualserver.rst @@ -0,0 +1,1114 @@ +.. _class_VisualServer: + +VisualServer +============ + +Inherits: :ref:`Object` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Server for anything visible. + +Member Functions +---------------- + ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`texture_create` **(** **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`texture_create_from_image` **(** :ref:`Image` arg0, :ref:`int` arg1=7 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`texture_set_flags` **(** :ref:`RID` arg0, :ref:`int` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`texture_get_flags` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`texture_get_width` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`texture_get_height` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`shader_create` **(** :ref:`int` mode=0 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shader_set_mode` **(** :ref:`RID` shader, :ref:`int` mode **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`material_create` **(** **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`material_set_shader` **(** :ref:`RID` shader, :ref:`RID` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`material_get_shader` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`material_set_param` **(** :ref:`RID` arg0, :ref:`String` arg1, var arg2 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`material_get_param` **(** :ref:`RID` arg0, :ref:`String` arg1 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`material_set_flag` **(** :ref:`RID` arg0, :ref:`int` arg1, :ref:`bool` arg2 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`material_get_flag` **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`material_set_blend_mode` **(** :ref:`RID` arg0, :ref:`int` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`material_get_blend_mode` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`material_set_line_width` **(** :ref:`RID` arg0, :ref:`float` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`material_get_line_width` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`mesh_create` **(** **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`mesh_add_surface` **(** :ref:`RID` arg0, :ref:`int` arg1, :ref:`Array` arg2, :ref:`Array` arg3, :ref:`bool` arg4=-1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`mesh_surface_set_material` **(** :ref:`RID` arg0, :ref:`int` arg1, :ref:`RID` arg2, :ref:`bool` arg3=false **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`mesh_surface_get_material` **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`mesh_surface_get_array_len` **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`mesh_surface_get_array_index_len` **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`mesh_surface_get_format` **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`mesh_surface_get_primitive_type` **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`mesh_remove_surface` **(** :ref:`RID` arg0, :ref:`int` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`mesh_get_surface_count` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`multimesh_create` **(** **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`multimesh_set_mesh` **(** :ref:`RID` arg0, :ref:`RID` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`multimesh_set_aabb` **(** :ref:`RID` arg0, :ref:`AABB` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`multimesh_instance_set_transform` **(** :ref:`RID` arg0, :ref:`int` arg1, :ref:`Transform` arg2 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`multimesh_instance_set_color` **(** :ref:`RID` arg0, :ref:`int` arg1, :ref:`Color` arg2 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`multimesh_get_mesh` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`AABB` | :ref:`multimesh_get_aabb` **(** :ref:`RID` arg0, :ref:`AABB` arg1 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`multimesh_instance_get_transform` **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`multimesh_instance_get_color` **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`particles_create` **(** **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_amount` **(** :ref:`RID` arg0, :ref:`int` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`particles_get_amount` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_emitting` **(** :ref:`RID` arg0, :ref:`bool` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`particles_is_emitting` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_visibility_aabb` **(** :ref:`RID` arg0, :ref:`AABB` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`AABB` | :ref:`particles_get_visibility_aabb` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_variable` **(** :ref:`RID` arg0, :ref:`int` arg1, :ref:`float` arg2 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`particles_get_variable` **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_randomness` **(** :ref:`RID` arg0, :ref:`int` arg1, :ref:`float` arg2 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`particles_get_randomness` **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_color_phases` **(** :ref:`RID` arg0, :ref:`int` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`particles_get_color_phases` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_color_phase_pos` **(** :ref:`RID` arg0, :ref:`int` arg1, :ref:`float` arg2 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`particles_get_color_phase_pos` **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_color_phase_color` **(** :ref:`RID` arg0, :ref:`int` arg1, :ref:`Color` arg2 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`particles_get_color_phase_color` **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_attractors` **(** :ref:`RID` arg0, :ref:`int` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`particles_get_attractors` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_attractor_pos` **(** :ref:`RID` arg0, :ref:`int` arg1, :ref:`Vector3` arg2 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`particles_get_attractor_pos` **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_attractor_strength` **(** :ref:`RID` arg0, :ref:`int` arg1, :ref:`float` arg2 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`particles_get_attractor_strength` **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_material` **(** :ref:`RID` arg0, :ref:`RID` arg1, :ref:`bool` arg2=false **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`particles_set_height_from_velocity` **(** :ref:`RID` arg0, :ref:`bool` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`particles_has_height_from_velocity` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`light_create` **(** :ref:`int` arg0 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`light_get_type` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`light_set_color` **(** :ref:`RID` arg0, :ref:`int` arg1, :ref:`Color` arg2 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`light_get_color` **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`light_set_shadow` **(** :ref:`RID` arg0, :ref:`bool` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`light_has_shadow` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`light_set_volumetric` **(** :ref:`RID` arg0, :ref:`bool` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`light_is_volumetric` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`light_set_projector` **(** :ref:`RID` arg0, :ref:`RID` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`light_get_projector` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`light_set_var` **(** :ref:`RID` arg0, :ref:`int` arg1, :ref:`float` arg2 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`light_get_var` **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`skeleton_create` **(** **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`skeleton_resize` **(** :ref:`RID` arg0, :ref:`int` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`skeleton_get_bone_count` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`skeleton_bone_set_transform` **(** :ref:`RID` arg0, :ref:`int` arg1, :ref:`Transform` arg2 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`skeleton_bone_get_transform` **(** :ref:`RID` arg0, :ref:`int` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`room_create` **(** **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`room_set_bounds` **(** :ref:`RID` arg0, :ref:`Dictionary` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`room_get_bounds` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`portal_create` **(** **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`portal_set_shape` **(** :ref:`RID` arg0, :ref:`Vector2Array` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2Array` | :ref:`portal_get_shape` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`portal_set_enabled` **(** :ref:`RID` arg0, :ref:`bool` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`portal_is_enabled` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`portal_set_disable_distance` **(** :ref:`RID` arg0, :ref:`float` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`portal_get_disable_distance` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`portal_set_disabled_color` **(** :ref:`RID` arg0, :ref:`Color` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`portal_get_disabled_color` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`camera_create` **(** **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`camera_set_perspective` **(** :ref:`RID` arg0, :ref:`float` arg1, :ref:`float` arg2, :ref:`float` arg3 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`camera_set_orthogonal` **(** :ref:`RID` arg0, :ref:`float` arg1, :ref:`float` arg2, :ref:`float` arg3 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`camera_set_transform` **(** :ref:`RID` arg0, :ref:`Transform` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`viewport_create` **(** **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_rect` **(** :ref:`RID` arg0, :ref:`Rect2` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`viewport_get_rect` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_attach_camera` **(** :ref:`RID` arg0, :ref:`RID` arg1=RID() **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`viewport_get_attached_camera` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`viewport_get_scenario` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_attach_canvas` **(** :ref:`RID` arg0, :ref:`RID` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_remove_canvas` **(** :ref:`RID` arg0, :ref:`RID` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_global_canvas_transform` **(** :ref:`RID` arg0, :ref:`Matrix32` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`scenario_create` **(** **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`scenario_set_debug` **(** :ref:`RID` arg0, :ref:`int` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`instance_create` **(** **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`instance_get_base` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`instance_get_base_aabb` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`instance_set_transform` **(** :ref:`RID` arg0, :ref:`Transform` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`instance_get_transform` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`instance_attach_object_instance_ID` **(** :ref:`RID` arg0, :ref:`int` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`instance_get_object_instance_ID` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`instance_attach_skeleton` **(** :ref:`RID` arg0, :ref:`RID` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`instance_get_skeleton` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`instance_set_room` **(** :ref:`RID` arg0, :ref:`RID` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`instance_get_room` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`instance_set_exterior` **(** :ref:`RID` arg0, :ref:`bool` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`instance_is_exterior` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`instances_cull_aabb` **(** :ref:`AABB` arg0, :ref:`RID` arg1 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`instances_cull_ray` **(** :ref:`Vector3` arg0, :ref:`Vector3` arg1, :ref:`RID` arg2 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`instances_cull_convex` **(** :ref:`Array` arg0, :ref:`RID` arg1 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`instance_geometry_override_material_param` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`instance_geometry_get_material_param` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_test_cube` **(** **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`canvas_create` **(** **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`canvas_item_create` **(** **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_parent` **(** :ref:`RID` arg0, :ref:`RID` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`canvas_item_get_parent` **(** :ref:`RID` arg0 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_transform` **(** :ref:`RID` arg0, :ref:`Matrix32` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_custom_rect` **(** :ref:`RID` arg0, :ref:`bool` arg1, :ref:`Rect2` arg2 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_clip` **(** :ref:`RID` arg0, :ref:`bool` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_opacity` **(** :ref:`RID` arg0, :ref:`float` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`canvas_item_get_opacity` **(** :ref:`RID` arg0, :ref:`float` arg1 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_self_opacity` **(** :ref:`RID` arg0, :ref:`float` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`canvas_item_get_self_opacity` **(** :ref:`RID` arg0, :ref:`float` arg1 **)** const | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_set_z` **(** :ref:`RID` arg0, :ref:`int` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_line` **(** :ref:`RID` arg0, :ref:`Vector2` arg1, :ref:`Vector2` arg2, :ref:`Color` arg3, :ref:`float` arg4=1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_rect` **(** :ref:`RID` arg0, :ref:`Rect2` arg1, :ref:`Color` arg2 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_texture_rect` **(** :ref:`RID` arg0, :ref:`Rect2` arg1, :ref:`RID` arg2, :ref:`bool` arg3, :ref:`Color` arg4=Color(1,1,1,1), :ref:`bool` arg5=false **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_texture_rect_region` **(** :ref:`RID` arg0, :ref:`Rect2` arg1, :ref:`RID` arg2, :ref:`Rect2` arg3, :ref:`Color` arg4=Color(1,1,1,1), :ref:`bool` arg5=false **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_style_box` **(** :ref:`RID` arg0, :ref:`Rect2` arg1, :ref:`RID` arg2, :ref:`RealArray` arg3, :ref:`Color` arg4=Color(1,1,1,1) **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_circle` **(** :ref:`RID` arg0, :ref:`Vector2` arg1, :ref:`float` arg2, :ref:`Color` arg3 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_canvas_transform` **(** :ref:`RID` arg0, :ref:`RID` arg1, :ref:`Matrix32` arg2 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_clear` **(** :ref:`RID` arg0 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_raise` **(** :ref:`RID` arg0 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`cursor_set_rotation` **(** :ref:`float` arg0, :ref:`int` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`cursor_set_texture` **(** :ref:`RID` arg0, :ref:`Vector2` arg1, :ref:`int` arg2 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`cursor_set_visible` **(** :ref:`bool` arg0, :ref:`int` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`cursor_set_pos` **(** :ref:`Vector2` arg0, :ref:`int` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`black_bars_set_margins` **(** :ref:`int` left, :ref:`int` top, :ref:`int` right, :ref:`int` bottom **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`black_bars_set_images` **(** :ref:`RID` left, :ref:`RID` top, :ref:`RID` right, :ref:`RID` bottom **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`make_sphere_mesh` **(** :ref:`int` arg0, :ref:`int` arg1, :ref:`float` arg2 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`mesh_add_surface_from_planes` **(** :ref:`RID` arg0, :ref:`Array` arg1 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw` **(** **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`sync` **(** **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`free` **(** :ref:`RID` arg0 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_default_clear_color` **(** :ref:`Color` arg0 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_render_info` **(** :ref:`int` arg0 **)** | ++------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **NO_INDEX_ARRAY** = **-1** +- **CUSTOM_ARRAY_SIZE** = **8** +- **ARRAY_WEIGHTS_SIZE** = **4** +- **MAX_PARTICLE_COLOR_PHASES** = **4** +- **MAX_PARTICLE_ATTRACTORS** = **4** +- **MAX_CURSORS** = **8** +- **TEXTURE_FLAG_MIPMAPS** = **1** +- **TEXTURE_FLAG_REPEAT** = **2** +- **TEXTURE_FLAG_FILTER** = **4** +- **TEXTURE_FLAG_CUBEMAP** = **2048** +- **TEXTURE_FLAGS_DEFAULT** = **7** +- **CUBEMAP_LEFT** = **0** +- **CUBEMAP_RIGHT** = **1** +- **CUBEMAP_BOTTOM** = **2** +- **CUBEMAP_TOP** = **3** +- **CUBEMAP_FRONT** = **4** +- **CUBEMAP_BACK** = **5** +- **SHADER_MATERIAL** = **0** +- **SHADER_POST_PROCESS** = **2** +- **MATERIAL_FLAG_VISIBLE** = **0** +- **MATERIAL_FLAG_DOUBLE_SIDED** = **1** +- **MATERIAL_FLAG_INVERT_FACES** = **2** +- **MATERIAL_FLAG_UNSHADED** = **3** +- **MATERIAL_FLAG_ONTOP** = **4** +- **MATERIAL_FLAG_MAX** = **7** +- **MATERIAL_BLEND_MODE_MIX** = **0** +- **MATERIAL_BLEND_MODE_ADD** = **1** +- **MATERIAL_BLEND_MODE_SUB** = **2** +- **MATERIAL_BLEND_MODE_MUL** = **3** +- **FIXED_MATERIAL_PARAM_DIFFUSE** = **0** +- **FIXED_MATERIAL_PARAM_DETAIL** = **1** +- **FIXED_MATERIAL_PARAM_SPECULAR** = **2** +- **FIXED_MATERIAL_PARAM_EMISSION** = **3** +- **FIXED_MATERIAL_PARAM_SPECULAR_EXP** = **4** +- **FIXED_MATERIAL_PARAM_GLOW** = **5** +- **FIXED_MATERIAL_PARAM_NORMAL** = **6** +- **FIXED_MATERIAL_PARAM_SHADE_PARAM** = **7** +- **FIXED_MATERIAL_PARAM_MAX** = **8** +- **FIXED_MATERIAL_TEXCOORD_SPHERE** = **3** +- **FIXED_MATERIAL_TEXCOORD_UV** = **0** +- **FIXED_MATERIAL_TEXCOORD_UV_TRANSFORM** = **1** +- **FIXED_MATERIAL_TEXCOORD_UV2** = **2** +- **ARRAY_VERTEX** = **0** +- **ARRAY_NORMAL** = **1** +- **ARRAY_TANGENT** = **2** +- **ARRAY_COLOR** = **3** +- **ARRAY_TEX_UV** = **4** +- **ARRAY_BONES** = **6** +- **ARRAY_WEIGHTS** = **7** +- **ARRAY_INDEX** = **8** +- **ARRAY_MAX** = **9** +- **ARRAY_FORMAT_VERTEX** = **1** +- **ARRAY_FORMAT_NORMAL** = **2** +- **ARRAY_FORMAT_TANGENT** = **4** +- **ARRAY_FORMAT_COLOR** = **8** +- **ARRAY_FORMAT_TEX_UV** = **16** +- **ARRAY_FORMAT_BONES** = **64** +- **ARRAY_FORMAT_WEIGHTS** = **128** +- **ARRAY_FORMAT_INDEX** = **256** +- **PRIMITIVE_POINTS** = **0** +- **PRIMITIVE_LINES** = **1** +- **PRIMITIVE_LINE_STRIP** = **2** +- **PRIMITIVE_LINE_LOOP** = **3** +- **PRIMITIVE_TRIANGLES** = **4** +- **PRIMITIVE_TRIANGLE_STRIP** = **5** +- **PRIMITIVE_TRIANGLE_FAN** = **6** +- **PRIMITIVE_MAX** = **7** +- **PARTICLE_LIFETIME** = **0** +- **PARTICLE_SPREAD** = **1** +- **PARTICLE_GRAVITY** = **2** +- **PARTICLE_LINEAR_VELOCITY** = **3** +- **PARTICLE_ANGULAR_VELOCITY** = **4** +- **PARTICLE_LINEAR_ACCELERATION** = **5** +- **PARTICLE_RADIAL_ACCELERATION** = **6** +- **PARTICLE_TANGENTIAL_ACCELERATION** = **7** +- **PARTICLE_INITIAL_SIZE** = **9** +- **PARTICLE_FINAL_SIZE** = **10** +- **PARTICLE_INITIAL_ANGLE** = **11** +- **PARTICLE_HEIGHT** = **12** +- **PARTICLE_HEIGHT_SPEED_SCALE** = **13** +- **PARTICLE_VAR_MAX** = **14** +- **LIGHT_DIRECTIONAL** = **0** +- **LIGHT_OMNI** = **1** +- **LIGHT_SPOT** = **2** +- **LIGHT_COLOR_DIFFUSE** = **0** +- **LIGHT_COLOR_SPECULAR** = **1** +- **LIGHT_PARAM_SPOT_ATTENUATION** = **0** +- **LIGHT_PARAM_SPOT_ANGLE** = **1** +- **LIGHT_PARAM_RADIUS** = **2** +- **LIGHT_PARAM_ENERGY** = **3** +- **LIGHT_PARAM_ATTENUATION** = **4** +- **LIGHT_PARAM_MAX** = **10** +- **SCENARIO_DEBUG_DISABLED** = **0** +- **SCENARIO_DEBUG_WIREFRAME** = **1** +- **SCENARIO_DEBUG_OVERDRAW** = **2** +- **INSTANCE_MESH** = **1** +- **INSTANCE_MULTIMESH** = **2** +- **INSTANCE_PARTICLES** = **4** +- **INSTANCE_LIGHT** = **5** +- **INSTANCE_ROOM** = **6** +- **INSTANCE_PORTAL** = **7** +- **INSTANCE_GEOMETRY_MASK** = **30** +- **INFO_OBJECTS_IN_FRAME** = **0** +- **INFO_VERTICES_IN_FRAME** = **1** +- **INFO_MATERIAL_CHANGES_IN_FRAME** = **2** +- **INFO_SHADER_CHANGES_IN_FRAME** = **3** +- **INFO_SURFACE_CHANGES_IN_FRAME** = **4** +- **INFO_DRAW_CALLS_IN_FRAME** = **5** +- **INFO_USAGE_VIDEO_MEM_TOTAL** = **6** +- **INFO_VIDEO_MEM_USED** = **7** +- **INFO_TEXTURE_MEM_USED** = **8** +- **INFO_VERTEX_MEM_USED** = **9** + +Description +----------- + +Server for anything visible. The visual server is the API backend for everything visible. The whole scene system mounts on it to display. + +The visual server is completely opaque, the internals are entirely implementation specific and cannot be accessed. + +Member Function Description +--------------------------- + +.. _class_VisualServer_texture_create: + +- :ref:`RID` **texture_create** **(** **)** + +.. _class_VisualServer_texture_create_from_image: + +- :ref:`RID` **texture_create_from_image** **(** :ref:`Image` arg0, :ref:`int` arg1=7 **)** + +.. _class_VisualServer_texture_set_flags: + +- void **texture_set_flags** **(** :ref:`RID` arg0, :ref:`int` arg1 **)** + +.. _class_VisualServer_texture_get_flags: + +- :ref:`int` **texture_get_flags** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_texture_get_width: + +- :ref:`int` **texture_get_width** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_texture_get_height: + +- :ref:`int` **texture_get_height** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_shader_create: + +- :ref:`RID` **shader_create** **(** :ref:`int` mode=0 **)** + +.. _class_VisualServer_shader_set_mode: + +- void **shader_set_mode** **(** :ref:`RID` shader, :ref:`int` mode **)** + +.. _class_VisualServer_material_create: + +- :ref:`RID` **material_create** **(** **)** + +.. _class_VisualServer_material_set_shader: + +- void **material_set_shader** **(** :ref:`RID` shader, :ref:`RID` arg1 **)** + +.. _class_VisualServer_material_get_shader: + +- :ref:`RID` **material_get_shader** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_material_set_param: + +- void **material_set_param** **(** :ref:`RID` arg0, :ref:`String` arg1, var arg2 **)** + +.. _class_VisualServer_material_get_param: + +- void **material_get_param** **(** :ref:`RID` arg0, :ref:`String` arg1 **)** const + +.. _class_VisualServer_material_set_flag: + +- void **material_set_flag** **(** :ref:`RID` arg0, :ref:`int` arg1, :ref:`bool` arg2 **)** + +.. _class_VisualServer_material_get_flag: + +- :ref:`bool` **material_get_flag** **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const + +.. _class_VisualServer_material_set_blend_mode: + +- void **material_set_blend_mode** **(** :ref:`RID` arg0, :ref:`int` arg1 **)** + +.. _class_VisualServer_material_get_blend_mode: + +- :ref:`int` **material_get_blend_mode** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_material_set_line_width: + +- void **material_set_line_width** **(** :ref:`RID` arg0, :ref:`float` arg1 **)** + +.. _class_VisualServer_material_get_line_width: + +- :ref:`float` **material_get_line_width** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_mesh_create: + +- :ref:`RID` **mesh_create** **(** **)** + +.. _class_VisualServer_mesh_add_surface: + +- void **mesh_add_surface** **(** :ref:`RID` arg0, :ref:`int` arg1, :ref:`Array` arg2, :ref:`Array` arg3, :ref:`bool` arg4=-1 **)** + +.. _class_VisualServer_mesh_surface_set_material: + +- void **mesh_surface_set_material** **(** :ref:`RID` arg0, :ref:`int` arg1, :ref:`RID` arg2, :ref:`bool` arg3=false **)** + +.. _class_VisualServer_mesh_surface_get_material: + +- :ref:`RID` **mesh_surface_get_material** **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const + +.. _class_VisualServer_mesh_surface_get_array_len: + +- :ref:`int` **mesh_surface_get_array_len** **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const + +.. _class_VisualServer_mesh_surface_get_array_index_len: + +- :ref:`int` **mesh_surface_get_array_index_len** **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const + +.. _class_VisualServer_mesh_surface_get_format: + +- :ref:`int` **mesh_surface_get_format** **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const + +.. _class_VisualServer_mesh_surface_get_primitive_type: + +- :ref:`int` **mesh_surface_get_primitive_type** **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const + +.. _class_VisualServer_mesh_remove_surface: + +- void **mesh_remove_surface** **(** :ref:`RID` arg0, :ref:`int` arg1 **)** + +.. _class_VisualServer_mesh_get_surface_count: + +- :ref:`int` **mesh_get_surface_count** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_multimesh_create: + +- :ref:`RID` **multimesh_create** **(** **)** + +.. _class_VisualServer_multimesh_set_mesh: + +- void **multimesh_set_mesh** **(** :ref:`RID` arg0, :ref:`RID` arg1 **)** + +.. _class_VisualServer_multimesh_set_aabb: + +- void **multimesh_set_aabb** **(** :ref:`RID` arg0, :ref:`AABB` arg1 **)** + +.. _class_VisualServer_multimesh_instance_set_transform: + +- void **multimesh_instance_set_transform** **(** :ref:`RID` arg0, :ref:`int` arg1, :ref:`Transform` arg2 **)** + +.. _class_VisualServer_multimesh_instance_set_color: + +- void **multimesh_instance_set_color** **(** :ref:`RID` arg0, :ref:`int` arg1, :ref:`Color` arg2 **)** + +.. _class_VisualServer_multimesh_get_mesh: + +- :ref:`RID` **multimesh_get_mesh** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_multimesh_get_aabb: + +- :ref:`AABB` **multimesh_get_aabb** **(** :ref:`RID` arg0, :ref:`AABB` arg1 **)** const + +.. _class_VisualServer_multimesh_instance_get_transform: + +- :ref:`Transform` **multimesh_instance_get_transform** **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const + +.. _class_VisualServer_multimesh_instance_get_color: + +- :ref:`Color` **multimesh_instance_get_color** **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const + +.. _class_VisualServer_particles_create: + +- :ref:`RID` **particles_create** **(** **)** + +.. _class_VisualServer_particles_set_amount: + +- void **particles_set_amount** **(** :ref:`RID` arg0, :ref:`int` arg1 **)** + +.. _class_VisualServer_particles_get_amount: + +- :ref:`int` **particles_get_amount** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_particles_set_emitting: + +- void **particles_set_emitting** **(** :ref:`RID` arg0, :ref:`bool` arg1 **)** + +.. _class_VisualServer_particles_is_emitting: + +- :ref:`bool` **particles_is_emitting** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_particles_set_visibility_aabb: + +- void **particles_set_visibility_aabb** **(** :ref:`RID` arg0, :ref:`AABB` arg1 **)** + +.. _class_VisualServer_particles_get_visibility_aabb: + +- :ref:`AABB` **particles_get_visibility_aabb** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_particles_set_variable: + +- void **particles_set_variable** **(** :ref:`RID` arg0, :ref:`int` arg1, :ref:`float` arg2 **)** + +.. _class_VisualServer_particles_get_variable: + +- :ref:`float` **particles_get_variable** **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const + +.. _class_VisualServer_particles_set_randomness: + +- void **particles_set_randomness** **(** :ref:`RID` arg0, :ref:`int` arg1, :ref:`float` arg2 **)** + +.. _class_VisualServer_particles_get_randomness: + +- :ref:`float` **particles_get_randomness** **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const + +.. _class_VisualServer_particles_set_color_phases: + +- void **particles_set_color_phases** **(** :ref:`RID` arg0, :ref:`int` arg1 **)** + +.. _class_VisualServer_particles_get_color_phases: + +- :ref:`int` **particles_get_color_phases** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_particles_set_color_phase_pos: + +- void **particles_set_color_phase_pos** **(** :ref:`RID` arg0, :ref:`int` arg1, :ref:`float` arg2 **)** + +.. _class_VisualServer_particles_get_color_phase_pos: + +- :ref:`float` **particles_get_color_phase_pos** **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const + +.. _class_VisualServer_particles_set_color_phase_color: + +- void **particles_set_color_phase_color** **(** :ref:`RID` arg0, :ref:`int` arg1, :ref:`Color` arg2 **)** + +.. _class_VisualServer_particles_get_color_phase_color: + +- :ref:`Color` **particles_get_color_phase_color** **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const + +.. _class_VisualServer_particles_set_attractors: + +- void **particles_set_attractors** **(** :ref:`RID` arg0, :ref:`int` arg1 **)** + +.. _class_VisualServer_particles_get_attractors: + +- :ref:`int` **particles_get_attractors** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_particles_set_attractor_pos: + +- void **particles_set_attractor_pos** **(** :ref:`RID` arg0, :ref:`int` arg1, :ref:`Vector3` arg2 **)** + +.. _class_VisualServer_particles_get_attractor_pos: + +- :ref:`Vector3` **particles_get_attractor_pos** **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const + +.. _class_VisualServer_particles_set_attractor_strength: + +- void **particles_set_attractor_strength** **(** :ref:`RID` arg0, :ref:`int` arg1, :ref:`float` arg2 **)** + +.. _class_VisualServer_particles_get_attractor_strength: + +- :ref:`float` **particles_get_attractor_strength** **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const + +.. _class_VisualServer_particles_set_material: + +- void **particles_set_material** **(** :ref:`RID` arg0, :ref:`RID` arg1, :ref:`bool` arg2=false **)** + +.. _class_VisualServer_particles_set_height_from_velocity: + +- void **particles_set_height_from_velocity** **(** :ref:`RID` arg0, :ref:`bool` arg1 **)** + +.. _class_VisualServer_particles_has_height_from_velocity: + +- :ref:`bool` **particles_has_height_from_velocity** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_light_create: + +- :ref:`RID` **light_create** **(** :ref:`int` arg0 **)** + +.. _class_VisualServer_light_get_type: + +- :ref:`int` **light_get_type** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_light_set_color: + +- void **light_set_color** **(** :ref:`RID` arg0, :ref:`int` arg1, :ref:`Color` arg2 **)** + +.. _class_VisualServer_light_get_color: + +- :ref:`Color` **light_get_color** **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const + +.. _class_VisualServer_light_set_shadow: + +- void **light_set_shadow** **(** :ref:`RID` arg0, :ref:`bool` arg1 **)** + +.. _class_VisualServer_light_has_shadow: + +- :ref:`bool` **light_has_shadow** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_light_set_volumetric: + +- void **light_set_volumetric** **(** :ref:`RID` arg0, :ref:`bool` arg1 **)** + +.. _class_VisualServer_light_is_volumetric: + +- :ref:`bool` **light_is_volumetric** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_light_set_projector: + +- void **light_set_projector** **(** :ref:`RID` arg0, :ref:`RID` arg1 **)** + +.. _class_VisualServer_light_get_projector: + +- :ref:`RID` **light_get_projector** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_light_set_var: + +- void **light_set_var** **(** :ref:`RID` arg0, :ref:`int` arg1, :ref:`float` arg2 **)** + +.. _class_VisualServer_light_get_var: + +- :ref:`float` **light_get_var** **(** :ref:`RID` arg0, :ref:`int` arg1 **)** const + +.. _class_VisualServer_skeleton_create: + +- :ref:`RID` **skeleton_create** **(** **)** + +.. _class_VisualServer_skeleton_resize: + +- void **skeleton_resize** **(** :ref:`RID` arg0, :ref:`int` arg1 **)** + +.. _class_VisualServer_skeleton_get_bone_count: + +- :ref:`int` **skeleton_get_bone_count** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_skeleton_bone_set_transform: + +- void **skeleton_bone_set_transform** **(** :ref:`RID` arg0, :ref:`int` arg1, :ref:`Transform` arg2 **)** + +.. _class_VisualServer_skeleton_bone_get_transform: + +- :ref:`Transform` **skeleton_bone_get_transform** **(** :ref:`RID` arg0, :ref:`int` arg1 **)** + +.. _class_VisualServer_room_create: + +- :ref:`RID` **room_create** **(** **)** + +.. _class_VisualServer_room_set_bounds: + +- void **room_set_bounds** **(** :ref:`RID` arg0, :ref:`Dictionary` arg1 **)** + +.. _class_VisualServer_room_get_bounds: + +- :ref:`Dictionary` **room_get_bounds** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_portal_create: + +- :ref:`RID` **portal_create** **(** **)** + +.. _class_VisualServer_portal_set_shape: + +- void **portal_set_shape** **(** :ref:`RID` arg0, :ref:`Vector2Array` arg1 **)** + +.. _class_VisualServer_portal_get_shape: + +- :ref:`Vector2Array` **portal_get_shape** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_portal_set_enabled: + +- void **portal_set_enabled** **(** :ref:`RID` arg0, :ref:`bool` arg1 **)** + +.. _class_VisualServer_portal_is_enabled: + +- :ref:`bool` **portal_is_enabled** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_portal_set_disable_distance: + +- void **portal_set_disable_distance** **(** :ref:`RID` arg0, :ref:`float` arg1 **)** + +.. _class_VisualServer_portal_get_disable_distance: + +- :ref:`float` **portal_get_disable_distance** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_portal_set_disabled_color: + +- void **portal_set_disabled_color** **(** :ref:`RID` arg0, :ref:`Color` arg1 **)** + +.. _class_VisualServer_portal_get_disabled_color: + +- :ref:`Color` **portal_get_disabled_color** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_camera_create: + +- :ref:`RID` **camera_create** **(** **)** + +.. _class_VisualServer_camera_set_perspective: + +- void **camera_set_perspective** **(** :ref:`RID` arg0, :ref:`float` arg1, :ref:`float` arg2, :ref:`float` arg3 **)** + +.. _class_VisualServer_camera_set_orthogonal: + +- void **camera_set_orthogonal** **(** :ref:`RID` arg0, :ref:`float` arg1, :ref:`float` arg2, :ref:`float` arg3 **)** + +.. _class_VisualServer_camera_set_transform: + +- void **camera_set_transform** **(** :ref:`RID` arg0, :ref:`Transform` arg1 **)** + +.. _class_VisualServer_viewport_create: + +- :ref:`RID` **viewport_create** **(** **)** + +.. _class_VisualServer_viewport_set_rect: + +- void **viewport_set_rect** **(** :ref:`RID` arg0, :ref:`Rect2` arg1 **)** + +.. _class_VisualServer_viewport_get_rect: + +- :ref:`Rect2` **viewport_get_rect** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_viewport_attach_camera: + +- void **viewport_attach_camera** **(** :ref:`RID` arg0, :ref:`RID` arg1=RID() **)** + +.. _class_VisualServer_viewport_get_attached_camera: + +- :ref:`RID` **viewport_get_attached_camera** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_viewport_get_scenario: + +- :ref:`RID` **viewport_get_scenario** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_viewport_attach_canvas: + +- void **viewport_attach_canvas** **(** :ref:`RID` arg0, :ref:`RID` arg1 **)** + +.. _class_VisualServer_viewport_remove_canvas: + +- void **viewport_remove_canvas** **(** :ref:`RID` arg0, :ref:`RID` arg1 **)** + +.. _class_VisualServer_viewport_set_global_canvas_transform: + +- void **viewport_set_global_canvas_transform** **(** :ref:`RID` arg0, :ref:`Matrix32` arg1 **)** + +.. _class_VisualServer_scenario_create: + +- :ref:`RID` **scenario_create** **(** **)** + +.. _class_VisualServer_scenario_set_debug: + +- void **scenario_set_debug** **(** :ref:`RID` arg0, :ref:`int` arg1 **)** + +.. _class_VisualServer_instance_create: + +- :ref:`RID` **instance_create** **(** **)** + +.. _class_VisualServer_instance_get_base: + +- :ref:`RID` **instance_get_base** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_instance_get_base_aabb: + +- :ref:`RID` **instance_get_base_aabb** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_instance_set_transform: + +- void **instance_set_transform** **(** :ref:`RID` arg0, :ref:`Transform` arg1 **)** + +.. _class_VisualServer_instance_get_transform: + +- :ref:`Transform` **instance_get_transform** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_instance_attach_object_instance_ID: + +- void **instance_attach_object_instance_ID** **(** :ref:`RID` arg0, :ref:`int` arg1 **)** + +.. _class_VisualServer_instance_get_object_instance_ID: + +- :ref:`int` **instance_get_object_instance_ID** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_instance_attach_skeleton: + +- void **instance_attach_skeleton** **(** :ref:`RID` arg0, :ref:`RID` arg1 **)** + +.. _class_VisualServer_instance_get_skeleton: + +- :ref:`RID` **instance_get_skeleton** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_instance_set_room: + +- void **instance_set_room** **(** :ref:`RID` arg0, :ref:`RID` arg1 **)** + +.. _class_VisualServer_instance_get_room: + +- :ref:`RID` **instance_get_room** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_instance_set_exterior: + +- void **instance_set_exterior** **(** :ref:`RID` arg0, :ref:`bool` arg1 **)** + +.. _class_VisualServer_instance_is_exterior: + +- :ref:`bool` **instance_is_exterior** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_instances_cull_aabb: + +- :ref:`Array` **instances_cull_aabb** **(** :ref:`AABB` arg0, :ref:`RID` arg1 **)** const + +.. _class_VisualServer_instances_cull_ray: + +- :ref:`Array` **instances_cull_ray** **(** :ref:`Vector3` arg0, :ref:`Vector3` arg1, :ref:`RID` arg2 **)** const + +.. _class_VisualServer_instances_cull_convex: + +- :ref:`Array` **instances_cull_convex** **(** :ref:`Array` arg0, :ref:`RID` arg1 **)** const + +.. _class_VisualServer_instance_geometry_override_material_param: + +- :ref:`RID` **instance_geometry_override_material_param** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_instance_geometry_get_material_param: + +- :ref:`RID` **instance_geometry_get_material_param** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_get_test_cube: + +- :ref:`RID` **get_test_cube** **(** **)** + +.. _class_VisualServer_canvas_create: + +- :ref:`RID` **canvas_create** **(** **)** + +.. _class_VisualServer_canvas_item_create: + +- :ref:`RID` **canvas_item_create** **(** **)** + +.. _class_VisualServer_canvas_item_set_parent: + +- void **canvas_item_set_parent** **(** :ref:`RID` arg0, :ref:`RID` arg1 **)** + +.. _class_VisualServer_canvas_item_get_parent: + +- :ref:`RID` **canvas_item_get_parent** **(** :ref:`RID` arg0 **)** const + +.. _class_VisualServer_canvas_item_set_transform: + +- void **canvas_item_set_transform** **(** :ref:`RID` arg0, :ref:`Matrix32` arg1 **)** + +.. _class_VisualServer_canvas_item_set_custom_rect: + +- void **canvas_item_set_custom_rect** **(** :ref:`RID` arg0, :ref:`bool` arg1, :ref:`Rect2` arg2 **)** + +.. _class_VisualServer_canvas_item_set_clip: + +- void **canvas_item_set_clip** **(** :ref:`RID` arg0, :ref:`bool` arg1 **)** + +.. _class_VisualServer_canvas_item_set_opacity: + +- void **canvas_item_set_opacity** **(** :ref:`RID` arg0, :ref:`float` arg1 **)** + +.. _class_VisualServer_canvas_item_get_opacity: + +- :ref:`float` **canvas_item_get_opacity** **(** :ref:`RID` arg0, :ref:`float` arg1 **)** const + +.. _class_VisualServer_canvas_item_set_self_opacity: + +- void **canvas_item_set_self_opacity** **(** :ref:`RID` arg0, :ref:`float` arg1 **)** + +.. _class_VisualServer_canvas_item_get_self_opacity: + +- :ref:`float` **canvas_item_get_self_opacity** **(** :ref:`RID` arg0, :ref:`float` arg1 **)** const + +.. _class_VisualServer_canvas_item_set_z: + +- void **canvas_item_set_z** **(** :ref:`RID` arg0, :ref:`int` arg1 **)** + +.. _class_VisualServer_canvas_item_add_line: + +- void **canvas_item_add_line** **(** :ref:`RID` arg0, :ref:`Vector2` arg1, :ref:`Vector2` arg2, :ref:`Color` arg3, :ref:`float` arg4=1 **)** + +.. _class_VisualServer_canvas_item_add_rect: + +- void **canvas_item_add_rect** **(** :ref:`RID` arg0, :ref:`Rect2` arg1, :ref:`Color` arg2 **)** + +.. _class_VisualServer_canvas_item_add_texture_rect: + +- void **canvas_item_add_texture_rect** **(** :ref:`RID` arg0, :ref:`Rect2` arg1, :ref:`RID` arg2, :ref:`bool` arg3, :ref:`Color` arg4=Color(1,1,1,1), :ref:`bool` arg5=false **)** + +.. _class_VisualServer_canvas_item_add_texture_rect_region: + +- void **canvas_item_add_texture_rect_region** **(** :ref:`RID` arg0, :ref:`Rect2` arg1, :ref:`RID` arg2, :ref:`Rect2` arg3, :ref:`Color` arg4=Color(1,1,1,1), :ref:`bool` arg5=false **)** + +.. _class_VisualServer_canvas_item_add_style_box: + +- void **canvas_item_add_style_box** **(** :ref:`RID` arg0, :ref:`Rect2` arg1, :ref:`RID` arg2, :ref:`RealArray` arg3, :ref:`Color` arg4=Color(1,1,1,1) **)** + +.. _class_VisualServer_canvas_item_add_circle: + +- void **canvas_item_add_circle** **(** :ref:`RID` arg0, :ref:`Vector2` arg1, :ref:`float` arg2, :ref:`Color` arg3 **)** + +.. _class_VisualServer_viewport_set_canvas_transform: + +- void **viewport_set_canvas_transform** **(** :ref:`RID` arg0, :ref:`RID` arg1, :ref:`Matrix32` arg2 **)** + +.. _class_VisualServer_canvas_item_clear: + +- void **canvas_item_clear** **(** :ref:`RID` arg0 **)** + +.. _class_VisualServer_canvas_item_raise: + +- void **canvas_item_raise** **(** :ref:`RID` arg0 **)** + +.. _class_VisualServer_cursor_set_rotation: + +- void **cursor_set_rotation** **(** :ref:`float` arg0, :ref:`int` arg1 **)** + +.. _class_VisualServer_cursor_set_texture: + +- void **cursor_set_texture** **(** :ref:`RID` arg0, :ref:`Vector2` arg1, :ref:`int` arg2 **)** + +.. _class_VisualServer_cursor_set_visible: + +- void **cursor_set_visible** **(** :ref:`bool` arg0, :ref:`int` arg1 **)** + +.. _class_VisualServer_cursor_set_pos: + +- void **cursor_set_pos** **(** :ref:`Vector2` arg0, :ref:`int` arg1 **)** + +.. _class_VisualServer_black_bars_set_margins: + +- void **black_bars_set_margins** **(** :ref:`int` left, :ref:`int` top, :ref:`int` right, :ref:`int` bottom **)** + +.. _class_VisualServer_black_bars_set_images: + +- void **black_bars_set_images** **(** :ref:`RID` left, :ref:`RID` top, :ref:`RID` right, :ref:`RID` bottom **)** + +.. _class_VisualServer_make_sphere_mesh: + +- :ref:`RID` **make_sphere_mesh** **(** :ref:`int` arg0, :ref:`int` arg1, :ref:`float` arg2 **)** + +.. _class_VisualServer_mesh_add_surface_from_planes: + +- void **mesh_add_surface_from_planes** **(** :ref:`RID` arg0, :ref:`Array` arg1 **)** + +.. _class_VisualServer_draw: + +- void **draw** **(** **)** + +.. _class_VisualServer_sync: + +- void **sync** **(** **)** + +.. _class_VisualServer_free: + +- void **free** **(** :ref:`RID` arg0 **)** + +.. _class_VisualServer_set_default_clear_color: + +- void **set_default_clear_color** **(** :ref:`Color` arg0 **)** + +.. _class_VisualServer_get_render_info: + +- :ref:`int` **get_render_info** **(** :ref:`int` arg0 **)** + + diff --git a/classes/class_vscrollbar.rst b/classes/class_vscrollbar.rst new file mode 100644 index 000000000..a939b6cf6 --- /dev/null +++ b/classes/class_vscrollbar.rst @@ -0,0 +1,16 @@ +.. _class_VScrollBar: + +VScrollBar +========== + +Inherits: :ref:`ScrollBar` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Vertical version of :ref:`ScrollBar`, which goes from left (min) to right (max). + diff --git a/classes/class_vseparator.rst b/classes/class_vseparator.rst new file mode 100644 index 000000000..af54ef4e4 --- /dev/null +++ b/classes/class_vseparator.rst @@ -0,0 +1,21 @@ +.. _class_VSeparator: + +VSeparator +========== + +Inherits: :ref:`Separator` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Vertical version of :ref:`Separator`. + +Description +----------- + +Vertical version of :ref:`Separator`. It is used to separate objects horizontally, though (but it looks vertical!). + diff --git a/classes/class_vslider.rst b/classes/class_vslider.rst new file mode 100644 index 000000000..69d62e7a4 --- /dev/null +++ b/classes/class_vslider.rst @@ -0,0 +1,21 @@ +.. _class_VSlider: + +VSlider +======= + +Inherits: :ref:`Slider` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Vertical slider. + +Description +----------- + +Vertical slider. See :ref:`Slider`. This one goes from left (min) to right (max). + diff --git a/classes/class_vsplitcontainer.rst b/classes/class_vsplitcontainer.rst new file mode 100644 index 000000000..0f2753be6 --- /dev/null +++ b/classes/class_vsplitcontainer.rst @@ -0,0 +1,21 @@ +.. _class_VSplitContainer: + +VSplitContainer +=============== + +Inherits: :ref:`SplitContainer` +----------------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Vertical split container. + +Description +----------- + +Vertical split container. See :ref:`SplitContainer`. This goes from left to right. + diff --git a/classes/class_weakref.rst b/classes/class_weakref.rst new file mode 100644 index 000000000..bbdffbf47 --- /dev/null +++ b/classes/class_weakref.rst @@ -0,0 +1,31 @@ +.. _class_WeakRef: + +WeakRef +======= + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------+----------------------------------------------------------+ +| :ref:`Object` | :ref:`get_ref` **(** **)** const | ++------------------------------+----------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_WeakRef_get_ref: + +- :ref:`Object` **get_ref** **(** **)** const + + diff --git a/classes/class_windowdialog.rst b/classes/class_windowdialog.rst new file mode 100644 index 000000000..b0c7c5491 --- /dev/null +++ b/classes/class_windowdialog.rst @@ -0,0 +1,54 @@ +.. _class_WindowDialog: + +WindowDialog +============ + +Inherits: :ref:`Popup` +----------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Base class for window dialogs. + +Member Functions +---------------- + ++--------------------------------------------+------------------------------------------------------------------------------------------------+ +| void | :ref:`set_title` **(** :ref:`String` title **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_title` **(** **)** const | ++--------------------------------------------+------------------------------------------------------------------------------------------------+ +| :ref:`TextureButton` | :ref:`get_close_button` **(** **)** | ++--------------------------------------------+------------------------------------------------------------------------------------------------+ + +Description +----------- + +Windowdialog is the base class for all window-based dialogs. It's a by-default toplevel :ref:`Control` that draws a window decoration and allows motion and resizing. + +Member Function Description +--------------------------- + +.. _class_WindowDialog_set_title: + +- void **set_title** **(** :ref:`String` title **)** + +Set the title of the window. + +.. _class_WindowDialog_get_title: + +- :ref:`String` **get_title** **(** **)** const + +Return the title of the window. + +.. _class_WindowDialog_get_close_button: + +- :ref:`TextureButton` **get_close_button** **(** **)** + +Return the close :ref:`TextureButton`. + + diff --git a/classes/class_world.rst b/classes/class_world.rst new file mode 100644 index 000000000..c00888fc6 --- /dev/null +++ b/classes/class_world.rst @@ -0,0 +1,66 @@ +.. _class_World: + +World +===== + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Class that has everything pertaining to a world. + +Member Functions +---------------- + ++----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_space` **(** **)** const | ++----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_scenario` **(** **)** const | ++----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_sound_space` **(** **)** const | ++----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_environment` **(** :ref:`Environment` env **)** | ++----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ +| :ref:`Environment` | :ref:`get_environment` **(** **)** const | ++----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ +| :ref:`PhysicsDirectSpaceState` | :ref:`get_direct_space_state` **(** **)** | ++----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +Class that has everything pertaining to a world. A physics space, a visual scenario and a sound space. Spatial nodes register their resources into the current world. + +Member Function Description +--------------------------- + +.. _class_World_get_space: + +- :ref:`RID` **get_space** **(** **)** const + +.. _class_World_get_scenario: + +- :ref:`RID` **get_scenario** **(** **)** const + +.. _class_World_get_sound_space: + +- :ref:`RID` **get_sound_space** **(** **)** const + +.. _class_World_set_environment: + +- void **set_environment** **(** :ref:`Environment` env **)** + +.. _class_World_get_environment: + +- :ref:`Environment` **get_environment** **(** **)** const + +.. _class_World_get_direct_space_state: + +- :ref:`PhysicsDirectSpaceState` **get_direct_space_state** **(** **)** + + diff --git a/classes/class_world2d.rst b/classes/class_world2d.rst new file mode 100644 index 000000000..ccb130d4d --- /dev/null +++ b/classes/class_world2d.rst @@ -0,0 +1,54 @@ +.. _class_World2D: + +World2D +======= + +Inherits: :ref:`Resource` +----------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + +Class that has everything pertaining to a 2D world. + +Member Functions +---------------- + ++--------------------------------------------------------------------+----------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_canvas` **(** **)** | ++--------------------------------------------------------------------+----------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_space` **(** **)** | ++--------------------------------------------------------------------+----------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_sound_space` **(** **)** | ++--------------------------------------------------------------------+----------------------------------------------------------------------------------+ +| :ref:`Physics2DDirectSpaceState` | :ref:`get_direct_space_state` **(** **)** | ++--------------------------------------------------------------------+----------------------------------------------------------------------------------+ + +Description +----------- + +Class that has everything pertaining to a 2D world. A physics space, a visual scenario and a sound space. 2D nodes register their resources into the current 2D world. + +Member Function Description +--------------------------- + +.. _class_World2D_get_canvas: + +- :ref:`RID` **get_canvas** **(** **)** + +.. _class_World2D_get_space: + +- :ref:`RID` **get_space** **(** **)** + +.. _class_World2D_get_sound_space: + +- :ref:`RID` **get_sound_space** **(** **)** + +.. _class_World2D_get_direct_space_state: + +- :ref:`Physics2DDirectSpaceState` **get_direct_space_state** **(** **)** + + diff --git a/classes/class_worldenvironment.rst b/classes/class_worldenvironment.rst new file mode 100644 index 000000000..7f6346ab3 --- /dev/null +++ b/classes/class_worldenvironment.rst @@ -0,0 +1,37 @@ +.. _class_WorldEnvironment: + +WorldEnvironment +================ + +Inherits: :ref:`Spatial` +--------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_environment` **(** :ref:`Environment` env **)** | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Environment` | :ref:`get_environment` **(** **)** const | ++----------------------------------------+------------------------------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_WorldEnvironment_set_environment: + +- void **set_environment** **(** :ref:`Environment` env **)** + +.. _class_WorldEnvironment_get_environment: + +- :ref:`Environment` **get_environment** **(** **)** const + + diff --git a/classes/class_xmlparser.rst b/classes/class_xmlparser.rst new file mode 100644 index 000000000..515db48c5 --- /dev/null +++ b/classes/class_xmlparser.rst @@ -0,0 +1,138 @@ +.. _class_XMLParser: + +XMLParser +========= + +Inherits: :ref:`Reference` +------------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`read` **(** **)** | ++------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_node_type` **(** **)** | ++------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_node_name` **(** **)** const | ++------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_node_data` **(** **)** const | ++------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_node_offset` **(** **)** const | ++------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_attribute_count` **(** **)** const | ++------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_attribute_name` **(** :ref:`int` idx **)** const | ++------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_attribute_value` **(** :ref:`int` idx **)** const | ++------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_attribute` **(** :ref:`String` name **)** const | ++------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_named_attribute_value` **(** :ref:`String` name **)** const | ++------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_named_attribute_value_safe` **(** :ref:`String` name **)** const | ++------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_empty` **(** **)** const | ++------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_current_line` **(** **)** const | ++------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`skip_section` **(** **)** | ++------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`seek` **(** :ref:`int` pos **)** | ++------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`open` **(** :ref:`String` file **)** | ++------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`open_buffer` **(** :ref:`RawArray` buffer **)** | ++------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + +Numeric Constants +----------------- + +- **NODE_NONE** = **0** +- **NODE_ELEMENT** = **1** +- **NODE_ELEMENT_END** = **2** +- **NODE_TEXT** = **3** +- **NODE_COMMENT** = **4** +- **NODE_CDATA** = **5** +- **NODE_UNKNOWN** = **6** + +Member Function Description +--------------------------- + +.. _class_XMLParser_read: + +- :ref:`int` **read** **(** **)** + +.. _class_XMLParser_get_node_type: + +- :ref:`int` **get_node_type** **(** **)** + +.. _class_XMLParser_get_node_name: + +- :ref:`String` **get_node_name** **(** **)** const + +.. _class_XMLParser_get_node_data: + +- :ref:`String` **get_node_data** **(** **)** const + +.. _class_XMLParser_get_node_offset: + +- :ref:`int` **get_node_offset** **(** **)** const + +.. _class_XMLParser_get_attribute_count: + +- :ref:`int` **get_attribute_count** **(** **)** const + +.. _class_XMLParser_get_attribute_name: + +- :ref:`String` **get_attribute_name** **(** :ref:`int` idx **)** const + +.. _class_XMLParser_get_attribute_value: + +- :ref:`String` **get_attribute_value** **(** :ref:`int` idx **)** const + +.. _class_XMLParser_has_attribute: + +- :ref:`bool` **has_attribute** **(** :ref:`String` name **)** const + +.. _class_XMLParser_get_named_attribute_value: + +- :ref:`String` **get_named_attribute_value** **(** :ref:`String` name **)** const + +.. _class_XMLParser_get_named_attribute_value_safe: + +- :ref:`String` **get_named_attribute_value_safe** **(** :ref:`String` name **)** const + +.. _class_XMLParser_is_empty: + +- :ref:`bool` **is_empty** **(** **)** const + +.. _class_XMLParser_get_current_line: + +- :ref:`int` **get_current_line** **(** **)** const + +.. _class_XMLParser_skip_section: + +- void **skip_section** **(** **)** + +.. _class_XMLParser_seek: + +- :ref:`int` **seek** **(** :ref:`int` pos **)** + +.. _class_XMLParser_open: + +- :ref:`int` **open** **(** :ref:`String` file **)** + +.. _class_XMLParser_open_buffer: + +- :ref:`int` **open_buffer** **(** :ref:`RawArray` buffer **)** + + diff --git a/classes/class_ysort.rst b/classes/class_ysort.rst new file mode 100644 index 000000000..49474e1e1 --- /dev/null +++ b/classes/class_ysort.rst @@ -0,0 +1,37 @@ +.. _class_YSort: + +YSort +===== + +Inherits: :ref:`Node2D` +------------------------------------- + +Category: Core +-------------- + +Brief Description +----------------- + + + +Member Functions +---------------- + ++--------------------------+-----------------------------------------------------------------------------------------------------+ +| void | :ref:`set_sort_enabled` **(** :ref:`bool` enabled **)** | ++--------------------------+-----------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_sort_enabled` **(** **)** const | ++--------------------------+-----------------------------------------------------------------------------------------------------+ + +Member Function Description +--------------------------- + +.. _class_YSort_set_sort_enabled: + +- void **set_sort_enabled** **(** :ref:`bool` enabled **)** + +.. _class_YSort_is_sort_enabled: + +- :ref:`bool` **is_sort_enabled** **(** **)** const + + diff --git a/index.rst b/index.rst index db2bd3410..a2dc3aca8 100644 --- a/index.rst +++ b/index.rst @@ -25,6 +25,7 @@ The main documentation for the site is organized into a couple sections: tutorials/advanced tutorials/editor_plugins reference/index + classes/index asset_pipeline/index advanced/index contributing/index diff --git a/reference/index.rst b/reference/index.rst index 5244e5eb7..3f51d0dd2 100644 --- a/reference/index.rst +++ b/reference/index.rst @@ -5,6 +5,5 @@ Reference :maxdepth: 2 :name: reference - ../classes/index languages cheat_sheets