CSGPolygon¶
Inherits: CSGPrimitive < CSGShape < GeometryInstance < VisualInstance < CullInstance < Spatial < Node < Object
Extrae una forma de polígono 2D para crear una malla 3D.
Descripción¶
An array of 2D points is extruded to quickly and easily create a variety of 3D meshes.
Propiedades¶
|
||
|
||
|
||
|
||
Enumeraciones¶
enum Mode:
MODE_DEPTH = 0 --- The polygon shape is extruded along the negative Z axis.
MODE_SPIN = 1 --- The polygon shape is extruded by rotating it around the Y axis.
MODE_PATH = 2 --- The polygon shape is extruded along the Path specified in path_node.
enum PathRotation:
PATH_ROTATION_POLYGON = 0 --- The polygon shape is not rotated.
Note: Requires the path's Z coordinates to continually decrease to ensure viable shapes.
PATH_ROTATION_PATH = 1 --- The polygon shape is rotated along the path, but it is not rotated around the path axis.
Note: Requires the path's Z coordinates to continually decrease to ensure viable shapes.
PATH_ROTATION_PATH_FOLLOW = 2 --- The polygon shape follows the path and its rotations around the path axis.
enum PathIntervalType:
PATH_INTERVAL_DISTANCE = 0 --- When mode is set to MODE_PATH, path_interval will determine the distance, in meters, each interval of the path will extrude.
PATH_INTERVAL_SUBDIVIDE = 1 --- When mode is set to MODE_PATH, path_interval will subdivide the polygons along the path.
Descripciones de Propiedades¶
float depth
Default |
|
Setter |
set_depth(value) |
Getter |
get_depth() |
When mode is MODE_DEPTH, the depth of the extrusion.
Material material
Setter |
set_material(value) |
Getter |
get_material() |
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 polygon), the bottom-left quarter to the front end face, and the bottom-right quarter to the back end face.
Mode mode
Default |
|
Setter |
set_mode(value) |
Getter |
get_mode() |
The mode used to extrude the polygon.
bool path_continuous_u
Setter |
set_path_continuous_u(value) |
Getter |
is_path_continuous_u() |
When mode is MODE_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.
float path_interval
Setter |
set_path_interval(value) |
Getter |
get_path_interval() |
When mode is MODE_PATH, the path interval or ratio of path points to extrusions.
PathIntervalType path_interval_type
Setter |
set_path_interval_type(value) |
Getter |
get_path_interval_type() |
When mode is MODE_PATH, this will determine if the interval should be by distance (PATH_INTERVAL_DISTANCE) or subdivision fractions (PATH_INTERVAL_SUBDIVIDE).
bool path_joined
Setter |
set_path_joined(value) |
Getter |
is_path_joined() |
When mode is MODE_PATH, if true
the ends of the path are joined, by adding an extrusion between the last and first points of the path.
bool path_local
Setter |
set_path_local(value) |
Getter |
is_path_local() |
When mode is MODE_PATH, if true
the Transform of the CSGPolygon
is used as the starting point for the extrusions, not the Transform of the path_node.
NodePath path_node
Setter |
set_path_node(value) |
Getter |
get_path_node() |
When mode is MODE_PATH, the location of the Path object used to extrude the polygon.
PathRotation path_rotation
Setter |
set_path_rotation(value) |
Getter |
get_path_rotation() |
When mode is MODE_PATH, the PathRotation method used to rotate the polygon as it is extruded.
float path_simplify_angle
Setter |
set_path_simplify_angle(value) |
Getter |
get_path_simplify_angle() |
When mode is MODE_PATH, extrusions that are less than this angle, will be merged together to reduce polygon count.
float path_u_distance
Setter |
set_path_u_distance(value) |
Getter |
get_path_u_distance() |
When mode is 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.
PoolVector2Array polygon
Default |
|
Setter |
set_polygon(value) |
Getter |
get_polygon() |
The point array that defines the 2D polygon that is extruded.
bool smooth_faces
Default |
|
Setter |
set_smooth_faces(value) |
Getter |
get_smooth_faces() |
If true
, applies smooth shading to the extrusions.
float spin_degrees
Setter |
set_spin_degrees(value) |
Getter |
get_spin_degrees() |
When mode is MODE_SPIN, the total number of degrees the polygon is rotated when extruding.
int spin_sides
Setter |
set_spin_sides(value) |
Getter |
get_spin_sides() |