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

Bsimplex Class Reference

#include <bsimplex.H>

Inheritance diagram for Bsimplex:

Inheritance graph
[legend]
Collaboration diagram for Bsimplex:

Collaboration graph
[legend]
List of all members.

Public Types

enum  { FLAG_BITS = 2, SELECTED_BIT, NEXT_AVAILABLE_BIT }

Public Member Functions

 Bsimplex ()
virtual ~Bsimplex ()
void set_mesh (BMESH *mesh)
BMESHmesh () const
uint key () const
virtual int dim () const =0
virtual int index () const =0
uint flag () const
void clear_flag ()
void set_flag (uchar b=1)
void inc_flag (uint i)
bool is_set (uint b) const
bool is_clear (uint b) const
void clear_bit (uint b)
void set_bit (uint b, int x=1)
bool is_selected () const
SimplexDatafind_data (uint key) const
SimplexDatafind_data (Cstr_ptr &s) const
SimplexDatafind_data (void *key) const
void add_simplex_data (SimplexData *sd)
void rem_simplex_data (SimplexData *sd)
const SimplexDataListdata_list () const
virtual void notify_split (Bsimplex *new_simp)
virtual void notify_xform (CWtransf &xf)
virtual void geometry_changed ()
virtual void normal_changed ()
virtual void project_barycentric (CWpt &loc, mlib::Wvec &bc) const =0
virtual void bc2pos (CWvec &bc, mlib::Wpt &pos) const =0
Wpt bc2pos (mlib::CWvec &bc) const
Wptproject_to_simplex (mlib::CWpt &pos, mlib::Wpt &ret)
virtual Bsimplexbc2sim (CWvec &bc) const =0
virtual bool view_intersect (CNDCpt &, Wpt &, double &, double &, Wvec &n) const =0
virtual bool near_point (CNDCpt &p, mlib::Wpt &hit) const
Bsimplexwalk_to_target (CWpt &target, CSimplexFilter &filter=SimplexFilter()) const
Bsimplexwalk_to_target (CWpt &target, Wpt &near_pt, Wvec &near_bc, CSimplexFilter &filter=SimplexFilter()) const
virtual Bsimplex_list neighbors () const =0
double dist (CWpt &p) const
double dist (CWpt &p, mlib::Wvec &bc) const
virtual bool local_search (Bsimplex *&end, Wvec &final_bc, CWpt &target, mlib::Wpt &reached, Bsimplex *repeater=0, int iters=30)=0
virtual NDCpt nearest_pt_ndc (mlib::CNDCpt &, mlib::Wvec &, int &) const =0
virtual Wpt nearest_pt (mlib::CWpt &p, mlib::Wvec &bc, bool &is_on_simplex) const =0
virtual Wpt nearest_pt (mlib::CWpt &p, mlib::Wvec &bc) const
virtual Wpt nearest_pt (mlib::CWpt &p) const
virtual bool on_face (const Bface *f) const =0
virtual Bfaceget_face () const =0

Static Public Member Functions

static Bsimplexlookup (uint k)
static void clamp_barycentric (Wvec &bc)

Protected Types

enum  { FLAG_MASK = ((1 << FLAG_BITS) - 1) }

Protected Member Functions

uint generate_key ()

Static Protected Member Functions

static uint mask (uint b)

Protected Attributes

uint _key
uint _flag
BMESH_mesh
SimplexDataList_data_list

Static Protected Attributes

static IDtable _table

Related Functions

(Note that these are not member functions.)

Patchget_patch (CBsimplex *s)
 Returns the Patch of a Bsimplex.
Patchget_ctrl_patch (CBsimplex *s)
 Similar to get_patch(CBsimplex*), but returns the control Patch.

Classes

class  IDtable

Detailed Description

Definition at line 46 of file bsimplex.H.


Member Enumeration Documentation

anonymous enum
 

Enumerator:
FLAG_BITS 
SELECTED_BIT 
NEXT_AVAILABLE_BIT 

Definition at line 54 of file bsimplex.H.

anonymous enum [protected]
 

Enumerator:
FLAG_MASK 

Definition at line 265 of file bsimplex.H.


Constructor & Destructor Documentation

Bsimplex::Bsimplex  )  [inline]
 

Definition at line 62 of file bsimplex.H.

Bsimplex::~Bsimplex  )  [virtual]
 

Definition at line 10 of file bsimplex.C.

References _data_list, and SimplexDataList::notify_simplex_deleted().


Member Function Documentation

void Bsimplex::add_simplex_data SimplexData sd  ) 
 

Definition at line 90 of file bsimplex.C.

