1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000,2001 by the OpenSG Forum *
7 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
9 \*---------------------------------------------------------------------------*/
10 /*---------------------------------------------------------------------------*\
13 * This library is free software; you can redistribute it and/or modify it *
14 * under the terms of the GNU Library General Public License as published *
15 * by the Free Software Foundation, version 2. *
17 * This library is distributed in the hope that it will be useful, but *
18 * WITHOUT ANY WARRANTY; without even the implied warranty of *
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
20 * Library General Public License for more details. *
22 * You should have received a copy of the GNU Library General Public *
23 * License along with this library; if not, write to the Free Software *
24 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
26 \*---------------------------------------------------------------------------*/
27 /*---------------------------------------------------------------------------*\
35 \*---------------------------------------------------------------------------*/
38 #ifndef _OSGSIMPLEGEOMETRYEXT_H_
39 #define _OSGSIMPLEGEOMETRYEXT_H_
44 #include "OSGConfig.h"
45 #include "OSGBaseTypes.h"
47 #include "OSGContribGUIDef.h"
48 #include "OSGGeometry.h"
49 #include "OSGMaterial.h"
53 #include "OSGPolygonChunk.h"
54 #include "OSGMaterialChunk.h"
55 #include "OSGChunkMaterial.h"
56 #include "OSGMatrixUtility.h"
61 /*---------------------------------------------------------------------*/
62 /*! \name Construction functions */
65 /*! \brief create a grid geometry
66 * \ingroup SimpleGeometry
68 OSG_CONTRIBGUI_DLLMAPPING
69 GeometryTransitPtr
makeGridGeo(const Real32 width
,
71 const Real32 horCellWidth
,
72 const Color3f
&color
);
75 /*! \brief create a grid
76 * \ingroup SimpleGeometry
78 OSG_CONTRIBGUI_DLLMAPPING
79 NodeTransitPtr
makeGrid(const Real32 width
,
81 const Real32 horCellWidth
,
82 const Color3f
&color
);
84 OSG_CONTRIBGUI_DLLMAPPING
85 NodeTransitPtr
makeSelection(Node
*);
87 OSG_CONTRIBGUI_DLLMAPPING
88 GeometryTransitPtr
makeSelectionGeo(Node
*);
91 /*! \brief create a coord-axis
92 * \ingroup SimpleGeometry
95 PolygonChunk
*getPolygonChunk(const UInt16 faces
= GL_FRONT_AND_BACK
,
96 const UInt16 mode
= GL_LINE
);
98 MaterialChunk
*getMaterialChunk(const Color4f
&ambientColor
,
99 const Color4f
&diffuseColor
,
100 const Color4f
&specularColor
= Color4f(1, 1, 1, 1),
101 const bool lit
= false );
103 ChunkMaterial
*getSelectionMaterial();
111 #endif /* _OSGSIMPLEGEOMETRYEXT_H_ */