proj home

Files   Classes   Functions   Hierarchy  

d3marchdisp Class Reference

#include <d3marchdisp.h>

Collaboration diagram for d3marchdisp:

List of all members.

Public Member Functions

 d3marchdisp (double const _cvalue=0.0)
void eval (pt3c &P0, pt3c &P1, pt3c &P2) const

Public Attributes

double cvalue


Detailed Description

Definition at line 9 of file d3marchdisp.h.


Constructor & Destructor Documentation

d3marchdisp::d3marchdisp ( double const   _cvalue = 0.0  )  [inline]

Definition at line 20 of file d3marchdisp.h.

00021     : cvalue(_cvalue) {}


Member Function Documentation

void d3marchdisp::eval ( pt3c P0,
pt3c P1,
pt3c P2 
) const

Definition at line 29 of file d3marchdisp.cpp.

References cvalue, and point3< T >::z.

Referenced by writesurfaceobj::draw().

00030 {
00031   unsigned int res(0);
00032 
00033   if (P0.z<cvalue)
00034     res += 1;
00035   if (P1.z<cvalue)
00036     res += 2;
00037   if (P2.z<cvalue)
00038     res += 4;
00039 
00040   if (res==0)
00041     return;
00042 
00043   if (res==7)
00044     return;
00045 
00046   switch(res)
00047   {
00048     case 1: case 6:
00049       drawline( interpolate(P0,P1), interpolate(P0,P2) );
00050       break;
00051 
00052     case 2: case 5:
00053       drawline( interpolate(P1,P0), interpolate(P1,P2) );
00054       break;
00055 
00056     case 4: case 3:
00057       drawline( interpolate(P2,P0), interpolate(P2,P1) );
00058       break;
00059 
00060   }
00061 
00062 }


Member Data Documentation

Definition at line 18 of file d3marchdisp.h.

Referenced by eval().


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

Generated on Fri Mar 4 00:49:53 2011 for Chelton Evans Source by  doxygen 1.5.8