Class CsgPolygon3D
- Namespace
- Godot
- Assembly
- GodotSharp.dll
An array of 2D points is extruded to quickly and easily create a variety of 3D meshes. See also CsgMesh3D for using 3D meshes as CSG nodes.
Note: CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a MeshInstance3D with a PrimitiveMesh. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay.
[GodotClassName("CSGPolygon3D")]
public class CsgPolygon3D : CsgPrimitive3D, IDisposable
- Inheritance
-
CsgPolygon3D
- Implements
- Inherited Members
Constructors
CsgPolygon3D()
public CsgPolygon3D()
Properties
Depth
public float Depth { get; set; }
Property Value
Material
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 Polygon), the bottom-left quarter to the front end face, and the bottom-right quarter to the back end face.
public Material Material { get; set; }
Property Value
Mode
public CsgPolygon3D.ModeEnum Mode { get; set; }
Property Value
PathContinuousU
When Mode is Path, by default, the top half of the Material is stretched along the entire length of the extruded shape. If false the top half of the material is repeated every step of the extrusion.
public bool PathContinuousU { get; set; }
Property Value
PathInterval
public float PathInterval { get; set; }
Property Value
PathIntervalType
When Mode is Path, this will determine if the interval should be by distance (Distance) or subdivision fractions (Subdivide).
public CsgPolygon3D.PathIntervalTypeEnum PathIntervalType { get; set; }
Property Value
PathJoined
When Mode is Path, if true the ends of the path are joined, by adding an extrusion between the last and first points of the path.
public bool PathJoined { get; set; }
Property Value
PathLocal
When Mode is Path, if true the Transform3D of the CsgPolygon3D is used as the starting point for the extrusions, not the Transform3D of the PathNode.
public bool PathLocal { get; set; }
Property Value
PathNode
public NodePath PathNode { get; set; }
Property Value
PathRotation
public CsgPolygon3D.PathRotationEnum PathRotation { get; set; }
Property Value
PathSimplifyAngle
When Mode is Path, extrusions that are less than this angle, will be merged together to reduce polygon count.
public float PathSimplifyAngle { get; set; }
Property Value
PathUDistance
When Mode is 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.
public float PathUDistance { get; set; }
Property Value
Polygon
The point array that defines the 2D polygon that is extruded. This can be a convex or concave polygon with 3 or more points. The polygon must not have any intersecting edges. Otherwise, triangulation will fail and no mesh will be generated.
Note: If only 1 or 2 points are defined in Polygon, no mesh will be generated.
public Vector2[] Polygon { get; set; }
Property Value
- Vector2[]
SmoothFaces
If true, applies smooth shading to the extrusions.
public bool SmoothFaces { get; set; }
Property Value
SpinDegrees
public float SpinDegrees { get; set; }
Property Value
SpinSides
public int SpinSides { get; set; }
Property Value
Methods
HasGodotClassMethod(in godot_string_name)
Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.
protected override bool HasGodotClassMethod(in godot_string_name method)
Parameters
method
godot_string_nameName of the method to check for.
Returns
HasGodotClassSignal(in godot_string_name)
Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.
protected override bool HasGodotClassSignal(in godot_string_name signal)
Parameters
signal
godot_string_nameName of the signal to check for.
Returns
InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)
Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.
protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)
Parameters
method
godot_string_nameName of the method to invoke.
args
NativeVariantPtrArgsArguments to use with the invoked method.
ret
godot_variantValue returned by the invoked method.