-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CSG shape resources. Add CSGTool for CSG operations. Make CSG nodes using CSG resources and CSGTool.
- Loading branch information
Showing
29 changed files
with
2,540 additions
and
1,618 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<class name="CSGTool" inherits="RefCounted" version="4.0"> | ||
<brief_description> | ||
</brief_description> | ||
<description> | ||
</description> | ||
<tutorials> | ||
</tutorials> | ||
<methods> | ||
<method name="add_primitive"> | ||
<return type="void" /> | ||
<argument index="0" name="primitive" type="CSGPrimitiveShape3D" /> | ||
<argument index="1" name="operation" type="int" enum="CSGTool.Operation" default="0" /> | ||
<argument index="2" name="xform" type="Transform3D" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)" /> | ||
<argument index="3" name="vertex_snap" type="float" default="0.001" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="commit"> | ||
<return type="ArrayMesh" /> | ||
<argument index="0" name="existing" type="ArrayMesh" default="null" /> | ||
<argument index="1" name="generate_tangents" type="bool" default="false" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="create_trimesh_shape" qualifiers="const"> | ||
<return type="ConcavePolygonShape3D" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="get_aabb" qualifiers="const"> | ||
<return type="AABB" /> | ||
<description> | ||
</description> | ||
</method> | ||
</methods> | ||
<constants> | ||
<constant name="OPERATION_UNION" value="0" enum="Operation"> | ||
Geometry of both primitives is merged, intersecting geometry is removed. | ||
</constant> | ||
<constant name="OPERATION_INTERSECTION" value="1" enum="Operation"> | ||
Only intersecting geometry remains, the rest is removed. | ||
</constant> | ||
<constant name="OPERATION_SUBTRACTION" value="2" enum="Operation"> | ||
The second shape is subtracted from the first, leaving a dent with its shape. | ||
</constant> | ||
</constants> | ||
</class> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.