Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

UVMapping Class Reference

#include <uv_mapping.H>

Collaboration diagram for UVMapping:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 UVMapping (Bface *f)
 ~UVMapping ()
Bfacefind_face (CUVpt &uv, mlib::Wvec &bc)
void draw_debug ()
void clear_debug_image ()
void debug_dot (double u, double val, unsigned char r, unsigned char g, unsigned char b)
void register_usage ()
void unregister_usage ()
bool wrap_u ()
bool wrap_v ()
double span_u ()
double span_v ()
double min_u ()
double min_v ()
double max_u ()
double max_v ()
Bfaceseed_face ()
void interpolate (CUVpt &uv1, double frac1, mlib::CUVpt &uv2, double frac2, mlib::UVpt &uv)
void apply_wrap (UVpt &uv)

Protected Types

typedef void(UVMapping::* rec_fun_t )(Bface *)

Protected Member Functions

void compute_mapping (Bface *f)
void compute_limits (Bface *f)
void compute_wrapping (Bface *f)
void compute_debug_image ()
void recurse_wrapping (Bface *f)
void recurse (Bface *f, rec_fun_t fun)
void add_face (Bface *f)
void add_limit (Bface *f)

Static Protected Member Functions

static bool intersect (CUVpt &pt1a, mlib::CUVpt &pt1b, mlib::CUVpt &pt2a, mlib::CUVpt &pt2b)

Protected Attributes

ARRAY< ARRAY< Bface * > * > _mapping
Bface_seed_face
int _face_cnt
int _bin_cnt
int _entry_cnt
int _use_cnt
double _du
double _dv
double _min_u
double _min_v
double _max_u
double _max_v
double _span_u
double _span_v
bool _wrap_u
bool _wrap_v
bool _wrap_bad
unsigned char * _virgin_debug_image
unsigned char * _marked_debug_image

Detailed Description

Definition at line 28 of file uv_mapping.H.


Member Typedef Documentation

typedef void(UVMapping::* UVMapping::rec_fun_t)(Bface *) [protected]
 

Definition at line 108 of file uv_mapping.H.


Constructor & Destructor Documentation

UVMapping::UVMapping Bface f  ) 
 

Definition at line 28 of file uv_mapping.C.

References _mapping, _seed_face, ARRAY< T >::add(), ARRAY< T >::clear(), compute_debug_image(), compute_limits(), compute_mapping(), compute_wrapping(), Config::get_var_bool(), and MAPPING_BINS.

UVMapping::~UVMapping  ) 
 

Definition at line 64 of file uv_mapping.C.

References _face_cnt, _mapping, _marked_debug_image, _use_cnt, _virgin_debug_image, ARRAY< T >::clear(), ERR_LEV_WARN, err_mesg(), UVdata::lookup(), UVdata::mapping(), ARRAY< T >::num(), and UVdata::set_mapping().


Member Function Documentation

void UVMapping::add_face Bface f  )  [protected]
 

Definition at line 642 of file uv_mapping.C.

References _bin_cnt, _du, _dv, _entry_cnt, _face_cnt, _mapping, _max_u, _max_v, _min_u, _min_v, ARRAY< T >::add(), mlib::Pointlist< L, P, V, S >::clear(), mlib::Point2list< L, P, V, S >::contains(), int(), intersect(), UVdata::lookup(), UVdata::mapping(), MAPPING_SIZE, UVdata::set_mapping(), GtexUtil::tri(), UVdata::uv(), UVdata::uv1(), UVdata::uv2(), and UVdata::uv3().

Referenced by compute_mapping().

void UVMapping::add_limit Bface f  )  [protected]
 

Definition at line 612 of file uv_mapping.C.

References _max_u, _max_v, _min_u, _min_v, UVdata::lookup(), UVdata::mapping(), and UVdata::uv().

Referenced by compute_limits().

void UVMapping::apply_wrap UVpt uv  ) 
 

Definition at line 965 of file uv_mapping.C.

References _max_u, _max_v, _min_u, _min_v, _span_u, _span_v, _wrap_u, and _wrap_v.

void UVMapping::clear_debug_image  ) 
 

Definition at line 223 of file uv_mapping.C.

References _marked_debug_image, _virgin_debug_image, DEBUG_SIZE, and Config::get_var_bool().

Referenced by compute_debug_image().

void UVMapping::compute_debug_image  )  [protected]
 

Definition at line 150 of file uv_mapping.C.

References _mapping, _marked_debug_image, _virgin_debug_image, clear_debug_image(), DEBUG_DOT_HEIGHT, DEBUG_SIZE, ERR_LEV_SPAM, err_mesg(), int(), MAPPING_BINS, MAPPING_SIZE, max(), and ARRAY< T >::num().

Referenced by UVMapping().

void UVMapping::compute_limits Bface f  )  [protected]
 

Definition at line 267 of file uv_mapping.C.

