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

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Public Attributes | Protected Attributes

# BrushStencil Struct Reference

This reference page is linked to from the following overview topics: Mudbox 2013.

Search for all occurrences

## Detailed Description

A masking image attached to a camera.

Definition at line 97 of file brushmask.h.

`#include <brushmask.h>`

Inheritance diagram for BrushStencil:
[legend]

List of all members.

## Public Types
enum | { eColorModeUndefined = -1, eColorModeLuminance, eColorModeColored }
## Public Member Functions
| BrushStencil (void)
| Constructor.
| ~BrushStencil (void)
| Destructor.
void | SetVisibility (float f)
| Sets the visibility.
float | Visibility (void)
| Returns the visibility.
void | SetUIEnabled (bool b)
| Sets if the object can interact with the user.
void | SetColorMode (unsigned int mode)
| Sets the color mode.
unsigned int | ColorMode (void)
| Returns the color mode.
void | SetOffset (float offset)
| Sets the offset.
float | Offset (void) const
| Returns the offset.
void | SetTransformation (const Matrix &mTransformation)
| Sets the transformation matrix.
void | UpdateMatrix (void)
| Updates the projection matrix.
const Matrix & | Final (void) const
| Returns the final matrix.
Matrix | MirroredFinal (void) const
| Returns the matrix mirrored to the active mirror axis.
bool | IsMirrored (void) const
| Returns if the stencil uses mirroring.
void | SetInverted (bool inv)
| Sets the stencil inverted state.
bool | IsInverted (void) const
| Returns if the stencil is inverted.
bool | Activate (void)
| Sets the stencil texture as current. Returns true if successful.
bool | Deactivate (void)
| Sets the stencil texture as not current. Returns true if successful.
void | SetFromImage (class Image *pSrcImage)
| Creates the stencil from an exisiting image.
virtual void | CreateTextures (void)
| Creates Texture objects from the in-memory Image.
Texture * | getTexture () const
void | SetFromColorTexture (Texture *pSrcTexture)
| Creates the stencil from an existing texture.
## Public Attributes
| DECLARE_CLASS
## Protected Attributes
bool | m_bUIEnabled
unsigned int | m_iColorMode
Matrix | m_mProjector
Matrix | m_mFinal
Texture * | m_pColorTexture
afloatr | m_fVisibility
abool | m_bInvert
abool | m_bUseTiles
abool | m_bShowTiles
afloatr | m_fOffset
abool | m_bAutoHide
abool | m_bMirror
abool | m_bFlipX
abool | m_bFlipY
aevent | m_cImport
aevent | m_cExport

## Member Enumeration Documentation

anonymous enum

Search for all occurrences

Enumerator:

  eColorModeUndefined | Search for all occurrences
  eColorModeLuminance | Search for all occurrences
  eColorModeColored | Search for all occurrences

Definition at line 99 of file brushmask.h.

        {
            eColorModeUndefined = -1,
            eColorModeLuminance,
            eColorModeColored
        };

## Constructor & Destructor Documentation

BrushStencil | ( | void |  | ) |

Constructor.

~BrushStencil | ( | void |  | ) |

Destructor.

## Member Function Documentation

void SetVisibility | ( | float | f | ) |

Search for all occurrences

Sets the visibility.

float Visibility | ( | void |  | ) |

Search for all occurrences

Returns the visibility.

void SetUIEnabled | ( | bool | b | ) |

Search for all occurrences

Sets if the object can interact with the user.

void SetColorMode | ( | unsigned int | mode | ) |

Search for all occurrences

Sets the color mode.

unsigned int ColorMode | ( | void |  | ) |

Search for all occurrences

Returns the color mode.

void SetOffset | ( | float | offset | ) |

Search for all occurrences

Sets the offset.

float Offset | ( | void |  | ) | const

Search for all occurrences

Returns the offset.

void SetTransformation | ( | const Matrix & | mTransformation | ) | `[virtual]`

