H3D API  2.4.1
VrmlParser.h
Go to the documentation of this file.
1 // Copyright 2004-2019, SenseGraphics AB
3 //
4 // This file is part of H3D API.
5 //
6 // H3D API is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
10 //
11 // H3D API is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with H3D API; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 //
20 // A commercial license is also available. Please contact us at
21 // www.sensegraphics.com for more information.
22 //
23 //
27 //
29 
30 #ifndef __VRMLPARSER_H__
31 #define __VRMLPARSER_H__
32 
33 #include <iostream>
34 #include <H3D/H3DApi.h>
35 #include <H3D/Group.h>
36 #include <H3D/DEFNodes.h>
37 #include <H3DUtil/AutoRef.h>
38 #include <H3D/ProtoDeclaration.h>
39 #include <H3D/X3D.h>
40 
41 namespace H3D {
42  namespace X3D {
43 
44  // A simple attempt to automatically determine VRMLedness of a
45  // file/string/url.
46  bool isVRML( const string &str );
47  bool isVRML( istream &is );
48 
58  H3DAPI_API Group*createVRMLFromStream(
59  istream &in,
60  DEFNodes *dn = NULL,
61  DEFNodes *exported_nodes = NULL,
62  PrototypeVector *prototypes = NULL
63  );
64 
74  H3DAPI_API Group* createVRMLFromString(
75  const string &str,
76  DEFNodes *dn = NULL,
77  DEFNodes *exported_nodes = NULL,
78  PrototypeVector *prototypes = NULL );
79 
80 
95  H3DAPI_API Group* createVRMLFromURL( const string &urn,
96  DEFNodes *dn = NULL,
97  DEFNodes *exported_nodes = NULL,
98  PrototypeVector *prototypes = NULL,
99  bool change_base_path_during_parsing = true );
100 
101 
111  H3DAPI_API AutoRef<Node> createVRMLNodeFromStream(
112  istream &in,
113  DEFNodes *dn = NULL,
114  DEFNodes *exported_nodes = NULL,
115  PrototypeVector *prototypes = NULL
116  );
117 
127  H3DAPI_API AutoRef<Node> createVRMLNodeFromString(
128  const string &str,
129  DEFNodes *dn = NULL,
130  DEFNodes *exported_nodes = NULL,
131  PrototypeVector *prototypes = NULL
132  );
133 
134 
149  H3DAPI_API AutoRef<Node> createVRMLNodeFromURL(
150  const string &urn,
151  DEFNodes *dn = NULL,
152  DEFNodes *exported_nodes = NULL,
153  PrototypeVector *prototypes = NULL,
154  bool change_base_path_during_parsing = true
155  );
156 
157 
158  }
159 }
160 
161 #endif
Contains the DEFNodes class.
Header file for Group, X3D scene-graph node.
Base header file that handles all configuration related settings.
Header file for ProtoDeclaration.
This file contains functions for creating H3D nodes from X3D input.
H3DAPI_API AutoRef< Node > createVRMLNodeFromStream(istream &in, DEFNodes *dn=NULL, DEFNodes *exported_nodes=NULL, PrototypeVector *prototypes=NULL)
Create a H3D Node given VRML data as a istream.
Definition: VrmlParser.cpp:253
H3DAPI_API Group * createVRMLFromStream(istream &in, DEFNodes *dn=NULL, DEFNodes *exported_nodes=NULL, PrototypeVector *prototypes=NULL)
Create H3D nodes given VRML data as an istream.
Definition: VrmlParser.cpp:161
H3DAPI_API Group * createVRMLFromURL(const string &urn, DEFNodes *dn=NULL, DEFNodes *exported_nodes=NULL, PrototypeVector *prototypes=NULL, bool change_base_path_during_parsing=true)
Create H3D nodes given VRML data as a URL.
Definition: VrmlParser.cpp:108
H3DAPI_API AutoRef< Node > createVRMLNodeFromURL(const string &urn, DEFNodes *dn=NULL, DEFNodes *exported_nodes=NULL, PrototypeVector *prototypes=NULL, bool change_base_path_during_parsing=true)
Create a H3D Node given VRML data as a URL.
Definition: VrmlParser.cpp:205
H3DAPI_API Group * createVRMLFromString(const string &str, DEFNodes *dn=NULL, DEFNodes *exported_nodes=NULL, PrototypeVector *prototypes=NULL)
Create H3D nodes given VRML data as a string.
Definition: VrmlParser.cpp:82
H3DAPI_API AutoRef< Node > createVRMLNodeFromString(const string &str, DEFNodes *dn=NULL, DEFNodes *exported_nodes=NULL, PrototypeVector *prototypes=NULL)
Create a H3D Node given VRML data as a string.
Definition: VrmlParser.cpp:186
H3D API namespace.
Definition: Anchor.h:38