References _data_list, ARRAY< T >::add(), find_data(), and SimplexData::id().

Referenced by SimplexData::set().

Wpt Bsimplex::bc2pos mlib::CWvec bc  )  const [inline]
 

Definition at line 146 of file bsimplex.H.

References bc2pos().

virtual void Bsimplex::bc2pos CWvec bc,
mlib::Wpt pos
const [pure virtual]
 

Implemented in Bedge, Bface, and Bvert.

Referenced by bc2pos(), DynamicSample::get_pos(), and project_to_simplex().

virtual Bsimplex* Bsimplex::bc2sim CWvec bc  )  const [pure virtual]
 

Implemented in Bedge, Bface, and Bvert.

static void Bsimplex::clamp_barycentric Wvec bc  )  [inline, static]
 

Definition at line 162 of file bsimplex.H.

References max(), and mlib::Vec3< V >::set().

Referenced by project_to_simplex().

void Bsimplex::clear_bit uint  b  )  [inline]
 

Definition at line 103 of file bsimplex.H.

References _flag, and mask().

Referenced by Ledge::crease_changed(), Bvert::crease_changed(), Bvert::degree_changed(), Lface::delete_subdiv_elements(), Ledge::delete_subdiv_elements(), Lvert::delete_subdiv_vert(), MeshGlobal::deselect(), Bedge::faces_changed(), Bface::geometry_changed(), Bface::make_primary(), LMESH::mark_all_dirty(), Lvert::mark_dirty(), Lvert::mask_changed(), Ledge::mask_changed(), Bvert::normal_changed(), Bedge::normal_changed(), LMESH::rem_dirty_vert(), set_bit(), Lvert::set_corner(), Ledge::set_crease(), Bvert::star_changed(), Ledge::subdiv_color_changed(), Lvert::subdiv_loc_changed(), Ledge::subdiv_loc_changed(), Lvert::subdiv_vert_deleted(), Ledge::subdiv_vert_deleted(), and LMESH::update_subdivision().

void Bsimplex::clear_flag  )  [inline]
 

Definition at line 92 of file bsimplex.H.

References _flag, and FLAG_MASK.

Referenced by Bface_list::clear_edge_flags(), Bvert::clear_flag02(), Bedge::clear_flag02(), Bface_list::clear_vert_flags(), Bedge_list::clear_vert_flags(), BMESH::get_enclosed_verts(), get_parent_faces(), and set_flag().

const SimplexDataList* Bsimplex::data_list  )  const [inline]
 

Definition at line 132 of file bsimplex.H.

References _data_list.

Referenced by num_data().

virtual int Bsimplex::dim  )  const [pure virtual]
 

Implemented in Bedge, Bface, and Bvert.

Referenced by Bface::contains(), is_edge(), is_face(), is_vert(), and Bedge::notify_split().

double Bsimplex::dist CWpt p,
mlib::Wvec bc
const [inline]
 

Definition at line 216 of file bsimplex.H.

References mlib::Point3< P, V >::dist(), and nearest_pt().

double Bsimplex::dist CWpt p  )  const [inline]
 

Definition at line 215 of file bsimplex.H.

References mlib::Point3< P, V >::dist(), and nearest_pt().

Referenced by Bface::contains().

SimplexData* Bsimplex::find_data void *  key  )  const [inline]
 

Definition at line 123 of file bsimplex.H.

References find_data().

SimplexData* Bsimplex::find_data Cstr_ptr &  s  )  const [inline]
 

Definition at line 122 of file bsimplex.H.

References find_data().

SimplexData* Bsimplex::find_data uint  key  )  const [inline]
 

Definition at line 118 of file bsimplex.H.

References _data_list, and SimplexDataList::get_item().

Referenced by add_simplex_data(), find_data(), and UVdata::lookup().

uint Bsimplex::flag  )  const [inline]
 

Definition at line 91 of file bsimplex.H.

References _flag, and FLAG_MASK.

Referenced by UnreachedSimplexFilter::accept(), SimplexFlagFilter::accept(), add_face(), TriStrip::backup_strip(), both_set(), TriStrip::build(), check_partner(), demote(), BMESH::get_components(), Bface_list::get_edges(), BMESH::get_enclosed_verts(), get_parent_faces(), Bface_list::get_verts(), Bface_list::grow_connected(), BMESH::grow_mesh_equivalence_class(), BMESH::grow_oriented_face_lists(), has_unmarked_face(), inc_flag(), is_claimed(), is_cleared(), is_marked(), mark_pushed_faces(), promote(), screen(), BMESH::split_components(), try_append(), try_get_edge(), try_get_face(), and try_get_nm_edge().

