Blender  V3.3
Functions
blender::nodes::node_geo_mesh_primitive_uv_sphere_cc Namespace Reference

Functions

static void node_declare (NodeDeclarationBuilder &b)
 
static int sphere_vert_total (const int segments, const int rings)
 
static int sphere_edge_total (const int segments, const int rings)
 
static int sphere_corner_total (const int segments, const int rings)
 
static int sphere_face_total (const int segments, const int rings)
 
static BLI_NOINLINE void calculate_sphere_vertex_data (MutableSpan< MVert > verts, MutableSpan< float3 > vert_normals, const float radius, const int segments, const int rings)
 
static BLI_NOINLINE void calculate_sphere_edge_indices (MutableSpan< MEdge > edges, const int segments, const int rings)
 
static BLI_NOINLINE void calculate_sphere_faces (MutableSpan< MPoly > polys, const int segments)
 
static BLI_NOINLINE void calculate_sphere_corners (MutableSpan< MLoop > loops, const int segments, const int rings)
 
static BLI_NOINLINE void calculate_sphere_uvs (Mesh *mesh, const float segments, const float rings)
 
static Meshcreate_uv_sphere_mesh (const float radius, const int segments, const int rings)
 
static void node_geo_exec (GeoNodeExecParams params)
 

Function Documentation

◆ calculate_sphere_corners()

static BLI_NOINLINE void blender::nodes::node_geo_mesh_primitive_uv_sphere_cc::calculate_sphere_corners ( MutableSpan< MLoop loops,
const int  segments,
const int  rings 
)
static

Definition at line 183 of file node_geo_mesh_primitive_uv_sphere.cc.

References MLoop::e, sphere_vert_total(), and MLoop::v.

Referenced by create_uv_sphere_mesh().

◆ calculate_sphere_edge_indices()

static BLI_NOINLINE void blender::nodes::node_geo_mesh_primitive_uv_sphere_cc::calculate_sphere_edge_indices ( MutableSpan< MEdge edges,
const int  segments,
const int  rings 
)
static

◆ calculate_sphere_faces()

static BLI_NOINLINE void blender::nodes::node_geo_mesh_primitive_uv_sphere_cc::calculate_sphere_faces ( MutableSpan< MPoly polys,
const int  segments 
)
static

◆ calculate_sphere_uvs()

static BLI_NOINLINE void blender::nodes::node_geo_mesh_primitive_uv_sphere_cc::calculate_sphere_uvs ( Mesh mesh,
const float  segments,
const float  rings 
)
static

◆ calculate_sphere_vertex_data()

static BLI_NOINLINE void blender::nodes::node_geo_mesh_primitive_uv_sphere_cc::calculate_sphere_vertex_data ( MutableSpan< MVert verts,
MutableSpan< float3 vert_normals,
const float  radius,
const int  segments,
const int  rings 
)
static

Also calculate vertex normals here, since the calculation is trivial, and it allows avoiding the calculation later, if it's necessary. The vertex normals are just the normalized positions.

Definition at line 66 of file node_geo_mesh_primitive_uv_sphere.cc.

References copy_v3_v3(), KDL::cos(), delta_phi(), blender::MutableSpan< T >::first(), blender::MutableSpan< T >::last(), M_PI, KDL::sin(), verts, x, y, and z.

Referenced by create_uv_sphere_mesh().

◆ create_uv_sphere_mesh()

static Mesh* blender::nodes::node_geo_mesh_primitive_uv_sphere_cc::create_uv_sphere_mesh ( const float  radius,
const int  segments,
const int  rings 
)
static

◆ node_declare()

static void blender::nodes::node_geo_mesh_primitive_uv_sphere_cc::node_declare ( NodeDeclarationBuilder b)
static

◆ node_geo_exec()

static void blender::nodes::node_geo_mesh_primitive_uv_sphere_cc::node_geo_exec ( GeoNodeExecParams  params)
static

◆ sphere_corner_total()

static int blender::nodes::node_geo_mesh_primitive_uv_sphere_cc::sphere_corner_total ( const int  segments,
const int  rings 
)
static

Definition at line 48 of file node_geo_mesh_primitive_uv_sphere.cc.

Referenced by create_uv_sphere_mesh().

◆ sphere_edge_total()

static int blender::nodes::node_geo_mesh_primitive_uv_sphere_cc::sphere_edge_total ( const int  segments,
const int  rings 
)
static

Definition at line 43 of file node_geo_mesh_primitive_uv_sphere.cc.

Referenced by create_uv_sphere_mesh().

◆ sphere_face_total()

static int blender::nodes::node_geo_mesh_primitive_uv_sphere_cc::sphere_face_total ( const int  segments,
const int  rings 
)
static

Definition at line 55 of file node_geo_mesh_primitive_uv_sphere.cc.

Referenced by create_uv_sphere_mesh().

◆ sphere_vert_total()

static int blender::nodes::node_geo_mesh_primitive_uv_sphere_cc::sphere_vert_total ( const int  segments,
const int  rings 
)
static