Search for all occurrences

Sets the transformation matrix.

Reimplemented from BrushMask.

void UpdateMatrix | ( | void |  | ) |

Search for all occurrences

Updates the projection matrix.

const Matrix& Final | ( | void |  | ) | const

Search for all occurrences

Returns the final matrix.

Matrix MirroredFinal | ( | void |  | ) | const

Search for all occurrences

Returns the matrix mirrored to the active mirror axis.

bool IsMirrored | ( | void |  | ) | const

Search for all occurrences

Returns if the stencil uses mirroring.

void SetInverted | ( | bool | inv | ) | `[inline]`

Search for all occurrences

Sets the stencil inverted state.

Definition at line 144 of file brushmask.h.

    { m_bInvert.SetValue(inv); }

bool IsInverted | ( | void |  | ) | const

Search for all occurrences

Returns if the stencil is inverted.

bool Activate | ( | void |  | ) |

Search for all occurrences

Sets the stencil texture as current. Returns true if successful.

bool Deactivate | ( | void |  | ) |

Search for all occurrences

Sets the stencil texture as not current. Returns true if successful.

void SetFromImage | ( | class Image * | pSrcImage | ) |

Search for all occurrences

Creates the stencil from an exisiting image.

virtual void CreateTextures | ( | void |  | ) | `[virtual]`

Search for all occurrences

Creates Texture objects from the in-memory Image.

Reimplemented from BrushMask.

Texture* getTexture | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 160 of file brushmask.h.

    { return m_pColorTexture; }

void SetFromColorTexture | ( | Texture * | pSrcTexture | ) |

Search for all occurrences

Creates the stencil from an existing texture.

Do not delete this texture -- it is not copied into this object, just the pointer to the texture. It will be released when this class is released. This has only been tested with a color texture. Use with caution. Used to implement the clone brush with no image traffic across the PCIe bus.

## Member Data Documentation

DECLARE_CLASS

Search for all occurrences

Reimplemented from BrushMask.

Definition at line 106 of file brushmask.h.

bool m_bUIEnabled `[protected]`

Search for all occurrences

Definition at line 171 of file brushmask.h.

unsigned int m_iColorMode `[protected]`

Search for all occurrences

Definition at line 172 of file brushmask.h.

Matrix m_mProjector `[protected]`

Search for all occurrences

Definition at line 173 of file brushmask.h.

Matrix m_mFinal `[protected]`

Search for all occurrences

Definition at line 174 of file brushmask.h.

Texture* m_pColorTexture `[protected]`

Search for all occurrences

Definition at line 176 of file brushmask.h.

afloatr m_fVisibility `[protected]`

Search for all occurrences

Definition at line 179 of file brushmask.h.

abool m_bInvert `[protected]`

Search for all occurrences

Definition at line 180 of file brushmask.h.

abool m_bUseTiles `[protected]`

Search for all occurrences

Definition at line 181 of file brushmask.h.

abool m_bShowTiles `[protected]`

Search for all occurrences

Definition at line 182 of file brushmask.h.

afloatr m_fOffset `[protected]`

Search for all occurrences

Definition at line 183 of file brushmask.h.

abool m_bAutoHide `[protected]`

Search for all occurrences

Definition at line 184 of file brushmask.h.

abool m_bMirror `[protected]`

Search for all occurrences

Definition at line 185 of file brushmask.h.

abool m_bFlipX `[protected]`

Search for all occurrences

Definition at line 186 of file brushmask.h.

abool m_bFlipY `[protected]`

Search for all occurrences

Definition at line 187 of file brushmask.h.

aevent m_cImport `[protected]`

Search for all occurrences

Definition at line 189 of file brushmask.h.

aevent m_cExport `[protected]`

Search for all occurrences

Definition at line 190 of file brushmask.h.

The documentation for this struct was generated from the following file:

- Mudbox/brushmask.h