- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# FCDocument/FCDEffect.h

Go to the documentation of this file.

    00001 /*
    00002     Copyright (C) 2005-2007 Feeling Software Inc.
    00003     Portions of the code are:
    00004     Copyright (C) 2005-2007 Sony Computer Entertainment America
    00005
    00006     MIT License: http://www.opensource.org/licenses/mit-license.php
    00007 */
    00008 /*
    00009     Based on the FS Import classes:
    00010     Copyright (C) 2005-2006 Feeling Software Inc
    00011     Copyright (C) 2005-2006 Autodesk Media Entertainment
    00012     MIT License: http://www.opensource.org/licenses/mit-license.php
    00013 */
    00014
    00020 #ifndef _FCD_EFFECT_H_
    00021 #define _FCD_EFFECT_H_
    00022
    00023 #ifndef _FU_DAE_ENUM_H_
    00024 #include "FUtils/FUDaeEnum.h"
    00025 #endif // _FU_DAE_ENUM_H_
    00026 #ifndef _FCD_ENTITY_H_
    00027 #include "FCDocument/FCDEntity.h"
    00028 #endif // _FCD_ENTITY_H_
    00029
    00030 class FCDocument;
    00031 class FCDEffectStandard;
    00032 class FCDEffectParameter;
    00033 class FCDEffectProfile;
    00034
    00053 class FCOLLADA_EXPORT FCDEffect : public FCDEntity
    00054 {
    00055 private:
    00056     DeclareObjectType(FCDEntity);
    00057     DeclareParameterContainer(FCDEffectProfile, profiles, FC("Profiles"));
    00058     DeclareParameterContainer(FCDEffectParameter, parameters, FC("Parameters"));
    00059
    00060 public:
    00064     FCDEffect(FCDocument* document);
    00065
    00067     virtual ~FCDEffect();
    00068
    00072     virtual Type GetType() const { return FCDEntity::EFFECT; }
    00073
    00076     size_t GetProfileCount() const { return profiles.size(); }
    00077
    00081     FCDEffectProfile* GetProfile(size_t index) { FUAssert(index < GetProfileCount(), return NULL); return profiles.at(index); }
    00082     const FCDEffectProfile* GetProfile(size_t index) const { FUAssert(index < GetProfileCount(), return NULL); return profiles.at(index); }
    00086     DEPRECATED(3.05A, GetProfileCount and GetProfile(index)) void GetProfiles() const {}
    00087
    00094     const FCDEffectProfile* FindProfile(FUDaeProfileType::Type type) const;
    00095     inline FCDEffectProfile* FindProfile(FUDaeProfileType::Type type) { return const_cast<FCDEffectProfile*>(const_cast<const FCDEffect*>(this)->FindProfile(type)); }
    00104     inline FCDEffectProfile* FindProfileByTypeAndPlatform(FUDaeProfileType::Type type, const fm::string& platform) { return const_cast<FCDEffectProfile*>(const_cast<const FCDEffect*>(this)->FindProfileByTypeAndPlatform(type, platform)); }
    00105     const FCDEffectProfile* FindProfileByTypeAndPlatform(FUDaeProfileType::Type type, const fm::string& platform) const;
    00110     inline bool HasProfile(FUDaeProfileType::Type type) const { return FindProfile(type) != NULL; }
    00111
    00117     FCDEffectProfile* AddProfile(FUDaeProfileType::Type type);
    00118
    00121     inline size_t GetEffectParameterCount() const { return parameters.size(); }
    00122
    00126     inline FCDEffectParameter* GetEffectParameter(size_t index) { FUAssert(index < parameters.size(), return NULL); return parameters.at(index); }
    00127     inline const FCDEffectParameter* GetEffectParameter(size_t index) const { FUAssert(index < parameters.size(), return NULL); return parameters.at(index); }
    00128
    00133     FCDEffectParameter* AddEffectParameter(uint32 type);
    00134
    00141     virtual FCDEntity* Clone(FCDEntity* clone = NULL, bool cloneChildren = false) const;
    00142
    00146     DEPRECATED(3.05A, not recommended) void Flatten();
    00147 };
    00148
    00149 #endif // _FCD_MATERIAL_H_