Blender V2.61 - r43446
|
#include <subd_dice.h>
Classes | |
struct | EdgeFactors |
struct | SubPatch |
Public Member Functions | |
QuadDice (Mesh *mesh, int shader, bool smooth, float dicing_rate) | |
void | reserve (EdgeFactors &ef, int Mu, int Mv) |
float3 | eval_projected (SubPatch &sub, float u, float v) |
float2 | map_uv (SubPatch &sub, float u, float v) |
int | add_vert (SubPatch &sub, float u, float v) |
void | add_corners (SubPatch &sub) |
void | add_grid (SubPatch &sub, int Mu, int Mv, int offset) |
void | add_side_u (SubPatch &sub, vector< int > &outer, vector< int > &inner, int Mu, int Mv, int tu, int side, int offset) |
void | add_side_v (SubPatch &sub, vector< int > &outer, vector< int > &inner, int Mu, int Mv, int tv, int side, int offset) |
float | quad_area (const float3 &a, const float3 &b, const float3 &c, const float3 &d) |
float | scale_factor (SubPatch &sub, EdgeFactors &ef, int Mu, int Mv) |
void | dice (SubPatch &sub, EdgeFactors &ef) |
Definition at line 73 of file subd_dice.h.
QuadDice::QuadDice | ( | Mesh * | mesh, |
int | shader, | ||
bool | smooth, | ||
float | dicing_rate | ||
) |
Definition at line 117 of file subd_dice.cpp.
void QuadDice::add_corners | ( | SubPatch & | sub | ) |
Definition at line 240 of file subd_dice.cpp.
References add_vert(), Patch::is_triangle(), and QuadDice::SubPatch::patch.
Referenced by dice().
void QuadDice::add_grid | ( | SubPatch & | sub, |
int | Mu, | ||
int | Mv, | ||
int | offset | ||
) |
Definition at line 256 of file subd_dice.cpp.
References EdgeDice::add_triangle(), add_vert(), and i.
Referenced by dice().
void QuadDice::add_side_u | ( | SubPatch & | sub, |
vector< int > & | outer, | ||
vector< int > & | inner, | ||
int | Mu, | ||
int | Mv, | ||
int | tu, | ||
int | side, | ||
int | offset | ||
) |
void QuadDice::add_side_v | ( | SubPatch & | sub, |
vector< int > & | outer, | ||
vector< int > & | inner, | ||
int | Mu, | ||
int | Mv, | ||
int | tv, | ||
int | side, | ||
int | offset | ||
) |
int QuadDice::add_vert | ( | SubPatch & | sub, |
float | u, | ||
float | v | ||
) |
Definition at line 149 of file subd_dice.cpp.
References map_uv(), and QuadDice::SubPatch::patch.
Referenced by add_corners(), add_grid(), add_side_u(), and add_side_v().
void QuadDice::dice | ( | SubPatch & | sub, |
EdgeFactors & | ef | ||
) |
Definition at line 282 of file subd_dice.cpp.
References add_corners(), add_grid(), add_side_u(), add_side_v(), assert, max, EdgeDice::mesh, reserve(), scale_factor(), EdgeDice::stitch_triangles(), QuadDice::EdgeFactors::tu0, QuadDice::EdgeFactors::tu1, QuadDice::EdgeFactors::tv0, QuadDice::EdgeFactors::tv1, EdgeDice::vert_offset, and Mesh::verts.
Referenced by DiagSplit::split_quad().
Definition at line 137 of file subd_dice.cpp.
References EdgeDice::camera, Patch::eval(), map_uv(), NULL, P(), QuadDice::SubPatch::patch, transform(), Camera::worldtoraster, float2::x, and float2::y.
Referenced by scale_factor().
Definition at line 129 of file subd_dice.cpp.
References interp(), QuadDice::SubPatch::P00, QuadDice::SubPatch::P01, QuadDice::SubPatch::P10, and QuadDice::SubPatch::P11.
Referenced by add_vert(), and eval_projected().
float QuadDice::quad_area | ( | const float3 & | a, |
const float3 & | b, | ||
const float3 & | c, | ||
const float3 & | d | ||
) |
Definition at line 206 of file subd_dice.cpp.
References triangle_area().
Referenced by scale_factor().
void QuadDice::reserve | ( | EdgeFactors & | ef, |
int | Mu, | ||
int | Mv | ||
) |
Definition at line 122 of file subd_dice.cpp.
References QuadDice::EdgeFactors::tu0, QuadDice::EdgeFactors::tu1, QuadDice::EdgeFactors::tv0, and QuadDice::EdgeFactors::tv1.
Referenced by dice().
float QuadDice::scale_factor | ( | SubPatch & | sub, |
EdgeFactors & | ef, | ||
int | Mu, | ||
int | Mv | ||
) |
Definition at line 211 of file subd_dice.cpp.
References D(), EdgeDice::dicing_rate, eval_projected(), i, max, N, P(), quad_area(), sqrtf, QuadDice::EdgeFactors::tu0, QuadDice::EdgeFactors::tu1, QuadDice::EdgeFactors::tv0, and QuadDice::EdgeFactors::tv1.
Referenced by dice().