Represents a texture tile inside a texture pool.
Textures are like images (see the Image class) in that they are a 2d array of pixel values. Like images, Textures support many formats. Textures can also be used internally as the target of OpenGL rendering operations – that is, Mudbox scenes can be rendered into Textures. Textures have the ability to keep old versions of themselves around for undo/redo purposes.
Definition at line 716 of file material.h.
|
virtual void | Create (unsigned int iWidth, unsigned int iHeight, unsigned int iChannelCount, enum Image::Format eFormat, const Color &cColor) |
| Create/allocate the content of the texture. More...
|
|
virtual void | Create (unsigned int iWidth, unsigned int iHeight, unsigned int iChannelCount, enum Image::Format eFormat) |
| Create/allocate the content of the texture. More...
|
|
virtual bool | CreateFromFile (const QString &sFileName, unsigned int iChannelCount=0, enum Image::Format eFormat=Image::eUnknown) |
| Create the texture from an image file. More...
|
|
virtual const Image * | AsImage (void) |
| Returns the content as an image. More...
|
|
virtual void | CopyTo (Texture &cTexture) const |
| Copy the content of the texture into another one, using the current opengl pipeline settings. More...
|
|
virtual unsigned int | Width (void) const |
| Returns the width of the texture in pixels. More...
|
|
virtual unsigned int | Height (void) const |
| Returns the height of the texture in pixels. More...
|
|
virtual unsigned int | BitDepth (void) const |
| Returns the bit depth of the texture (per channel) More...
|
|
virtual enum Image::Format | Format (void) const |
| Returns the format of the texture. More...
|
|
virtual unsigned int | ChannelCount (void) const |
| Returns the number of channels. More...
|
|
virtual bool | Activate (void) const |
| Binds the texture node. More...
|
|
virtual bool | Deactivate (void) const |
| UnBinds the texture node, but does not restore the previous active texture. More...
|
|
virtual unsigned int | OpenGLName (void) const |
| Returns the opengl name of the texture. More...
|
|
virtual bool | SetAsRenderTarget (void) |
| Sets the texture as a render target. Subsequent renderings will render into that texture. More...
|
|
virtual bool | RestoreRenderTarget (void) |
| Restore previous render target. More...
|
|
virtual abool * | getFilteringPref () |
|
virtual void | CopyFrom (Image *pImage, const ImgTile *pRegion=0) |
| Create the texture content from an image. More...
|
|
virtual void | ReplaceWith (Image *pImage, const ImgTile *pRegion=0) |
| Replace the texture with the content from an image. More...
|
|
virtual void | CopyTo (Image *pImage, bool tiled=true, const ImgTile *region=0, ImageDescriptor::MemoryChannelOrder eOrder=ImageDescriptor::orderRGBA) |
| Copy the texture or a region thereof to an image. More...
|
|
virtual void | SetLocation (unsigned int iLocation) |
| Sets the location for the texture pool. More...
|
|
virtual unsigned int | Location (void) const |
| Gets the location for the texture pool. More...
|
|
virtual int64 | TotalMemoryUsage (void) const |
| Return the memory usage of all texture instances of the class in bytes. More...
|
|
virtual qint64 | VideoMemoryUsage (float fTCGrad=-1.0f) const |
| Returns the GPU memory usage in bytes. More...
|
|
virtual void | SetLive (bool bLive) |
| For internal use only. More...
|
|
virtual bool | IsLive (void) const |
| For internal use only. More...
|
|
virtual void | SetFiltered (bool bFiltered) |
| Set the texture filtering on this texture. More...
|
|
virtual void | SetConvert32To16bitFloat (bool bConvert) |
| Set to true to automatically convert 32 bit floating point textures to 16 bit floating point textures on the gpu. More...
|
|
virtual bool | setProxyLevel (unsigned char level, bool bLazySet=false) |
| Set the proxy level – 0 == no proxy, 1 == 0.5x, 2 = 0.25x, 3 = 0.125 etc... More...
|
|
virtual void | SyncContent () |
| Syncronize texture in video memory with texture in system memory. More...
|
|
virtual unsigned char | getProxyLevel () const |
| get the proxy level – 0 == no proxy, 1 == 0.5x, 2 = 0.25x, 3 = 0.125 etc... More...
|
|
virtual void | Composite (const Texture *pTex, ImgDirtyRegion *pRegion=0, unsigned int iBlendMode=0, const Store< float > *aBlendParameters=0) |
| Composites the given texture over this texture, and stores the final result into this texture. More...
|
|
virtual void | CopyGLTextureToImage (Image *pImage, bool tiled=true, const ImgTile *region=0, ImageDescriptor::MemoryChannelOrder eOrder=ImageDescriptor::orderRGBA) const |
| Avoid using this function unless you know exactly what you are doing. More...
|
|
virtual bool | IsDirty (void) const |
| Returns if the texture is modified since last load/save. More...
|
|
virtual void | SetDirty (bool bDirty) |
| Returns if the texture is modified since last load/save. More...
|
|
|
These methods provide a multi-level undo and redo system for textures.
|
virtual bool | NewVersion () |
| Caches a copy of the current texture. More...
|
|
virtual bool | PrevVersion () |
| Makes the previous version of the texture current. More...
|
|
virtual bool | NextVersion () |
| Makes the 'next' version of the texture current. More...
|
|
virtual int | NumVersions () |
| Returns the number of versions of this texture. More...
|
|
virtual bool | MergeOldestVersions () |
| Merges the oldest two versions of this texture. More...
|
|
virtual bool | PurgeNewerVersions () |
| Purges any versions of this texture after the current one (i.e. More...
|
|
virtual bool | PurgeAllButCurrentVersion () |
| Purges all but the current version of this Texture. More...
|
|
virtual bool | BeginUndoableOperation () |
| Notifies the texture that you are about to start making undoable changes to it (such as a brush stroke). More...
|
|
virtual bool | EndUndoableOperation () |
| Notifies the texture that you have finished making undoable changes to it (such as a brush stroke). More...
|
|
|
The dirty tile methods are used by the undo mechanism so that it only has to save those portions of the texture that has been modified.
|
void | ResetDirtyTile () |
| Resets the dirty region to be empty. More...
|
|
virtual void | AddDirtyPixel (int x, int y) |
| Notifies the texture that part of it has changed. More...
|
|
virtual void | AddDirtyTile (const ImgTile &t) |
| Notifies the texture that part of it has changed. More...
|
|
ImgTile | DirtyTile () const |
| Returns the dirty rectangle of the texture. Deprecated. More...
|
|
ImgDirtyRegion * | DirtyRegion () |
| returns the dirty region. More...
|
|
| Node (const QString &sStringID="", const QString &sDisplayName="") |
| Standard constructor. More...
|
|
virtual | ~Node (void) |
|
virtual void | Initialize (void) |
|
void | LoadTemplate (const QString &sFileName="", bool bStartEvent=false) |
| Use an external XML file to initialize the attributes. More...
|
|
void | SaveTemplate (const QString &sFileName="", bool bSaveOnlyVisible=false) |
| Save current attributes as an XML template. More...
|
|
unsigned int | Version (void) const |
| Returns the current version of the node. This number increases when the content of the node changed (when ContentChanged() called). More...
|
|
void | SetVersion (unsigned int iVersion) |
| Sets the current version number for the node. More...
|
|
unsigned int | ReferenceCount (void) const |
| Returns the number of pointers referencing this node. More...
|
|
Attribute * | ReferencePointer (unsigned int iIndex) const |
| Returns the address of an attribute which refers to this node. The type of the attribute is always aptr. More...
|
|
Node * | ReferenceNode (unsigned int iIndex) const |
| Returns the address of a node referencing this node. More...
|
|
virtual QString | Name (const ClassDesc *pClass=0) const |
| Deprecated. More...
|
|
virtual void | SetName (const QString &sName) |
| Deprecated. More...
|
|
virtual QString | StringID (const ClassDesc *pClass=0) const |
| Returns the string id of the node. More...
|
|
virtual void | SetStringID (const QString &sStringID) |
| Sets the string id of the node. More...
|
|
virtual QString | DisplayName (void) const |
| Returns the display name of the node. More...
|
|
virtual void | SetDisplayName (const QString &sDisplayName) |
| Sets the display name of the node. More...
|
|
virtual QString | HelpID (void) const |
| Returns the help entry id of the node. Can be overwritten in derived classes. More...
|
|
virtual void | SetHelpID (const QString &sHelpID) |
| Sets the help entry id of the node. More...
|
|
void | Annex (Node *pSource, const QString &sCategory="") |
| Relink all the attributes of the source node to this one. More...
|
|
virtual void | Serialize (Stream &s) |
| Serializes the node. More...
|
|
bool | IsKindOf (const ClassDesc *pClass) const |
| Returns true if this node is derived from the pClass class. More...
|
|
void | ContentChanged (void) const |
| This function must be called if the content of the node is changed. More...
|
|
virtual void | CheckValidity (DiagnosticLevel iLevel=dgnLevel2) const |
| Checks the validity of this node. More...
|
|
virtual void | CopyTo (Node *pNode) const |
|
virtual Node * | Duplicate (void) const |
|
virtual void | OnNodeEvent (const Attribute &cAttribute, NodeEventType cType) |
| This function is called if an event occurs with any of the attributes of the node. More...
|
|
virtual void | OnEvent (const EventGate &cEvent) |
| This function is called when a generic event occurs. See EventGate class. More...
|
|
void | RequestDeferredEvent (Attribute &cAttribute) |
| Request for a deferred event, which will occur only in the main loop. More...
|
|
unsigned int | AttributeCount (void) const |
| Returns the number of attributes owned by the node. More...
|
|
Attribute * | AttributeByIndex (int iIndex) const |
| Returns a specified attribute (or 0 if iIndex is greater than the number of attributes). More...
|
|
Attribute * | AttributeByName (const QString &sName) const |
| Returns a specified attribute by its name. Returns 0 if the attribute not found. More...
|
|
Attribute * | AttributeByID (const QString &sID) const |
| Returns a specified attribute by its ID. Returns 0 if the attribute not found. More...
|
|
void | SetAttributeValue (const QString &sAttributeID, const QString &sNewValue) |
| Set the value of an attribute from a string. More...
|
|
QString | AttributeValue (const QString &sAttributeID) const |
| Returns the current value of an attribute as a string. More...
|
|
void | LogAttributes (void) const |
| Write all attributes into the log file. More...
|
|
virtual QWidget * | CreatePropertiesWindow (QWidget *pParent) |
| Create a window which displays the attributes of the node. Can be overriden to provide a custom interface. More...
|
|
Attribute * | AddAttribute (Attribute::AttributeType type, const QString &id) |
| Allows SDK users to add attributes at runtime. More...
|
|
Node * | Next (void) const |
| Returns the next node in the chain. Used to enumerate the current nodes. See also First(). More...
|
|
int | ID (void) const |
| Returns an ID for the node. The ID is unique in the whole application life. More...
|
|
bool | SetID (int iID) |
| Set ID for the node. More...
|
|