tpl3d< C, V > Class Template Reference

#include <tpl3d.hpp>

Inheritance diagram for tpl3d< C, V >:
topology< C, V > subdivision< C, with_tpl3d< V >, CELL >

List of all members.

Public Types

Public Member Functions

Public Attributes


Detailed Description

template<class C, class V = default_env>
class mmx::shape::tpl3d< C, V >

Definition at line 87 of file tpl3d.hpp.


Member Typedef Documentation

Reimplemented from topology< C, V >.

Reimplemented in subdivision< C, with_tpl3d< V >, CELL >.

Definition at line 97 of file tpl3d.hpp.

typedef bcell<C,Ref> Cell

Reimplemented from topology< C, V >.

Reimplemented in subdivision< C, with_tpl3d< V >, CELL >.

Definition at line 94 of file tpl3d.hpp.

Reimplemented from topology< C, V >.

Reimplemented in subdivision< C, with_tpl3d< V >, CELL >.

Definition at line 92 of file tpl3d.hpp.

Reimplemented from topology< C, V >.

Reimplemented in subdivision< C, with_tpl3d< V >, CELL >.

Definition at line 93 of file tpl3d.hpp.

Reimplemented from topology< C, V >.

Reimplemented in subdivision< C, with_tpl3d< V >, CELL >.

Definition at line 91 of file tpl3d.hpp.

typedef use<ref_def,double, V >::Ref Ref

Definition at line 90 of file tpl3d.hpp.

typedef use<shape_def,double, V >::Shape Shape [inherited]

Definition at line 76 of file topology.hpp.

typedef surface<Ref> Surface

Definition at line 96 of file tpl3d.hpp.

typedef topology<C,V> Topology

Reimplemented in subdivision< C, with_tpl3d< V >, CELL >.

Definition at line 89 of file tpl3d.hpp.

typedef with_idx<V> W [inherited]

Definition at line 77 of file topology.hpp.


Constructor & Destructor Documentation

tpl3d ( void   )  [inline]

Definition at line 141 of file tpl3d.hpp.

00141                      : m_nbv(0) {
00142 
00143 }

tpl3d ( const BoundingBox bx  )  [inline]

Definition at line 145 of file tpl3d.hpp.

00145                                        : m_nbv(0), Topology(bx) {
00146 }

~tpl3d ( void   )  [inline]

Definition at line 148 of file tpl3d.hpp.

00148                       {
00149 }


Member Function Documentation

void clear ( void   )  [inline, virtual]

Remove all vertices, edges and faces from the 3D topology.

Reimplemented in subdivision< C, with_tpl3d< V >, CELL >.

Definition at line 199 of file tpl3d.hpp.

References tpl3d< C, V >::m_edges, tpl3d< C, V >::m_faces, tpl3d< C, V >::m_vertices, and Seq< C, R >::resize().

00199             {
00200     // Should we clean up these points?
00201     m_faces.resize( 0 );
00202     m_edges.resize( 0 );
00203     m_vertices.resize( 0 );
00204 }

virtual Edge* edge ( int  i  )  [inline, virtual]

Definition at line 126 of file tpl3d.hpp.

References tpl3d< C, V >::m_edges.

00126 { return m_edges[i] ; }

Seq<Edge *> edges ( void   )  const [inline]

Definition at line 122 of file tpl3d.hpp.

References tpl3d< C, V >::m_edges.

00122 { return m_edges ; }

virtual Face* face ( int  i  )  [inline, virtual]

Definition at line 127 of file tpl3d.hpp.

References tpl3d< C, V >::m_faces.

00127 { return m_faces[i] ; }

Seq<Face *> faces ( void   )  const [inline]

Definition at line 123 of file tpl3d.hpp.

References tpl3d< C, V >::m_faces.

00123 { return m_faces ; }

void insert ( BoundingBox bx,
bool  cross = false 
) [inline, virtual, inherited]

Definition at line 134 of file topology.hpp.

References mmx::shape::cross(), topology< C, V >::insert(), bounding_box< C, V >::xmax(), bounding_box< C, V >::xmin(), bounding_box< C, V >::ymax(), bounding_box< C, V >::ymin(), bounding_box< C, V >::zmax(), and bounding_box< C, V >::zmin().

00134                                                           {
00135   Point 
00136     *p0= new Point(bx->xmin(),bx->ymin(),bx->zmin()),
00137     *p1= new Point(bx->xmin(),bx->ymax(),bx->zmin()),
00138     *p2= new Point(bx->xmax(),bx->ymax(),bx->zmin()),
00139     *p3= new Point(bx->xmax(),bx->ymin(),bx->zmin());
00140   
00141   this->insert(p0);this->insert(p1); this->insert(new Edge(p0,p1));
00142   this->insert(p1);this->insert(p2); this->insert(new Edge(p1,p2));
00143   this->insert(p2);this->insert(p3); this->insert(new Edge(p2,p3));
00144   this->insert(p3);this->insert(p0); this->insert(new Edge(p3,p0));
00145       
00146   Point 
00147     *q0= new Point(bx->xmin(),bx->ymin(),bx->zmax()),
00148     *q1= new Point(bx->xmin(),bx->ymax(),bx->zmax()),
00149     *q2= new Point(bx->xmax(),bx->ymax(),bx->zmax()),
00150     *q3= new Point(bx->xmax(),bx->ymin(),bx->zmax());
00151   
00152   this->insert(q0);this->insert(q1); this->insert(new Edge(q0,q1));
00153   this->insert(q1);this->insert(q2); this->insert(new Edge(q1,q2));
00154   this->insert(q2);this->insert(q3); this->insert(new Edge(q2,q3));
00155   this->insert(q3);this->insert(q0); this->insert(new Edge(q3,q0));
00156   
00157   this->insert(p0);this->insert(q0);this->insert(new Edge(p0,q0));
00158   this->insert(p1);this->insert(q1);this->insert(new Edge(p1,q1));
00159   this->insert(p2);this->insert(q2);this->insert(new Edge(p2,q2));
00160   this->insert(p3);this->insert(q3);this->insert(new Edge(p3,q3));
00161 
00162   if(cross) {
00163     Point 
00164       *r0= new Point(bx->xmin(),bx->ymin(),bx->zmax()),
00165       *r1= new Point(bx->xmin(),bx->ymax(),bx->zmax()),
00166       *r2= new Point(bx->xmax(),bx->ymax(),bx->zmax()),
00167       *r3= new Point(bx->xmax(),bx->ymin(),bx->zmax());
00168 
00169     this->insert(r0);this->insert(r2);this->insert(new Edge(r0,r2));
00170     this->insert(r1);this->insert(r3);this->insert(new Edge(r1,r3));
00171   }
00172 }

