Mudbox/layer.h Source File

layer.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: October 2008
13 //**************************************************************************/
14 
15 namespace mudbox {
16 
20 class MBDLL_DECL Layer : virtual public TreeNode
21 {
23 
24 public:
26  virtual float Transparency( void ) const;
27 
29  virtual void SetTransparency(
30  float fTransparency
31  );
32 
34  virtual Layer *Children( void ) const;
35 
37  virtual Layer *Next( void ) const;
38 
40  virtual Layer *Prev( void ) const;
41 
43  virtual class LayerContainer *Container( void ) const;
44 };
45 
47 class MBDLL_DECL LayerContainer : virtual public TreeNode
48 {
50 
51 public:
53  virtual unsigned int LayerCount( void ) const;
54 
56  virtual class Layer *Layer(
57  unsigned int iLayerIndex
58  ) const;
59 
61  virtual unsigned int LayerIndex(
62  const class Layer *pLayer
63  ) const;
64 
66  virtual void UnlinkLayer(
67  class Layer *pLayer
68  );
69 
71  virtual void AddLayer(
72  class Layer *pLayer
73  );
74 
76  virtual class Layer *CreateLayer( void );
77 
79  virtual class Layer *ActiveLayer( void ) const;
80 
82  virtual void SetActiveLayer(
83  class Layer *pLayer
84  );
85 
87  virtual void MoveLayer(
88  class Layer *pLayer,
89  class Layer *pWhere,
90  bool bBefore
91  );
92 
94  virtual void ReparentLayer(
95  class Layer *pLayer,
96  class Layer *pParent
97  );
98 
100  virtual class Layer *BaseLayer( void ) const;
101 
103  virtual unsigned int LayerGroupCount( void ) const;
104 
106  virtual class LayerGroup *LayerGroup( unsigned int iLayerGroupIndex ) const;
107 
109  virtual class LayerGroup *LayerGroup( class Layer *pLayer ) const ;
110 
112  virtual class LayerGroup *AddLayerGroup(
113  const QString &sName
114  );
115 
117  virtual void AddLayerGroup(
118  class LayerGroup *pLayerGroup
119  );
120 
122  virtual void RemoveLayerGroup(
123  class LayerGroup *pLayerGroup
124  );
125 
128  virtual void UpdateLayerToGroup(
129  class Layer *pLayer,
130  class LayerGroup *pLayerGroup
131  );
132 
134  virtual class LayerGroup *ActiveLayerGroup( void ) const;
135 
137  virtual void SetActiveLayerGroup(class LayerGroup *pLayerGroup) ;
138 
140  virtual void Serialize(
141  Stream &s
142  );
143 };
144 
159 {
161 
162 protected:
164  LayerGroup();
165 
166 public:
168  virtual LayerContainer *Container( void ) const;
169 
171  virtual QString Name( void ) const;
172  virtual void SetName(const QString &sName);
173  virtual QString StringID( void ) const;
174  virtual void SetStringID(const QString &sName);
175 
177  virtual bool Visible() const;
178 
180  virtual void SetVisible( bool bVisible );
181 
183  virtual float Transparency() const;
184 
186  virtual void SetTransparency( float fTransparency );
187 
189  virtual unsigned int LayerCount( void ) const;
190 
192  virtual class Layer *Layer(
193  unsigned int iLayerIndex
194  ) const;
195 
197  virtual QList<class Layer *> Layers( void ) const;
198 
200  virtual bool Contains(class Layer *pLayer) const;
201 };
202 
217 {
219 public:
221  virtual void SetName(
222  const QString &sName
223  );
224 
226  virtual class Layer *Layer( void ) const;
227 
229  virtual QString Name( void ) const;
230 
232  virtual bool Visible() const;
233 
235  virtual void SetVisible( bool bVisible, bool bLeaveMesh = false );
236 
238  virtual mudbox::Mesh* Mesh() const;
239 
241  virtual void SetTransparency(
242  float fTransparency,
243  bool bLeaveMesh = false
244  );
245 
247  virtual float Transparency( void ) const;
248 
256  virtual unsigned int LayerVertexIndex (
257  unsigned int iVertexIndex,
258  bool bCreate = true
259  );
260 
266  virtual void SetVertexCount(
267  unsigned int iVertexCount
268  );
269 
272  virtual unsigned int VertexCount() const;
273 
276  virtual unsigned int MeshVertexIndex(
277  unsigned int iLayerVertexIndex
278  ) const;
279 
281  virtual void SetVertexData(
282  unsigned int iVertexLayerIndex,
283  unsigned int iGlobalVertexIndex,
284  float fMask
285  );
286 
288  virtual Vector SetVertexDelta(
289  unsigned int iVertexLayerIndex,
290  unsigned int iGlobalVertexIndex,
291  const Vector &vDelta,
292  bool bUpdate = true
293  );
294 
296  virtual void SetVertexMask(
297  unsigned int iVertexLayerIndex,
298  float fMask
299  );
300 
302  virtual float VertexMask(
303  unsigned int iVertexLayerIndex
304  );
305 
307  virtual Vector VertexDelta(
308  unsigned int iVertexLayerIndex
309  );
310 
315  virtual bool FinishChanges();
316 
317  virtual void Transform( const Matrix &mMatrix );
318 };
319 
320 }; // end of namespace mudbox
LayerGroup acts as a logical sub-container for the layers, it does not own the these layers...
Definition: layer.h:158
Represents a 3D vector or point with S23E8 floating point elements.
Definition: math.h:35
A Mesh is a collection of vertices organized into faces, and optional Texture Coordinate information...
Definition: mesh.h:452
This is the base class for anything which is an element of a list with a fixed order and a transparen...
Definition: layer.h:20
This class represents a 4x4 transformation matrix.
Definition: math.h:1122
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
This class contains and manages a list of Layers.
Definition: layer.h:47
Streams are used to read information from a file, or to write it to a file.
Definition: stream.h:39
#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
GLdouble s
Definition: GLee.h:1173
#define MBDLL_DECL
Definition: dllinterface.h:35
This class represents a Sculpt Layer.
Definition: layer.h:216