Biped8Api.h

Go to the documentation of this file.
00001 /*********************************************************************
00002  *<
00003     FILE: Biped8Api.h
00004 
00005     DESCRIPTION: These are functions that are exported in biped.dlc, updated for Max 8
00006 
00007     CREATED BY: Susan Amkraut
00008 
00009     HISTORY: Created 18 January 2005
00010 
00011  *> Copyright (c) 2005 All Rights Reserved.
00012  **********************************************************************/
00013 
00014 #pragma once
00015 
00016 #include "..\maxheap.h"
00017 #include "BipedApi.h"
00018 #include "IMixer8.h"
00019 
00024 #define I_BIPMASTER8    0x9167    //!< Biped interface identifier
00025 #define GetBipMaster8Interface(anim) ((IBipMaster8*)(anim)->GetInterface(I_BIPMASTER8)) //!< Gets the Biped interface
00026 
00027 
00032 #define SNAP_VIEW       0    //!< Snapshot of the active viewport
00033 #define SNAP_AUTO       1    //!< Snapshot camera position computed automatically to make a close up of the copied parts
00034 #define SNAP_NONE       2    //!< No Snapshot
00035 
00036 
00042 #define PST_DEF         0    //!< Paste the default TCB / IK values
00043 #define PST_COPY        1    //!< Paste the TCB / IK values which were stored in the copy
00044 #define PST_INTERP      2    //!< Paste an interpolation of the surrounding TCB / IK values
00045 
00046 
00053 #define BMODE_TWISTLINKS    (1<<12)    //!< Twist Links Mode
00054 #define BMODE_TWISTIND      (1<<13)    //!< Twist Individual Mode
00055 #define BMODE_SMOOTHTWIST   (1<<14)    //!< Smooth Twist Mode
00056 #define BMODE_ALL           (BMODE_FIGURE|BMODE_FOOTSTEP|BMODE_MOTIONFLOW| \
00057                              BMODE_BUFFER|BMODE_RUBBERBAND| \
00058                              BMODE_BENDLINKS|BMODE_TWISTLINKS|BMODE_TWISTIND|BMODE_SMOOTHTWIST \
00059                              BMODE_SCALESTRIDE|BMODE_INPLACE|BMODE_MIXER|BMODE_MOVEALL)    //!< All Modes
00060 
00061 
00062 class IBipMaster8;
00063 
00065 
00069 class IBipedCopy: public MaxHeapOperators
00070 {
00071   public:
00073     virtual ~IBipedCopy() {;}
00074 
00077     virtual const MCHAR *GetName() const = 0;
00078 
00083     virtual bool SetName(const MCHAR *name) = 0;
00084 
00087     virtual int GetCopyType() const = 0;
00088 };
00089 
00091 
00095 class ICopyCollection: public MaxHeapOperators
00096 {
00097   public:
00099     virtual ~ICopyCollection() {;}
00100 
00103     virtual const MCHAR *GetName() const = 0;
00104 
00109     virtual bool SetName(const MCHAR *name) = 0;
00110 
00114     virtual int NumCopies(int copyType) = 0;
00115 
00120     virtual IBipedCopy *GetCopy(int copyType, int index) = 0;
00121 
00127     virtual IBipedCopy *GetCopy(int copyType, const MCHAR *name, int *index) = 0;
00128 
00133     virtual bool DeleteCopy(int copyType, int index) = 0;
00134 
00138     virtual void DeleteAllCopies(int copyType) = 0;
00139 };
00140 
00142 
00145 class IBipMaster8: public IBipMaster 
00146 {
00147     public:
00148 
00151         virtual void    RefreshBipedUI() = 0;
00152 
00153         /************ Quaternion / Euler Track Specification **************/
00155 
00156 
00157 
00158 
00159         virtual bool GetEulerActive(const int id) = 0;
00160 
00164         virtual int  GetEulerOrder(const int id) = 0;
00165 
00172         virtual bool SetEulerActive(int id, int eulerOrder) = 0;
00173 
00177         virtual bool SetQuaternionActive(int id) = 0;
00178         
00185         virtual bool SetEulerOrder(int id, int eulerOrder) = 0;
00187 
00188         /************ Center of Mass Selection ***************/
00190 
00191 
00192 
00193         virtual bool    IsComLocked()=0;
00194 
00197         virtual void    LockCom(bool lock)=0;
00199 
00200         /************ Functions to Manipulate Twist Bones ***************/
00202 
00203 
00204 
00205         virtual bool    GetTwist() const =0;
00206         
00210         virtual void    SetTwist(bool enable)=0;
00211         
00216         virtual float   GetTwistBias(int twisttrack) const =0;
00217             
00222         virtual void    SetTwistBias(int twisttrack, float bias)=0;
00224 
00225         /************ Functions to Manipulate Twist Poses ***************/
00227 
00228 
00229 
00230 
00231         virtual int  NumTwistPoses(int keytrack)=0;
00232 
00237         virtual bool CreateTwistPose(int keytrack)=0;
00238 
00244         virtual bool SetTwistPose(int keytrack, int index)=0;
00245 
00250         virtual bool DeleteTwistPose(int keytrack, int index)=0;
00251 
00254         virtual void SetDefaultTwistPoses(int keytrack)=0;
00255 
00261         virtual bool SetTwistPoseName(int keytrack, int index, const MCHAR *name)=0;
00262 
00268         virtual bool SetTwistPoseTwist(int keytrack, int index, float twist)=0;
00269 
00275         virtual bool SetTwistPoseBias(int keytrack, int index, float bias)=0;
00276 
00281         virtual const MCHAR *GetTwistPoseName(int keytrack, int index)=0;
00282 
00287         virtual float GetTwistPoseTwist(int keytrack, int index)=0;
00288 
00293         virtual float GetTwistPoseBias(int keytrack, int index)=0;
00294 
00299         virtual void SetLimbToTwistPose(int keytrack, int index, bool opposite)=0;
00300 
00306         virtual int     LoadFigNoTwists     (const MCHAR *fname, BOOL redraw = false, BOOL msgs = false)=0; 
00307 
00313         virtual int     LoadFigJustTwists   (const MCHAR *fname, BOOL redraw = false, BOOL msgs = false)=0; 
00315 
00316         /************ Bend Links Menu Functions, for rotations of spine, neck, tail, and pony tail links ***************/
00319 
00320 
00321 
00322         virtual void    ZeroTwist(int keytrack)=0;
00323 
00326         virtual void    ZeroAll(int keytrack)=0;
00327 
00331         virtual void    SmoothTwist(int keytrack, float bias)=0;
00333 
00334         /************ Copy/Paste Functions which work with Copy Collections ***************/
00336 
00337 
00338 
00339         virtual int NumCopyCollections() const = 0;
00340 
00344         virtual ICopyCollection *GetCopyCollection(int index) const = 0;
00345 
00350         virtual ICopyCollection *GetCopyCollection(const MCHAR *name, int *index) const = 0;
00351 
00355         virtual ICopyCollection *CreateCopyCollection(const MCHAR *colname) = 0;
00356 
00360         virtual bool DeleteCopyCollection(int index) = 0;
00361 
00363         virtual void DeleteAllCopyCollections() = 0;
00364 
00371         virtual IBipedCopy *CopyBipPosture(ICopyCollection *ICC, INodeTab *nodes, int snapshottype) = 0;
00372 
00377         virtual IBipedCopy *CopyBipPose(ICopyCollection *ICC, int snapshottype) = 0;
00378         
00385         virtual IBipedCopy *CopyBipTrack(ICopyCollection *ICC, INodeTab *nodes, int snapshottype) = 0;
00386         
00398         virtual bool PasteBipPosture(IBipedCopy *CP, bool opposite, int KeyPasteType, bool Hor, bool Ver, bool Trn, bool ByVel) = 0;
00399                 
00410         virtual bool PasteBipPose(IBipedCopy *CP, bool opposite, int KeyPasteType, bool Hor, bool Ver, bool Trn, bool ByVel) = 0;
00411                 
00419         virtual bool PasteBipTrack(IBipedCopy *CP, bool opposite, bool Hor, bool Ver, bool Trn) = 0;
00421 
00422 
00423 
00424         virtual IMixer8 * GetMixer8() =0;
00425 };
00426