transformation.h

Go to the documentation of this file.
00001 
00002 
00003 //**************************************************************************/
00004 
00005 // Copyright (c) 2008 Autodesk, Inc.
00006 
00007 // All rights reserved.
00008 
00009 //
00010 
00011 // Use of this software is subject to the terms of the Autodesk license
00012 
00013 // agreement provided at the time of installation or download, or which
00014 
00015 // otherwise accompanies this software in either electronic or hard copy form.
00016 
00017 //
00018 
00019 //**************************************************************************/
00020 
00021 // DESCRIPTION:
00022 
00023 // CREATED: October 2008
00024 
00025 //**************************************************************************/
00026 
00027 
00028 
00029 namespace mudbox {
00030 
00031 
00032 
00034 
00036 
00038 
00040 
00042 
00043 class MBDLL_DECL GroupNode : virtual public TreeNode
00044 
00045 {
00046 
00047     DECLARE_CLASS;
00048 
00049 
00050 
00051 public:
00052 
00054 
00056 
00058 
00059     class Transformation *Transformation( void ) const;
00060 
00061 };
00062 
00063 
00064 
00066 
00068 
00070 
00072 
00074 
00076 
00078 
00080 
00082 
00084 
00085 class MBDLL_DECL Transformation : virtual public GroupNode
00086 
00087 {
00088 
00089     DECLARE_CLASS;
00090 
00091 
00092 
00093 public:
00094 
00096 
00098 
00100 
00102 
00104 
00106 
00108 
00109     virtual Vector TransformToWorld(
00110 
00111         const Vector &vL,   
00112 
00113         float fW = 1.0f     
00114 
00115         );
00116 
00117 
00118 
00120 
00122 
00124 
00126 
00128 
00130 
00132 
00133     virtual Vector TransformToLocal(
00134 
00135         const Vector &vW,   
00136 
00137         float fW = 1.0f     
00138 
00139         );
00140 
00141 
00142 
00144 
00146 
00147     virtual Matrix LocalToWorldMatrix( void );
00148 
00149 
00150 
00152 
00154 
00155     virtual Matrix WorldToLocalMatrix( void );
00156 
00157 
00158 
00160 
00162 
00163     virtual void SetLocalToWorldMatrix(
00164 
00165         const Matrix &mMatrix   
00166 
00167         );
00168 
00169 
00170 
00172 
00174 
00176 
00177     virtual Vector Rotation( void ) const;
00178 
00179 
00180 
00182 
00184 
00185     virtual void SetRotation(
00186 
00187         const Vector &vYawPitchRoll 
00188 
00189         );
00190 
00191 
00192 
00194 
00196 
00197     virtual void SetRotation(
00198 
00199         const Matrix &mRotation 
00200 
00201         );
00202 
00203 
00204 
00206 
00208 
00209     virtual void AddRotation(
00210 
00211         const Vector &vYawPitchRoll,    
00212 
00213         bool bAfter = false             
00214 
00215         );
00216 
00217 
00218 
00220 
00222 
00223     virtual void AddRotation(
00224 
00225         const Vector &vAxis,        
00226 
00227         float fAngle                
00228 
00229         );
00230 
00231 
00232 
00234 
00236 
00238 
00239     virtual Vector Position( void ) const;
00240 
00241 
00242 
00244 
00245     virtual void SetPosition(
00246 
00247         const Vector &vVector   
00248 
00249         );
00250 
00251 
00252 
00254 
00255     virtual Vector Scale( void ) const;
00256 
00257 
00258 
00260 
00261     virtual void SetScale(
00262 
00263         const Vector &vScale    
00264 
00265         );
00266 
00267 
00268 
00270 
00271     virtual Vector Pivot( void ) const;
00272 
00273 
00274 
00276 
00277     virtual void SetPivot( const Vector &vNewPivot );   
00278 
00279 };
00280 
00281 
00282 
00284 
00286 
00288 
00290 
00292 
00294 
00296 
00298 
00300 
00302 
00303 class MBDLL_DECL TransformationPalette : virtual public TreeNode
00304 
00305 {
00306 
00307 
00308 
00309     DECLARE_CLASS;
00310 
00311 
00312 
00313 public:
00314 
00316 
00318 
00319     virtual int TransformationCount( void ) const;
00320 
00321 
00322 
00324 
00325     enum TransformationType
00326 
00327     {
00328 
00329         eMatrix,
00330 
00331         eDualQuaternion
00332 
00333     };
00334 
00335 
00336 
00338 
00340 
00342 
00343     virtual TransformationType Type( void ) const;
00344 
00345 
00346 
00348 
00349     virtual Matrix AsMatrix( 
00350 
00351         int iIndex 
00352 
00353         ) const;
00354 
00355 
00356 
00358 
00359     virtual DualQuaternion AsDualQuaternion( 
00360 
00361         int iIndex 
00362 
00363         ) const;
00364 
00365 
00366 
00368 
00370 
00371     virtual void SetupVertexProcessing( void ) const;
00372 
00373 
00374 
00376 
00377     virtual void RestoreVertexProcessing( void ) const;
00378 
00379 };
00380 
00381 
00382 
00383 }; // end of namespace mudbox
00384