|
Katana Plug-in APIs 0.1
|
00001 #ifndef FnGeolibServicesXformUtil_H 00002 #define FnGeolibServicesXformUtil_H 00003 00004 #include <stdint.h> 00005 #include <limits> 00006 #include <string> 00007 #include <utility> 00008 00009 #include <FnAttribute/FnAttribute.h> 00010 #include <FnAttribute/FnGroupBuilder.h> 00011 00012 #include <FnGeolibServices/FnGeolibServicesAPI.h> 00013 #include <FnGeolibServices/ns.h> 00014 #include <FnGeolibServices/suite/FnXFormUtilSuite.h> 00015 00016 #include <FnPluginSystem/FnPluginSystem.h> 00017 00018 FNGEOLIBSERVICES_NAMESPACE_ENTER 00019 { 00045 class FNGEOLIBSERVICES_API FnXFormUtil 00046 { 00047 public: 00054 static std::pair<FnAttribute::DoubleAttribute, bool> 00055 CalcTransformMatrixAtTime( 00056 const FnAttribute::GroupAttribute & groupAttr, 00057 float time); 00058 00067 static std::pair<FnAttribute::DoubleAttribute, bool> 00068 CalcTransformMatrixAtTimes( 00069 const FnAttribute::GroupAttribute& groupAttr, 00070 const float* time, int numSamples); 00071 00078 static std::pair<FnAttribute::DoubleAttribute, bool> 00079 CalcTransformMatrixAtExistingTimes( 00080 const FnAttribute::GroupAttribute & groupAttr); 00081 00082 // 00083 // Bounds handling 00084 // 00085 00101 static FnAttribute::DoubleAttribute CreateBoundsAttr( 00102 double xMin, double xMax, 00103 double yMin, double yMax, 00104 double zMin, double zMax); 00105 00118 static FnAttribute::DoubleAttribute MergeBounds( 00119 const FnAttribute::DoubleAttribute & boundAttr1, 00120 const FnAttribute::DoubleAttribute & boundAttr2); 00121 00122 00144 static FnAttribute::DoubleAttribute 00145 CalcTransformedBoundsAtExistingTimes( 00146 const FnAttribute::Attribute& xform, 00147 const FnAttribute::DoubleAttribute& boundAttr); 00148 00157 static FnAttribute::DoubleAttribute CollapseBoundsTimeSamples( 00158 const FnAttribute::DoubleAttribute & boundAttr); 00159 00160 00186 static void InitXForm(FnAttribute::GroupBuilder & gb); 00187 00188 static void InitXForm(FnAttribute::GroupBuilder & gb, 00189 const FnAttribute::Attribute & xform); 00190 00191 static void PushRotateAttr(FnAttribute::GroupBuilder & gb, 00192 double angle, double x, double y, double z); 00193 00194 static FnAttribute::Attribute PushRotateAttr( 00195 const FnAttribute::Attribute & xform, 00196 double angle, double x, double y, double z); 00197 00198 static void PushTranslateAttr(FnAttribute::GroupBuilder & gb, 00199 double x, double y, double z); 00200 00201 static FnAttribute::Attribute PushTranslateAttr( 00202 const FnAttribute::Attribute & xform, 00203 double x, double y, double z); 00204 00205 static void PushScaleAttr( 00206 FnAttribute::GroupBuilder & gb, 00207 double x, double y, double z); 00208 00209 static FnAttribute::Attribute PushScaleAttr( 00210 const FnAttribute::Attribute & xform, 00211 double x, double y, double z); 00212 00213 static void PushMatrixAttr( 00214 FnAttribute::GroupBuilder & gb, 00215 const double * mtx16); 00216 00217 static FnAttribute::Attribute PushMatrixAttr( 00218 const FnAttribute::Attribute & xform, 00219 const double * mtx16); 00220 00221 static void PushOriginAttr(FnAttribute::GroupBuilder & gb); 00222 00223 static FnAttribute::Attribute PushOriginAttr( 00224 const FnAttribute::Attribute & xform); 00225 00226 private: 00227 FnXFormUtil(); 00228 00229 static const FnXFormUtilHostSuite_v1 *_getSuite(); 00230 }; 00232 } 00233 FNGEOLIBSERVICES_NAMESPACE_EXIT 00234 00235 00236 #endif // FnGeolibServicesXformUtil_H
1.7.3