kfbxcamerastereo.h

Go to the documentation of this file.
00001 
00004 #ifndef FBXFILESDK_KFBXPLUGINS_KFBXCAMERASTEREO_H
00005 #define FBXFILESDK_KFBXPLUGINS_KFBXCAMERASTEREO_H
00006 
00007 /**************************************************************************************
00008 
00009 Copyright (C) 2001 - 2009 Autodesk, Inc. and/or its licensors.
00010 All Rights Reserved.
00011 
00012 The coded instructions, statements, computer programs, and/or related material 
00013 (collectively the "Data") in these files contain unpublished information 
00014 proprietary to Autodesk, Inc. and/or its licensors, which is protected by 
00015 Canada and United States of America federal copyright law and by international 
00016 treaties. 
00017 
00018 The Data may not be disclosed or distributed to third parties, in whole or in
00019 part, without the prior written consent of Autodesk, Inc. ("Autodesk").
00020 
00021 THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
00022 ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO
00023 WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR ARISING
00024 BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES OF TITLE, 
00025 NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR USE. 
00026 WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT WARRANT THAT THE OPERATION
00027 OF THE DATA WILL BE UNINTERRUPTED OR ERROR FREE. 
00028 
00029 IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS
00030 OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR EXPENSES
00031 OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE DAMAGES OR OTHER
00032 SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS OF PROFITS, REVENUE
00033 OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR DAMAGES OF ANY KIND),
00034 HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF LIABILITY, WHETHER DERIVED
00035 FROM CONTRACT, TORT (INCLUDING, BUT NOT LIMITED TO, NEGLIGENCE), OR OTHERWISE,
00036 ARISING OUT OF OR RELATING TO THE DATA OR ITS USE OR ANY OTHER PERFORMANCE,
00037 WHETHER OR NOT AUTODESK HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS
00038 OR DAMAGE. 
00039 
00040 **************************************************************************************/
00041 
00042 #include <fbxfilesdk/components/kbaselib/kaydaradef_h.h>
00043 #include <fbxfilesdk/components/kbaselib/kaydara.h>
00044 
00045 #include <fbxfilesdk/kfbxplugins/kfbxnodeattribute.h>
00046 #include <fbxfilesdk/kfbxplugins/kfbxcolor.h>
00047 
00048 #include <fbxfilesdk/kfbxmath/kfbxvector4.h>
00049 
00050 #include <fbxfilesdk/components/kbaselib/klib/kstring.h>
00051 
00052 #include <fbxfilesdk/fbxfilesdk_nsbegin.h>
00053 
00061 class KFBX_DLL KFbxCameraStereo : public KFbxCamera
00062 {
00063     KFBXOBJECT_DECLARE(KFbxCameraStereo, KFbxCamera);
00064 
00065 public:
00066 
00068     virtual EAttributeType GetAttributeType() const;
00069 
00071     void Reset();
00072 
00073 
00080     typedef enum
00081     {
00082         eNONE,
00083         eCONVERGED,
00084         eOFF_AXIS,
00085         ePARALLEL
00086     } ECameraStereo;
00087 
00093     KFbxCamera* GetLeftCamera();
00094 
00100     KFbxCamera* GetRightCamera();
00101 
00108     bool SetLeftCamera(KFbxCamera* pCamera);
00109 
00116     bool SetRightCamera(KFbxCamera* pCamera);
00117 
00122     KFbxXMatrix GetLeftCameraLocalMatrix();
00123 
00128     KFbxXMatrix GetLeftCameraGlobalMatrix();
00129 
00134     KFbxXMatrix GetRightCameraLocalMatrix();
00135 
00140     KFbxXMatrix GetRightCameraGlobalMatrix();
00141 
00146     KFbxXMatrix GetStereoCameraLocalMatrix();
00147 
00152     KFbxXMatrix GetStereoCameraGlobalMatrix();
00153 
00159     double ReevaluateLeftCameraFilmOffsetX();
00160 
00166     double ReevaluateRightCameraFilmOffsetX();
00167 
00169     //
00170     // Properties
00171     //
00173 
00174     // -----------------------------------------------------------------------
00175     // Stereo and Stereo Adjustments
00176     // -----------------------------------------------------------------------
00177 
00185     KFbxTypedProperty<ECameraStereo>                    Stereo;
00186 
00194     KFbxTypedProperty<fbxDouble1>                       InteraxialSeparation;
00195 
00203     KFbxTypedProperty<fbxDouble1>                       ZeroParallax;
00204 
00213     KFbxTypedProperty<fbxDouble1>                       ToeInAdjust;
00214 
00222     KFbxTypedProperty<fbxDouble1>                       FilmOffsetRightCam;
00223 
00231     KFbxTypedProperty<fbxDouble1>                       FilmOffsetLeftCam;
00232 
00240     KFbxTypedProperty<fbxDouble1>                       ZeroOffset;
00241 
00249     KFbxTypedProperty<fbxReference>                     RightCamera;
00250 
00258     KFbxTypedProperty<fbxReference>                     LeftCamera;
00259 
00260 
00262     //
00263     //  WARNING!
00264     //
00265     //  Anything beyond these lines may not be documented accurately and is
00266     //  subject to change without notice.
00267     //
00269 
00270 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00271 
00279     KFbxTypedProperty<fbxString>                        PrecompFileName;
00280 
00288     KFbxTypedProperty<fbxString>                        RelativePrecompFileName;
00289 
00290 public:
00298     bool ConnectProperties();
00299 
00300     friend class KFbxGlobalCameraSettings;
00301 
00302     // Clone
00303     virtual KFbxObject* Clone(KFbxObject* pContainer, KFbxObject::ECloneType pCloneType) const;
00304 
00305 protected:
00307     KFbxCameraStereo& operator=(KFbxCameraStereo const& pCameraStereo);
00308 
00309     KFbxCameraStereo(KFbxSdkManager& pManager, char const* pName);
00310 
00311     virtual bool ConstructProperties(bool pForceSet);
00312 
00316     virtual KString     GetTypeName() const;
00317     virtual KStringList GetTypeFlags() const;
00318 
00319 private:
00320     friend class KFbxNode;
00321 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00322 };
00323 
00324 typedef KFbxCameraStereo* HKFbxCameraStereo;
00325 
00326 inline EFbxType FbxTypeOf( KFbxCameraStereo::ECameraStereo const &pItem )         { return eENUM; }
00327 
00328 #include <fbxfilesdk/fbxfilesdk_nsend.h>
00329 
00330 #endif // FBXFILESDK_KFBXPLUGINS_KFBXCAMERASTEREO_H
00331