00001 // BC 6/14/2005 \Master120\Include\SDK\HPropert.h 00002 //NAP Bitmap COMEBACK RGBFloat needs old ColorVector functions for backward compata 00003 #define __HPROPERT_H 00004 00005 #ifndef _SMALLPDB 00006 00007 #ifndef __HHASHOBJ_H 00008 #include "SDK/HHashObj.h" 00009 #endif 00010 00011 #ifndef __DATAVALUE_H 00012 #include "DataValue.h" 00013 #endif 00014 00015 #ifndef __COLORVEC_H 00016 #include "ColorVec.h" 00017 #endif 00018 00019 //********************************************************* 00020 //** HPropertyInfo 00021 //********************************************************* 00022 00023 class PLUGINEXPORT HPropertyInfo 00024 { 00025 public: 00026 enum DrawWhen { DRAWNEVER, DRAWALWAYS, DRAWIFSHADED, DRAWIFFLARES, DRAWIFMATERIALS, DRAWIFPARTICLES }; 00027 enum VisibleWhen { VISIBLENEVER, VISIBLEALWAYS, VISIBLECACHEONLY, VISIBLEINSTANCEONLY, VISIBLESOMETIMES }; 00028 00029 static HPropertyInfo *New( const char *localizedname, const char *matchname ); 00030 void operator delete( void *ptr ) { DeleteHandle( (HPropertyInfo *)ptr ); } 00031 static void DeleteHandle(HPropertyInfo *handle); 00032 00033 void SetLocalizedName(const char *name); // for backward comp with V9.0o and older 00034 void SetMatchName(const char *name); // for backward comp with V9.0o and older 00035 00036 void SetLocalizedName(const String &name); 00037 void SetMatchName(const String &name); 00038 String GetLocalizedName(); 00039 String GetMatchName(); 00040 void SetDocumentation(const char *doc); 00041 00042 DrawWhen GetDrawWhen(); 00043 void SetDrawWhen(DrawWhen dw); 00044 00045 VisibleWhen GetVisibleWhen(); 00046 void SetVisibleWhen(VisibleWhen vw); 00047 00048 BOOL IsConstant(); 00049 void SetConstant(BOOL state); // Constant will not animate over time 00050 00051 BOOL IsReadOnly(); // Both cache and instanes will be read only 00052 void SetReadOnly(BOOL state); 00053 00054 BOOL IsReadOnlyOnCache(); // User will not be able to change the value on the cache, SetReadOnly should be set to FALSE if you want the instances to be able to be editied 00055 void SetReadOnlyOnCache(BOOL state); 00056 00057 BOOL IsReadOnlyOnInstance(); // User will not be able to change the value on the instance, SetReadOnly should be set to FALSE if you want the caches to be able to be editied 00058 void SetReadOnlyOnInstance(BOOL state); 00059 00060 BOOL IsAdvanced(); // only shows up if user has Show Advanced Proerties on 00061 void SetAdvanced(BOOL state); 00062 00063 BOOL IsSaveProperty(); // Defaults to TRUE 00064 void SetSaveProperty(BOOL state); 00065 00066 BOOL IsNotifyAnimObjectValueChanged(); 00067 void SetNotifyAnimObjectValueChanged(BOOL state); // use this to have HxtOnPtrMessage called for your property. This is a speed hit 00068 // so only set it if you really want the function to be called 00069 BOOL IsDeletable(); 00070 void SetDeletable(BOOL state); 00071 00072 void SetCacheAnimatable( BOOL state ); 00073 BOOL GetCacheAnimatable(); 00074 }; 00075 00076 //********************************************************* 00077 //** HProperty 00078 //********************************************************* 00079 class HPropertyDriver; 00080 class HPropertyShortcut; 00081 00082 class PLUGINEXPORT HProperty : public HHashObject 00083 { 00084 public: 00085 HPropertyInfo *GetPropertyInfo() const; 00086 HPropertyDriver *GetHeadDriver() const; 00087 00088 void Show( BOOL bShow = TRUE ); 00089 00090 void SetNullable(BOOL isnullable); 00091 BOOL IsNullable(); 00092 BOOL IsNull(); 00093 void SetNull( BOOL state=TRUE, HAnimObject *animob=NULL ); 00094 void SetIsDynamic(BOOL isdynamic); 00095 BOOL IsDynamic(); 00096 00097 HHashObject *CreateParentForDriver(); 00098 HProperty *GetDriverProperty(); 00099 void AddDriver(HPropertyDriver *); 00100 00101 int Compare( const HProperty *other, BOOL dochildren=TRUE ); // 0 => EQUAL, 1 => NOT EQUAL 00102 00103 BOOL IsDefaultValue() const; 00104 int GetIndex() const; 00105 00106 void Copy(const HProperty *other); 00107 HPropertyShortcut *FindEmptyRelation();//should return HEmptyRelation probably 00108 HProperty *GetPropertyCache(); 00109 HProperty *MakeCopy(); 00110 00111 String ToString(); 00112 00113 BOOL GetFirstRelationKey(); 00114 BOOL GetNextRelationKey(); 00115 BOOL GetPrevRelationKey(BOOL *pHasKey); 00116 00117 HProperty *GetParentProperty(); 00118 00119 BOOL IsUserProperty(); 00120 }; 00121 00122 //********************************************************* 00123 //** HBoolPropertyInfo 00124 //********************************************************* 00125 class PLUGINEXPORT HBoolPropertyInfo : public HPropertyInfo 00126 { 00127 public: 00128 static HBoolPropertyInfo *New( const char *localizedname, const char *matchname ); 00129 void SetDefaultValue( BOOL val ); 00130 BOOL GetDefaultValue() const; 00131 00132 void SetDisplayInPoseSlider(BOOL show); 00133 BOOL GetDisplayInPoseSlider(); 00134 }; 00135 00136 //********************************************************* 00137 //** HBoolProperty 00138 //********************************************************* 00139 class PLUGINEXPORT HBoolProperty : public HProperty 00140 { 00141 public: 00142 static HBoolProperty *New(); 00143 static HBoolProperty *New( HBoolPropertyInfo *propinfo ); 00144 BOOL GetValue() const; 00145 BOOL GetValue( Time time ); 00146 void SetValue( BOOL value ); 00147 void StoreValue( Time time, BOOL value, BOOL storeundo=TRUE ); 00148 }; 00149 00150 //********************************************************* 00151 //** HContainerProperty 00152 //********************************************************* 00153 class PLUGINEXPORT HContainerProperty : public HProperty 00154 { 00155 public: 00156 static HContainerProperty *New(); 00157 static HContainerProperty *New( HPropertyInfo *propinfo ); 00158 }; 00159 00160 //********************************************************* 00161 // HCategoryProperty 00162 // Maintains an array of sub variables 00163 //********************************************************* 00164 class PLUGINEXPORT HCategoryProperty : public HContainerProperty 00165 { 00166 public: 00167 static HCategoryProperty *New(); 00168 static HCategoryProperty *New( HPropertyInfo *propinfo ); 00169 int AddProperty( HProperty *property ); 00170 BOOL RemoveProperty( HProperty *property); 00171 }; 00172 00173 //********************************************************* 00174 //** HUserCategoryProperty 00175 //********************************************************* 00176 class PLUGINEXPORT HUserCategoryProperty : public HCategoryProperty 00177 { 00178 public: 00179 static HUserCategoryProperty *New();//Use this to add folders to other UserCategoryProperties 00180 // If trytokeep is TRUE the property name will be the name passed in if it doesn't exist, 00181 // otherwise it will be the name appended by a instance number of the name 00182 int AddUserProperty(HProperty *property, const String &basestring, BOOL trytokeepname=FALSE); // No PropertyInfo needed in passed in Property because it is dynamically allocated in this call 00183 }; 00184 00185 //********************************************************* 00186 //** HBoolCategoryProperty 00187 //********************************************************* 00188 class PLUGINEXPORT HBoolCategoryProperty : public HCategoryProperty 00189 { 00190 public: 00191 static HBoolCategoryProperty *New(); 00192 static HBoolCategoryProperty *New( HBoolPropertyInfo *propinfo ); 00193 00194 BOOL GetValue() const; 00195 BOOL GetValue( Time time ); 00196 void SetValue( BOOL value ); 00197 void StoreValue( Time time, BOOL value, BOOL storeundo=TRUE ); 00198 }; 00199 00200 class HTypePropertyInfo; 00201 //********************************************************* 00202 //** HTypeCategoryProperty 00203 //********************************************************* 00204 class PLUGINEXPORT HTypeCategoryProperty : public HCategoryProperty 00205 { 00206 public: 00207 static HTypeCategoryProperty *New(); 00208 static HTypeCategoryProperty *New( HTypePropertyInfo *propinfo ); 00209 00210 UINT GetValue() const; 00211 UINT GetValue( Time time ); 00212 void SetValue( UINT value ); 00213 void StoreValue( Time time, UINT value, BOOL storeundo=TRUE ); 00214 }; 00215 00216 //********************************************************* 00217 //** HAttrPropertyInfo 00218 //********************************************************* 00219 class PLUGINEXPORT HAttrPropertyInfo : public HPropertyInfo 00220 { 00221 public: 00222 static HAttrPropertyInfo *New( const char *localizedname, const char *matchname ); 00223 }; 00224 00225 //********************************************************* 00226 //** HAttrProperty 00227 //********************************************************* 00228 class HColorProperty; 00229 class HFloatProperty; 00230 class HPercentProperty; 00231 class HMaterial; 00232 00233 class PLUGINEXPORT HAttrProperty : public HContainerProperty 00234 { 00235 public: 00236 static HAttrProperty *New( HAttrPropertyInfo *propinfo ); 00237 static HAttrProperty *New(); 00238 00239 HAttrProperty *GetBaseAttr(); 00240 00241 HColorProperty *GetDiffuseColor(); 00242 HFloatProperty *GetDiffuseFallOff(); 00243 HColorProperty *GetAmbianceColor(); 00244 HColorProperty *GetAmbianceColorForRead(); 00245 HFloatProperty *GetAmbiance(); 00246 HColorProperty *GetSpecularColor(); 00247 HColorProperty *GetSpecularColorForRead(); 00248 HFloatProperty *GetSpecularSize(); 00249 HFloatProperty *GetSpecularIntensity(); 00250 HFloatProperty *GetRoughness(); 00251 HFloatProperty *GetRoughnessScale(); 00252 HFloatProperty *GetTransparency(); 00253 HFloatProperty *GetDensity(); 00254 HFloatProperty *GetRefraction(); 00255 HFloatProperty *GetTranslucency(); 00256 HFloatProperty *GetReflectivity(); 00257 HPercentProperty *GetReflectiveBlend(); 00258 HFloatProperty *GetReflectivityFallOff(); 00259 HFloatProperty *GetRadiance(); 00260 HBoolProperty *GetGlow(); 00261 BOOL IsComplex(); // tells whether a pre-composited attr is complex (Combiners etc..) 00262 BOOL IsBump(); // tells whether any of the materials on a pre-composited attr had bump on 00263 BOOL IsInvariant(); // tells whether any of the materials on a pre-composited attr were invariant 00264 BOOL IsDisplace(); // tells whether any of the materials on a pre-composited attr had displace on 00265 HMaterial *GetMaterialHead(); 00266 }; 00267 00268 //********************************************************* 00269 //** HFileInfoPropertyInfo 00270 //********************************************************* 00271 class PLUGINEXPORT HFileInfoPropertyInfo : public HPropertyInfo 00272 { 00273 public: 00274 }; 00275 00276 class HFilenameProperty; 00277 class HStringProperty; 00278 //********************************************************* 00279 //** HFileInfoProperty 00280 //********************************************************* 00281 class PLUGINEXPORT HFileInfoProperty : public HContainerProperty 00282 { 00283 public: 00284 HBoolProperty *GetEmbedded(); 00285 HFilenameProperty *GetFileName(); 00286 HStringProperty *GetCreatedBy(); 00287 HStringProperty *GetLastModifiedBy(); 00288 HStringProperty *GetDescription(); 00289 HStringProperty *GetNotes(); 00290 }; 00291 00292 //********************************************************* 00293 //** HFloatPropertyInfo 00294 //********************************************************* 00295 class PLUGINEXPORT HFloatPropertyInfo : public HPropertyInfo 00296 { 00297 public: 00298 enum { FF_X = 0x0001, 00299 FF_Y = 0x0002, 00300 FF_Z = 0x0003, 00301 00302 FF_RED = 0x0008, 00303 FF_GREEN = 0x0010, 00304 FF_BLUE = 0x0020, 00305 00306 FF_UNIT = 0x0040, 00307 FF_PERCENTAGE = 0x0080, 00308 FF_ANGLE = 0x0100 00309 }; 00310 00311 static HFloatPropertyInfo *New( const char *localizedname, const char *matchname ); 00312 void SetFactorValue( float val ); // Set Factor before calling SetDefault, SetMin or SetMax 00313 void SetModulo( float modulo ); 00314 void SetDefaultValue( float val ); 00315 void SetMinValue( float val ); 00316 void SetMaxValue( float val ); 00317 void SetFlags(UINT flags); 00318 00319 float GetFactorValue() const; 00320 float GetDefaultValue() const; 00321 float GetMinValue() const; 00322 float GetMaxValue() const; 00323 UINT GetFlags() const; 00324 00325 void SetDisplayInPoseSlider(BOOL show); 00326 BOOL GetDisplayInPoseSlider(); 00327 }; 00328 00329 //********************************************************* 00330 //** HFloatProperty 00331 //********************************************************* 00332 class PLUGINEXPORT HFloatProperty : public HProperty 00333 { 00334 public: 00335 static HFloatProperty *New(); 00336 static HFloatProperty *New( HFloatPropertyInfo *propinfo ); 00337 float GetValue() const; 00338 float GetValue( Time time ); 00339 void SetValue(float value); 00340 void StoreValue(Time time, float value, BOOL storeundo = TRUE); 00341 }; 00342 00343 //********************************************************* 00344 //** HPercentPropertyInfo 00345 //********************************************************* 00346 class PLUGINEXPORT HPercentPropertyInfo : public HFloatPropertyInfo 00347 { 00348 public: 00349 00350 static HPercentPropertyInfo *New( const char *localizedname, const char *matchname ); 00351 }; 00352 00353 //********************************************************* 00354 //** HPercentProperty 00355 //********************************************************* 00356 class PLUGINEXPORT HPercentProperty : public HFloatProperty 00357 { 00358 public: 00359 static HPercentProperty *New(); 00360 static HPercentProperty *New( HPercentPropertyInfo *propinfo ); 00361 }; 00362 00363 //********************************************************* 00364 //** HIntPropertyInfo 00365 //********************************************************* 00366 class PLUGINEXPORT HIntPropertyInfo : public HPropertyInfo 00367 { 00368 public: 00369 static HIntPropertyInfo *New( const char *localizedname, const char *matchname ); 00370 void SetDefaultValue( int val ); 00371 void SetMinValue( int val ); 00372 void SetMaxValue( int val ); 00373 00374 int GetDefaultValue() const; 00375 int GetMinValue() const; 00376 int GetMaxValue() const; 00377 }; 00378 00379 //********************************************************* 00380 //** HIntProperty 00381 //********************************************************* 00382 class PLUGINEXPORT HIntProperty : public HProperty 00383 { 00384 public: 00385 static HIntProperty *New(); 00386 static HIntProperty *New( HIntPropertyInfo *propinfo ); 00387 int GetValue() const; 00388 int GetValue( Time time ); 00389 void SetValue(int value); 00390 void StoreValue(Time time, int value, BOOL storeundo = TRUE); 00391 }; 00392 00393 //********************************************************* 00394 //** HRotatePropertyInfo 00395 //********************************************************* 00396 class PLUGINEXPORT HRotatePropertyInfo : public HPropertyInfo 00397 { 00398 public: 00399 static HRotatePropertyInfo *New( const char *localizedname, const char *matchname ); 00400 }; 00401 00402 //********************************************************* 00403 //** HRotateProperty 00404 //********************************************************* 00405 class PLUGINEXPORT HRotateProperty : public HProperty 00406 { 00407 public: 00408 enum InterpolationMethod { VECTORINTERP, EULERINTERP, QUATINTERP }; 00409 00410 static HRotateProperty *New(); 00411 static HRotateProperty *New( HRotatePropertyInfo *propinfo ); 00412 00413 InterpolationMethod GetDefaultObjectInterpolationMethod(); 00414 void SetDefaultObjectInterpolationMethod(InterpolationMethod method); 00415 InterpolationMethod GetDefaultBoneInterpolationMethod(); 00416 void SetDefaultBoneInterpolationMethod(InterpolationMethod method); 00417 InterpolationMethod GetDefaultRootBoneInterpolationMethod(); 00418 void SetDefaultRootBoneInterpolationMethod(InterpolationMethod method); 00419 00420 const Quaternion &GetValue() const; 00421 const Quaternion &GetValue( Time time ); 00422 void SetValue( const Quaternion &value ); 00423 void StoreValue( Time time, const Quaternion &value, BOOL storeroll=TRUE);// old for Backward compatibility, Defaults TRUE for StoreUndo 00424 void StoreValue( Time time, const Quaternion &value, BOOL storeroll, BOOL storeundo); 00425 }; 00426 00427 //********************************************************* 00428 //** HButtonPropertyInfo 00429 //********************************************************* 00430 class PLUGINEXPORT HButtonPropertyInfo : public HPropertyInfo 00431 { 00432 public: 00433 static HButtonPropertyInfo *New( const char *localizedname, const char *matchname ); 00434 00435 void SetButtonText(const char *); 00436 const char *GetButtonText() const; 00437 }; 00438 00439 //********************************************************* 00440 //** HButtonProperty 00441 //********************************************************* 00442 class PLUGINEXPORT HButtonProperty : public HProperty 00443 { 00444 public: 00445 static HButtonProperty *New(); 00446 static HButtonProperty *New( HButtonPropertyInfo *propinfo ); 00447 00448 void SetButtonText(const char *); // Use this over the ones in ButtonPropertyInfo if you need to change the text on different instances of the property 00449 const char *GetButtonText() const; 00450 void Press(); 00451 }; 00452 00453 //********************************************************* 00454 //** HBiasPropertyInfo 00455 //********************************************************* 00456 class PLUGINEXPORT HBiasPropertyInfo : public HPropertyInfo 00457 { 00458 public: 00459 static HBiasPropertyInfo *New( const char *localizedname, const char *matchname ); 00460 00461 HFloatPropertyInfo *GetAlphaPropertyInfo(); 00462 HFloatPropertyInfo *GetGammaPropertyInfo(); 00463 HFloatPropertyInfo *GetMagnitudePropertyInfo(); 00464 }; 00465 00466 //********************************************************* 00467 //** HBiasProperty 00468 //********************************************************* 00469 class PLUGINEXPORT HBiasProperty : public HProperty 00470 { 00471 public: 00472 static HBiasProperty *New(); 00473 static HBiasProperty *New( HBiasPropertyInfo *propinfo ); 00474 00475 float GetAlpha(); 00476 float GetGamma(); 00477 float GetMagnitude(); 00478 void SetAlpha( float num ); 00479 void SetGamma( float num ); 00480 void SetMagnitude( float num ); 00481 00482 const Vector &GetValue(); 00483 const Vector &GetValue(Time time); 00484 Vector GetFactoredValue(); 00485 00486 void SetFactoredValue( const Vector &value ); 00487 void SetValue( const Vector &value ); 00488 void StoreValue( Time time, const Vector &value, BOOL storeundo=TRUE ); 00489 }; 00490 00491 //********************************************************* 00492 //** HStringPropertyInfo 00493 //********************************************************* 00494 class PLUGINEXPORT HStringPropertyInfo : public HPropertyInfo 00495 { 00496 public: 00497 static HStringPropertyInfo *New( const char *localizedname, const char *matchname ); 00498 void SetDefaultValue( const char *value ); 00499 void SetIllegalChars( const char *value ); 00500 const char *GetDefaultValue() const; 00501 const char *GetIllegalChars() const; 00502 }; 00503 00504 //********************************************************* 00505 //** HStringProperty 00506 //********************************************************* 00507 class PLUGINEXPORT HStringProperty : public HProperty 00508 { 00509 public: 00510 static HStringProperty *New(); 00511 static HStringProperty *New( HStringPropertyInfo *propinfo ); 00512 const char *GetValue() const; 00513 void SetValue( const char *value ); 00514 void StoreValue(const char *value, BOOL storeundo = TRUE); 00515 }; 00516 00517 //********************************************************* 00518 //** HFilenamePropertyInfo 00519 //********************************************************* 00520 class PLUGINEXPORT HFilenamePropertyInfo : public HStringPropertyInfo 00521 { 00522 public: 00523 static HFilenamePropertyInfo *New( const char *localizedname, const char *matchname ); 00524 void SetFileDialogTitle( const char *value ); 00525 void SetFileDialogFilter( const char *value ); 00526 void SetDefaultExtension( const char *value ); 00527 void SetIsOpenDialog( BOOL isopendialog ); 00528 const char *GetFileDialogTitle() const; 00529 const char *GetFileDialogFilter() const; 00530 const char *GetDefaultExtension() const; 00531 BOOL IsOpenDialog() const; 00532 BOOL IsPromptForMissingFileOnLoad(); 00533 void SetIsPromptForMissingFileOnLoad(BOOL state); 00534 }; 00535 00536 //********************************************************* 00537 //** HFilenameProperty 00538 //********************************************************* 00539 class PLUGINEXPORT HFilenameProperty : public HStringProperty 00540 { 00541 public: 00542 static HFilenameProperty *New(); 00543 static HFilenameProperty *New( HFilenamePropertyInfo *propinfo ); 00544 }; 00545 00546 //********************************************************* 00547 //** HDirPropertyInfo 00548 //********************************************************* 00549 class PLUGINEXPORT HDirPropertyInfo : public HStringPropertyInfo 00550 { 00551 public: 00552 static HDirPropertyInfo *New( const char *localizedname, const char *matchname ); 00553 void SetFileDialogTitle( const char *value ); 00554 const char *GetFileDialogTitle() const; 00555 }; 00556 00557 //********************************************************* 00558 //** HDirProperty 00559 //********************************************************* 00560 class PLUGINEXPORT HDirProperty : public HStringProperty 00561 { 00562 public: 00563 static HDirProperty *New(); 00564 static HDirProperty *New( HDirPropertyInfo *propinfo ); 00565 }; 00566 00567 //********************************************************* 00568 //** HTimePropertyInfo 00569 //********************************************************* 00570 class PLUGINEXPORT HTimePropertyInfo : public HPropertyInfo 00571 { 00572 public: 00573 static HTimePropertyInfo *New( const char *localizedname, const char *matchname ); 00574 void SetDefaultValue( Time val ); 00575 void SetMinValue( Time val ); 00576 void SetMaxValue( Time val ); 00577 00578 Time GetDefaultValue() const; 00579 Time GetMinValue() const; 00580 Time GetMaxValue() const; 00581 }; 00582 00583 //********************************************************* 00584 //** HTimeProperty 00585 //********************************************************* 00586 class PLUGINEXPORT HTimeProperty : public HProperty 00587 { 00588 public: 00589 static HTimeProperty *New(); 00590 static HTimeProperty *New( HTimePropertyInfo *propinfo ); 00591 Time GetValue() const; 00592 Time GetValue(Time time); 00593 void SetValue(Time value); 00594 void StoreValue(Time time, Time value, BOOL storeundo = TRUE); 00595 }; 00596 00597 //********************************************************* 00598 //** HTimeRangePropertyInfo 00599 //********************************************************* 00600 class PLUGINEXPORT HTimeRangePropertyInfo : public HPropertyInfo 00601 { 00602 public: 00603 static HTimeRangePropertyInfo *New( const char *localizedname, const char *matchname ); 00604 }; 00605 00606 //********************************************************* 00607 //** HTimeRangeProperty 00608 //********************************************************* 00609 class PLUGINEXPORT HTimeRangeProperty : public HContainerProperty 00610 { 00611 public: 00612 static HTimeRangeProperty *New(); 00613 static HTimeRangeProperty *New( HTimeRangePropertyInfo *propinfo ); 00614 HTimeProperty *GetStart(); 00615 HTimeProperty *GetEnd(); 00616 }; 00617 00618 //********************************************************* 00619 //** HTransformPropertyInfo 00620 //********************************************************* 00621 class PLUGINEXPORT HTransformPropertyInfo : public HPropertyInfo 00622 { 00623 public: 00624 static HTransformPropertyInfo *New( const char *localizedname, const char *matchname ); 00625 }; 00626 00627 class HTranslateProperty; 00628 class HScaleProperty; 00629 class HRotateProperty; 00630 //********************************************************* 00631 //** HTransformProperty 00632 //********************************************************* 00633 class PLUGINEXPORT HTransformProperty : public HProperty 00634 { 00635 public: 00636 static HTransformProperty *New(); 00637 static HTransformProperty *New( HTransformPropertyInfo *propinfo ); 00638 HTranslateProperty *GetTranslate(); 00639 HScaleProperty *GetScale(); 00640 HRotateProperty *GetRotate(); 00641 TSQ GetTSQ() const; 00642 }; 00643 00644 class HTypeInfo; 00645 //********************************************************* 00646 //** TypeInfoArray 00647 //********************************************************* 00648 class PLUGINEXPORT TypeInfoArray 00649 { 00650 private: 00651 HTypeInfo *m_typeinfoarray; 00652 int m_count; 00653 00654 void AllocArray(HTypeInfo **array, int count); 00655 void DeleteArray(HTypeInfo *array); 00656 HTypeInfo *ElementAt(HTypeInfo *array, int index); 00657 00658 public: 00659 TypeInfoArray() { 00660 m_typeinfoarray = NULL; 00661 m_count = 0; 00662 } 00663 ~TypeInfoArray() { 00664 DeleteArray(m_typeinfoarray); 00665 } 00666 void SetArraySize(int count) { 00667 DeleteArray(m_typeinfoarray); 00668 AllocArray(&m_typeinfoarray, count); 00669 m_count = count; 00670 } 00671 void DeleteArray() { 00672 DeleteArray(m_typeinfoarray); 00673 m_typeinfoarray = NULL; 00674 m_count = 0; 00675 } 00676 HTypeInfo *operator [] ( int index ) { return ElementAt(m_typeinfoarray, index); } 00677 00678 // Internal use only 00679 HTypeInfo *GetTypeInfoArrayData() { return m_typeinfoarray; } 00680 int GetCount() const { return m_count; } 00681 }; 00682 00683 //********************************************************* 00684 //** HTypeInfo 00685 //********************************************************* 00686 class PLUGINEXPORT HTypeInfo 00687 { 00688 public: 00689 String GetMatchName() const; 00690 String GetLocalizedName() const; 00691 void SetMatchName(const String &name); 00692 void SetLocalizedName(const String &name); 00693 void SetMatchName(const char *); // Old for backward Compatibility with version 9.0o and older 00694 void SetLocalizedName(const char *); // Old for backward Compatibility with version 9.0o and older 00695 }; 00696 00697 //********************************************************* 00698 //** HTypePropertyInfo 00699 //********************************************************* 00700 class PLUGINEXPORT HTypePropertyInfo : public HPropertyInfo 00701 { 00702 public: 00703 static HTypePropertyInfo *New( const char *localizedname, const char *matchname, TypeInfoArray *typeinfoarray ); 00704 00705 void SetDefaultIndex(UINT index); 00706 UINT GetDefaultIndex() const; 00707 }; 00708 00709 //********************************************************* 00710 //** HTypeProperty 00711 //********************************************************* 00712 class PLUGINEXPORT HTypeProperty : public HProperty 00713 { 00714 public: 00715 static HTypeProperty *New(); 00716 static HTypeProperty *New( HTypePropertyInfo *propinfo ); 00717 00718 UINT GetValue() const; 00719 UINT GetValue( Time time ); 00720 void SetValue( UINT value ); 00721 void StoreValue( Time time, UINT value, BOOL storeundo = TRUE); 00722 }; 00723 00724 //********************************************************* 00725 //** HVectorPropertyInfo 00726 //********************************************************* 00727 class PLUGINEXPORT HVectorPropertyInfo : public HPropertyInfo 00728 { 00729 public: 00730 static HVectorPropertyInfo *New( const char *localizedname, const char *matchname ); 00731 00732 HFloatPropertyInfo *GetX(); 00733 HFloatPropertyInfo *GetY(); 00734 HFloatPropertyInfo *GetZ(); 00735 00736 Vector GetDefaultValue() const; 00737 void SetDefaultValue(const Vector &v); 00738 }; 00739 00740 //********************************************************* 00741 //** HVectorProperty 00742 //********************************************************* 00743 class PLUGINEXPORT HVectorProperty : public HProperty 00744 { 00745 public: 00746 static HVectorProperty *New(); 00747 static HVectorProperty *New(HVectorPropertyInfo *propinfo); 00748 00749 Vector GetValue() const; 00750 Vector GetValue( Time time ); 00751 void SetValue( const Vector &value ); 00752 void StoreValue( Time time, const Vector &value, BOOL storeundo=TRUE ); 00753 00754 HFloatProperty *GetX(); 00755 HFloatProperty *GetY(); 00756 HFloatProperty *GetZ(); 00757 }; 00758 00759 //********************************************************* 00760 //** HVectorPropertyNoSubsInfo 00761 //********************************************************* 00762 class PLUGINEXPORT HVectorPropertyNoSubsInfo : public HPropertyInfo 00763 { 00764 public: 00765 static HVectorPropertyNoSubsInfo *New( const char *localizedname, const char *matchname ); 00766 00767 HFloatPropertyInfo *GetX(); 00768 HFloatPropertyInfo *GetY(); 00769 HFloatPropertyInfo *GetZ(); 00770 00771 Vector GetDefaultValue() const; 00772 void SetDefaultValue(const Vector &v); 00773 }; 00774 00775 //********************************************************* 00776 //** HVectorPropertyNoSubs 00777 //********************************************************* 00778 class PLUGINEXPORT HVectorPropertyNoSubs : public HProperty 00779 { 00780 public: 00781 static HVectorPropertyNoSubs *New(); 00782 static HVectorPropertyNoSubs *New(HVectorPropertyNoSubsInfo *propinfo); 00783 00784 float GetXFactor() const; 00785 float GetYFactor() const; 00786 float GetZFactor() const; 00787 const Vector &GetValue() const; 00788 const Vector &GetValue(Time time); 00789 Vector GetFactoredValue() const; 00790 void SetFactoredValue( const Vector &value ); 00791 void SetValue( const Vector &value ); 00792 void StoreValue( Time time, const Vector &value, BOOL storeundo=TRUE ); 00793 }; 00794 00795 //********************************************************* 00796 //** HVector2PropertyInfo 00797 //********************************************************* 00798 class PLUGINEXPORT HVector2PropertyInfo : public HPropertyInfo 00799 { 00800 public: 00801 static HVector2PropertyInfo *New( const char *localizedname, const char *matchname ); 00802 00803 HFloatPropertyInfo *GetX(); 00804 HFloatPropertyInfo *GetY(); 00805 00806 Vector2 GetDefaultValue() const; 00807 void SetDefaultValue(const Vector2 &v); 00808 }; 00809 00810 //********************************************************* 00811 //** HVector2Property 00812 //********************************************************* 00813 class PLUGINEXPORT HVector2Property : public HProperty 00814 { 00815 public: 00816 static HVector2Property *New(); 00817 static HVector2Property *New(HVector2PropertyInfo *propinfo); 00818 00819 Vector2 GetValue( ) const; 00820 Vector2 GetValue( Time time ); 00821 void SetValue( const Vector2 &value ); 00822 void StoreValue( Time time, const Vector2 &value, BOOL storeundo=TRUE ); 00823 00824 HFloatProperty *GetX(); 00825 HFloatProperty *GetY(); 00826 }; 00827 00828 //********************************************************* 00829 //** HColorPropertyInfo 00830 //********************************************************* 00831 class PLUGINEXPORT HColorPropertyInfo : public HVectorPropertyInfo 00832 { 00833 public: 00834 static HColorPropertyInfo *New( const char *localizedname, const char *matchname ); 00835 00836 HFloatPropertyInfo *GetRed(); 00837 HFloatPropertyInfo *GetGreen(); 00838 HFloatPropertyInfo *GetBlue(); 00839 00840 RGBFloat GetDefaultRGBFloatValue() const; 00841 /*don't use this one anymore*/ ColorVector GetDefaultValue() const; 00842 00843 void SetDefaultValue(const RGBFloat &rgbfloat); 00844 /*don't use this one anymore*/ void SetDefaultValue(const ColorVector &cv); 00845 }; 00846 00847 //********************************************************* 00848 //** HColorProperty 00849 //********************************************************* 00850 class ColorBuf; 00851 class PLUGINEXPORT HColorProperty : public HVectorProperty 00852 { 00853 public: 00854 static HColorProperty *New(); 00855 static HColorProperty *New(HColorPropertyInfo *propinfo); 00856 00857 HFloatProperty *GetRed(); 00858 HFloatProperty *GetGreen(); 00859 HFloatProperty *GetBlue(); 00860 00861 float GetLuminance()const; 00862 00863 COLORREF GetCOLORREF() const; 00864 RGBFloat GetFactoredRGBFloat() const; 00865 /*don't use this one anymore*/ ColorVector GetFactoredColorVector() const; 00866 00867 RGBFloat GetNormalizedRGBFloat() const; 00868 /*don't use this one anymore*/ ColorVector GetNormalizedColorVector() const; 00869 00870 void SetValue( const RGBFloat &value ); 00871 /*don't use this one anymore*/ void SetValue( const ColorVector &value ); 00872 00873 void StoreValue( Time time, const RGBFloat &value, BOOL storeundo=TRUE ); 00874 /*don't use this one anymore*/ void StoreValue( Time time, const ColorVector &value, BOOL storeundo=TRUE ); 00875 00876 void StoreValue( Time time, const ColorBuf &value, BOOL storeundo=TRUE ); 00877 }; 00878 00879 //********************************************************* 00880 //** HScalePropertyInfo 00881 //********************************************************* 00882 class PLUGINEXPORT HScalePropertyInfo : public HVectorPropertyInfo 00883 { 00884 public: 00885 static HScalePropertyInfo *New( const char *localizedname, const char *matchname ); 00886 }; 00887 00888 //********************************************************* 00889 //** HScaleProperty 00890 //********************************************************* 00891 class PLUGINEXPORT HScaleProperty : public HVectorProperty 00892 { 00893 public: 00894 static HScaleProperty *New(); 00895 static HScaleProperty *New(HScalePropertyInfo *propinfo); 00896 }; 00897 00898 //********************************************************* 00899 //** HTranslatePropertyInfo 00900 //********************************************************* 00901 class PLUGINEXPORT HTranslatePropertyInfo : public HVectorPropertyInfo 00902 { 00903 public: 00904 static HTranslatePropertyInfo *New( const char *localizedname, const char *matchname ); 00905 }; 00906 00907 //********************************************************* 00908 //** HTranslateProperty 00909 //********************************************************* 00910 class PLUGINEXPORT HTranslateProperty : public HVectorProperty 00911 { 00912 public: 00913 static HTranslateProperty *New(); 00914 static HTranslateProperty *New(HTranslatePropertyInfo *propinfo); 00915 }; 00916 00917 //********************************************************* 00918 //** HTranslatePropertyNoSubs 00919 //********************************************************* 00920 class PLUGINEXPORT HTranslatePropertyNoSubs : public HVectorPropertyNoSubs 00921 { 00922 public: 00923 static HTranslateProperty *New(); 00924 static HTranslateProperty *New(HTranslatePropertyInfo *propinfo); 00925 }; 00926 00927 //********************************************************* 00928 //** HObjectListNode 00929 //********************************************************* 00930 class PLUGINEXPORT HObjectListNode 00931 { 00932 public: 00933 HObjectListNode *GetSibling(); 00934 void SetSibling(HObjectListNode *); 00935 00936 HTreeObject *GetObject(); 00937 void SetObject(HTreeObject *); 00938 00939 static HObjectListNode *New(); 00940 static HObjectListNode *New( HTreeObject *obj, HObjectListNode *next ); 00941 00942 void operator delete( void *ptr ) { DeleteHandle( (HObjectListNode *)ptr ); } 00943 static void DeleteHandle(HObjectListNode *handle); 00944 }; 00945 00946 //********************************************************* 00947 //** HPointerPropertyInfo 00948 //********************************************************* 00949 class PLUGINEXPORT HPointerPropertyInfo : public HPropertyInfo 00950 { 00951 public: 00952 static HPointerPropertyInfo *New( const char *localizedname, const char *matchname ); 00953 }; 00954 00955 //********************************************************* 00956 //** HPointerProperty 00957 //********************************************************* 00958 class PLUGINEXPORT HPointerProperty : public HProperty 00959 { 00960 public: 00961 static HPointerProperty *New(); 00962 static HPointerProperty *New(HPointerPropertyInfo *propinfo); 00963 HTreeObject *GetValue(); 00964 void SetValue( HTreeObject *obj ); // Rarely used 00965 void StoreValue( Time time, HTreeObject *obj, BOOL storeundo=TRUE ); 00966 String GetDescription(); 00967 void SetDescription(const String &); 00968 }; 00969 00970 //********************************************************* 00971 //** HClipPropertyInfo 00972 //********************************************************* 00973 class PLUGINEXPORT HClipPropertyInfo : public HPointerPropertyInfo 00974 { 00975 public: 00976 static HClipPropertyInfo *New( const char *localizedname, const char *matchname ); 00977 HVector2PropertyInfo *GetRepeatInfo(); 00978 HTimePropertyInfo *GetTimeInfo(); 00979 HBoolPropertyInfo *GetSeamlessInfo(); 00980 }; 00981 00982 class HClip; 00983 //********************************************************* 00984 //** HClipProperty 00985 //********************************************************* 00986 class PLUGINEXPORT HClipProperty : public HContainerProperty 00987 { 00988 public: 00989 static HClipProperty *New(); 00990 static HClipProperty *New(HClipPropertyInfo *propinfo); 00991 HClip *GetClip(); 00992 00993 HVector2Property *GetRepeat(); 00994 HTimeProperty *GetTime(); 00995 HBoolProperty *GetIsSeamless(); 00996 00997 int GetWidth(); 00998 int GetHeight(); 00999 BOOL ReadBitmap( float x, float y, RGBFloat *diffuse, float *opacity, float pixelwidth); 01000 /*don't use this one anymore*/ BOOL ReadBitmap( float x, float y, ColorVector *diffuse, float *opacity, float pixelwidth); 01001 01002 BOOL ReadBumpmap( float x, float y, Vector2 &delta, float pixelwidth ); 01003 BOOL LoadImage( const String &filename ); 01004 }; 01005 01006 //********************************************************* 01007 //** HTexInfo 01008 //********************************************************* 01009 class PLUGINEXPORT HTexInfo 01010 { 01011 public: 01012 HAttrProperty *GetAttr(); 01013 Vector *GetN(); // Screen Space 01014 float GetHeight(); 01015 void SetHeight( float val ); 01016 Time GetTime(); 01017 float GetFPS(); 01018 float GetPixelWidth(); 01019 Vector GetGlobalP(); // World Space, If from a HSHader plugin, us HSHader::GetHitP rather than this. 01020 Vector GetEye(); // Screen Space 01021 Vector GetD(); // Screen Space 01022 Matrix34 *GetMatrix(); //Model Space To Screen Space 01023 int GetObjectType(); 01024 HObject *GetObject(); 01025 void *GetSubObject(); 01026 }; 01027 01028 //********************************************************* 01029 //** HShading 01030 //********************************************************* 01031 class PLUGINEXPORT HShading : public HProperty 01032 { 01033 public: 01034 HTexInfo *GetTexInfo(); 01035 RGBFloat *GetACol(); //these gets invalidate plugins that used to use this built for v11.1 or earlier 01036 RGBFloat *GetDCol(); //should probably rewrite with RGBFloat GetACol(), and SetACol(RGBFloat &) 01037 RGBFloat *GetSCol(); //since these invalidate anyways. 01038 Vector *GetAway(); 01039 Vector *GetL(); 01040 float GetIntensity(); 01041 float GetLDot(); 01042 float GetEDot(); 01043 int GetObjectType(); 01044 HObject *GetObject(); 01045 void *GetSubObject(); 01046 Vector GetHitP(); 01047 }; 01048 01049 //********************************************************* 01050 //** HGradientPropertyInfo 01051 //********************************************************* 01052 class PLUGINEXPORT HGradientPropertyInfo : public HPropertyInfo 01053 { 01054 public: 01055 static HGradientPropertyInfo *New( const char *localizedname, const char *matchname ); 01056 }; 01057 01058 //********************************************************* 01059 //** HGradientProperty 01060 //********************************************************* 01061 class PLUGINEXPORT HGradientProperty : public HProperty 01062 { 01063 public: 01064 static HGradientProperty *New(); 01065 static HGradientProperty *New(HGradientPropertyInfo *propinfo); 01066 RGBFloat GetColor( RGBFloat &diffuse, float n ); 01067 /*don't use this one anymore*/ ColorVector GetColor( ColorVector &diffuse, float n ); 01068 }; 01069 01070 //********************************************************* 01071 //** HDataPropertyInfo 01072 //********************************************************* 01073 class PLUGINEXPORT HDataPropertyInfo : public HPropertyInfo 01074 { 01075 public: 01076 static HDataPropertyInfo *New( const char *localizedname, const char *matchname ); 01077 01078 void SetDefaultValue( const DataValue &value ); 01079 const DataValue &GetDefaultValue() const; 01080 01081 void SetSaveCompressed( BOOL savecompressed ); 01082 BOOL GetSaveCompressed() const; 01083 }; 01084 01085 //********************************************************* 01086 //** HDataProperty 01087 //********************************************************* 01088 class PLUGINEXPORT HDataProperty : public HProperty 01089 { 01090 public: 01091 static HDataProperty *New(); 01092 static HDataProperty *New( HDataPropertyInfo *propinfo ); 01093 const DataValue &GetValue() const; 01094 DataValue GetValue(Time time) const; 01095 void SetValue( const DataValue &value ); 01096 void StoreValue(const DataValue &value, BOOL storeundo = TRUE); // Stores at Time 0 01097 void StoreValue( Time time, const DataValue &value, BOOL storeundo=TRUE ); 01098 }; 01099 01100 #endif
Generated on Thu Oct 27 11:46:46 2005 with
1.4.5 written by Dimitri van Heesch,
© 1997-2001