Blender
V3.3
|
#include <dice.h>
Public Member Functions | |
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) |
Public Attributes | |
SubdParams | params |
float3 * | mesh_P |
float3 * | mesh_N |
size_t | vert_offset |
size_t | tri_offset |
|
explicit |
Definition at line 14 of file dice.cpp.
References AttributeSet::add(), ATTR_STD_PTEX_FACE_ID, ATTR_STD_PTEX_UV, ATTR_STD_VERTEX_NORMAL, Geometry::attributes, SubdParams::mesh, mesh_N, mesh_P, NULL, params, SubdParams::ptex, and vert_offset.
Definition at line 59 of file dice.cpp.
References Mesh::add_triangle(), SubdParams::mesh, mesh, Mesh::num_triangles(), params, Patch::patch_index, Patch::shader, tri_offset, v1, v2, and vert_offset.
Referenced by QuadDice::add_grid(), and stitch_triangles().
void EdgeDice::reserve | ( | int | num_verts, |
int | num_triangles | ||
) |
Definition at line 28 of file dice.cpp.
References AttributeSet::add(), ATTR_STD_VERTEX_NORMAL, Geometry::attributes, Attribute::data_float3(), SubdParams::mesh, mesh, mesh_N, mesh_P, Mesh::num_triangles(), params, Mesh::reserve_mesh(), Mesh::resize_mesh(), Mesh::size, tri_offset, and vert_offset.
Referenced by DiagSplit::post_split().
Definition at line 46 of file dice.cpp.
References Patch::eval(), make_float2, SubdParams::mesh, mesh_N, mesh_P, N, NULL, P(), params, vert_offset, verts, float2::x, and float2::y.
Referenced by QuadDice::set_vert().
Definition at line 69 of file dice.cpp.
References add_triangle(), Subpatch::edge_u0, Subpatch::edge_u1, Subpatch::edge_v0, Subpatch::edge_v1, Subpatch::edges, Subpatch::get_vert_along_edge(), Subpatch::get_vert_along_grid_edge(), len_squared(), max, mesh_P, Subpatch::patch, Subpatch::edge_t::T, v1, and v2.
Referenced by QuadDice::dice().
float3* EdgeDice::mesh_N |
Definition at line 53 of file dice.h.
Referenced by EdgeDice(), reserve(), and set_vert().
float3* EdgeDice::mesh_P |
Definition at line 52 of file dice.h.
Referenced by EdgeDice(), reserve(), set_vert(), and stitch_triangles().
SubdParams EdgeDice::params |
Definition at line 51 of file dice.h.
Referenced by add_triangle(), EdgeDice(), QuadDice::eval_projected(), reserve(), QuadDice::scale_factor(), and set_vert().
size_t EdgeDice::tri_offset |
Definition at line 55 of file dice.h.
Referenced by add_triangle(), and reserve().
size_t EdgeDice::vert_offset |
Definition at line 54 of file dice.h.
Referenced by add_triangle(), EdgeDice(), reserve(), and set_vert().