2018-05-12 15:38:00 +08:00
<?xml version="1.0" encoding="UTF-8" ?>
2019-04-24 03:39:09 +08:00
<class name= "CSGShape" inherits= "GeometryInstance" category= "Core" version= "3.2" >
2018-05-12 15:38:00 +08:00
<brief_description >
2018-07-19 17:31:12 +08:00
The CSG base class.
2018-05-12 15:38:00 +08:00
</brief_description>
<description >
2018-07-19 17:31:12 +08:00
This is the CSG base class that provides CSG operation support to the various CSG nodes in Godot.
2018-05-12 15:38:00 +08:00
</description>
<tutorials >
</tutorials>
<methods >
2018-10-13 07:58:58 +08:00
<method name= "get_collision_layer_bit" qualifiers= "const" >
<return type= "bool" >
</return>
<argument index= "0" name= "bit" type= "int" >
</argument>
<description >
Returns an individual bit on the collision mask.
</description>
</method>
<method name= "get_collision_mask_bit" qualifiers= "const" >
<return type= "bool" >
</return>
<argument index= "0" name= "bit" type= "int" >
</argument>
<description >
Returns an individual bit on the collision mask.
</description>
</method>
2019-02-10 20:01:03 +08:00
<method name= "get_meshes" qualifiers= "const" >
<return type= "Array" >
</return>
<description >
</description>
</method>
2018-12-15 08:39:02 +08:00
<method name= "is_root_shape" qualifiers= "const" >
<return type= "bool" >
</return>
<description >
2019-04-17 19:42:56 +08:00
Returns [code]true[/code] if this is a root shape and is thus the object that is rendered.
2018-12-15 08:39:02 +08:00
</description>
</method>
2018-10-13 07:58:58 +08:00
<method name= "set_collision_layer_bit" >
<return type= "void" >
</return>
<argument index= "0" name= "bit" type= "int" >
</argument>
<argument index= "1" name= "value" type= "bool" >
</argument>
<description >
Sets individual bits on the layer mask. Use this if you only need to change one layer's value.
</description>
</method>
<method name= "set_collision_mask_bit" >
<return type= "void" >
</return>
<argument index= "0" name= "bit" type= "int" >
</argument>
<argument index= "1" name= "value" type= "bool" >
</argument>
<description >
Sets individual bits on the collision mask. Use this if you only need to change one layer's value.
</description>
</method>
2018-05-12 15:38:00 +08:00
</methods>
<members >
2019-06-29 18:38:01 +08:00
<member name= "calculate_tangents" type= "bool" setter= "set_calculate_tangents" getter= "is_calculating_tangents" default= "true" >
2018-11-16 19:56:12 +08:00
Calculate tangents for the CSG shape which allows the use of normal maps. This is only applied on the root shape, this setting is ignored on any child.
</member>
2019-06-29 18:38:01 +08:00
<member name= "collision_layer" type= "int" setter= "set_collision_layer" getter= "get_collision_layer" default= "1" >
2018-10-13 07:58:58 +08:00
The physics layers this area is in.
Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property.
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.
</member>
2019-06-29 18:38:01 +08:00
<member name= "collision_mask" type= "int" setter= "set_collision_mask" getter= "get_collision_mask" default= "1" >
2018-10-13 07:58:58 +08:00
The physics layers this CSG shape scans for collisions.
</member>
2019-06-29 18:38:01 +08:00
<member name= "operation" type= "int" setter= "set_operation" getter= "get_operation" enum= "CSGShape.Operation" default= "0" >
2018-12-15 08:39:02 +08:00
The operation that is performed on this shape. This is ignored for the first CSG child node as the operation is between this node and the previous child of this nodes parent.
</member>
2019-06-29 18:38:01 +08:00
<member name= "snap" type= "float" setter= "set_snap" getter= "get_snap" default= "0.001" >
2018-12-15 08:39:02 +08:00
</member>
2019-06-29 18:38:01 +08:00
<member name= "use_collision" type= "bool" setter= "set_use_collision" getter= "is_using_collision" default= "false" >
2018-12-15 08:39:02 +08:00
Adds a collision shape to the physics engine for our CSG shape. This will always act like a static body. Note that the collision shape is still active even if the CSG shape itself is hidden.
</member>
2018-05-12 15:38:00 +08:00
</members>
<constants >
<constant name= "OPERATION_UNION" value= "0" enum= "Operation" >
2018-07-19 17:31:12 +08:00
Geometry of both primitives is merged, intersecting geometry is removed.
2018-05-12 15:38:00 +08:00
</constant>
<constant name= "OPERATION_INTERSECTION" value= "1" enum= "Operation" >
2018-07-19 17:31:12 +08:00
Only intersecting geometry remains, the rest is removed.
2018-05-12 15:38:00 +08:00
</constant>
<constant name= "OPERATION_SUBTRACTION" value= "2" enum= "Operation" >
2019-07-07 04:54:01 +08:00
The second shape is subtracted from the first, leaving a dent with its shape.
2018-05-12 15:38:00 +08:00
</constant>
</constants>
</class>