uint Bsimplex::generate_key  )  [protected]
 

Definition at line 20 of file bsimplex.C.

References _key, _table, err_msg(), and ARRAY< T >::num().

void Bsimplex::geometry_changed  )  [virtual]
 

Reimplemented in Bedge, Bface, Bvert, Ledge, and Lvert.

Definition at line 60 of file bsimplex.C.

References _data_list, and SimplexDataList::notify_simplex_changed().

Referenced by Bvert::geometry_changed(), Bface::geometry_changed(), and Bedge::geometry_changed().

virtual Bface* Bsimplex::get_face  )  const [pure virtual]
 

Implemented in Bedge, Bface, and Bvert.

Referenced by get_bface(), IDRefImage::intersect(), and IDRefImage::intersect_sim().

void Bsimplex::inc_flag uint  i  )  [inline]
 

Definition at line 96 of file bsimplex.H.

References flag(), FLAG_BITS, and set_flag().

virtual int Bsimplex::index  )  const [pure virtual]
 

Implemented in Bedge, Bface, and Bvert.

bool Bsimplex::is_clear uint  b  )  const [inline]
 

Definition at line 101 of file bsimplex.H.

References is_set().

Referenced by BitClearSimplexFilter::accept(), LMESH::add_dirty_vert(), Bface::is_primary(), Lface::subdiv_dirty(), Lvert::update_subdivision(), and Ledge::update_subdivision().

bool Bsimplex::is_selected  )  const [inline]
 

Definition at line 114 of file bsimplex.H.

References is_set(), and SELECTED_BIT.

Referenced by SelectedSimplexFilter::accept(), MeshGlobal::deselect(), MeshGlobal::select(), MeshGlobal::toggle_select(), Bedge::~Bedge(), Bface::~Bface(), and Bvert::~Bvert().

bool Bsimplex::is_set uint  b  )  const [inline]
 

Definition at line 100 of file bsimplex.H.

References _flag, and mask().

Referenced by BitSetSimplexFilter::accept(), Lface::allocate_subdiv_elements(), Ledge::allocate_subdiv_elements(), Lvert::allocate_subdiv_vert(), Bface::area(), Lface::delete_subdiv_elements(), Ledge::delete_subdiv_elements(), Lvert::delete_subdiv_vert(), Lvert::displaced_loc(), Ledge::do_swap(), Bface::front_facing(), Bvert::has_color(), Bface::is_bad(), is_clear(), Bedge::is_convex(), Bvert::is_crease(), Bedge::is_crease(), Bedge::is_patch_boundary(), is_selected(), Bvert::is_stressed(), Bedge::is_weak(), Lface::make_primary(), Lface::make_secondary(), Lvert::mark_dirty(), Lvert::mask_changed(), Bvert::norm(), Bface::norm(), Bvert::order_edges_ccw(), UVMapping::recurse(), UVMapping::recurse_wrapping(), LMESH::rem_dirty_vert(), Lface::reverse(), Lface::set_layer(), Lface::set_subdiv_elements(), Ledge::set_subdiv_elements(), Lvert::set_subdiv_vert(), Lvert::subdiv_mask(), and Ledge::subdiv_mask().

uint Bsimplex::key  )  const [inline]
 

Definition at line 72 of file bsimplex.H.

References _key.

Referenced by ColorIDStripCB::edgeCB(), ColorIDStripCB::faceCB(), and ColorIDStripCB::vertCB().

virtual bool Bsimplex::local_search Bsimplex *&  end,
Wvec final_bc,
CWpt target,
mlib::Wpt reached,
Bsimplex repeater = 0,
int  iters = 30
[pure virtual]
 

Implemented in Bedge, Bface, and Bvert.

static Bsimplex* Bsimplex::lookup uint  k  )  [inline, static]
 

Definition at line 73 of file bsimplex.H.

References _table, and ARRAY< T >::num().

Referenced by VisRefImage::debug(), and IDRefImage::simplex().

static uint Bsimplex::mask uint  b  )  [inline, static, protected]
 

Definition at line 268 of file bsimplex.H.

Referenced by clear_bit(), is_set(), and set_bit().

BMESH* Bsimplex::mesh  )  const [inline]
 

Definition at line 68 of file bsimplex.H.

References _mesh.

