BoxMesh
继承: PrimitiveMesh
< Mesh
< Resource
< RefCounted
< Object
Generate an axis-aligned box PrimitiveMesh
.
描述
Generate an axis-aligned box PrimitiveMesh
.
The box's UV layout is arranged in a 3×2 layout that allows texturing each face individually. To apply the same texture on all faces, change the material's UV property to Vector3(3, 2, 1)
. This is equivalent to adding UV *= vec2(3.0, 2.0)
in a vertex shader.
Note: When using a large textured BoxMesh (e.g. as a floor), you may stumble upon UV jittering issues depending on the camera angle. To solve this, increase subdivide_depth
, subdivide_height
and subdivide_width
until you no longer notice UV jittering.
属性
属性说明
Vector3
size = Vector3(1, 1, 1)
The box's width, height and depth.
int
subdivide_depth = 0
Number of extra edge loops inserted along the Z axis.
int
subdivide_height = 0
Number of extra edge loops inserted along the Y axis.
int
subdivide_width = 0
Number of extra edge loops inserted along the X axis.
本方法通常需要用户覆盖才能生效。
本方法无副作用,不会修改该实例的任何成员变量。
本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。
本方法用于构造某个类型。
调用本方法无需实例,可直接使用类名进行调用。
本方法描述的是使用本类型作为左操作数的有效运算符。
这个值是由下列位标志构成位掩码的整数。
无返回值。