fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / Dynamics / Skeleton / OSGSkinnedGeometry.h
blobd348371690532d886d42e6546f19c1a7ade2198b
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2006 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
10 * *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13 * License *
14 * *
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
18 * *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
23 * *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
27 * *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30 * Changes *
31 * *
32 * *
33 * *
34 * *
35 * *
36 * *
37 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGSKINNEDGEOMETRY_H_
40 #define _OSGSKINNEDGEOMETRY_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 #include "OSGSkinnedGeometryBase.h"
46 #include "OSGRenderAction.h"
48 OSG_BEGIN_NAMESPACE
50 /*! \brief SkinnedGeometry class. See \ref
51 PageDynamicsSkinnedGeometry for a description.
54 class OSG_DYNAMICS_DLLMAPPING SkinnedGeometry : public SkinnedGeometryBase
56 protected:
58 /*========================== PUBLIC =================================*/
60 public:
62 typedef SkinnedGeometryBase Inherited;
63 typedef SkinnedGeometry Self;
65 enum RenderModeE
67 RMUnskinned = 0,
68 RMSkeleton = 1,
69 RMSkinnedCPU = 2,
70 RMSkinnedGPU = 3
73 /*---------------------------------------------------------------------*/
74 /*! \name Sync */
75 /*! \{ */
77 virtual void changed(ConstFieldMaskArg whichField,
78 UInt32 origin,
79 BitVector details );
81 /*! \} */
82 /*---------------------------------------------------------------------*/
83 /*! \name Render */
84 /*! \{ */
86 Action::ResultE renderEnter (Action *action);
87 Action::ResultE renderLeave (Action *action);
89 Action::ResultE intersectEnter(Action *action);
91 Action::ResultE animBindEnter (Action *action);
93 /*! \} */
94 /*---------------------------------------------------------------------*/
95 /*! \name Drawable Specifics */
96 /*! \{ */
98 virtual void fill (DrawableStatsAttachment *drawStats);
99 virtual void adjustVolume(Volume &volume );
101 /*! \} */
102 /*---------------------------------------------------------------------*/
103 /*! \name Output */
104 /*! \{ */
106 virtual void dump( UInt32 uiIndent = 0,
107 const BitVector bvFlags = 0) const;
109 /*! \} */
110 /*========================= PROTECTED ===============================*/
112 protected:
114 // Variables should all be in SkinnedGeometryBase.
116 /*---------------------------------------------------------------------*/
117 /*! \name Constructors */
118 /*! \{ */
120 SkinnedGeometry(void);
121 SkinnedGeometry(const SkinnedGeometry &source);
123 /*! \} */
124 /*---------------------------------------------------------------------*/
125 /*! \name Destructors */
126 /*! \{ */
128 virtual ~SkinnedGeometry(void);
130 /*! \} */
131 /*---------------------------------------------------------------------*/
132 /*! \name Init */
133 /*! \{ */
135 static void initMethod(InitPhase ePhase);
137 /*! \} */
138 /*---------------------------------------------------------------------*/
139 /*! \name Helper */
140 /*! \{ */
142 template <class ElemTypeT>
143 void transformProperty(GeoVectorProperty *prop, const Matrix &matrix);
145 /*! \} */
146 /*========================== PRIVATE ================================*/
148 private:
150 friend class FieldContainer;
151 friend class SkinnedGeometryBase;
153 // prohibit default functions (move to 'public' if you need one)
154 void operator =(const SkinnedGeometry &source);
157 typedef SkinnedGeometry *SkinnedGeometryP;
159 OSG_END_NAMESPACE
161 #include "OSGSkinningAlgorithm.h"
163 #include "OSGSkinnedGeometryBase.inl"
164 #include "OSGSkinnedGeometry.inl"
166 #endif /* _OSGSKINNEDGEOMETRY_H_ */