cgma
ParamCubitPlane.hpp
Go to the documentation of this file.
00001 //-------------------------------------------------------------------------
00002 // Filename      : ParamCubitPlane.hpp
00003 //
00004 // Purpose       : A class derived from CubitPlane with a parameterization,
00005 //                 essentially a planar surface.
00006 //
00007 // Special Notes : 
00008 //
00009 // Creator       : Jason Kraftcheck
00010 //
00011 // Creation Date : 07/06/98
00012 //-------------------------------------------------------------------------
00013 #ifndef PARAM_CUBIT_PLANE_HPP
00014 #define PARAM_CUBIT_PLANE_HPP
00015 
00016 #include "CubitPlane.hpp"
00017 #include "CGMUtilConfigure.h"
00018 
00019 class CubitVector;
00020 
00021 
00022 class CUBIT_UTIL_EXPORT ParamCubitPlane : public CubitPlane
00023 {
00024     public:
00025 
00026     ParamCubitPlane( const CubitVector& zero_position,
00027                      const CubitVector& u_direction,
00028                                      const CubitVector& v_direction,
00029                                      CubitStatus& result );
00030     //I zero_position
00031     //I- The position on the plane where (u,v) = (0,0).
00032     //I u_direction
00033     //I- A vector parallel to the plane along which u increases
00034     //I- and v is constant.
00035     //I v_direction
00036     //I- A vector parallel to the plane along which v increases
00037     //I- and u is constant.
00038     //O result
00039     //O- CUBIT_FAILURE if u_direction and v_direction are parallel, or
00040     //O- are of zero length.
00041     //- Create a parametric CubitPlane with the specified
00042     //- parameterization.
00043     //-
00044     //- Note:  The size of a step in the u and v directions
00045     //- is determined by the lenght of the respective 
00046     //- u and v direction vectors passed.
00047     
00048     ParamCubitPlane( const ParamCubitPlane& copy_this );
00049     //- Copy constructor.
00050     
00051     ParamCubitPlane( double A, double B, double C, double D );
00052     ParamCubitPlane( const CubitVector& normal, double D );
00053     ParamCubitPlane( const CubitVector& normal, const CubitVector& point );
00054     ParamCubitPlane( DLIList<CubitVector*>& positions );
00055     ParamCubitPlane( const CubitPlane& copy_this );
00056     //- Constructors from CubitPlane
00057     //- An arbitraty parameterization is generated.
00058     
00059     CubitStatus closest_point( const CubitVector& position,
00060                                CubitVector& closest_position ) const;
00061     //R CubitStatus
00062     //R- CUBIT_SUCCESS/CUBIT_FAILURE
00063     //I position
00064     //I- A position to evaluate
00065     //O closest_position
00066     //O- The projection of the passed position onto the surface
00067     //O- along the normal.
00068     //- Find the closest point on the plane.
00069     
00070     CubitStatus move_to_plane( CubitVector& position ) const;
00071     //R CubitStatus
00072     //R- CUBIT_SUCCESS/CUBIT_FAILURE
00073     //I position
00074     //I- A position to evaluate
00075     //O position
00076     //O- The projection of the passed position onto the surface
00077     //O- along the normal.
00078     //- Move the passed position to the plane.
00079     
00080     private:
00081     
00082     void make_parameterization();
00083     //- This method is used by various constructors to generate
00084     //- an arbitrary parameterization after the members of the
00085     //- parent class CubitPlane have been initialized.
00086     
00087     CubitVector p_, s_, t_;
00088     CubitBoolean is_plane_valid_;
00089     CubitVector n_; //Non-unit normal vector.
00090     double n_epsilon_;
00091 };
00092       
00093 #endif
00094 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines