Differential D10763 Diff 35353 source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc
| Show First 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | |||||
| static Mesh *create_uv_sphere_mesh_bmesh(const float3 location, | static Mesh *create_uv_sphere_mesh_bmesh(const float3 location, | ||||
| const float3 rotation, | const float3 rotation, | ||||
| const float radius, | const float radius, | ||||
| const int segments, | const int segments, | ||||
| const int rings) | const int rings) | ||||
| { | { | ||||
| float4x4 transform; | float4x4 transform; | ||||
| loc_eul_size_to_mat4(transform.values, location, rotation, float3(radius)); | loc_eul_size_to_mat4(transform.values, location, rotation, float3(1.0f)); | ||||
| const BMeshCreateParams bmcp = {true}; | const BMeshCreateParams bmcp = {true}; | ||||
| const BMAllocTemplate allocsize = {sphere_vert_total(segments, rings), | const BMAllocTemplate allocsize = {sphere_vert_total(segments, rings), | ||||
| sphere_edge_total(segments, rings), | sphere_edge_total(segments, rings), | ||||
| sphere_corner_total(segments, rings), | sphere_corner_total(segments, rings), | ||||
| sphere_face_total(segments, rings)}; | sphere_face_total(segments, rings)}; | ||||
| BMesh *bm = BM_mesh_create(&allocsize, &bmcp); | BMesh *bm = BM_mesh_create(&allocsize, &bmcp); | ||||
| ▲ Show 20 Lines • Show All 46 Lines • Show Last 20 Lines | |||||