shape_doc 0.1
topology< C, V > Class Template Reference

#include <topology.hpp>

Inheritance diagram for topology< C, V >:
SHAPE_OFV topology2d< C, V > tpl3d< C, V > arrangement2d< C, V > semialgebraic2d< C, V > 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::topology< C, V >

Definition at line 54 of file topology.hpp.


Member Typedef Documentation

typedef with_idx<V> W

Definition at line 58 of file topology.hpp.


Constructor & Destructor Documentation

topology ( ) [inline]

Definition at line 66 of file topology.hpp.

{};
topology ( const BoundingBox bx)
~topology ( void  ) [virtual]

Definition at line 101 of file topology.hpp.

{}

Member Function Documentation

unsigned count ( void  ) [inline]

Definition at line 84 of file topology.hpp.

References topology< C, V >::m_objects.

{ return m_objects.size(); }
void insert ( BoundingBox bx,
bool  cross = false 
) [virtual]

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));
  }
}
virtual void insert ( Edge ) [pure virtual]

Implemented in topology2d< C, V >, and tpl3d< C, V >.

void operator<< ( Shape s) [inline]

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]

Definition at line 81 of file topology.hpp.

References topology< C, V >::m_objects.

{ m_objects.push_back(s); }
void set_precision ( double  eps)

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)

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

Definition at line 103 of file topology.hpp.

                                         {
  m_maxprec = eps;
}
typedef SHAPE_OF ( )

Member Data Documentation

Definition at line 91 of file topology.hpp.

double m_maxprec

Definition at line 88 of file topology.hpp.

double m_minprec

Definition at line 89 of file topology.hpp.


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