CSGPolygon3D.xml 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. This node takes a 2D polygon shape and extrudes it to create a 3D mesh.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <methods>
  12. </methods>
  13. <members>
  14. <member name="depth" type="float" setter="set_depth" getter="get_depth" default="1.0">
  15. Extrusion depth when [member mode] is [constant MODE_DEPTH].
  16. </member>
  17. <member name="material" type="Material" setter="set_material" getter="get_material">
  18. Material to use for the resulting mesh.
  19. </member>
  20. <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="CSGPolygon3D.Mode" default="0">
  21. Extrusion mode.
  22. </member>
  23. <member name="path_continuous_u" type="bool" setter="set_path_continuous_u" getter="is_path_continuous_u">
  24. If [code]true[/code] the u component of our uv will continuously increase in unison with the distance traveled along our path when [member mode] is [constant MODE_PATH].
  25. </member>
  26. <member name="path_interval" type="float" setter="set_path_interval" getter="get_path_interval">
  27. Interval at which a new extrusion slice is added along the path when [member mode] is [constant MODE_PATH].
  28. </member>
  29. <member name="path_joined" type="bool" setter="set_path_joined" getter="is_path_joined">
  30. If [code]true[/code] the start and end of our path are joined together ensuring there is no seam when [member mode] is [constant MODE_PATH].
  31. </member>
  32. <member name="path_local" type="bool" setter="set_path_local" getter="is_path_local">
  33. If [code]false[/code] we extrude centered on our path, if [code]true[/code] we extrude in relation to the position of our CSGPolygon3D when [member mode] is [constant MODE_PATH].
  34. </member>
  35. <member name="path_node" type="NodePath" setter="set_path_node" getter="get_path_node">
  36. The [Shape3D] object containing the path along which we extrude when [member mode] is [constant MODE_PATH].
  37. </member>
  38. <member name="path_rotation" type="int" setter="set_path_rotation" getter="get_path_rotation" enum="CSGPolygon3D.PathRotation">
  39. The method by which each slice is rotated along the path when [member mode] is [constant MODE_PATH].
  40. </member>
  41. <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( 0, 0, 0, 1, 1, 1, 1, 0 )">
  42. Point array that defines the shape that we'll extrude.
  43. </member>
  44. <member name="smooth_faces" type="bool" setter="set_smooth_faces" getter="get_smooth_faces" default="false">
  45. Generates smooth normals so smooth shading is applied to our mesh.
  46. </member>
  47. <member name="spin_degrees" type="float" setter="set_spin_degrees" getter="get_spin_degrees">
  48. Degrees to rotate our extrusion for each slice when [member mode] is [constant MODE_SPIN].
  49. </member>
  50. <member name="spin_sides" type="int" setter="set_spin_sides" getter="get_spin_sides">
  51. Number of extrusion when [member mode] is [constant MODE_SPIN].
  52. </member>
  53. </members>
  54. <constants>
  55. <constant name="MODE_DEPTH" value="0" enum="Mode">
  56. Shape3D is extruded to [member depth].
  57. </constant>
  58. <constant name="MODE_SPIN" value="1" enum="Mode">
  59. Shape3D is extruded by rotating it around an axis.
  60. </constant>
  61. <constant name="MODE_PATH" value="2" enum="Mode">
  62. Shape3D is extruded along a path set by a [Shape3D] set in [member path_node].
  63. </constant>
  64. <constant name="PATH_ROTATION_POLYGON" value="0" enum="PathRotation">
  65. Slice is not rotated.
  66. </constant>
  67. <constant name="PATH_ROTATION_PATH" value="1" enum="PathRotation">
  68. Slice is rotated around the up vector of the path.
  69. </constant>
  70. <constant name="PATH_ROTATION_PATH_FOLLOW" value="2" enum="PathRotation">
  71. Slice is rotate to match the path exactly.
  72. </constant>
  73. </constants>
  74. </class>