Referenced by MeshSimplexFilter::accept(), BMESH::add_edge(), BMESH::add_face(), UVMapping::compute_limits(), UVMapping::compute_mapping(), UVMapping::compute_wrapping(), Ledge::delete_subdiv_elements(), Lvert::delete_subdiv_vert(), Bvert::eye_local(), ToonTexCB::faceCB(), XToonStripCB::faceCB(), get_ctrl_face(), get_cur_sub_edges(), get_cur_sub_faces(), get_cur_sub_vert(), VisRefImage::get_edit_face(), BMESH::get_enclosed_verts(), get_lmesh(), get_mesh(), get_parent_face(), get_parent_simplex(), TriStrip::get_strips(), VisRefImage::get_sub_face(), get_subdiv_chain(), BMESH::intersect(), Lvert::lmesh(), Lface::lmesh(), Ledge::lmesh(), BMESHray::mesh(), normalized_pix_area(), Bface_list::reachable_faces(), Ledge::rel_level(), LMESH::remove_edge(), LMESH::remove_face(), LMESH::remove_vertex(), MeshGlobal::select(), Lvert::set_subdiv_vert(), BMESH::split_faces(), subdiv_level(), SimpleUVCalc::subdiv_val(), and toggle_crease().

virtual bool Bsimplex::near_point CNDCpt p,
mlib::Wpt hit
const [inline, virtual]
 

Definition at line 182 of file bsimplex.H.

References view_intersect().

virtual Wpt Bsimplex::nearest_pt mlib::CWpt p  )  const [inline, virtual]
 

Definition at line 232 of file bsimplex.H.

References nearest_pt().

virtual Wpt Bsimplex::nearest_pt mlib::CWpt p,
mlib::Wvec bc
const [inline, virtual]
 

Definition at line 228 of file bsimplex.H.

References nearest_pt().

virtual Wpt Bsimplex::nearest_pt mlib::CWpt p,
mlib::Wvec bc,
bool is_on_simplex
const [pure virtual]
 

Implemented in Bedge, and Bvert.

Referenced by dist(), Bface::near_pt(), nearest_pt(), and walk_to_target().

virtual NDCpt Bsimplex::nearest_pt_ndc mlib::CNDCpt ,
mlib::Wvec ,
int & 
const [pure virtual]
 

Implemented in Bedge, Bface, and Bvert.

virtual Bsimplex_list Bsimplex::neighbors  )  const [pure virtual]
 

Implemented in Bedge, Bface, and Bvert.

void Bsimplex::normal_changed  )  [virtual]
 

Reimplemented in Bedge, Bface, Bvert, Ledge, and Lvert.

Definition at line 75 of file bsimplex.C.

References _data_list, and SimplexDataList::notify_normal_changed().

Referenced by Bvert::normal_changed(), and Bedge::normal_changed().

void Bsimplex::notify_split Bsimplex new_simp  )  [virtual]
 

Reimplemented in Bedge.

Definition at line 39 of file bsimplex.C.

References _data_list, and SimplexDataList::notify_split().

Referenced by Bedge::notify_split(), BMESH::split_edge(), and BMESH::split_face().

void Bsimplex::notify_xform CWtransf xf  )  [virtual]
 

Definition at line 52 of file bsimplex.C.

References _data_list, and SimplexDataList::notify_simplex_xformed().

Referenced by Bvert::transform().

virtual bool Bsimplex::on_face const Bface f  )  const [pure virtual]
 

Referenced by IDRefImage::is_face_visible().

virtual void Bsimplex::project_barycentric CWpt loc,
mlib::Wvec bc
const [pure virtual]
 

Implemented in Bedge, Bface, and Bvert.

Referenced by project_to_simplex(), ZXseg::set_bary(), and ZXseg::ZXseg().

Wpt& Bsimplex::project_to_simplex mlib::CWpt pos,
mlib::Wpt ret
[inline]
 

Definition at line 152 of file bsimplex.H.

References bc2pos(), clamp_barycentric(), and project_barycentric().

void Bsimplex::rem_simplex_data SimplexData sd  )  [inline]
 

Definition at line 126 of file bsimplex.H.

References _data_list, and ARRAY< T >::rem().

Referenced by SimplexData::set().

void Bsimplex::set_bit uint  b,
int  x = 1
[inline]
 

Definition at line 104 of file bsimplex.H.

References _flag, clear_bit(), and mask().

