1 | /**************************************************************************************** |
2 | |
3 | Copyright (C) 2015 Autodesk, Inc. |
4 | All rights reserved. |
5 | |
6 | Use of this software is subject to the terms of the Autodesk license agreement |
7 | provided at the time of installation or download, or which otherwise accompanies |
8 | this software in either electronic or hard copy form. |
9 | |
10 | ****************************************************************************************/ |
11 | |
12 | //! \file fbxcameraswitcher.h |
13 | #ifndef _FBXSDK_SCENE_GEOMETRY_CAMERA_SWITCHER_H_ |
14 | #define _FBXSDK_SCENE_GEOMETRY_CAMERA_SWITCHER_H_ |
15 | |
16 | #include <fbxsdk/fbxsdk_def.h> |
17 | |
18 | #include <fbxsdk/core/base/fbxarray.h> |
19 | #include <fbxsdk/scene/geometry/fbxnodeattribute.h> |
20 | |
21 | #include <fbxsdk/fbxsdk_nsbegin.h> |
22 | |
23 | /** This node attribute contains methods for accessing the properties of a camera switcher. |
24 | * The camera switcher is a concept of Motion Builder. |
25 | * The camera switcher lets you switch between the custom cameras placed in your scene so you can create an animation using multiple camera angles. |
26 | * Custom cameras are cameras which created by users, while the default cameras are top, bottom, left, right, front, back and perspective camera. |
27 | * The Camera switcher contains the custom cameras you have created. If you have no custom cameras created in your scene, the Camera switcher is empty. |
28 | * Please read Motion Builder documentation for more details. |
29 | * \nosubgrouping |
30 | * \see FbxCamera and FbxCameraStereo. |
31 | */ |
32 | class FBXSDK_DLL FbxCameraSwitcher : public FbxNodeAttribute |
33 | { |
34 | FBXSDK_OBJECT_DECLARE(FbxCameraSwitcher,FbxNodeAttribute); |
35 | |
36 | public: |
37 | /** |
38 | * \name Properties |
39 | */ |
40 | //@{ |
41 | /** This property handles the index of camera. |
42 | * |
43 | * Default value is 1. |
44 | */ |
45 | FbxPropertyT<FbxInt> CameraIndex; |
46 | //@} |
47 | |
48 | //! Return the type of node attribute which is EType::eCameraSwitcher. |
49 | virtual FbxNodeAttribute::EType GetAttributeType() const; |
50 | |
51 | /** |
52 | * \name Default Animation Values. |
53 | * These functions provides direct access to default animation values specific to a camera switcher. The default animation |
54 | * values are found in the default take node of the associated node. These functions only work if the camera switcher has been |
55 | * associated with a node. |
56 | * |
57 | * Camera indices start at 1. Out of range indices are clamped between 1 and the number of cameras in the scene. The index of a |
58 | * camera refers to its order of appearance when searching the node tree depth first. |
59 | */ |
60 | //@{ |
61 | |
62 | /** Get default camera index. |
63 | * \return Camera index. The return value is an integer between 1 and the number |
64 | * of cameras in the scene, or 0 if there are no default camera set in the camera switcher. |
65 | */ |
66 | int GetDefaultCameraIndex() const; |
67 | |
68 | /** Set default camera index. |
69 | * \param pIndex The index of the camera to set as default. This parameter has an integer |
70 | * scale from 1 to the number of cameras in the scene. Its default value is 1 if |
71 | * there is at least one camera in the camera switcher, 0 if there are none. |
72 | * No validation checks are made. |
73 | */ |
74 | void SetDefaultCameraIndex(int pIndex); |
75 | |
76 | //@} |
77 | |
78 | /***************************************************************************************************************************** |
79 | ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! ** |
80 | *****************************************************************************************************************************/ |
81 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
82 | virtual FbxObject& Copy(const FbxObject& pObject); |
83 | |
84 | protected: |
85 | virtual void Destruct(bool pRecursive); |
86 | virtual void ConstructProperties(bool pForceSet); |
87 | |
88 | public: |
89 | void AddCameraName(char* pCameraName); |
90 | char* GetCameraName(FbxUInt pIndex) const; |
91 | FbxUInt GetCameraNameCount() const; |
92 | void ClearCameraNames(); |
93 | |
94 | protected: |
95 | FbxArray<FbxString*> mCameraNameList; |
96 | #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/ |
97 | }; |
98 | |
99 | #include <fbxsdk/fbxsdk_nsend.h> |
100 | |
101 | #endif /* _FBXSDK_SCENE_GEOMETRY_CAMERA_SWITCHER_H_ */ |
102 | |