shape_doc 0.1
tpl3d< C, V > Class Template Reference

#include <tpl3d.hpp>

Inheritance diagram for tpl3d< C, V >:
topology< C, V > SHAPE_OFV subdivision< C, with_tpl3d< V >, SURFACE, 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 188 of file tpl3d.hpp.


Member Typedef Documentation

Reimplemented from topology< C, V >.

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

Definition at line 198 of file tpl3d.hpp.

typedef cell<C,Ref> Cell

Reimplemented from topology< C, V >.

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

Definition at line 195 of file tpl3d.hpp.

typedef cell3d<C,Ref> Cell3d

Definition at line 196 of file tpl3d.hpp.

Reimplemented from topology< C, V >.

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

Definition at line 193 of file tpl3d.hpp.

Reimplemented from topology< C, V >.

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

Definition at line 194 of file tpl3d.hpp.

Reimplemented from topology< C, V >.

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

Definition at line 192 of file tpl3d.hpp.

typedef surface<Ref> Surface

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

Definition at line 197 of file tpl3d.hpp.

typedef topology<C,V> Topology

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

Definition at line 190 of file tpl3d.hpp.

typedef with_idx<V> W [inherited]

Definition at line 58 of file topology.hpp.


Constructor & Destructor Documentation

tpl3d ( ) [inline]

Definition at line 200 of file tpl3d.hpp.

{};
tpl3d ( const BoundingBox bx)

Definition at line 235 of file tpl3d.hpp.

                                       : Topology(bx) {
}
~tpl3d ( void  )

Definition at line 238 of file tpl3d.hpp.

                      {
}

Member Function Documentation

void clear ( void  ) [virtual]

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

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

Definition at line 275 of file tpl3d.hpp.

            {
  // Should we clean up these points?
  m_faces.resize( 0 );
  m_edges.resize( 0 );
  m_vertices.resize( 0 );
}
unsigned count ( void  ) [inline, inherited]

Definition at line 84 of file topology.hpp.

References topology< C, V >::m_objects.

{ return m_objects.size(); }
Seq<Edge *> edges ( void  ) const [inline]

Definition at line 219 of file tpl3d.hpp.

References tpl3d< C, V >::m_edges.

{ return m_edges ; }
Seq<Face *> faces ( void  ) const [inline]

Definition at line 220 of file tpl3d.hpp.

References tpl3d< C, V >::m_faces.

{ return m_faces ; }
virtual Face* faces ( int  i) [inline, virtual]

Definition at line 223 of file tpl3d.hpp.

References tpl3d< C, V >::m_faces.

{ return m_faces[i] ; }
void insert ( BoundingBox bx,
bool  cross = false 
) [virtual, inherited]

Definition at line 111 of file topology.hpp.

References Edge, mmx::shape::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().

                                                        {
  Point 
    *p0= new Point(bx->xmin(),bx->ymin(),bx->zmin()),
    *p1= new Point(bx->xmin(),bx->ymax(),bx->zmin()),
    *p2= new Point(bx->xmax(),bx->ymax(),bx->zmin()),
    *p3= new Point(bx->xmax(),bx->ymin(),bx->zmin());
  
  this->insert(p0);this->insert(p1); this->insert(new Edge(p0,p1));
  this->insert(p1);this->insert(p2); this->insert(new Edge(p1,p2));
  this->insert(p2);this->insert(p3); this->insert(new Edge(p2,p3));
  this->insert(p3);this->insert(p0); this->insert(new Edge(p3,p0));
      
  Point 
    *q0= new Point(bx->xmin(),bx->ymin(),bx->zmax()),
    *q1= new Point(bx->xmin(),bx->ymax(),bx->zmax()),
    *q2= new Point(bx->xmax(),bx->ymax(),bx->zmax()),
    *q3= new Point(bx->xmax(),bx->ymin(),bx->zmax());
  
  this->insert(q0);this->insert(q1); this->insert(new Edge(q0,q1));
  this->insert(q1);this->insert(q2); this->insert(new Edge(q1,q2));
  this->insert(q2);this->insert(q3); this->insert(new Edge(q2,q3));
  this->insert(q3);this->insert(q0); this->insert(new Edge(q3,q0));
  
  this->insert(p0);this->insert(q0);this->insert(new Edge(p0,q0));
  this->insert(p1);this->insert(q1);this->insert(new Edge(p1,q1));
  this->insert(p2);this->insert(q2);this->insert(new Edge(p2,q2));
  this->insert(p3);this->insert(q3);this->insert(new Edge(p3,q3));

  if(cross) {
    Point 
      *r0= new Point(bx->xmin(),bx->ymin(),bx->zmax()),
      *r1= new Point(bx->xmin(),bx->ymax(),bx->zmax()),
      *r2= new Point(bx->xmax(),bx->ymax(),bx->zmax()),
      *r3= new Point(bx->xmax(),bx->ymin(),bx->zmax());

    this->insert(r0);this->insert(r2);this->insert(new Edge(r0,r2));
    this->insert(r1);this->insert(r3);this->insert(new Edge(r1,r3));
  }
}
void insert ( Edge e) [virtual]

Implements topology< C, V >.

Definition at line 256 of file tpl3d.hpp.

                    { 
  m_edges<<e; 
}
void insert ( Face f) [virtual]

Definition at line 261 of file tpl3d.hpp.

                     { 
  m_faces<<f; 
}
void insert ( Point p) [virtual]

Implements topology< C, V >.

Definition at line 251 of file tpl3d.hpp.

Referenced by cell3d_surface_algebraic< C, V >::topology_regular().

                      {
  use<point_def,V>::point_insertor(m_vertices, p); 
}
bool insert_regular ( Cell cell)

Definition at line 243 of file tpl3d.hpp.

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

                             {
  //  m_leaves <<cl;// put in the leaves and will be treated at the end
  return cl->insert_regular(this);
//  return true; 
}
void insert_singular ( Point ) [virtual]

Implements topology< C, V >.

Definition at line 270 of file tpl3d.hpp.

                              {
  //  m_specials<<p;
}
void insert_singular ( BoundingBox ) [virtual]

Definition at line 266 of file tpl3d.hpp.

                                    {
}
int nbe ( ) const [inline]

Definition at line 215 of file tpl3d.hpp.

References tpl3d< C, V >::m_edges.

{ return m_edges.size(); }
int nbf ( ) const [inline]

Definition at line 216 of file tpl3d.hpp.

References tpl3d< C, V >::m_faces.

{ return m_faces.size(); }
int nbv ( void  ) const [inline]

Definition at line 214 of file tpl3d.hpp.

References tpl3d< C, V >::m_vertices.

{ return m_vertices.size(); }
void operator<< ( Shape s) [inline, inherited]

Definition at line 82 of file topology.hpp.

References topology< C, V >::m_objects.

{ m_objects.push_back(s); }
void push_back ( Shape s) [inline, inherited]

Definition at line 81 of file topology.hpp.

References topology< C, V >::m_objects.

{ m_objects.push_back(s); }
typedef REF_OF ( )
void set_precision ( double  eps) [inherited]

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

Definition at line 107 of file topology.hpp.

                                        {
  m_minprec = eps;
}
void set_smoothness ( double  eps) [inherited]

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

Definition at line 103 of file topology.hpp.

                                         {
  m_maxprec = eps;
}
typedef SHAPE_OF ( ) [inherited]
Seq<Point *> vertices ( void  ) const [inline]

Definition at line 218 of file tpl3d.hpp.

References tpl3d< C, V >::m_vertices.

{ return m_vertices ; }
virtual Point* vertices ( int  i) [inline, virtual]

Definition at line 222 of file tpl3d.hpp.

References tpl3d< C, V >::m_vertices.

{ return m_vertices[i] ; }

Member Data Documentation

BoundingBox m_bbx [inherited]

Definition at line 91 of file topology.hpp.

Seq<Edge *> m_edges

Definition at line 231 of file tpl3d.hpp.

Referenced by tpl3d< C, V >::edges(), and tpl3d< C, V >::nbe().

Seq<Face *> m_faces

Definition at line 232 of file tpl3d.hpp.

Referenced by tpl3d< C, V >::faces(), and tpl3d< C, V >::nbf().

double m_maxprec [inherited]

Definition at line 88 of file topology.hpp.

double m_minprec [inherited]

Definition at line 89 of file topology.hpp.

Seq<Point *> m_vertices

Definition at line 230 of file tpl3d.hpp.

Referenced by tpl3d< C, V >::nbv(), and tpl3d< C, V >::vertices().


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