References _du, _dv, _max_u, _max_v, _min_u, _min_v, _span_u, _span_v, add_limit(), ERR_LEV_INFO, err_mesg(), BMESH::faces(), UVdata::lookup(), UVdata::mapping(), MAPPING_SIZE, Bsimplex::mesh(), ARRAY< T >::num(), recurse(), and UVdata::uv().

Referenced by UVMapping().

void UVMapping::compute_mapping Bface f  )  [protected]
 

Definition at line 312 of file uv_mapping.C.

References _bin_cnt, _entry_cnt, _face_cnt, add_face(), ERR_LEV_INFO, err_mesg(), BMESH::faces(), UVdata::lookup(), UVdata::mapping(), MAPPING_BINS, Bsimplex::mesh(), ARRAY< T >::num(), and recurse().

Referenced by UVMapping().

void UVMapping::compute_wrapping Bface f  )  [protected]
 

Definition at line 345 of file uv_mapping.C.

References _max_u, _max_v, _min_u, _min_v, _wrap_bad, _wrap_u, _wrap_v, ERR_LEV_INFO, ERR_LEV_WARN, err_mesg(), BMESH::faces(), UVdata::lookup(), UVdata::mapping(), Bsimplex::mesh(), ARRAY< T >::num(), and recurse_wrapping().

Referenced by UVMapping().

void UVMapping::debug_dot double  u,
double  val,
unsigned char  r,
unsigned char  g,
unsigned char  b
 

Definition at line 236 of file uv_mapping.C.

References _du, _marked_debug_image, _min_u, DEBUG_DOT_HEIGHT, Config::get_var_bool(), int(), and MAPPING_SIZE.

void UVMapping::draw_debug  ) 
 

Definition at line 106 of file uv_mapping.C.

References _marked_debug_image, DEBUG_DOT_HEIGHT, GL_BLEND, GL_ENABLE_BIT, GL_MODELVIEW, GL_PROJECTION, GL_RGB, GL_UNSIGNED_BYTE, glDisable(), glDrawPixels(), glLoadIdentity(), glLoadMatrixd(), glMatrixMode(), glPopAttrib(), glPopMatrix(), glPushAttrib(), glPushMatrix(), glRasterPos2i(), MAPPING_SIZE, VIEW::peek(), and VIEW_SIZE.

Bface * UVMapping::find_face CUVpt uv,
mlib::Wvec bc
 

Definition at line 773 of file uv_mapping.C.

References _du, _dv, _mapping, _marked_debug_image, _min_u, _min_v, debug, Config::get_var_bool(), int(), UVdata::lookup(), MAPPING_SIZE, UVdata::uv1(), UVdata::uv2(), and UVdata::uv3().

void UVMapping::interpolate CUVpt uv1,
double  frac1,
mlib::CUVpt uv2,
double  frac2,
mlib::UVpt uv
 

Definition at line 878 of file uv_mapping.C.

References _max_u, _max_v, _min_u, _min_v, _span_u, _span_v, _wrap_u, and _wrap_v.

bool UVMapping::intersect CUVpt pt1a,
mlib::CUVpt pt1b,
mlib::CUVpt pt2a,
mlib::CUVpt pt2b
[static, protected]
 

Definition at line 855 of file uv_mapping.C.

References mlib::gEpsZeroMath.

Referenced by add_face().

double UVMapping::max_u  )  [inline]
 

Definition at line 96 of file uv_mapping.H.

References _max_u.

double UVMapping::max_v  )  [inline]
 

Definition at line 97 of file uv_mapping.H.

References _max_v.

double UVMapping::min_u  )  [inline]
 

Definition at line 93 of file uv_mapping.H.

References _min_u.

double UVMapping::min_v  )  [inline]
 

Definition at line 94 of file uv_mapping.H.

References _min_v.

void UVMapping::recurse Bface f,
rec_fun_t  fun
[protected]
 

Definition at line 541 of file uv_mapping.C.

References Bface::e(), Bface::e1(), Bface::e2(), Bface::e3(), Bsimplex::is_set(), UVdata::lookup(), UVdata::mapping(), ARRAY< T >::num(), Bedge::other_face(), ARRAY< T >::pop(), ARRAY< T >::push(), Bsimplex::set_bit(), and UVdata::uv().

Referenced by compute_limits(), and compute_mapping().

void UVMapping::recurse_wrapping Bface f  )  [protected]
 

Definition at line 380 of file uv_mapping.C.

References _max_u, _max_v, _min_u, _min_v, _wrap_bad, _wrap_u, _wrap_v, Bface::e(), Bface::e1(), Bface::e2(), Bface::e3(), ERR_LEV_INFO, ERR_LEV_SPAM, ERR_LEV_WARN, err_mesg(), Bsimplex::is_set(), UVdata::lookup(), UVdata::mapping(), ARRAY< T >::num(), Bedge::other_face(), ARRAY< T >::pop(), ARRAY< T >::push(), Bsimplex::set_bit(), and UVdata::uv().

