|
Blender V5.0
|
#include <dice.h>
Public Member Functions | |
| EdgeDice (const SubdParams ¶ms, const int num_verts, const int num_triangles, SubdAttributeInterpolation &interpolation) | |
| void | dice (const DiagSplit &split) |
Public Attributes | |
| SubdParams | params |
| SubdAttributeInterpolation & | interpolation |
| int * | mesh_triangles = nullptr |
| int * | mesh_shader = nullptr |
| bool * | mesh_smooth = nullptr |
| float3 * | mesh_P = nullptr |
| float3 * | mesh_N = nullptr |
| float * | mesh_ptex_face_id = nullptr |
| float2 * | mesh_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) |
|
explicit |
Definition at line 17 of file dice.cpp.
References AttributeSet::add(), ATTR_STD_VERTEX_NORMAL, Geometry::attributes, Attribute::data_float3(), interpolation, mesh_N, mesh_P, mesh_shader, mesh_smooth, mesh_triangles, params, Mesh::resize_mesh(), and size().
|
protected |
Definition at line 148 of file dice.cpp.
References SubPatch::Edge::edge, SubPatch::edges, float, SubPatch::get_vert_along_edge(), SubPatch::get_vert_along_grid_edge(), i, SubPatch::inner_grid_vert_offset, len_squared(), make_float2, SubPatch::map_uv(), mesh_P, set_triangle(), set_vertex(), SubEdge::T, SubPatch::triangles_offset, v, and v2.
Referenced by quad_dice().
|
protected |
Definition at line 265 of file dice.cpp.
References SubPatch::Edge::edge, SubPatch::edges, SubPatch::get_vert_along_edge(), SubPatch::get_vert_along_edge_reverse(), i, len_squared(), make_float2, SubPatch::map_uv(), mesh_P, set_triangle(), SubEdge::T, SubPatch::triangles_offset, and v2.
Referenced by quad_dice().
| void EdgeDice::dice | ( | const DiagSplit & | split | ) |
Definition at line 663 of file dice.cpp.
References i, quad_dice(), quad_set_sides(), SubPatch::shape, split(), tri_dice(), tri_set_sides(), and SubPatch::TRIANGLE.
Referenced by Mesh::tessellate().
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().
|
protected |
Definition at line 59 of file dice.cpp.
References b, and triangle_area().
Referenced by scale_factor().
|
protected |
Definition at line 370 of file dice.cpp.
References add_grid_triangles_and_stitch(), add_triangle_strip(), ceilf, SubPatch::Edge::edge, SubPatch::edges, max, scale_factor(), and SubEdge::T.
Referenced by dice().
|
protected |
Definition at line 336 of file dice.cpp.
References SubPatch::Edge::edge, SubPatch::edges, float, SubPatch::get_vert_along_edge(), i, make_float2, SubPatch::map_uv(), SubPatch::Edge::own_edge, SubPatch::Edge::own_vertex, set_vertex(), and SubEdge::T.
Referenced by dice().
Definition at line 64 of file dice.cpp.
References A1, A2, D, SubPatch::Edge::edge, SubPatch::edges, eval_projected(), i, make_float2, SubPatch::map_uv(), max, N, P, params, quad_area(), sqrtf, and SubEdge::T.
Referenced by quad_dice().
|
protected |
Definition at line 113 of file dice.cpp.
References assert, SubPatch::corner, SubPatch::face_index, SubdAttribute::interp, interpolation, mesh_ptex_face_id, mesh_ptex_uv, mesh_shader, mesh_smooth, mesh_triangles, params, SubPatch::patch, Patch::patch_index, Patch::shader, Patch::smooth, and v2.
Referenced by add_grid_triangles_and_stitch(), add_triangle_strip(), and tri_dice().
Definition at line 96 of file dice.cpp.
References assert, SubPatch::corner, Patch::eval(), SubPatch::face_index, SubdAttribute::interp, interpolation, mesh_N, mesh_P, N, P, SubPatch::patch, Patch::patch_index, verts, float2::x, and float2::y.
Referenced by add_grid_triangles_and_stitch(), quad_set_sides(), tri_dice(), and tri_set_sides().
|
protected |
Definition at line 428 of file dice.cpp.
References assert, SubPatch::calc_num_triangles(), SubPatch::Edge::edge, SubPatch::edges, float, SubPatch::get_inner_grid_vert_triangle(), SubPatch::get_vert_along_edge(), SubPatch::get_vert_along_grid_edge(), i, len_squared(), M, make_float2, SubPatch::map_uv(), max, mesh_P, set_triangle(), set_vertex(), SubPatch::Edge::start_vert_index(), SubEdge::T, SubPatch::triangles_offset, v, and v2.
Referenced by dice().
|
protected |
Definition at line 397 of file dice.cpp.
References SubPatch::Edge::edge, SubPatch::edges, float, SubPatch::get_vert_along_edge(), i, make_float2, SubPatch::map_uv(), SubPatch::Edge::own_edge, SubPatch::Edge::own_vertex, set_vertex(), and SubEdge::T.
Referenced by dice().
| SubdAttributeInterpolation& EdgeDice::interpolation |
Definition at line 42 of file dice.h.
Referenced by EdgeDice(), set_triangle(), and set_vertex().
Definition at line 47 of file dice.h.
Referenced by EdgeDice(), and set_vertex().
Definition at line 46 of file dice.h.
Referenced by add_grid_triangles_and_stitch(), add_triangle_strip(), EdgeDice(), set_vertex(), and tri_dice().
Definition at line 48 of file dice.h.
Referenced by set_triangle().
Definition at line 49 of file dice.h.
Referenced by set_triangle().
| int* EdgeDice::mesh_shader = nullptr |
Definition at line 44 of file dice.h.
Referenced by EdgeDice(), and set_triangle().
| bool* EdgeDice::mesh_smooth = nullptr |
Definition at line 45 of file dice.h.
Referenced by EdgeDice(), and set_triangle().
| int* EdgeDice::mesh_triangles = nullptr |
Definition at line 43 of file dice.h.
Referenced by EdgeDice(), and set_triangle().
| SubdParams EdgeDice::params |
Definition at line 41 of file dice.h.
Referenced by EdgeDice(), eval_projected(), scale_factor(), and set_triangle().