|
Blender
V2.93
|
#include <subd_dice.h>
Inherits EdgeDice.
Public Member Functions | |
| QuadDice (const SubdParams ¶ms) | |
| float3 | eval_projected (Subpatch &sub, float u, float v) |
| float2 | map_uv (Subpatch &sub, float u, float v) |
| void | set_vert (Subpatch &sub, int index, float u, float v) |
| void | add_grid (Subpatch &sub, int Mu, int Mv, int offset) |
| void | set_side (Subpatch &sub, int edge) |
| float | quad_area (const float3 &a, const float3 &b, const float3 &c, const float3 &d) |
| float | scale_factor (Subpatch &sub, int Mu, int Mv) |
| void | dice (Subpatch &sub) |
Public Member Functions inherited from EdgeDice | |
| EdgeDice (const SubdParams ¶ms) | |
| void | reserve (int num_verts, int num_triangles) |
| void | set_vert (Patch *patch, int index, float2 uv) |
| void | add_triangle (Patch *patch, int v0, int v1, int v2) |
| void | stitch_triangles (Subpatch &sub, int edge) |
Additional Inherited Members | |
Public Attributes inherited from EdgeDice | |
| SubdParams | params |
| float3 * | mesh_P |
| float3 * | mesh_N |
| size_t | vert_offset |
| size_t | tri_offset |
Definition at line 82 of file subd_dice.h.
|
explicit |
Definition at line 131 of file subd_dice.cpp.
| void QuadDice::add_grid | ( | Subpatch & | sub, |
| int | Mu, | ||
| int | Mv, | ||
| int | offset | ||
| ) |
Definition at line 227 of file subd_dice.cpp.
References EdgeDice::add_triangle(), float(), i1, Subpatch::patch, set_vert(), and v.
Referenced by dice().
| void QuadDice::dice | ( | Subpatch & | sub | ) |
Definition at line 253 of file subd_dice.cpp.
References add_grid(), ceilf, Subpatch::edge_u0, Subpatch::edge_u1, Subpatch::edge_v0, Subpatch::edge_v1, Subpatch::inner_grid_vert_offset, max, scale_factor(), set_side(), EdgeDice::stitch_triangles(), and Subpatch::edge_t::T.
Referenced by DiagSplit::post_split().
Definition at line 143 of file subd_dice.cpp.
References SubdParams::camera, Patch::eval(), map_uv(), NULL, P(), EdgeDice::params, Subpatch::patch, transform_perspective(), v, Camera::worldtoraster, float2::x, and float2::y.
Referenced by scale_factor().
Definition at line 135 of file subd_dice.cpp.
References Subpatch::c00, Subpatch::c01, Subpatch::c10, Subpatch::c11, interp(), and v.
Referenced by eval_projected(), and set_vert().
| float QuadDice::quad_area | ( | const float3 & | a, |
| const float3 & | b, | ||
| const float3 & | c, | ||
| const float3 & | d | ||
| ) |
Definition at line 193 of file subd_dice.cpp.
References Freestyle::a, Freestyle::c, and triangle_area().
Referenced by scale_factor().
Definition at line 198 of file subd_dice.cpp.
References A1, A2, D(), SubdParams::dicing_rate, Subpatch::edge_u0, Subpatch::edge_u1, Subpatch::edge_v0, Subpatch::edge_v1, eval_projected(), max, N, P(), EdgeDice::params, quad_area(), sqrtf, and Subpatch::edge_t::T.
Referenced by dice().
| void QuadDice::set_side | ( | Subpatch & | sub, |
| int | edge | ||
| ) |
Definition at line 160 of file subd_dice.cpp.
References Subpatch::edges, float(), Subpatch::get_vert_along_edge(), set_vert(), Subpatch::edge_t::T, t, and v.
Referenced by dice().
Definition at line 155 of file subd_dice.cpp.
References map_uv(), Subpatch::patch, EdgeDice::set_vert(), and v.
Referenced by add_grid(), and set_side().