Blender V5.0
EdgeDice Class Reference

#include <dice.h>

Public Member Functions

 EdgeDice (const SubdParams &params, const int num_verts, const int num_triangles, SubdAttributeInterpolation &interpolation)
void dice (const DiagSplit &split)

Public Attributes

SubdParams params
SubdAttributeInterpolationinterpolation
int * mesh_triangles = nullptr
int * mesh_shader = nullptr
bool * mesh_smooth = nullptr
float3mesh_P = nullptr
float3mesh_N = nullptr
floatmesh_ptex_face_id = nullptr
float2mesh_ptex_uv = nullptr

Protected Member Functions

void tri_dice (const SubPatch &sub)
void quad_dice (const SubPatch &sub)
void set_vertex (const SubPatch &sub, const int index, const float2 uv)
void set_triangle (const SubPatch &sub, const int triangle_index, const int v0, const int v1, const int v2, const float2 uv0, const float2 uv1, const float2 uv2)
void add_grid_triangles_and_stitch (const SubPatch &sub, const int Mu, const int Mv)
void add_triangle_strip (const SubPatch &sub, const int left_edge, const int right_edge)
float3 eval_projected (const SubPatch &sub, const float2 uv)
void tri_set_sides (const SubPatch &sub)
void quad_set_sides (const SubPatch &sub)
float quad_area (const float3 &a, const float3 &b, const float3 &c, const float3 &d)
float scale_factor (const SubPatch &sub, const int Mu, const int Mv)

Detailed Description

Definition at line 39 of file dice.h.

Constructor & Destructor Documentation

◆ EdgeDice()

CCL_NAMESPACE_BEGIN EdgeDice::EdgeDice ( const SubdParams & params,
const int num_verts,
const int num_triangles,
SubdAttributeInterpolation & interpolation )
explicit

Member Function Documentation

◆ add_grid_triangles_and_stitch()

void EdgeDice::add_grid_triangles_and_stitch ( const SubPatch & sub,
const int Mu,
const int Mv )
protected

◆ add_triangle_strip()

void EdgeDice::add_triangle_strip ( const SubPatch & sub,
const int left_edge,
const int right_edge )
protected

◆ dice()

void EdgeDice::dice ( const DiagSplit & split)

◆ eval_projected()

float3 EdgeDice::eval_projected ( const SubPatch & sub,
const float2 uv )
protected

Definition at line 47 of file dice.cpp.

References Patch::eval(), P, params, SubPatch::patch, transform_perspective(), float2::x, and float2::y.

Referenced by scale_factor().

◆ quad_area()

float EdgeDice::quad_area ( const float3 & a,
const float3 & b,
const float3 & c,
const float3 & d )
protected

Definition at line 59 of file dice.cpp.

References b, and triangle_area().

Referenced by scale_factor().

◆ quad_dice()

void EdgeDice::quad_dice ( const SubPatch & sub)
protected

◆ quad_set_sides()

void EdgeDice::quad_set_sides ( const SubPatch & sub)
protected

◆ scale_factor()

float EdgeDice::scale_factor ( const SubPatch & sub,
const int Mu,
const int Mv )
protected

◆ set_triangle()

void EdgeDice::set_triangle ( const SubPatch & sub,
const int triangle_index,
const int v0,
const int v1,
const int v2,
const float2 uv0,
const float2 uv1,
const float2 uv2 )
protected

◆ set_vertex()

void EdgeDice::set_vertex ( const SubPatch & sub,
const int index,
const float2 uv )
protected

◆ tri_dice()

◆ tri_set_sides()

void EdgeDice::tri_set_sides ( const SubPatch & sub)
protected

Member Data Documentation

◆ interpolation

SubdAttributeInterpolation& EdgeDice::interpolation

Definition at line 42 of file dice.h.

Referenced by EdgeDice(), set_triangle(), and set_vertex().

◆ mesh_N

float3* EdgeDice::mesh_N = nullptr

Definition at line 47 of file dice.h.

Referenced by EdgeDice(), and set_vertex().

◆ mesh_P

float3* EdgeDice::mesh_P = nullptr

◆ mesh_ptex_face_id

float* EdgeDice::mesh_ptex_face_id = nullptr

Definition at line 48 of file dice.h.

Referenced by set_triangle().

◆ mesh_ptex_uv

float2* EdgeDice::mesh_ptex_uv = nullptr

Definition at line 49 of file dice.h.

Referenced by set_triangle().

◆ mesh_shader

int* EdgeDice::mesh_shader = nullptr

Definition at line 44 of file dice.h.

Referenced by EdgeDice(), and set_triangle().

◆ mesh_smooth

bool* EdgeDice::mesh_smooth = nullptr

Definition at line 45 of file dice.h.

Referenced by EdgeDice(), and set_triangle().

◆ mesh_triangles

int* EdgeDice::mesh_triangles = nullptr

Definition at line 43 of file dice.h.

Referenced by EdgeDice(), and set_triangle().

◆ params

SubdParams EdgeDice::params

Definition at line 41 of file dice.h.

Referenced by EdgeDice(), eval_projected(), scale_factor(), and set_triangle().


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