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

- File List
- File Members

# FCDocument/FCDTexture.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_TEXTURE_H_
    00021 #define _FCD_TEXTURE_H_
    00022
    00023 #ifndef _FCD_ENTITY_H_
    00024 #include "FCDocument/FCDEntity.h"
    00025 #endif // _FCD_ENTITY_H_
    00026 #ifndef _FU_DAE_ENUM_H_
    00027 #include "FUtils/FUDaeEnum.h"
    00028 #endif // _FU_DAE_ENUM_H_
    00029
    00030 class FCDocument;
    00031 class FCDEffectParameter;
    00032 class FCDEffectParameterSampler;
    00033 class FCDEffectStandard;
    00034 class FCDImage;
    00035
    00036 #ifndef LINUX
    00037 template <class T> class FCOLLADA_EXPORT FCDEffectParameterT;
    00038 #else
    00039 template <class T> class FCDEffectParameterT;
    00040 #endif // LINUX
    00041 typedef FCDEffectParameterT<int32> FCDEffectParameterInt;
    00057 class FCOLLADA_EXPORT FCDTexture : public FCDObject
    00058 {
    00059 private:
    00060     DeclareObjectType(FCDObject);
    00061
    00062     FCDEffectStandard* parent;
    00063     DeclareParameterPtr(FCDEffectParameterSampler, sampler, FC("Sampler")); // Points to the surface, which points to the image.
    00064     DeclareParameterRef(FCDEffectParameterInt, set, FC("Set")); // Always preset, this parameter hold the map channel/uv set index
    00065     DeclareParameterRef(FCDExtra, extra, FC("Extra Tree"));
    00066
    00067 public:
    00072     FCDTexture(FCDocument* document, FCDEffectStandard* parent = NULL);
    00073
    00075     virtual ~FCDTexture();
    00076
    00079     FCDEffectStandard* GetParent() const { return parent; }
    00080
    00084     inline FCDImage* GetImage() { return const_cast<FCDImage*>(const_cast<const FCDTexture*>(this)->GetImage()); }
    00085     const FCDImage* GetImage() const;
    00092     void SetImage(FCDImage* image);
    00093
    00097     FCDEffectParameterSampler* GetSampler();
    00098     inline const FCDEffectParameterSampler* GetSampler() const { return sampler; }
    00102     inline void SetSampler(FCDEffectParameterSampler* _sampler) { sampler = _sampler; }
    00103
    00106     inline bool HasSampler() { return sampler != NULL; }
    00107
    00111     inline FCDEffectParameterInt* GetSet() { return set; }
    00112     inline const FCDEffectParameterInt* GetSet() const { return set; }
    00116     inline FCDExtra* GetExtra() { return extra; }
    00117     inline const FCDExtra* GetExtra() const { return extra; }
    00123     virtual FCDTexture* Clone(FCDTexture* clone = NULL) const;
    00124 };
    00125
    00126 #endif // _FCD_TEXTURE_H_