fbsdk/fbmodelpath3d.h Source File

fbmodelpath3d.h
Go to the documentation of this file.
1 #ifndef __FBMODEL_PATH3D_H__
2 #define __FBMODEL_PATH3D_H__
3 /**************************************************************************
4  Copyright (c) 1994 - 2009 Autodesk, Inc. and/or its licensors.
5  All Rights Reserved.
6 
7  The coded instructions, statements, computer programs, and/or related
8  material (collectively the "Data") in these files contain unpublished
9  information proprietary to Autodesk, Inc. and/or its licensors, which is
10  protected by Canada and United States of America federal copyright law
11  and by international treaties.
12 
13  The Data may not be disclosed or distributed to third parties, in whole
14  or in part, without the prior written consent of Autodesk, Inc.
15  ("Autodesk").
16 
17  THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
18  ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO
19  WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR
20  ARISING BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES
21  OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
22  PURPOSE OR USE. WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT
23  WARRANT THAT THE OPERATION OF THE DATA WILL BE UNINTERRUPTED OR ERROR
24  FREE.
25 
26  IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS
27  OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR
28  EXPENSES OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE
29  DAMAGES OR OTHER SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS
30  OF PROFITS, REVENUE OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR
31  DAMAGES OF ANY KIND), HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF
32  LIABILITY, WHETHER DERIVED FROM CONTRACT, TORT (INCLUDING, BUT NOT
33  LIMITED TO, NEGLIGENCE), OR OTHERWISE, ARISING OUT OF OR RELATING TO THE
34  DATA OR ITS USE OR ANY OTHER PERFORMANCE, WHETHER OR NOT AUTODESK HAS
35  BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
36 
37 **************************************************************************/
38 
43 #include <kaydaradef.h>
44 
45 #ifndef FBSDK_DLL
46  #define FBSDK_DLL K_DLLIMPORT
47 #endif
48 
49 #include <fbsdk/fbcore.h>
50 #include <fbsdk/fbcomponent.h>
51 #include <fbsdk/fbmodel.h>
52 
53 #ifdef FBSDKUseNamespace
54  namespace FBSDKNamespace {
55 #endif
56 
58 // FBModelPath3D
60 __FB_FORWARD( FBModelPath3D );
61 
64 {
66 
67 public:
92  FBModelPath3D(const char* pName, HIObject pObject=NULL);
93 
96  {
98  eVector
99  };
101 
104  {
105  eArchitectural = 0,
108  eM,
109  eKM
110  };
112 
115  {
117  eArrow
118  };
119 
121 
122  PropertyKeyPropertyBehavior KeyPropertyBehavior;
126  PropertyUnitType PathLengthUnit;
130  PropertyPathEndCapStyle PathEndCapStyle;
133 
134  //--- Visual ------------------------------------------------------------------------------------------------------------------------
135 
139  void ShowCurveControls(bool pShow);
140 
144  void ShowCurvePoints(bool pShow);
145 
146 
147  //--- Key Manipulation --------------------------------------------------------------------------------------------------------------
151  int PathKeyGetCount();
152 
157  FBVector4d PathKeyGet(int pKeyIndex);
158 
164  void PathKeySet(int pKeyIndex, FBVector4d pTLocal, bool pUpdate=true);
165 
173  void PathKeySetLeftRightTangent(int pKeyIndex, FBVector4d pKeyTLocal, FBVector4d pLeftTangentTLocal, FBVector4d pRightTangentTLocal, bool pUpdate=true);
174 
178  void PathKeyRemove(int pKeyIndex);
179 
182  void PathKeyClear();
183 
184  //--- Tangent ----------------------------------------------------------------------------------------------------------------------
185 
191  void PathKeySetLeftTangent(int pKeyIndex, FBVector4d pTLocal, bool pUpdate=true);
192 
198  void PathKeySetRightTangent(int pKeyIndex, FBVector4d pTLocal, bool pUpdate=true);
199 
204  FBVector4d PathKeyGetLeftTangent(int pKeyIndex);
205 
210  FBVector4d PathKeyGetRightTangent(int pKeyIndex);
211 
217  void PathKeySetXDerivative(int pKeyIndex, double pDerivative, bool pUpdate);
218 
224  void PathKeySetYDerivative(int pKeyIndex, double pDerivative, bool pUpdate);
225 
231  void PathKeySetZDerivative(int pKeyIndex, double pDerivative, bool pUpdate);
232 
238  void PathKeySetXYZDerivative(int pKeyIndex, FBVector4d pDerivative, bool pUpdate);
239 
244  FBVector4d PathKeyGetXYZDerivative(int pKeyIndex);
245 
250  double PathKeyGetLeftTangentLength(int pKeyIndex);
251 
256  double PathKeyGetRightTangentLength(int pKeyIndex);
257 
258  //--- Path remove keys (editing) ----------------------------------------------------------------------------------------------------
259 
263  int GetSelectedPathKeyCount();
264 
267  void PathKeyRemoveSelected();
268 
269  //--- Keys Helpers ------------------------------------------------------------------------------------------------------------------
270 
274  int InsertNewStartKey();
275 
279  int InsertNewEndKey();
280 
285  int PathKeyStartAdd(FBVector4d pTLocal);
286 
291  int PathKeyEndAdd(FBVector4d pTLocal);
292 
298  int PathKeyInsertAfter(int pKeyIndex, FBVector4d pTLocal);
299 
300  //--- Animated Keys - Properties and Control Nodes ----------------------------------------------------------------------------------
301 
306  FBProperty* PathKeyGetProperty(int pKeyIndex);
307 
312  FBModel* PathKeyGetControlNode(int pKeyIndex);
313 
319  bool PathKeySetControlNode(int pKeyIndex, FBModel* pControlNode);
320 
321  //--- Curve -------------------------------------------------------------------------------------------------------------------------
329  K_DEPRECATED_2017 int Total_PathKeyAdd(double pTotalPercent, FBVector4d pTLocal, FBEvaluateInfo* pEvaluateInfo=NULL);
330 
335  int Total_IsPathKey(double pTotalPercent, FBEvaluateInfo* pEvaluateInfo=NULL);
336 
341  FBVector4d Total_GlobalPathEvaluate(double pTotalPercent, FBEvaluateInfo* pEvaluateInfo=NULL);
342 
347  FBVector4d Total_LocalPathEvaluate(double pTotalPercent, FBEvaluateInfo* pEvaluateInfo=NULL);
348 
353  FBVector4d Total_GlobalPathEvaluateDerivative(double pTotalPercent, FBEvaluateInfo* pEvaluateInfo=NULL);
354 
359  FBVector4d Total_LocalPathEvaluateDerivative(double pTotalPercent, FBEvaluateInfo* pEvaluateInfo=NULL);
360 
368  K_DEPRECATED_2017 int Segment_PathKeyAdd(double pSegmentPercent, FBVector4d pTLocal, FBEvaluateInfo* pEvaluateInfo=NULL);
369 
374  int Segment_IsPathKey(double pSegmentPercent, FBEvaluateInfo* pEvaluateInfo=NULL);
375 
380  FBVector4d Segment_GlobalPathEvaluate(double pSegmentPercent, FBEvaluateInfo* pEvaluateInfo=NULL);
381 
386  FBVector4d Segment_LocalPathEvaluate(double pSegmentPercent, FBEvaluateInfo* pEvaluateInfo=NULL);
387 
392  FBVector4d Segment_GlobalPathEvaluateDerivative(double pSegmentPercent, FBEvaluateInfo* pEvaluateInfo=NULL);
393 
398  FBVector4d Segment_LocalPathEvaluateDerivative(double pSegmentPercent, FBEvaluateInfo* pEvaluateInfo=NULL);
399 
400  //--- Key Type Converter ------------------------------------------------------------------------------------------------------------
401 
406  double ConvertTotalPercentToSegmentPercent(double pPercent, FBEvaluateInfo* pEvaluateInfo=NULL);
407 
412  double ConvertSegmentPercentToTotalPercent(double pPercent, FBEvaluateInfo* pEvaluateInfo=NULL);
413 
417  double ConvertToSegmentPercentFactor();
418 
422  double ConvertToTotalPercentFactor();
423 
426  void UpdateGeometry();
427 };
428 
429 #ifdef FBSDKUseNamespace
430 }
431 #endif
432 
433 #endif
FBPropertyDouble PathEndCapScale
Read Write Property: Path end cap display scale.
Model class.
Definition: fbmodel.h:273
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:132
class FBVector4< double > FBVector4d
4D vector
Definition: fbtypes.h:441
class FBPropertyBase< double, kFBPT_double > FBPropertyDouble
Property: double
Path 3D model class.
Definition: fbmodelpath3d.h:63
FBPropertyBool PathLengthShow
Read Write Property: Path length label display or not.
#define NULL
Definition: kaydara.h:169
FBPropertyColorAndAlpha TextBackground
Read Write Property: Path Length label display background color.
AnimationNodeNotify evaluation information.
Contains definitions for devices, boxes and models.
#define K_DEPRECATED_2017
Definition: kaydara.h:415
Property class: const char * (String).
Base class for Cameras.
FBPropertyBool AutoControlNode
Read Write Property: Automatically create key control nodes.
class FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
class FBPropertyBase< FBColorAndAlpha, kFBPT_ColorRGBA > FBPropertyColorAndAlpha
FBPropertyColorAndAlpha type definition.
FBPropertyDouble TextScale
Read Write Property: Path Length label display scale.
FBPropertyBaseEnum< ELengthUnitType > PropertyUnitType
EPathEndCapStyle
Path end cap style enum.
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68
Property: Base property class.
Definition: fbproperties.h:192
#define FBSDK_DLL
Definition: fbmodelpath3d.h:46
PropertyKeyPropertyBehavior KeyPropertyBehavior
Read Only Property: Key property behavior.
FBPropertyString PathLengthInString
Read Only Property: Path Length Display String According To The Current Unit.
PropertyUnitType PathLengthUnit
Read Write Property: Path Length Unit.
#define FBSDKNamespace
FBSDKNamespace define.
Definition: fbversion.h:64
Basic class definitions.
FBPropertyBaseEnum< EKeyPropertyBehavior > PropertyKeyPropertyBehavior
class FBPropertyBaseAnimatable< FBColor, kFBPT_ColorRGB > FBPropertyAnimatableColor
FBPropertyAnimatableColor type definition.
PropertyPathEndCapStyle PathEndCapStyle
Read Write Property: Path end cap display style.
FBPropertyAnimatableColor Color
Read Write Property: Path display color in viewport.
FBPropertyDouble PathLength
Read Only Property: Path Length In Centimeter.
EKeyPropertyBehavior
Key property behavior.
Definition: fbmodelpath3d.h:95
FBPropertyBaseEnum< EPathEndCapStyle > PropertyPathEndCapStyle
ELengthUnitType
Path Length Unit enum.