Open Reality Reference Guide
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
61 
64 {
66 
67 public:
92  FBModelPath3D(const char* pName, HIObject pObject=NULL);
93 
96  {
98  eVector
99  };
100  typedef FBPropertyBaseEnum<EKeyPropertyBehavior> PropertyKeyPropertyBehavior;
101 
104  {
105  eArchitectural = 0,
106  eMI,
107  eCM,
108  eM,
109  eKM
110  };
111  typedef FBPropertyBaseEnum<ELengthUnitType> PropertyUnitType;
112 
115  {
116  eNone,
117  eArrow
118  };
119 
120  typedef FBPropertyBaseEnum<EPathEndCapStyle> PropertyPathEndCapStyle;
121 
133 
134  //--- Visual ------------------------------------------------------------------------------------------------------------------------
135 
139  void ShowCurveControls(bool pShow);
140 
144  void ShowCurvePoints(bool pShow);
145 
146 
147  //--- Key Manipulation --------------------------------------------------------------------------------------------------------------
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 
205 
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 
245 
250  double PathKeyGetLeftTangentLength(int pKeyIndex);
251 
256  double PathKeyGetRightTangentLength(int pKeyIndex);
257 
258  //--- Path remove keys (editing) ----------------------------------------------------------------------------------------------------
259 
264 
268 
269  //--- Keys Helpers ------------------------------------------------------------------------------------------------------------------
270 
275 
280 
286 
291  int PathKeyEndAdd(FBVector4d pTLocal);
292 
298  int PathKeyInsertAfter(int pKeyIndex, FBVector4d pTLocal);
299 
300  //--- Animated Keys - Properties and Control Nodes ----------------------------------------------------------------------------------
301 
307 
313 
319  bool PathKeySetControlNode(int pKeyIndex, FBModel* pControlNode);
320 
325  int Total_IsPathKey(double pTotalPercent, FBEvaluateInfo* pEvaluateInfo=NULL);
326 
331  FBVector4d Total_GlobalPathEvaluate(double pTotalPercent, FBEvaluateInfo* pEvaluateInfo=NULL);
332 
337  FBVector4d Total_LocalPathEvaluate(double pTotalPercent, FBEvaluateInfo* pEvaluateInfo=NULL);
338 
343  FBVector4d Total_GlobalPathEvaluateDerivative(double pTotalPercent, FBEvaluateInfo* pEvaluateInfo=NULL);
344 
349  FBVector4d Total_LocalPathEvaluateDerivative(double pTotalPercent, FBEvaluateInfo* pEvaluateInfo=NULL);
350 
355  int Segment_IsPathKey(double pSegmentPercent, FBEvaluateInfo* pEvaluateInfo=NULL);
356 
361  FBVector4d Segment_GlobalPathEvaluate(double pSegmentPercent, FBEvaluateInfo* pEvaluateInfo=NULL);
362 
367  FBVector4d Segment_LocalPathEvaluate(double pSegmentPercent, FBEvaluateInfo* pEvaluateInfo=NULL);
368 
373  FBVector4d Segment_GlobalPathEvaluateDerivative(double pSegmentPercent, FBEvaluateInfo* pEvaluateInfo=NULL);
374 
379  FBVector4d Segment_LocalPathEvaluateDerivative(double pSegmentPercent, FBEvaluateInfo* pEvaluateInfo=NULL);
380 
381  //--- Key Type Converter ------------------------------------------------------------------------------------------------------------
382 
387  double ConvertTotalPercentToSegmentPercent(double pPercent, FBEvaluateInfo* pEvaluateInfo=NULL);
388 
393  double ConvertSegmentPercentToTotalPercent(double pPercent, FBEvaluateInfo* pEvaluateInfo=NULL);
394 
399 
404 
408 };
409 
410 #ifdef FBSDKUseNamespace
411 }
412 #endif
413 
414 #endif
FBModelPath3D::Segment_GlobalPathEvaluateDerivative
FBVector4d Segment_GlobalPathEvaluateDerivative(double pSegmentPercent, FBEvaluateInfo *pEvaluateInfo=NULL)
Get the path's derivative at a particular point within the curve, in global coordinates.
FBModelPath3D::ConvertSegmentPercentToTotalPercent
double ConvertSegmentPercentToTotalPercent(double pPercent, FBEvaluateInfo *pEvaluateInfo=NULL)
Converting one key type Segment (time) to Total (percent).
FBModelPath3D::PathKeyRemove
void PathKeyRemove(int pKeyIndex)
Remove key at a particular index.
FBModelPath3D::PathKeyGet
FBVector4d PathKeyGet(int pKeyIndex)
Get path's key vector for at a particular key index.
FBModelPath3D::ShowCurvePoints
void ShowCurvePoints(bool pShow)
Enable or disable displaying Curve Points for the 3D model path.
FBModelPath3D::PathKeySet
void PathKeySet(int pKeyIndex, FBVector4d pTLocal, bool pUpdate=true)
Set the local coordinate vector values for path at a particular key index.
FBModelPath3D::TextScale
FBPropertyDouble TextScale
Read Write Property: Path Length label display scale.
Definition: fbmodelpath3d.h:128
FBPropertyAnimatableColor
class K_DLLIMPORT FBPropertyBaseAnimatable< FBColor, kFBPT_ColorRGB > FBPropertyAnimatableColor
FBPropertyAnimatableColor type definition.
Definition: fbproperties.h:1776
FBModelPath3D::Segment_GlobalPathEvaluate
FBVector4d Segment_GlobalPathEvaluate(double pSegmentPercent, FBEvaluateInfo *pEvaluateInfo=NULL)
Get the path's vector at a particular point within the curve, in global coordinates.
FBModelPath3D::ConvertToTotalPercentFactor
double ConvertToTotalPercentFactor()
Get factor for multiplying the derivative of a key for total mode.
FBSDK_DLL
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
Definition: fbconstraintlayout.h:48
FBModelPath3D::PathLengthInString
FBPropertyString PathLengthInString
Read Only Property: Path Length Display String According To The Current Unit.
Definition: fbmodelpath3d.h:125
FBModelPath3D::FBModelPath3D
FBModelPath3D(const char *pName, HIObject pObject=NULL)
Constructor.
FBModelPath3D::GetSelectedPathKeyCount
int GetSelectedPathKeyCount()
Query the number of keys present in the selected path.
FBPropertyDouble
class K_DLLIMPORT FBPropertyBase< double, kFBPT_double > FBPropertyDouble
Property: double
Definition: fbproperties.h:1340
FBModelPath3D::Segment_IsPathKey
int Segment_IsPathKey(double pSegmentPercent, FBEvaluateInfo *pEvaluateInfo=NULL)
Query whether a percentage value has a key associated at that point in the path.
FBModelPath3D::PathKeyGetLeftTangent
FBVector4d PathKeyGetLeftTangent(int pKeyIndex)
Get the path key left tangent's vector value for designated index.
FBModelPath3D::Segment_LocalPathEvaluate
FBVector4d Segment_LocalPathEvaluate(double pSegmentPercent, FBEvaluateInfo *pEvaluateInfo=NULL)
Get the path's vector at a particular point within the curve, in local coordinates.
FBModelPath3D::PathKeyGetXYZDerivative
FBVector4d PathKeyGetXYZDerivative(int pKeyIndex)
Get vector in XYZ coordinates for a path tangent.
FBModelPath3D::Total_GlobalPathEvaluate
FBVector4d Total_GlobalPathEvaluate(double pTotalPercent, FBEvaluateInfo *pEvaluateInfo=NULL)
Get the path's vector at a particular point within the curve, in global coordinates.
FBModelPath3D::PathKeyGetCount
int PathKeyGetCount()
Query the number of keys present in the path.
FBModelPath3D::PathKeyRemoveSelected
void PathKeyRemoveSelected()
Remove the selected keys from the path.
FBModelPath3D::PathKeyEndAdd
int PathKeyEndAdd(FBVector4d pTLocal)
Adds a new key to the end of the path (with time gap of 1 sec).
fbmodel.h
Base class for Cameras.
FBModelPath3D::ConvertTotalPercentToSegmentPercent
double ConvertTotalPercentToSegmentPercent(double pPercent, FBEvaluateInfo *pEvaluateInfo=NULL)
Converting one key type Total (percent) to Segment (time).
FBPropertyColorAndAlpha
class K_DLLIMPORT FBPropertyBase< FBColorAndAlpha, kFBPT_ColorRGBA > FBPropertyColorAndAlpha
FBPropertyColorAndAlpha type definition.
Definition: fbproperties.h:1459
FBModelPath3D::InsertNewStartKey
int InsertNewStartKey()
Insert a new key at the start of the path.
FBModelPath3D::EKeyPropertyBehavior
EKeyPropertyBehavior
Key property behavior.
Definition: fbmodelpath3d.h:96
FBModelPath3D::PathLength
FBPropertyDouble PathLength
Read Only Property: Path Length In Centimeter.
Definition: fbmodelpath3d.h:124
FBModelPath3D::PathKeySetLeftTangent
void PathKeySetLeftTangent(int pKeyIndex, FBVector4d pTLocal, bool pUpdate=true)
Set path's key left tangent vector for designated index.
FBModelPath3D::PathKeyGetProperty
FBProperty * PathKeyGetProperty(int pKeyIndex)
Get the path key's corresponding property.
__FBClassDeclare
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:131
FBModelPath3D::PathKeySetLeftRightTangent
void PathKeySetLeftRightTangent(int pKeyIndex, FBVector4d pKeyTLocal, FBVector4d pLeftTangentTLocal, FBVector4d pRightTangentTLocal, bool pUpdate=true)
Set path's vectors for key, left tangent and right tangent at a particular key index.
FBProperty
Property: Base property class.
Definition: fbproperties.h:195
FBModelPath3D::TextBackground
FBPropertyColorAndAlpha TextBackground
Read Write Property: Path Length label display background color.
Definition: fbmodelpath3d.h:129
__FB_FORWARD
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68
FBModelPath3D::PathKeyGetRightTangent
FBVector4d PathKeyGetRightTangent(int pKeyIndex)
Get the path key right tangent's vector value for designated index.
FBModelPath3D::Total_LocalPathEvaluateDerivative
FBVector4d Total_LocalPathEvaluateDerivative(double pTotalPercent, FBEvaluateInfo *pEvaluateInfo=NULL)
Get the path's derivative at a particular point within the curve, in local coordinates.
FBModelPath3D::PathKeyStartAdd
int PathKeyStartAdd(FBVector4d pTLocal)
Adds a new key to the start of the path (with time gap of 1 sec).
FBModelPath3D::Total_GlobalPathEvaluateDerivative
FBVector4d Total_GlobalPathEvaluateDerivative(double pTotalPercent, FBEvaluateInfo *pEvaluateInfo=NULL)
Get the path's derivative at a particular point within the curve, in global coordinates.
FBModelPath3D::PathKeyClear
void PathKeyClear()
Clear the path keys.
FBModelPath3D::eLegacyVector4
@ eLegacyVector4
2014, 2015, 2016. Key property type is Vector4.
Definition: fbmodelpath3d.h:97
FBModelPath3D::Total_LocalPathEvaluate
FBVector4d Total_LocalPathEvaluate(double pTotalPercent, FBEvaluateInfo *pEvaluateInfo=NULL)
Get the path's vector at a particular point within the curve, in local coordinates.
FBModelPath3D::PathKeySetYDerivative
void PathKeySetYDerivative(int pKeyIndex, double pDerivative, bool pUpdate)
Set derivative in Y coordinate for a path tangent.
FBVector4d
class K_DLLIMPORT FBVector4< double > FBVector4d
4D vector
Definition: fbtypes.h:441
FBModelPath3D::PathEndCapStyle
PropertyPathEndCapStyle PathEndCapStyle
Read Write Property: Path end cap display style.
Definition: fbmodelpath3d.h:130
FBModelPath3D::PathKeySetZDerivative
void PathKeySetZDerivative(int pKeyIndex, double pDerivative, bool pUpdate)
Set derivative in Z coordinate for a path tangent.
FBModelPath3D::ELengthUnitType
ELengthUnitType
Path Length Unit enum.
Definition: fbmodelpath3d.h:104
FBModelPath3D::PathLengthShow
FBPropertyBool PathLengthShow
Read Write Property: Path length label display or not.
Definition: fbmodelpath3d.h:127
FBModelPath3D::PathKeySetRightTangent
void PathKeySetRightTangent(int pKeyIndex, FBVector4d pTLocal, bool pUpdate=true)
Set 3D path's key right tangent vector for designated index.
FBModelPath3D::PathKeySetControlNode
bool PathKeySetControlNode(int pKeyIndex, FBModel *pControlNode)
Set the path key's control node.
FBModelPath3D::PathKeySetXDerivative
void PathKeySetXDerivative(int pKeyIndex, double pDerivative, bool pUpdate)
Set derivative in X coordinate for a path tangent.
FBModelPath3D::AutoControlNode
FBPropertyBool AutoControlNode
Read Write Property: Automatically create key control nodes.
Definition: fbmodelpath3d.h:123
FBModelPath3D::ShowCurveControls
void ShowCurveControls(bool pShow)
Enable or disable displaying Curve Controls for the 3D model path.
FBModelPath3D::PathKeyGetLeftTangentLength
double PathKeyGetLeftTangentLength(int pKeyIndex)
Query the length of the left tangent.
FBPropertyBool
class K_DLLIMPORT FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
Definition: fbproperties.h:1308
FBModelPath3D::PathKeySetXYZDerivative
void PathKeySetXYZDerivative(int pKeyIndex, FBVector4d pDerivative, bool pUpdate)
Set derivative in XYZ coordinates for a path tangent.
FBModelPath3D::PathKeyGetRightTangentLength
double PathKeyGetRightTangentLength(int pKeyIndex)
Query the value of the right tangent.
fbcomponent.h
Basic class definitions.
fbcore.h
Contains definitions for devices, boxes and models.
FBModelPath3D::Color
FBPropertyAnimatableColor Color
Read Write Property: Path display color in viewport.
Definition: fbmodelpath3d.h:132
FBModelPath3D::PathLengthUnit
PropertyUnitType PathLengthUnit
Read Write Property: Path Length Unit.
Definition: fbmodelpath3d.h:126
FBModelPath3D::PathKeyInsertAfter
int PathKeyInsertAfter(int pKeyIndex, FBVector4d pTLocal)
Adds a new key immediately after the specified key ID (with time gap of 1 sec).
FBModelPath3D::KeyPropertyBehavior
PropertyKeyPropertyBehavior KeyPropertyBehavior
Read Only Property: Key property behavior.
Definition: fbmodelpath3d.h:122
FBModelPath3D::ConvertToSegmentPercentFactor
double ConvertToSegmentPercentFactor()
Get factor for multiplying the derivative of a key for segment mode.
FBModelPath3D::EPathEndCapStyle
EPathEndCapStyle
Path end cap style enum.
Definition: fbmodelpath3d.h:115
FBModelPath3D::PathEndCapScale
FBPropertyDouble PathEndCapScale
Read Write Property: Path end cap display scale.
Definition: fbmodelpath3d.h:131
FBModelPath3D::PathKeyGetControlNode
FBModel * PathKeyGetControlNode(int pKeyIndex)
Get the path key's control node.
FBEvaluateInfo
AnimationNodeNotify evaluation information.
Definition: fbevaluateinfo.h:79
FBModelPath3D::InsertNewEndKey
int InsertNewEndKey()
Insert a new key at the end of the path.
FBModelPath3D::Segment_LocalPathEvaluateDerivative
FBVector4d Segment_LocalPathEvaluateDerivative(double pSegmentPercent, FBEvaluateInfo *pEvaluateInfo=NULL)
Get the path's derivative at a particular point within the curve, in local coordinates.
FBPropertyString
Property class: const char * (String).
Definition: fbproperties.h:1281
FBModel
Model class.
Definition: fbmodel.h:274
FBPropertyBaseEnum< EKeyPropertyBehavior >
FBModelPath3D
Path 3D model class.
Definition: fbmodelpath3d.h:64
FBModelPath3D::UpdateGeometry
void UpdateGeometry()
Update path geometry explicitly.
FBModelPath3D::Total_IsPathKey
int Total_IsPathKey(double pTotalPercent, FBEvaluateInfo *pEvaluateInfo=NULL)
Query whether a percentage value has a key associated at that point in the path.