00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __GEO_Profiles_h__
00021 #define __GEO_Profiles_h__
00022
00023 #include "GEO_API.h"
00024 #include <GD/GD_Detail.h>
00025 #include <GD/GD_TrimLoop.h>
00026
00027 class UT_BoundingBox;
00028 class GB_Basis;
00029 class GB_PrimitiveGroup;
00030 class GD_Face;
00031 class GD_TrimLoop;
00032 class GEO_Face;
00033 class GEO_TPSurf;
00034 class GEO_Detail;
00035
00036 class GEO_API GEO_Profiles : public GD_Detail
00037 {
00038 friend class GEO_TPSurf;
00039
00040 public:
00041 GEO_Profiles(GEO_TPSurf &tpsurf);
00042 virtual ~GEO_Profiles();
00043
00044
00045
00046
00047 GD_Face *map(const GEO_Face &face, UT_Axis3::axis uaxis,
00048 UT_Axis3::axis vaxis, float umin, float umax,
00049 float vmin, float vmax, int unif,
00050 UT_BoundingBox *bbox = 0);
00051
00052
00053
00054 GD_Face *map(const GEO_Face &face,
00055 UT_Axis3::axis uaxis = UT_Axis3::XAXIS,
00056 UT_Axis3::axis vaxis = UT_Axis3::YAXIS);
00057
00058
00059
00060
00061
00062 int map(const GB_PrimitiveGroup &faces,
00063 UT_Axis3::axis uaxis,
00064 UT_Axis3::axis vaxis, float umin, float umax,
00065 float vmin, float vmax, int unif,
00066 GEO_Detail *gdp = 0);
00067
00068
00069
00070
00071 int remap(GD_Primitive &profile, float umin, float umax,
00072 float vmin, float vmax, int unif)
00073 {
00074 return remap(profile.getNum(),umin, umax, vmin,
00075 vmax, unif);
00076 }
00077 int remap(int profileidx, float umin, float umax,
00078 float vmin, float vmax, int unif);
00079
00080
00081
00082 void reverseU(void);
00083 void reverseV(void);
00084
00085
00086
00087 virtual void getDomainBBox(float &u0, float &v0,
00088 float &u1, float &v1) const;
00089
00090 GD_TrimLoop *getTrimLoops(GD_TrimRule rule);
00091
00092 int getMaxHeight();
00093 int getBaseDir();
00094
00095 const GEO_TPSurf &getSurf() const { return mySurf; }
00096
00097 private:
00098
00099 GEO_TPSurf &mySurf;
00100
00101 int getUVRange(float umin, float umax, float vmin,
00102 float vmax, int unif, float &uka,
00103 float &ukb, float &vka, float &vkb,
00104 GB_Basis *&ubunif, GB_Basis *&vbunif,
00105 GB_Basis *&uchrd, GB_Basis *&vchrd) const;
00106
00107 GD_Face *doMap(const GEO_Face &face,
00108 UT_Axis3::axis uaxis, UT_Axis3::axis vaxis,
00109 float uka, float ulen, float vka, float vlen,
00110 int unif, GB_Basis *ubunif, GB_Basis *vbunif,
00111 GB_Basis *ubchord, GB_Basis *vbchord,
00112 UT_BoundingBox *bbox);
00113
00114 void doMap(GD_Face &face,
00115 float uka, float ulen, float vka, float vlen,
00116 int unif, GB_Basis *ubunif, GB_Basis *vbunif,
00117 GB_Basis *ubchord, GB_Basis *vbchord);
00118
00119
00120 friend ostream &operator<<(ostream &os, const GEO_Profiles &d)
00121 {
00122 d.save(os, 0, 0);
00123 return os;
00124 }
00125 };
00126
00127 #endif