cgma
CubitQuadFacet.hpp
Go to the documentation of this file.
00001 #ifndef CUBITQUADFACET_HPP
00002 #define CUBITQUADFACET_HPP
00003 
00004 #include "CubitDefines.h"
00005 #include "FacetEntity.hpp"
00006 class CubitFacet;
00007 class CubitVector;
00008 class CubitPoint;
00009 
00010 class CubitQuadFacet : public FacetEntity
00011 {
00012 private:
00013   void map_to_tri_system(double u, double v, int &tri_index,
00014                          double &A, double &B, double &C);
00015     //- map the u,v quad system into one of its triangle's area coordinate system
00016   CubitStatus eval_derivatives( double u, double v,
00017                                 CubitVector &point,
00018                                 CubitVector &du,
00019                                 CubitVector &dv );
00020     //- evaluate derivatives on the quad
00021 
00022 public:
00023   CubitQuadFacet( );
00024   virtual ~CubitQuadFacet();
00025 
00026   virtual int tri_to_quad_index( int tri_index, int pt_index ) = 0;
00027     // return the point index on the quad facet gicen one of its triangles
00028     // and the point index on the triangle (indecies start at 0)
00029 
00030   virtual CubitFacet *get_tri_facet( int index ) = 0;
00031     // return one of the underlying triangles (index should be 0 or 1)
00032 
00033   virtual CubitFacet *get_tri_facet_at_point( CubitPoint *point_ptr ) = 0;
00034     // return the underlying triangle of which the point_ptr is a vertex
00035 
00036   virtual void remove_tri_facets(  ) = 0;
00037     // used prior to delete if tri facets have already been deleted by
00038     // another mechanism.
00039 
00040   virtual void points (CubitPoint *points[4]) = 0;
00041     // return the four vertices of the quad facet
00042 
00043   virtual CubitPoint *point( int index ) = 0;
00044     // return the specified point
00045   virtual CubitFacetEdge *edge( int index ) = 0;
00046     // return the specified edge
00047 
00048   void get_control_points( double *ctrl_pts );
00049   void set_control_points( double *ctrl_pts );
00050     // get and set the control points
00051 
00052   CubitStatus evaluate( double u, double v, 
00053                         CubitVector *eval_point,
00054                         CubitVector *eval_normal = NULL,
00055                         CubitVector *eval_du = NULL,
00056                         CubitVector *eval_dv = NULL );
00057     // evaluate u, v location and normal on facet. Pass in NULL if 
00058     // point or normal are not to be evaluated
00059 
00060   virtual void debug_draw(int color=-1, int flush_it = 1, int draw_uv=0);
00061     // draw the underlying tri facets
00062 
00063   virtual void get_parents(DLIList<FacetEntity *> &){}; 
00064     // dummy for this class 
00065   virtual void points(DLIList<CubitPoint*> &point_list ); 
00066   virtual void facets(DLIList<CubitFacet*> &facet_list );
00067   virtual void edges(DLIList<CubitFacetEdge*> &edge_list );
00068 
00069   CubitStatus init_patch(  );
00070     // computes the interior control points for the quad facet and
00071     // stores them with the quad facet.  Assumes edge control points
00072     // on the four boundary edges have already been computed
00073 
00074 };
00075 
00076 #endif
00077 
00078 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines