Blender V5.3
blender::geometry::geom Namespace Reference

Functions

static int edge_other_vert (const ExtendableMesh &emesh, int e, int v)
static float3 slide_dist (const ExtendableMesh &emesh, int e, int v, float d)
static bool is_outside_edge (const ExtendableMesh &emesh, EdgeHalf *eh, const float co[3], int *ret_closer_v)
static bool point_between_edges (const ExtendableMesh &emesh, const float co[3], int v, int f, EdgeHalf *e1, EdgeHalf *e2)
static float3 offset_meet (const ExtendableMesh &emesh, EdgeHalf *e1, EdgeHalf *e2, int v, int f, bool edges_between, const EdgeHalf *e_in_plane)
VMesh grid helpers
static NewVert * mesh_vert (VMesh *vm, int i, int j, int k)
static NewVert * mesh_vert_canon (VMesh *vm, int i, int j, int k)
static bool is_canon (const VMesh *vm, int i, int j, int k)
static void vmesh_copy_equiv_verts (VMesh *vm)
static float3 vmesh_center (VMesh *vm)
static float3 avg4 (const NewVert *v0, const NewVert *v1, const NewVert *v2, const NewVert *v3)
Profile geometry helpers
static bool nearly_parallel (const float3 &d1, const float3 &d2)
static bool make_unit_square_map (const float3 &va, const float3 &vmid, const float3 &vb, float4x4 &r_mat)
static float sabin_gamma (int n)

Variables

constexpr float BEVEL_EPSILON_D = 1e-6f
constexpr float BEVEL_EPSILON_SQ = 1e-12f
constexpr float BEVEL_EPSILON_BIG = 1e-4f
constexpr float BEVEL_EPSILON_ANG = DEG2RADF(2.0f)
constexpr float BEVEL_SMALL_ANG = DEG2RADF(10.0f)
const float BEVEL_SMALL_ANG_DOT = (1.0f - std::cos(BEVEL_SMALL_ANG))
const float BEVEL_EPSILON_ANG_DOT = (1.0f - std::cos(BEVEL_EPSILON_ANG))

Function Documentation

◆ avg4()

float3 blender::geometry::geom::avg4 ( const NewVert * v0,
const NewVert * v1,
const NewVert * v2,
const NewVert * v3 )
static

◆ edge_other_vert()

◆ is_canon()

bool blender::geometry::geom::is_canon ( const VMesh * vm,
int i,
int j,
int k )
static

◆ is_outside_edge()

bool blender::geometry::geom::is_outside_edge ( const ExtendableMesh & emesh,
EdgeHalf * eh,
const float co[3],
int * ret_closer_v )
static

◆ make_unit_square_map()

bool blender::geometry::geom::make_unit_square_map ( const float3 & va,
const float3 & vmid,
const float3 & vb,
float4x4 & r_mat )
static

◆ mesh_vert()

NewVert * blender::geometry::geom::mesh_vert ( VMesh * vm,
int i,
int j,
int k )
static

◆ mesh_vert_canon()

NewVert * blender::geometry::geom::mesh_vert_canon ( VMesh * vm,
int i,
int j,
int k )
static

Return the canonical representative for vmesh position (i, j, k). Due to the rotational symmetry of the vmesh grid, many positions are equivalent; this function maps any (i, j, k) to the one canonical representative in the stored range.

Definition at line 1331 of file mesh_bevel.cc.

References blender::BLI_assert(), blender::geometry::VMesh::count, mesh_vert(), mesh_vert_canon(), and blender::geometry::VMesh::seg.

Referenced by blender::geometry::construct::cubic_subdiv(), blender::geometry::construct::interp_vmesh(), mesh_vert_canon(), and vmesh_copy_equiv_verts().

◆ nearly_parallel()

bool blender::geometry::geom::nearly_parallel ( const float3 & d1,
const float3 & d2 )
static

Returns true when d1 and d2 are parallel or anti-parallel.

Definition at line 1410 of file mesh_bevel.cc.

References blender::math::abs(), blender::math::angle_between(), BEVEL_EPSILON_ANG, float, M_PI, nearly_parallel(), and blender::math::normalize().

Referenced by nearly_parallel(), and blender::geometry::profile::set_profile_params().

◆ offset_meet()

◆ point_between_edges()

◆ sabin_gamma()

float blender::geometry::geom::sabin_gamma ( int n)
static

Returns the Sabin-modified Catmull-Clark gamma value for an n-sided corner. This controls the smoothness of the center vertex during subdivision.

Definition at line 1455 of file mesh_bevel.cc.

References cos, float, M_PI, M_SQRT3, pow, sabin_gamma(), blender::sqrt(), blender::x, and y.

Referenced by blender::geometry::construct::cubic_subdiv(), and sabin_gamma().

◆ slide_dist()

◆ vmesh_center()

◆ vmesh_copy_equiv_verts()

Variable Documentation

◆ BEVEL_EPSILON_ANG

float blender::geometry::geom::BEVEL_EPSILON_ANG = DEG2RADF(2.0f)
constexpr

◆ BEVEL_EPSILON_ANG_DOT

const float blender::geometry::geom::BEVEL_EPSILON_ANG_DOT = (1.0f - std::cos(BEVEL_EPSILON_ANG))

◆ BEVEL_EPSILON_BIG

◆ BEVEL_EPSILON_D

◆ BEVEL_EPSILON_SQ

float blender::geometry::geom::BEVEL_EPSILON_SQ = 1e-12f
constexpr

Definition at line 1061 of file mesh_bevel.cc.

Referenced by blender::geometry::construct::adj_vmesh().

◆ BEVEL_SMALL_ANG

float blender::geometry::geom::BEVEL_SMALL_ANG = DEG2RADF(10.0f)
constexpr

◆ BEVEL_SMALL_ANG_DOT

const float blender::geometry::geom::BEVEL_SMALL_ANG_DOT = (1.0f - std::cos(BEVEL_SMALL_ANG))

Definition at line 1065 of file mesh_bevel.cc.

Referenced by blender::geometry::construct::next_edgehalf_bev().