Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc
| Show All 34 Lines | static bNodeSocketTemplate geo_node_mesh_primitive_cube_out[] = { | ||||
| {-1, ""}, | {-1, ""}, | ||||
| }; | }; | ||||
| namespace blender::nodes { | namespace blender::nodes { | ||||
| static Mesh *create_cube_mesh(const float3 location, const float3 rotation, const float size) | static Mesh *create_cube_mesh(const float3 location, const float3 rotation, const float size) | ||||
| { | { | ||||
| float4x4 transform; | float4x4 transform; | ||||
| loc_eul_size_to_mat4(transform.values, location, rotation, float3(size)); | loc_eul_size_to_mat4(transform.values, location, rotation, float3(1.0f)); | ||||
| const BMeshCreateParams bmcp = {true}; | const BMeshCreateParams bmcp = {true}; | ||||
| const BMAllocTemplate allocsize = {8, 12, 24, 6}; | const BMAllocTemplate allocsize = {8, 12, 24, 6}; | ||||
| BMesh *bm = BM_mesh_create(&allocsize, &bmcp); | BMesh *bm = BM_mesh_create(&allocsize, &bmcp); | ||||
| BMO_op_callf(bm, | BMO_op_callf(bm, | ||||
| BMO_FLAG_DEFAULTS, | BMO_FLAG_DEFAULTS, | ||||
| "create_cube matrix=%m4 size=%f calc_uvs=%b", | "create_cube matrix=%m4 size=%f calc_uvs=%b", | ||||
| Show All 33 Lines | |||||