Blender V4.3
Subpatch Class Reference

#include <subpatch.h>

Classes

struct  edge_t

Public Member Functions

 Subpatch (Patch *patch=nullptr)
 Subpatch (Patch *patch, float2 c00, float2 c01, float2 c11, float2 c10)
int calc_num_inner_verts () const
int calc_num_triangles () const
int get_vert_along_edge (int e, int n) const
int get_vert_along_grid_edge (int edge, int n) const

Public Attributes

class Patchpatch
int inner_grid_vert_offset
union { 
   float2   corners [4] 
   struct { 
      float2   c00 
      float2   c01 
      float2   c11 
      float2   c10 
   } 
}; 
union { 
   edge_t   edges [4] 
   struct { 
      edge_t   edge_v0 
      edge_t   edge_u1 
      edge_t   edge_v1 
      edge_t   edge_u0 
   } 
}; 

Detailed Description

Definition at line 15 of file subpatch.h.

Constructor & Destructor Documentation

◆ Subpatch() [1/2]

Subpatch::Subpatch ( Patch * patch = nullptr)
inlineexplicit

Definition at line 57 of file subpatch.h.

References c00, c01, c10, c11, make_float2(), one_float2(), patch, and zero_float2().

◆ Subpatch() [2/2]

Subpatch::Subpatch ( Patch * patch,
float2 c00,
float2 c01,
float2 c11,
float2 c10 )
inline

Definition at line 66 of file subpatch.h.

References c00, c01, c10, c11, and patch.

Member Function Documentation

◆ calc_num_inner_verts()

int Subpatch::calc_num_inner_verts ( ) const
inline

Definition at line 71 of file subpatch.h.

References edge_u0, edge_u1, edge_v0, edge_v1, and max.

◆ calc_num_triangles()

int Subpatch::calc_num_triangles ( ) const
inline

Definition at line 80 of file subpatch.h.

References edge_u0, edge_u1, edge_v0, edge_v1, and max.

◆ get_vert_along_edge()

int Subpatch::get_vert_along_edge ( int e,
int n ) const
inline

Definition at line 200 of file subpatch.h.

References edges.

Referenced by QuadDice::set_side(), and EdgeDice::stitch_triangles().

◆ get_vert_along_grid_edge()

int Subpatch::get_vert_along_grid_edge ( int edge,
int n ) const
inline

Definition at line 96 of file subpatch.h.

References edge_u0, edge_u1, edge_v0, edge_v1, inner_grid_vert_offset, and max.

Referenced by EdgeDice::stitch_triangles().

Member Data Documentation

◆ [union]

union { ... } Subpatch

◆ [union]

union { ... } Subpatch

◆ c00

float2 Subpatch::c00

Definition at line 45 of file subpatch.h.

Referenced by QuadDice::map_uv(), DiagSplit::split_ngon(), Subpatch(), and Subpatch().

◆ c01

float2 Subpatch::c01

Definition at line 45 of file subpatch.h.

Referenced by QuadDice::map_uv(), DiagSplit::split_ngon(), Subpatch(), and Subpatch().

◆ c10

float2 Subpatch::c10

Definition at line 45 of file subpatch.h.

Referenced by QuadDice::map_uv(), DiagSplit::split_ngon(), Subpatch(), and Subpatch().

◆ c11

float2 Subpatch::c11

Definition at line 45 of file subpatch.h.

Referenced by QuadDice::map_uv(), DiagSplit::split_ngon(), Subpatch(), and Subpatch().

◆ corners

float2 Subpatch::corners[4]

Definition at line 43 of file subpatch.h.

◆ edge_u0

◆ edge_u1

◆ edge_v0

◆ edge_v1

◆ edges

edge_t Subpatch::edges[4]

Definition at line 51 of file subpatch.h.

Referenced by get_vert_along_edge(), QuadDice::set_side(), and EdgeDice::stitch_triangles().

◆ inner_grid_vert_offset

int Subpatch::inner_grid_vert_offset

Definition at line 18 of file subpatch.h.

Referenced by QuadDice::dice(), and get_vert_along_grid_edge().

◆ patch


The documentation for this class was generated from the following file: