1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2002 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
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. *
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. *
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. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGVTKPOLYDATAMAPPER_H_
40 #define _OSGVTKPOLYDATAMAPPER_H_
45 #include "OSGConfig.h"
46 #include "OSGVTKPolyDataMapperBase.h"
47 #include "OSGChunkMaterial.h"
48 #include "OSGMaterialChunk.h"
49 #include "OSGGeometry.h"
52 #include <vtkTimeStamp.h>
58 #ifdef OSG_HAVE_ACTION //CHECK
59 #include "OSGActorBase.h"
64 class OSG_CONTRIBVTK_DLLMAPPING VTKPolyDataMapper
: public VTKPolyDataMapperBase
66 /*========================== PUBLIC =================================*/
70 /*---------------------------------------------------------------------*/
74 virtual void changed(ConstFieldMaskArg whichField
,
79 /*---------------------------------------------------------------------*/
86 void setActor(vtkActor
*pActor
);
90 /*---------------------------------------------------------------------*/
94 void adjustVolume(Volume
&volume
);
97 /*---------------------------------------------------------------------*/
101 virtual void dump( UInt32 uiIndent
= 0,
102 const BitVector bvFlags
= 0) const;
105 /*========================= PROTECTED ===============================*/
109 typedef VTKPolyDataMapperBase Inherited
;
113 vtkTimeStamp _executeTime
;
114 vtkTimeStamp _modifiedTime
;
117 /*---------------------------------------------------------------------*/
118 /*! \name Constructors */
121 VTKPolyDataMapper(void);
122 VTKPolyDataMapper(const VTKPolyDataMapper
&source
);
125 /*---------------------------------------------------------------------*/
126 /*! \name Destructors */
129 virtual ~VTKPolyDataMapper(void);
131 virtual void resolveLinks(void);
134 /*---------------------------------------------------------------------*/
138 void initGeometries(void);
141 bool processPrimitive(OSG::GeoPnt3fProperty
*pPoints
,
142 OSG::GeoColor4fProperty
*pColors
,
143 OSG::GeoVec3fProperty
*pNormals
,
144 OSG::GeoUInt32Property
*pLengths
,
145 OSG::GeoUInt8Property
*pTypes
,
148 vtkCellArray
*primArray
,
154 /*---------------------------------------------------------------------*/
158 static void initMethod(InitPhase ePhase
);
161 /*---------------------------------------------------------------------*/
162 /*! \name Intersect & Render */
165 Action::ResultE
intersectEnter(Action
*action
);
166 Action::ResultE
intersectLeave(Action
*action
);
168 Action::ResultE
renderEnter (Action
*action
);
169 Action::ResultE
renderLeave (Action
*action
);
172 /*========================== PRIVATE ================================*/
176 friend class FieldContainer
;
177 friend class VTKPolyDataMapperBase
;
179 /*---------------------------------------------------------------------*/
181 /*!\brief prohibit default function (move to 'public' if needed) */
182 void operator =(const VTKPolyDataMapper
&source
);
185 typedef VTKPolyDataMapper
*VTKPolyDataMapperP
;
189 #include "OSGVTKPolyDataMapperBase.inl"
190 #include "OSGVTKPolyDataMapper.inl"
192 #endif /* _OSGVTKPOLYDATAMAPPER_H_ */