2
0

CSGPolygon3D.xml 6.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="CSGPolygon3D" inherits="CSGPrimitive3D" version="4.0">
  3. <brief_description>
  4. Extrudes a 2D polygon shape to create a 3D mesh.
  5. </brief_description>
  6. <description>
  7. An array of 2D points is extruded to quickly and easily create a variety of 3D meshes.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <members>
  12. <member name="depth" type="float" setter="set_depth" getter="get_depth" default="1.0">
  13. When [member mode] is [constant MODE_DEPTH], the depth of the extrusion.
  14. </member>
  15. <member name="material" type="Material" setter="set_material" getter="get_material">
  16. Material to use for the resulting mesh. The UV maps the top half of the material to the extruded shape (U along 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.
  17. </member>
  18. <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="CSGPolygon3D.Mode" default="0">
  19. The [member mode] used to extrude the [member polygon].
  20. </member>
  21. <member name="path_continuous_u" type="bool" setter="set_path_continuous_u" getter="is_path_continuous_u">
  22. 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.
  23. </member>
  24. <member name="path_interval" type="float" setter="set_path_interval" getter="get_path_interval">
  25. When [member mode] is [constant MODE_PATH], the path interval or ratio of path points to extrusions.
  26. </member>
  27. <member name="path_interval_type" type="int" setter="set_path_interval_type" getter="get_path_interval_type" enum="CSGPolygon3D.PathIntervalType">
  28. 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]).
  29. </member>
  30. <member name="path_joined" type="bool" setter="set_path_joined" getter="is_path_joined">
  31. 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.
  32. </member>
  33. <member name="path_local" type="bool" setter="set_path_local" getter="is_path_local">
  34. When [member mode] is [constant MODE_PATH], if [code]true[/code] the [Transform3D] of the [CSGPolygon3D] is used as the starting point for the extrusions, not the [Transform3D] of the [member path_node].
  35. </member>
  36. <member name="path_node" type="NodePath" setter="set_path_node" getter="get_path_node">
  37. When [member mode] is [constant MODE_PATH], the location of the [Path3D] object used to extrude the [member polygon].
  38. </member>
  39. <member name="path_rotation" type="int" setter="set_path_rotation" getter="get_path_rotation" enum="CSGPolygon3D.PathRotation">
  40. When [member mode] is [constant MODE_PATH], the [enum PathRotation] method used to rotate the [member polygon] as it is extruded.
  41. </member>
  42. <member name="path_simplify_angle" type="float" setter="set_path_simplify_angle" getter="get_path_simplify_angle">
  43. When [member mode] is [constant MODE_PATH], extrusions that are less than this angle, will be merged together to reduce polygon count.
  44. </member>
  45. <member name="path_u_distance" type="float" setter="set_path_u_distance" getter="get_path_u_distance">
  46. 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.
  47. </member>
  48. <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array(0, 0, 0, 1, 1, 1, 1, 0)">
  49. The point array that defines the 2D polygon that is extruded.
  50. </member>
  51. <member name="smooth_faces" type="bool" setter="set_smooth_faces" getter="get_smooth_faces" default="false">
  52. If [code]true[/code], applies smooth shading to the extrusions.
  53. </member>
  54. <member name="spin_degrees" type="float" setter="set_spin_degrees" getter="get_spin_degrees">
  55. When [member mode] is [constant MODE_SPIN], the total number of degrees the [member polygon] is rotated when extruding.
  56. </member>
  57. <member name="spin_sides" type="int" setter="set_spin_sides" getter="get_spin_sides">
  58. When [member mode] is [constant MODE_SPIN], the number of extrusions made.
  59. </member>
  60. </members>
  61. <constants>
  62. <constant name="MODE_DEPTH" value="0" enum="Mode">
  63. The [member polygon] shape is extruded along the negative Z axis.
  64. </constant>
  65. <constant name="MODE_SPIN" value="1" enum="Mode">
  66. The [member polygon] shape is extruded by rotating it around the Y axis.
  67. </constant>
  68. <constant name="MODE_PATH" value="2" enum="Mode">
  69. The [member polygon] shape is extruded along the [Path3D] specified in [member path_node].
  70. </constant>
  71. <constant name="PATH_ROTATION_POLYGON" value="0" enum="PathRotation">
  72. The [member polygon] shape is not rotated.
  73. [b]Note:[/b] Requires the path Z coordinates to continually decrease to ensure viable shapes.
  74. </constant>
  75. <constant name="PATH_ROTATION_PATH" value="1" enum="PathRotation">
  76. The [member polygon] shape is rotated along the path, but it is not rotated around the path axis.
  77. [b]Note:[/b] Requires the path Z coordinates to continually decrease to ensure viable shapes.
  78. </constant>
  79. <constant name="PATH_ROTATION_PATH_FOLLOW" value="2" enum="PathRotation">
  80. The [member polygon] shape follows the path and its rotations around the path axis.
  81. </constant>
  82. <constant name="PATH_INTERVAL_DISTANCE" value="0" enum="PathIntervalType">
  83. 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.
  84. </constant>
  85. <constant name="PATH_INTERVAL_SUBDIVIDE" value="1" enum="PathIntervalType">
  86. When [member mode] is set to [constant MODE_PATH], [member path_interval] will subdivide the polygons along the path.
  87. </constant>
  88. </constants>
  89. </class>