Mudbox/brushmask.h Source File

brushmask.h
Go to the documentation of this file.
1 
2 //**************************************************************************/
3 // Copyright (c) 2008 Autodesk, Inc.
4 // All rights reserved.
5 //
6 // Use of this software is subject to the terms of the Autodesk license
7 // agreement provided at the time of installation or download, or which
8 // otherwise accompanies this software in either electronic or hard copy form.
9 //
10 //**************************************************************************/
11 // DESCRIPTION:
12 // CREATED: November 2009
13 //**************************************************************************/
14 
15 #ifndef __MUDBOXSDK_BRUSHMASK_H__
16 #define __MUDBOXSDK_BRUSHMASK_H__
17 
18 namespace mudbox {
19 
21 struct MBDLL_DECL BrushMask : public TreeNode
22 {
25 
27  BrushMask( void );
29  ~BrushMask( void );
30 
32  void SetState( bool b );
34  bool State( void );
35 
37  float Factor( void );
39  void SetFactor( float f );
40 
42  virtual void SetTransformation( const Matrix &mTransformation );
44  Matrix Transformation( void );
45 
47  virtual class Image *Image( void );
48 
50  void SetImage( class Image *pImage );
52  void Clear( void );
56  void SetFileName( const QString &sFileName );
58  virtual void CreateTextures( void );
59  QString GetFileName() const { return m_sFileName; }
60 
61 
62 protected:
65 
66  class Image *m_pImage;
68 
72 };
73 
76 {
78 
80  void SetParameters( const StampConfiguration &config,
81  const Vector &vPosition,
82  const Vector &vNormal,
83  float fSize,
84  const Matrix &mLocalToWorld );
85 
88  void CalculateTransformation( const Vector &vPosition,
89  const Vector &vNormal,
90  const Vector &vUp,
91  float fScaleX, float fScaleY,
92  bool bFlip, bool bFlop,
93  const Matrix &mLocalToWorld );
94 };
95 
98 {
99  enum
100  {
101  eColorModeUndefined = -1,
103  eColorModeColored
104  };
105 
107 
109  BrushStencil( void );
111  ~BrushStencil( void );
112 
114  void SetVisibility( float f );
116  float Visibility( void );
117 
119  void SetUIEnabled( bool b );
120 
122  void SetColorMode( unsigned int mode );
124  unsigned int ColorMode( void );
125 
127  void SetOffset( float offset );
129  float Offset( void ) const;
130 
132  void SetTransformation( const Matrix &mTransformation );
134  void UpdateMatrix( void );
136  const Matrix &Final( void ) const;
138  Matrix MirroredFinal( void ) const;
139 
141  bool IsMirrored( void ) const;
142 
144  void SetInverted(bool inv) { m_bInvert.SetValue(inv); }
145 
147  bool IsInverted( void ) const;
148 
150  bool Activate( void );
152  bool Deactivate( void );
153 
155  void SetFromImage( class Image *pSrcImage );
156 
158  virtual void CreateTextures( void );
159 
160  Texture *getTexture() const { return m_pColorTexture; }
161 
168  void SetFromColorTexture(Texture *pSrcTexture);
169 
170 protected:
172  unsigned int m_iColorMode;
175 
177 
178  // attributes
188 
191 };
192 
193 }; // end of namespace mudbox
194 
195 #endif
GLint mode
Definition: GLee.h:4479
Container class for stamp related properties and functions.
Definition: brush.h:185
Represents a 3D vector or point with S23E8 floating point elements.
Definition: math.h:35
GLintptr offset
Definition: GLee.h:1562
This attribute represents a float value which has a minimum and a maximum value.
Definition: node.h:1020
A masking image aligned to a mesh surface.
Definition: brushmask.h:75
State
The state the media producing object is in at the moment.
This class can be used for masking out areas from the brush effect.
Definition: brushmask.h:21
Texture * m_pLuminanceTexture
Definition: brushmask.h:67
astring m_sFileName
Definition: brushmask.h:71
A masking image attached to a camera.
Definition: brushmask.h:97
void SetInverted(bool inv)
Sets the stencil inverted state.
Definition: brushmask.h:144
This class represents a 4x4 transformation matrix.
Definition: math.h:1122
class Image * m_pImage
Definition: brushmask.h:66
Texture * getTexture() const
Definition: brushmask.h:160
Texture * m_pColorTexture
Definition: brushmask.h:176
This class represents an event receiver/triggerer point.
Definition: node.h:999
Matrix m_mTransformation
Definition: brushmask.h:63
unsigned int m_iColorMode
Definition: brushmask.h:172
GLubyte GLubyte b
Definition: GLee.h:5404
Represents a texture tile inside a texture pool.
Definition: material.h:716
Class: ConvolutionKernel.
Definition: array.h:15
This class is the base of all node types that can be structured in a hierarchy.
Definition: treenode.h:18
float m_fAspectRatio
Definition: brushmask.h:64
A Transformation is a node in the Mudbox scene that controls the size and position of other nodes...
#define DECLARE_CLASS
This macro should be used in declaration of classes which are inherited from the Node class (or any d...
Definition: node.h:91
GLXFBConfig config
Definition: GLee.h:10233
This is the base image type defining the interface to images.
Definition: image.h:1504
GLclampf f
Definition: GLee.h:9303
#define Q_DECLARE_TR_FUNCTIONS(context)
afloatr m_fFactor
Definition: brushmask.h:70
#define MBDLL_DECL
Definition: dllinterface.h:35