CSGMesh3D
继承: CSGPrimitive3D
< CSGShape3D
< GeometryInstance3D
< VisualInstance3D
< Node3D
< Node
< Object
A CSG Mesh shape that uses a mesh resource.
描述
This CSG node allows you to use any mesh resource as a CSG shape, provided it is closed, does not self-intersect, does not contain internal faces and has no edges that connect to more than two faces. See also CSGPolygon3D
for drawing 2D extruded polygons to be used 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.
属性
属性说明
Material
material
The Material
used in drawing the CSG shape.
Mesh
mesh
The Mesh
resource to use as a CSG shape.
Note: When using an ArrayMesh
, all vertex attributes except Mesh.ARRAY_VERTEX
, Mesh.ARRAY_NORMAL
and Mesh.ARRAY_TEX_UV
are left unused. Only Mesh.ARRAY_VERTEX
and Mesh.ARRAY_TEX_UV
will be passed to the GPU.
Mesh.ARRAY_NORMAL
is only used to determine which faces require the use of flat shading. By default, CSGMesh will ignore the mesh's vertex normals, recalculate them for each vertex and use a smooth shader. If a flat shader is required for a face, ensure that all vertex normals of the face are approximately equal.
本方法通常需要用户覆盖才能生效。
本方法无副作用,不会修改该实例的任何成员变量。
本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。
本方法用于构造某个类型。
调用本方法无需实例,可直接使用类名进行调用。
本方法描述的是使用本类型作为左操作数的有效运算符。
这个值是由下列位标志构成位掩码的整数。
无返回值。