ISimpleFaceDataChannel.h

Go to the documentation of this file.
00001 //**************************************************************************/
00002 // Copyright (c) 1998-2006 Autodesk, Inc.
00003 // All rights reserved.
00004 // 
00005 // These coded instructions, statements, and computer programs contain
00006 // unpublished proprietary information written by Autodesk, Inc., and are
00007 // protected by Federal copyright law. They may not be disclosed to third
00008 // parties or copied or duplicated in any form, in whole or in part, without
00009 // the prior written consent of Autodesk, Inc.
00010 /**************************************************************************
00011     FILE: ISimpleFaceDataChannel.h
00012 
00013     DESCRIPTION: Declares a public header for a function publish interface
00014                  for controlling the SimpleFaceData custom attributes.
00015                     - interface ID
00016                     - FP command ID's
00017                     - Mixin FP interface declaration and function map
00018 
00019     AUTHOR: ktong - created 02.16.2006
00020 /***************************************************************************/
00021 
00022 #pragma once
00023 
00024 #include "iFnPub.h"
00025 
00027 #define SimpleFaceDataChannel_InterfaceID Interface_ID(0x1b2f01d0, 0x1c42591f)
00028 
00030 
00038 class ISimpleFaceDataChannel : public FPMixinInterface
00039 {
00040 public:
00042     enum {
00043         eFpGetChannelName,  // get the channel's name
00044         eFpSetChannelName,  // set the channel's name
00045         eFpGetChannelID,    // get the identifying channel id
00046         eFpGetChannelType,  // get the channel's data type
00047         eFpGetNumFaces,     // get the number of faces in the channel
00048         eFpGetValue,        // get a specific face value
00049         eFpSetValue,        // set a specific face value
00050         eFpGetValues,       // get all face values
00051         eFpSetValues,       // set all face values
00052         eFpGetValueBySelection,     // get the value of a selection of faces
00053         eFpSetValueBySelection,     // set the value of a selection of faces
00054 
00055         eFpChannelTypeEnum, // the function-published channel-type enum
00056     };
00057 
00058 #pragma warning(push)
00059 #pragma warning(disable:4238)
00060     BEGIN_FUNCTION_MAP
00061         // functions exposed to Maxscript as properties
00062         PROP_FNS(eFpGetChannelName, GetChannelName, eFpSetChannelName, SetChannelName, TYPE_STRING);
00063         RO_PROP_FN(eFpGetChannelID, ChannelID, TYPE_DWORD_TAB_BV)
00064         RO_PROP_FN(eFpGetChannelType, ChannelType, TYPE_ENUM)
00065         RO_PROP_FN(eFpGetNumFaces, NumFaces, TYPE_DWORD)
00066 
00067         // functions exposed to Maxscript as methods
00068         FN_1(eFpGetValue, TYPE_FPVALUE_BV, GetValue, TYPE_INDEX)
00069         FN_2(eFpSetValue, TYPE_BOOL, SetValue, TYPE_INDEX, TYPE_VALUE)
00070         FN_0(eFpGetValues, TYPE_FPVALUE_BV, GetValues)
00071         FN_1(eFpSetValues, TYPE_BOOL, SetValues, TYPE_VALUE)
00072         FN_1(eFpGetValueBySelection, TYPE_FPVALUE_BV, GetValueBySelection, TYPE_BITARRAY)
00073         FN_2(eFpSetValueBySelection, TYPE_BOOL, SetValueBySelection, TYPE_BITARRAY, TYPE_VALUE)
00074     END_FUNCTION_MAP
00075 #pragma warning(pop)
00076 
00077 
00080     virtual void        SetChannelName(const MCHAR* pName)=0;
00081 
00083 
00086     virtual MCHAR*      GetChannelName() =0;
00087 
00089 
00093     virtual Class_ID    GetChannelID()  =0;
00094 
00096 
00100     virtual Tab<DWORD>  ChannelID() =0;
00101 
00103 
00107     virtual ULONG       NumFaces() =0;
00108 
00110 
00114     virtual int         ChannelType() =0;
00115 
00117 
00122     virtual FPValue     GetValue(ULONG face) =0;
00123 
00125 
00131     virtual BOOL        SetValue(ULONG face, Value* pVal)=0;
00132 
00134 
00138     virtual FPValue     GetValues() =0;
00139 
00141 
00147     virtual BOOL        SetValues(Value* pVal)=0;
00148 
00150 
00157     virtual FPValue     GetValueBySelection(const BitArray* pFaces) =0;
00158 
00160 
00167     virtual BOOL        SetValueBySelection(const BitArray* pFaces, Value* pVal)=0;
00168 };
00169 
00170 // EOF