File: Shape2D.xml

package info (click to toggle)
godot 3.2.3-stable-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 121,308 kB
  • sloc: cpp: 804,285; ansic: 597,434; xml: 77,823; asm: 17,127; cs: 13,535; lisp: 12,017; python: 9,376; java: 7,474; sh: 973; javascript: 659; perl: 264; pascal: 203; objc: 116; makefile: 105
file content (96 lines) | stat: -rw-r--r-- 4,390 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Shape2D" inherits="Resource" version="3.2">
	<brief_description>
		Base class for all 2D shapes.
	</brief_description>
	<description>
		Base class for all 2D shapes. All 2D shape types inherit from this.
	</description>
	<tutorials>
		<link>https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
	</tutorials>
	<methods>
		<method name="collide">
			<return type="bool">
			</return>
			<argument index="0" name="local_xform" type="Transform2D">
			</argument>
			<argument index="1" name="with_shape" type="Shape2D">
			</argument>
			<argument index="2" name="shape_xform" type="Transform2D">
			</argument>
			<description>
				Returns [code]true[/code] if this shape is colliding with another.
				This method needs the transformation matrix for this shape ([code]local_xform[/code]), the shape to check collisions with ([code]with_shape[/code]), and the transformation matrix of that shape ([code]shape_xform[/code]).
			</description>
		</method>
		<method name="collide_and_get_contacts">
			<return type="Array">
			</return>
			<argument index="0" name="local_xform" type="Transform2D">
			</argument>
			<argument index="1" name="with_shape" type="Shape2D">
			</argument>
			<argument index="2" name="shape_xform" type="Transform2D">
			</argument>
			<description>
				Returns 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 ([code]local_xform[/code]), the shape to check collisions with ([code]with_shape[/code]), and the transformation matrix of that shape ([code]shape_xform[/code]).
			</description>
		</method>
		<method name="collide_with_motion">
			<return type="bool">
			</return>
			<argument index="0" name="local_xform" type="Transform2D">
			</argument>
			<argument index="1" name="local_motion" type="Vector2">
			</argument>
			<argument index="2" name="with_shape" type="Shape2D">
			</argument>
			<argument index="3" name="shape_xform" type="Transform2D">
			</argument>
			<argument index="4" name="shape_motion" type="Vector2">
			</argument>
			<description>
				Returns whether this shape would collide with another, if a given movement was applied.
				This method needs the transformation matrix for this shape ([code]local_xform[/code]), the movement to test on this shape ([code]local_motion[/code]), the shape to check collisions with ([code]with_shape[/code]), the transformation matrix of that shape ([code]shape_xform[/code]), and the movement to test onto the other object ([code]shape_motion[/code]).
			</description>
		</method>
		<method name="collide_with_motion_and_get_contacts">
			<return type="Array">
			</return>
			<argument index="0" name="local_xform" type="Transform2D">
			</argument>
			<argument index="1" name="local_motion" type="Vector2">
			</argument>
			<argument index="2" name="with_shape" type="Shape2D">
			</argument>
			<argument index="3" name="shape_xform" type="Transform2D">
			</argument>
			<argument index="4" name="shape_motion" type="Vector2">
			</argument>
			<description>
				Returns 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 ([code]local_xform[/code]), the movement to test on this shape ([code]local_motion[/code]), the shape to check collisions with ([code]with_shape[/code]), the transformation matrix of that shape ([code]shape_xform[/code]), and the movement to test onto the other object ([code]shape_motion[/code]).
			</description>
		</method>
		<method name="draw">
			<return type="void">
			</return>
			<argument index="0" name="canvas_item" type="RID">
			</argument>
			<argument index="1" name="color" type="Color">
			</argument>
			<description>
				Draws a solid shape onto a [CanvasItem] with the [VisualServer] API filled with the specified [code]color[/code]. The exact drawing method is specific for each shape and cannot be configured.
			</description>
		</method>
	</methods>
	<members>
		<member name="custom_solver_bias" type="float" setter="set_custom_solver_bias" getter="get_custom_solver_bias" default="0.0">
			The shape's custom solver bias.
		</member>
	</members>
	<constants>
	</constants>
</class>