2018-05-12 09:38:00 +02:00
<?xml version="1.0" encoding="UTF-8" ?>
2021-04-26 13:14:51 +02:00
<class name= "CSGPolygon" inherits= "CSGPrimitive" version= "3.4" >
2018-05-12 09:38:00 +02:00
<brief_description >
2018-07-19 11:31:12 +02:00
Extrudes a 2D polygon shape to create a 3D mesh.
2018-05-12 09:38:00 +02:00
</brief_description>
<description >
2021-05-30 19:35:52 +02:00
An array of 2D points is extruded to quickly and easily create a variety of 3D meshes.
2018-05-12 09:38:00 +02:00
</description>
<tutorials >
</tutorials>
<methods >
</methods>
<members >
2019-06-29 12:38:01 +02:00
<member name= "depth" type= "float" setter= "set_depth" getter= "get_depth" default= "1.0" >
2021-05-30 19:35:52 +02:00
When [member mode] is [constant MODE_DEPTH], the depth of the extrusion.
2018-05-12 09:38:00 +02:00
</member>
2019-07-15 20:42:47 +02:00
<member name= "material" type= "Material" setter= "set_material" getter= "get_material" >
2021-05-30 19:35:52 +02:00
Material to use for the resulting mesh. The UV maps the top half of the material to the extruded shape (U along the the length of the extrusions and V around the outline of the [member polygon]), the bottom-left quarter to the front end face, and the bottom-right quarter to the back end face.
2018-05-12 09:38:00 +02:00
</member>
2019-06-29 12:38:01 +02:00
<member name= "mode" type= "int" setter= "set_mode" getter= "get_mode" enum= "CSGPolygon.Mode" default= "0" >
2021-05-30 19:35:52 +02:00
The [member mode] used to extrude the [member polygon].
2018-05-12 09:38:00 +02:00
</member>
2019-06-29 21:22:15 +02:00
<member name= "path_continuous_u" type= "bool" setter= "set_path_continuous_u" getter= "is_path_continuous_u" >
2021-05-30 19:35:52 +02:00
When [member mode] is [constant MODE_PATH], by default, the top half of the [member material] is stretched along the entire length of the extruded shape. If [code]false[/code] the top half of the material is repeated every step of the extrusion.
2018-05-12 09:38:00 +02:00
</member>
2019-06-29 21:22:15 +02:00
<member name= "path_interval" type= "float" setter= "set_path_interval" getter= "get_path_interval" >
2021-05-30 19:35:52 +02:00
When [member mode] is [constant MODE_PATH], the path interval or ratio of path points to extrusions.
2018-05-12 09:38:00 +02:00
</member>
2021-09-07 07:09:11 +02:00
<member name= "path_interval_type" type= "int" setter= "set_path_interval_type" getter= "get_path_interval_type" enum= "CSGPolygon.PathIntervalType" >
When [member mode] is [constant MODE_PATH], this will determine if the interval should be by distance ([constant PATH_INTERVAL_DISTANCE]) or subdivision fractions ([constant PATH_INTERVAL_SUBDIVIDE]).
</member>
2019-06-29 21:22:15 +02:00
<member name= "path_joined" type= "bool" setter= "set_path_joined" getter= "is_path_joined" >
2021-05-30 19:35:52 +02:00
When [member mode] is [constant MODE_PATH], if [code]true[/code] the ends of the path are joined, by adding an extrusion between the last and first points of the path.
2018-07-03 13:21:36 +02:00
</member>
2019-06-29 21:22:15 +02:00
<member name= "path_local" type= "bool" setter= "set_path_local" getter= "is_path_local" >
2021-05-30 19:35:52 +02:00
When [member mode] is [constant MODE_PATH], if [code]true[/code] the [Transform] of the [CSGPolygon] is used as the starting point for the extrusions, not the [Transform] of the [member path_node].
2018-07-03 13:21:36 +02:00
</member>
2019-06-29 21:22:15 +02:00
<member name= "path_node" type= "NodePath" setter= "set_path_node" getter= "get_path_node" >
2021-05-30 19:35:52 +02:00
When [member mode] is [constant MODE_PATH], the location of the [Path] object used to extrude the [member polygon].
2018-07-03 13:21:36 +02:00
</member>
2019-06-29 21:22:15 +02:00
<member name= "path_rotation" type= "int" setter= "set_path_rotation" getter= "get_path_rotation" enum= "CSGPolygon.PathRotation" >
2021-05-30 19:35:52 +02:00
When [member mode] is [constant MODE_PATH], the [enum PathRotation] method used to rotate the [member polygon] as it is extruded.
2018-05-12 09:38:00 +02:00
</member>
2021-09-07 07:09:11 +02:00
<member name= "path_simplify_angle" type= "float" setter= "set_path_simplify_angle" getter= "get_path_simplify_angle" >
When [member mode] is [constant MODE_PATH], extrusions that are less than this angle, will be merged together to reduce polygon count.
</member>
<member name= "path_u_distance" type= "float" setter= "set_path_u_distance" getter= "get_path_u_distance" >
When [member mode] is [constant MODE_PATH], this is the distance along the path, in meters, the texture coordinates will tile. When set to 0, texture coordinates will match geometry exactly with no tiling.
</member>
2019-06-29 12:38:01 +02:00
<member name= "polygon" type= "PoolVector2Array" setter= "set_polygon" getter= "get_polygon" default= "PoolVector2Array( 0, 0, 0, 1, 1, 1, 1, 0 )" >
2021-05-30 19:35:52 +02:00
The point array that defines the 2D polygon that is extruded.
2018-05-12 09:38:00 +02:00
</member>
2019-06-29 12:38:01 +02:00
<member name= "smooth_faces" type= "bool" setter= "set_smooth_faces" getter= "get_smooth_faces" default= "false" >
2021-05-30 19:35:52 +02:00
If [code]true[/code], applies smooth shading to the extrusions.
2018-05-12 09:38:00 +02:00
</member>
2019-06-29 21:22:15 +02:00
<member name= "spin_degrees" type= "float" setter= "set_spin_degrees" getter= "get_spin_degrees" >
2021-05-30 19:35:52 +02:00
When [member mode] is [constant MODE_SPIN], the total number of degrees the [member polygon] is rotated when extruding.
2018-05-12 09:38:00 +02:00
</member>
2019-06-29 21:22:15 +02:00
<member name= "spin_sides" type= "int" setter= "set_spin_sides" getter= "get_spin_sides" >
2021-05-30 19:35:52 +02:00
When [member mode] is [constant MODE_SPIN], the number of extrusions made.
2018-05-12 09:38:00 +02:00
</member>
</members>
<constants >
<constant name= "MODE_DEPTH" value= "0" enum= "Mode" >
2021-05-30 19:35:52 +02:00
The [member polygon] shape is extruded along the negative Z axis.
2018-05-12 09:38:00 +02:00
</constant>
<constant name= "MODE_SPIN" value= "1" enum= "Mode" >
2021-05-30 19:35:52 +02:00
The [member polygon] shape is extruded by rotating it around the Y axis.
2018-05-12 09:38:00 +02:00
</constant>
<constant name= "MODE_PATH" value= "2" enum= "Mode" >
2021-05-30 19:35:52 +02:00
The [member polygon] shape is extruded along the [Path] specified in [member path_node].
2018-05-12 09:38:00 +02:00
</constant>
<constant name= "PATH_ROTATION_POLYGON" value= "0" enum= "PathRotation" >
2021-05-30 19:35:52 +02:00
The [member polygon] shape is not rotated.
[b]Note:[/b] Requires the path's Z coordinates to continually decrease to ensure viable shapes.
2018-05-12 09:38:00 +02:00
</constant>
<constant name= "PATH_ROTATION_PATH" value= "1" enum= "PathRotation" >
2021-05-30 19:35:52 +02:00
The [member polygon] shape is rotated along the path, but it is not rotated around the path axis.
[b]Note:[/b] Requires the path's Z coordinates to continually decrease to ensure viable shapes.
2018-05-12 09:38:00 +02:00
</constant>
<constant name= "PATH_ROTATION_PATH_FOLLOW" value= "2" enum= "PathRotation" >
2021-05-30 19:35:52 +02:00
The [member polygon] shape follows the path and its rotations around the path axis.
2018-05-12 09:38:00 +02:00
</constant>
2021-09-07 07:09:11 +02:00
<constant name= "PATH_INTERVAL_DISTANCE" value= "0" enum= "PathIntervalType" >
When [member mode] is set to [constant MODE_PATH], [member path_interval] will determine the distance, in meters, each interval of the path will extrude.
</constant>
<constant name= "PATH_INTERVAL_SUBDIVIDE" value= "1" enum= "PathIntervalType" >
When [member mode] is set to [constant MODE_PATH], [member path_interval] will subdivide the polygons along the path.
</constant>
2018-05-12 09:38:00 +02:00
</constants>
</class>