Referenced by LMESH::add_dirty_vert(), OBJReaderImpl::add_face(), add_poly(), BMESH::add_quad(), Lface::allocate_subdiv_elements(), Ledge::allocate_subdiv_elements(), Lvert::allocate_subdiv_vert(), Ledge::claim_child(), Bvert::color_changed(), Lvert::displaced_loc(), Bface::make_secondary(), BMESH::operator=(), Bvert::order_edges_ccw(), UVMapping::recurse(), UVMapping::recurse_wrapping(), LMESH::remove_vertex(), MeshGlobal::select(), Bvert::set_color(), Bedge::set_convex(), Lvert::set_mask(), Ledge::set_mask(), Bvert::set_norm(), Bvert::set_normal(), Bface::set_normal(), Bedge::set_patch_boundary(), Lface::set_subdiv_elements(), Ledge::set_subdiv_elements(), Lvert::set_subdiv_vert(), BMESH::set_weak_edge(), Lvert::update_subdivision(), and Ledge::update_subdivision().

void Bsimplex::set_flag uchar  b = 1  )  [inline]
 

Definition at line 93 of file bsimplex.H.

References _flag, and clear_flag().

Referenced by add_face(), claim_face(), Bface_list::get_edges(), BMESH::get_enclosed_verts(), get_parent_faces(), Bface_list::get_verts(), Bface_list::grow_connected(), BMESH::grow_mesh_equivalence_class(), BMESH::grow_oriented_face_lists(), inc_flag(), BMESH::kill_component(), mark_face(), mark_pushed_faces(), screen(), BMESH::split_components(), try_append(), try_get_edge(), try_get_face(), and try_get_nm_edge().

void Bsimplex::set_mesh BMESH mesh  )  [inline]
 

Definition at line 67 of file bsimplex.H.

References _mesh.

Referenced by BMESH::add_edge(), BMESH::add_face(), and BMESH::add_vertex().

virtual bool Bsimplex::view_intersect CNDCpt ,
Wpt ,
double &  ,
double &  ,
Wvec n
const [pure virtual]
 

Implemented in Bedge, Bface, and Bvert.

Referenced by BMESH::intersect(), and near_point().

Bsimplex* Bsimplex::walk_to_target CWpt target,
Wpt near_pt,
Wvec near_bc,
CSimplexFilter filter = SimplexFilter()
const [inline]
 

Definition at line 199 of file bsimplex.H.

References nearest_pt(), and walk_to_target().

Bsimplex* Bsimplex::walk_to_target CWpt target,
CSimplexFilter filter = SimplexFilter()
const
 

Referenced by walk_to_target().


Friends And Related Function Documentation

Patch * get_ctrl_patch CBsimplex s  )  [related]
 

Similar to get_patch(CBsimplex*), but returns the control Patch.

Definition at line 662 of file patch.H.

Patch * get_patch CBsimplex s  )  [related]
 

Returns the Patch of a Bsimplex.

Note:
If you know it's actually a Bface, get_patch(CBface*) is faster.

Definition at line 639 of file patch.H.


Member Data Documentation

SimplexDataList* Bsimplex::_data_list [protected]
 

Definition at line 248 of file bsimplex.H.

Referenced by add_simplex_data(), Lface::allocate_subdiv_elements(), Ledge::allocate_subdiv_elements(), Lvert::allocate_subdiv_vert(), data_list(), find_data(), geometry_changed(), normal_changed(), notify_split(), notify_xform(), rem_simplex_data(), Lface::set_subdiv_elements(), Ledge::set_subdiv_elements(), Lvert::set_subdiv_vert(), Lvert::update_subdivision(), Ledge::update_subdivision(), and ~Bsimplex().

uint Bsimplex::_flag [protected]
 

Definition at line 246 of file bsimplex.H.

Referenced by clear_bit(), clear_flag(), flag(), is_set(), set_bit(), and set_flag().

uint Bsimplex::_key [protected]
 

Definition at line 245 of file bsimplex.H.

Referenced by generate_key(), and key().

BMESH* Bsimplex::_mesh [protected]
 

Definition at line 247 of file bsimplex.H.

Referenced by Lface::bc_to_edit_level(), Lvert::cur_subdiv_vert(), Bvert::curv_tensor(), Bvert::dcurv_tensor(), Bvert::diag_curv(), Bface::find_intersect_sim(), Bface::front_facing(), Bvert::index(), Bface::index(), Bedge::index(), Bvert::k1(), Bvert::k2(), mesh(), Bvert::ndc(), Bvert::pdir1(), Bvert::pdir2(), set_mesh(), Bvert::view_intersect(), Bface::view_intersect(), Bedge::view_intersect(), Bvert::wloc(), Bvert::wnorm(), Bedge::~Bedge(), Bvert::~Bvert(), Ledge::~Ledge(), and Lvert::~Lvert().

Bsimplex::IDtable Bsimplex::_table [static, protected]
 

Definition at line 263 of file bsimplex.H.

Referenced by generate_key(), and lookup().


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