void insert ( Face f  )  [inline, virtual]

Reimplemented from topology< C, V >.

Definition at line 185 of file tpl3d.hpp.

References tpl3d< C, V >::m_faces.

00185                      { 
00186     m_faces<<f;
00187 }

void insert ( Edge e  )  [inline, virtual]

Implements topology< C, V >.

Definition at line 180 of file tpl3d.hpp.

References tpl3d< C, V >::m_edges.

00180                     { 
00181     m_edges<<e;
00182 }

void insert ( Point p  )  [inline, virtual]

Implements topology< C, V >.

Definition at line 161 of file tpl3d.hpp.

References vertex< C, N, V >::index(), tpl3d< C, V >::m_nbv, tpl3d< C, V >::m_vertices, and vertex< C, N, V >::set_index().

Referenced by tpl3d< C, V >::insert_edge(), tpl3d< C, V >::push_back_vertex(), and bcell3d_algebraic_surface< C, V >::topology_regular().

00161                       {
00162     //use<point_def,C,V>::point_insertor(m_vertices, p);
00163     if (p->index()<0) {
00164         p->set_index(m_nbv);
00165         m_vertices << p;
00166         m_nbv++;
00167     }
00168 }

void insert_edge ( Point p1,
Point p2 
) [inline, virtual]

Implements topology< C, V >.

Definition at line 172 of file tpl3d.hpp.

References vertex< C, N, V >::index(), tpl3d< C, V >::insert(), and tpl3d< C, V >::m_edges.

Referenced by tpl3d< C, V >::push_back_edge().

00172                                         {
00173     if (p1->index()<0) this->insert(p1);
00174     if (p2->index()<0) this->insert(p2);
00175     m_edges<< new Edge(p1,p2);
00176 }

bool insert_regular ( Cell bcell  )  [inline]

Definition at line 153 of file tpl3d.hpp.

References bcell< C, V >::insert_regular().

Referenced by mesher2d< C, V >::run().

00153                              {
00154     //  m_leaves <<cl;// put in the leaves and will be treated at the end
00155     return cl->insert_regular(this);
00156     //  return true;
00157 }

void insert_singular ( BoundingBox  )  [inline, virtual]

Definition at line 190 of file tpl3d.hpp.

00190                                     {
00191 }

void insert_singular ( Point  )  [inline, virtual]

Implements topology< C, V >.

Definition at line 194 of file tpl3d.hpp.

00194                               {
00195     //  m_specials<<p;
00196 }

int nbe ( void   )  const [inline]

Definition at line 118 of file tpl3d.hpp.

References tpl3d< C, V >::m_edges, and Seq< C, R >::size().

00118 { return m_edges.size(); }

int nbf (  )  const [inline]

Definition at line 119 of file tpl3d.hpp.

References tpl3d< C, V >::m_faces, and Seq< C, R >::size().

00119 { return m_faces.size(); }

int nbv ( void   )  const [inline]

Definition at line 117 of file tpl3d.hpp.

References tpl3d< C, V >::m_vertices, and Seq< C, R >::size().

00117 { return m_vertices.size(); }

void push_back_edge ( int  b,
int  e 
) [inline]

Definition at line 112 of file tpl3d.hpp.

References tpl3d< C, V >::insert_edge(), and tpl3d< C, V >::vertex().

00112 {this->insert_edge(this->vertex(b), this->vertex(e));}

void push_back_vertex ( Point p  )  [inline]

Definition at line 111 of file tpl3d.hpp.

References tpl3d< C, V >::insert().

00111 {this->insert(p);}

void set_precision ( double  eps  )  [inline, inherited]

Reimplemented in subdivision< C, with_tpl3d< V >, CELL >.

Definition at line 130 of file topology.hpp.

00130                                         {
00131   //m_minprec = eps;
00132 }

void set_smoothness ( double  eps  )  [inline, inherited]

Reimplemented in subdivision< C, with_tpl3d< V >, CELL >.

Definition at line 126 of file topology.hpp.

00126                                          {
00127   //m_maxprec = eps;
00128 }

virtual Point* vertex ( int  i  )  [inline, virtual]

Definition at line 125 of file tpl3d.hpp.

References tpl3d< C, V >::m_vertices.

Referenced by tpl3d< C, V >::push_back_edge().

00125 { return m_vertices[i] ; }

Seq<Point *> vertices ( void   )  const [inline]

Definition at line 121 of file tpl3d.hpp.

References tpl3d< C, V >::m_vertices.

00121 { return m_vertices ; }


Member Data Documentation

int m_nbv

Definition at line 138 of file tpl3d.hpp.

Referenced by tpl3d< C, V >::insert().


The documentation for this class was generated from the following file:

Generated on 6 Dec 2012 for shape by  doxygen 1.6.1