fbmodelpath3d.h

Go to the documentation of this file.
00001 #ifndef __FBMODEL_PATH3D_H__
00002 #define __FBMODEL_PATH3D_H__
00003 /**************************************************************************
00004  Copyright (c) 1994 - 2009 Autodesk, Inc. and/or its licensors.
00005  All Rights Reserved.
00006  
00007  The coded instructions, statements, computer programs, and/or related 
00008  material (collectively the "Data") in these files contain unpublished 
00009  information proprietary to Autodesk, Inc. and/or its licensors, which is 
00010  protected by Canada and United States of America federal copyright law 
00011  and by international treaties.
00012  
00013  The Data may not be disclosed or distributed to third parties, in whole 
00014  or in part, without the prior written consent of Autodesk, Inc. 
00015  ("Autodesk").
00016  
00017  THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
00018  ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO 
00019  WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR 
00020  ARISING BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES 
00021  OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR 
00022  PURPOSE OR USE. WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT 
00023  WARRANT THAT THE OPERATION OF THE DATA WILL BE UNINTERRUPTED OR ERROR 
00024  FREE.
00025  
00026  IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS 
00027  OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR 
00028  EXPENSES OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE 
00029  DAMAGES OR OTHER SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS 
00030  OF PROFITS, REVENUE OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR 
00031  DAMAGES OF ANY KIND), HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF 
00032  LIABILITY, WHETHER DERIVED FROM CONTRACT, TORT (INCLUDING, BUT NOT 
00033  LIMITED TO, NEGLIGENCE), OR OTHERWISE, ARISING OUT OF OR RELATING TO THE 
00034  DATA OR ITS USE OR ANY OTHER PERFORMANCE, WHETHER OR NOT AUTODESK HAS 
00035  BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
00036  
00037 **************************************************************************/
00038 
00043 #include <kaydaradef.h>
00044 
00045 #ifndef FBSDK_DLL 
00046     #define FBSDK_DLL K_DLLIMPORT
00047 #endif
00048 
00049 #include <fbsdk/fbcore.h>
00050 #include <fbsdk/fbcomponent.h>
00051 #include <fbsdk/fbmodel.h>
00052 
00053 #ifdef FBSDKUseNamespace
00054     namespace FBSDKNamespace {
00055 #endif
00056 
00058 // FBModelPath3D
00060 __FB_FORWARD( FBModelPath3D );
00061 
00063 class FBSDK_DLL FBModelPath3D : public FBModel
00064 {
00065     __FBClassDeclare(FBModelPath3D, FBModel);
00066 
00067 public:
00068 
00069     FBPropertyAnimatableColor Color;
00070 
00093     FBModelPath3D(const char* pName, HIObject pObject=NULL);
00094 
00095     //--- Visual ------------------------------------------------------------------------------------------------------------------------
00096 
00100     void        ShowCurveControls(bool pShow);
00101 
00105     void        ShowCurvePoints(bool pShow);
00106 
00107 
00108     //--- Key Manipulation --------------------------------------------------------------------------------------------------------------
00112     int         PathKeyGetCount();
00113 
00118     FBVector4d  PathKeyGet(int pKeyIndex);
00119 
00125     void        PathKeySet(int pKeyIndex, FBVector4d pTLocal, bool pUpdate=true);
00126 
00135     K_DEPRECATED void        PathSetKeyLeftRightTangeant(int pKeyIndex, FBVector4d pKeyTLocal, FBVector4d pLeftTangentTLocal, FBVector4d pRightTangentTLocal, bool pUpdate=true); 
00136 
00144     void        PathKeySetLeftRightTangent(int pKeyIndex, FBVector4d pKeyTLocal, FBVector4d pLeftTangentTLocal, FBVector4d pRightTangentTLocal, bool pUpdate=true); 
00145 
00149     void        PathKeyRemove(int pKeyIndex);
00150 
00153     void        PathKeyClear();
00154 
00155     //--- Tangent ----------------------------------------------------------------------------------------------------------------------
00156 
00163     K_DEPRECATED void        PathKeySetLeftTangeant(int pKeyIndex, FBVector4d pTLocal, bool pUpdate=true);
00164 
00170     void        PathKeySetLeftTangent(int pKeyIndex, FBVector4d pTLocal, bool pUpdate=true);
00171 
00178     K_DEPRECATED void        PathKeySetRightTangeant(int pKeyIndex, FBVector4d pTLocal, bool pUpdate=true);
00179 
00185     void        PathKeySetRightTangent(int pKeyIndex, FBVector4d pTLocal, bool pUpdate=true);
00186 
00192     K_DEPRECATED FBVector4d  PathKeyGetLeftTangeant(int pKeyIndex);
00193 
00198     FBVector4d  PathKeyGetLeftTangent(int pKeyIndex);
00199 
00205     K_DEPRECATED FBVector4d  PathKeyGetRightTangeant(int pKeyIndex);
00206 
00211     FBVector4d  PathKeyGetRightTangent(int pKeyIndex);
00212 
00218     void        PathKeySetXDerivative(int pKeyIndex, double pDerivative, bool pUpdate);
00219 
00225     void        PathKeySetYDerivative(int pKeyIndex, double pDerivative, bool pUpdate);
00226 
00232     void        PathKeySetZDerivative(int pKeyIndex, double pDerivative, bool pUpdate);
00233 
00239     void        PathKeySetXYZDerivative(int pKeyIndex, FBVector4d pDerivative, bool pUpdate);
00240 
00245     FBVector4d  PathKeyGetXYZDerivative(int pKeyIndex);
00246 
00252     K_DEPRECATED double      PatKeyGetLeftTangeantLength(int pKeyIndex);
00253 
00258     double      PathKeyGetLeftTangentLength(int pKeyIndex);
00259 
00265     K_DEPRECATED double      PatKeyGetRightTangeantLength(int pKeyIndex);
00266 
00271     double      PathKeyGetRightTangentLength(int pKeyIndex);
00272 
00273     //--- Path remove keys (editing) ----------------------------------------------------------------------------------------------------
00274 
00278     int         GetSelectedPathKeyCount();
00279 
00282     void        PathKeyRemoveSelected();
00283 
00284     //--- Keys Helpers ------------------------------------------------------------------------------------------------------------------
00285 
00289     int        InsertNewStartKey();
00290 
00294     int        InsertNewEndKey();
00295 
00300     int        PathKeyStartAdd(FBVector4d pTLocal);
00301 
00306     int        PathKeyEndAdd(FBVector4d pTLocal);
00307 
00308     //--- Curve -------------------------------------------------------------------------------------------------------------------------
00315     int        Total_PathKeyAdd(double pTotalPercent, FBVector4d pTLocal);
00316 
00321     int        Total_IsPathKey(double pTotalPercent);
00322 
00327     FBVector4d Total_GlobalPathEvaluate(double pTotalPercent);
00328 
00333     FBVector4d Total_LocalPathEvaluate(double pTotalPercent);
00334 
00339     FBVector4d Total_GlobalPathEvaluateDerivative(double pTotalPercent);
00340 
00345     FBVector4d Total_LocalPathEvaluateDerivative(double pTotalPercent);
00346 
00353     int        Segment_PathKeyAdd(double pSegmentPercent, FBVector4d pTLocal);
00354 
00359     int        Segment_IsPathKey(double pSegmentPercent);
00360 
00365     FBVector4d Segment_GlobalPathEvaluate(double pSegmentPercent);
00366 
00371     FBVector4d Segment_LocalPathEvaluate(double pSegmentPercent);
00372 
00377     FBVector4d Segment_GlobalPathEvaluateDerivative(double pSegmentPercent);
00378 
00383     FBVector4d Segment_LocalPathEvaluateDerivative(double pSegmentPercent);
00384 
00385     //--- Key Type Converter ------------------------------------------------------------------------------------------------------------
00386 
00391     double     ConvertTotalPercentToSegmentPercent(double pPercent);
00392 
00397     double     ConvertSegmentPercentToTotalPercent(double pPercent);
00398 
00402     double     ConvertToSegmentPercentFactor();
00403 
00407     double     ConvertToTotalPercentFactor();
00408     
00411     void      UpdateGeometry();
00412 };
00413 
00414 #ifdef FBSDKUseNamespace
00415 }
00416 #endif
00417 
00418 #endif