Referenced by compute_wrapping().

void UVMapping::register_usage  )  [inline]
 

Definition at line 82 of file uv_mapping.H.

References _use_cnt.

Bface* UVMapping::seed_face  )  [inline]
 

Definition at line 99 of file uv_mapping.H.

References _seed_face.

double UVMapping::span_u  )  [inline]
 

Definition at line 90 of file uv_mapping.H.

References _span_u.

double UVMapping::span_v  )  [inline]
 

Definition at line 91 of file uv_mapping.H.

References _span_v.

void UVMapping::unregister_usage  )  [inline]
 

Definition at line 83 of file uv_mapping.H.

References _use_cnt.

bool UVMapping::wrap_u  )  [inline]
 

Definition at line 87 of file uv_mapping.H.

References _wrap_u.

bool UVMapping::wrap_v  )  [inline]
 

Definition at line 88 of file uv_mapping.H.

References _wrap_v.


Member Data Documentation

int UVMapping::_bin_cnt [protected]
 

Definition at line 37 of file uv_mapping.H.

Referenced by add_face(), and compute_mapping().

double UVMapping::_du [protected]
 

Definition at line 40 of file uv_mapping.H.

Referenced by add_face(), compute_limits(), debug_dot(), and find_face().

double UVMapping::_dv [protected]
 

Definition at line 41 of file uv_mapping.H.

Referenced by add_face(), compute_limits(), and find_face().

int UVMapping::_entry_cnt [protected]
 

Definition at line 38 of file uv_mapping.H.

Referenced by add_face(), and compute_mapping().

int UVMapping::_face_cnt [protected]
 

Definition at line 36 of file uv_mapping.H.

Referenced by add_face(), compute_mapping(), and ~UVMapping().

ARRAY<ARRAY<Bface*>*> UVMapping::_mapping [protected]
 

Definition at line 34 of file uv_mapping.H.

Referenced by add_face(), compute_debug_image(), find_face(), UVMapping(), and ~UVMapping().

unsigned char* UVMapping::_marked_debug_image [protected]
 

Definition at line 52 of file uv_mapping.H.

Referenced by clear_debug_image(), compute_debug_image(), debug_dot(), draw_debug(), find_face(), and ~UVMapping().

double UVMapping::_max_u [protected]
 

Definition at line 44 of file uv_mapping.H.

Referenced by add_face(), add_limit(), apply_wrap(), compute_limits(), compute_wrapping(), interpolate(), max_u(), and recurse_wrapping().

double UVMapping::_max_v [protected]
 

Definition at line 45 of file uv_mapping.H.

Referenced by add_face(), add_limit(), apply_wrap(), compute_limits(), compute_wrapping(), interpolate(), max_v(), and recurse_wrapping().

double UVMapping::_min_u [protected]
 

Definition at line 42 of file uv_mapping.H.

Referenced by add_face(), add_limit(), apply_wrap(), compute_limits(), compute_wrapping(), debug_dot(), find_face(), interpolate(), min_u(), and recurse_wrapping().

double UVMapping::_min_v [protected]
 

Definition at line 43 of file uv_mapping.H.

Referenced by add_face(), add_limit(), apply_wrap(), compute_limits(), compute_wrapping(), find_face(), interpolate(), min_v(), and recurse_wrapping().

Bface* UVMapping::_seed_face [protected]
 

Definition at line 35 of file uv_mapping.H.

Referenced by seed_face(), and UVMapping().

double UVMapping::_span_u [protected]
 

Definition at line 46 of file uv_mapping.H.

Referenced by apply_wrap(), compute_limits(), interpolate(), and span_u().

double UVMapping::_span_v [protected]
 

Definition at line 47 of file uv_mapping.H.

Referenced by apply_wrap(), compute_limits(), interpolate(), and span_v().

int UVMapping::_use_cnt [protected]
 

Definition at line 39 of file uv_mapping.H.

Referenced by register_usage(), unregister_usage(), and ~UVMapping().

unsigned char* UVMapping::_virgin_debug_image [protected]
 

Definition at line 51 of file uv_mapping.H.

Referenced by clear_debug_image(), compute_debug_image(), and ~UVMapping().

bool UVMapping::_wrap_bad [protected]
 

Definition at line 50 of file uv_mapping.H.

Referenced by compute_wrapping(), and recurse_wrapping().

bool UVMapping::_wrap_u [protected]
 

Definition at line 48 of file uv_mapping.H.

Referenced by apply_wrap(), compute_wrapping(), interpolate(), recurse_wrapping(), and wrap_u().

bool UVMapping::_wrap_v [protected]
 

Definition at line 49 of file uv_mapping.H.

Referenced by apply_wrap(), compute_wrapping(), interpolate(), recurse_wrapping(), and wrap_v().


The documentation for this class was generated from the following files:
Generated on Mon Sep 18 11:47:45 2006 for jot by  doxygen 1.4.4