ConstrainableType.h

00001 //***************************************************************************************
00002 //
00003 // File supervisor: Softimage 3D Games & 3D Bridge team
00004 //
00005 // (c) Copyright 2001-2002 Avid Technology, Inc. . All rights reserved.
00006 //
00007 //***************************************************************************************
00008 
00009 /****************************************************************************************
00010 THIS CODE IS PUBLISHED AS A SAMPLE ONLY AND IS PROVIDED "AS IS".
00011 IN NO EVENT SHALL SOFTIMAGE, AVID TECHNOLOGY, INC. AND/OR THEIR RESPECTIVE
00012 SUPPLIERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
00013 DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
00014 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
00015 CONNECTION WITH THE USE OR PERFORMANCE OF THIS CODE .
00016 
00017 COPYRIGHT NOTICE. Copyright © 1999-2002 Avid Technology Inc. . All rights reserved. 
00018 
00019 SOFTIMAGE is a registered trademark of Avid Technology Inc. or its subsidiaries 
00020 or divisions. Windows NT is a registered trademark of Microsoft Corp. All other
00021 trademarks contained herein are the property of their respective owners. 
00022 ****************************************************************************************/
00023 
00024 #ifndef _CONSTRAINABLETYPE_H
00025 #define _CONSTRAINABLETYPE_H
00026 
00027 #include "Constraint.h"
00028 
00031 class XSIEXPORT CSLConstrainableType
00032 {
00033 public:
00037     virtual CSLConstraint* AddConstraint(CSLConstraint::EConstraintType in_ConstraintType) = 0;
00038 
00043     SI_Error RemoveConstraint( SI_Int in_nIndex );
00044     
00049     SI_Error RemoveConstraint( CSLConstraint *in_pToRemove );
00050     
00054     SI_Int GetConstraintCount();
00055 
00059     CSLConstraint** GetConstraintList();
00060 
00064     SI_Error ClearConstraints();
00065 
00070     CSLConstraint* ConnectConstraint( CSLConstraint* in_pNewConstraint );
00071 
00072     // overloaded methods /////////////////////////////////////////////////////
00073     SI_Error Synchronize();
00074 
00075 protected:
00076     CSLConstrainableType(CSLScene* in_pScene);
00077     virtual ~CSLConstrainableType();
00078 
00079 private:
00080     CSIBCArray<CSLConstraint*> m_Constraints;
00081     CSLScene *m_pScene;
00082 };
00083 
00084 
00085 #endif // _CONSTRAINABLETYPE_H
00086