shape_doc 0.1
box_face< C, V > Struct Template Reference

#include <box_face.hpp>

List of all members.

Public Types

Public Member Functions

Public Attributes


Detailed Description

template<class C, class V>
struct mmx::shape::box_face< C, V >

Definition at line 16 of file box_face.hpp.


Member Typedef Documentation

typedef bounding_box<C,V> BoundingBox

Definition at line 18 of file box_face.hpp.

typedef vertex<C,V> Point

Definition at line 17 of file box_face.hpp.


Constructor & Destructor Documentation

box_face ( ) [inline]

Definition at line 19 of file box_face.hpp.

References box_face< C, V >::m_s, box_face< C, V >::m_v, and box_face< C, V >::m_var.

                 {
        m_v<<2;m_s<<0;m_var<<0<<1;
      }
box_face ( int  v1,
int  i1 
) [inline]

Definition at line 22 of file box_face.hpp.

References box_face< C, V >::m_s, box_face< C, V >::m_v, and box_face< C, V >::m_var.

                               {  
        m_v<<v1; m_s<<i1;
        switch(v1) {
        case 0:
          m_var<<1<<2;
        case 1:
          m_var<<0<<2;
        default:
          m_var<<0<<1;
        }
      }
box_face ( int  v1,
int  i1,
int  v2,
int  i2 
) [inline]

Definition at line 34 of file box_face.hpp.

References box_face< C, V >::m_s, box_face< C, V >::m_v, and box_face< C, V >::m_var.

                                               {
        m_v<<v1<<v2;
        m_s<<i1<<i2;
        m_var<<(3-v1-v2);
      }

Member Function Documentation

int fvar ( unsigned  i) const [inline]

Definition at line 81 of file box_face.hpp.

References box_face< C, V >::m_var.

{ return m_var[i]; }
bool is_valid ( const Point p,
const BoundingBox bx,
double  eps = 0.000001 
) const [inline]

Definition at line 70 of file box_face.hpp.

References box_face< C, V >::m_s, and box_face< C, V >::m_v.

                                                                                        {

        if (m_s[0] ==0 && p[m_v[0]]<bx(m_v[0],0)-eps) return false;
        if (m_s[0] ==1 && p[m_v[0]]>bx(m_v[0],1)+eps) return false;

        return true;
      }
bool is_valid ( const BoundingBox bx,
double  u,
double  eps 
) const [inline]

Definition at line 56 of file box_face.hpp.

References box_face< C, V >::m_var.

Referenced by solver_implicit< C, V >::edge_point(), and solver_implicit< C, V >::face_point().

                                                                           {
        if(m_var[0]==0)
          return u-eps>(bx)(m_var[0],0);
        else
          return u+eps<(bx)(m_var[0],1);
      }
bool is_valid_scale ( double  u,
double  eps 
) const [inline]

Definition at line 63 of file box_face.hpp.

References box_face< C, V >::m_var.

                                                         {
        if(m_var[0]==0)
          return u-eps>0;
        else
          return u+eps<1;
      }
double lower ( const BoundingBox bx) const [inline]

Definition at line 83 of file box_face.hpp.

References box_face< C, V >::m_var.

Referenced by solver_implicit< C, V >::common_edge_point(), and solver_implicit< C, V >::edge_point().

                                                 { 
        return (bx)(m_var[0],0); 
      }
Point* new_point ( const BoundingBox bx,
double  u 
) const [inline]

Definition at line 40 of file box_face.hpp.

References box_face< C, V >::m_s, box_face< C, V >::m_v, and box_face< C, V >::m_var.

Referenced by solver_implicit< C, V >::common_edge_point(), solver_implicit< C, V >::edge_point(), and solver_implicit< C, V >::face_point().

                                                               {
        double pt[3];
        pt[m_var[0]]= u;
        pt[m_v[0]] = (bx)(m_v[0],m_s[0]);
        pt[m_v[1]] = (bx)(m_v[1],m_s[1]);
        return new Point(pt[0],pt[1],pt[2]);
      }
Point* new_point ( const BoundingBox bx,
double  u,
double  v 
) const [inline]

Definition at line 48 of file box_face.hpp.

References box_face< C, V >::m_s, box_face< C, V >::m_v, and box_face< C, V >::m_var.

                                                                         {
        double pt[3];
        pt[m_var[0]]= bx(m_var[0],0)+ u*(bx(m_var[0],1)-bx(m_var[0],0));        
        pt[m_var[1]]= bx(m_var[1],0)+ v*(bx(m_var[1],1)-bx(m_var[1],0));        
        pt[m_v[0]] = (bx)(m_v[0],m_s[0]);
        return new Point(pt[0],pt[1],pt[2], m_v[0]);
      }
double upper ( const BoundingBox bx) const [inline]

Definition at line 86 of file box_face.hpp.

References box_face< C, V >::m_var.

Referenced by solver_implicit< C, V >::common_edge_point(), and solver_implicit< C, V >::edge_point().

                                                 { 
        return (bx)(m_var[0],1); 
      }

Member Data Documentation


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