@@ -82,6 +82,8 @@ namespace rl
82
82
83
83
for (int i = 0 ; i < ::std::min (1 , scenes.size ()); ++i)
84
84
{
85
+ ::rl::xml::Path path (document, scenes[i]);
86
+
85
87
::SoInput input;
86
88
87
89
if (!input.openFile (scenes[i].getLocalPath (scenes[i].getProperty (" href" )).c_str () ,true ))
@@ -102,7 +104,7 @@ namespace rl
102
104
103
105
// model
104
106
105
- ::rl::xml::NodeSet models = :: rl::xml::Path (document, scenes[i]) .eval (" model" ).getValue <::rl::xml::NodeSet>();
107
+ ::rl::xml::NodeSet models = path .eval (" model" ).getValue <::rl::xml::NodeSet>();
106
108
107
109
for (int j = 0 ; j < models.size (); ++j)
108
110
{
@@ -127,6 +129,8 @@ namespace rl
127
129
128
130
for (int k = 0 ; k < bodies.size (); ++k)
129
131
{
132
+ ::rl::xml::Path path (document, bodies[k]);
133
+
130
134
::SoSearchAction bodySearchAction;
131
135
bodySearchAction.setName (bodies[k].getProperty (" name" ).c_str ());
132
136
bodySearchAction.apply (static_cast <::SoFullPath*>(modelSearchAction.getPath ())->getTail ());
@@ -199,17 +203,17 @@ namespace rl
199
203
200
204
for (int l = 0 ; l < shapeSearchAction.getPaths ().getLength (); ++l)
201
205
{
202
- ::SoFullPath* path = static_cast <::SoFullPath*>(shapeSearchAction.getPaths ()[l]);
206
+ ::SoFullPath* fullPath = static_cast <::SoFullPath*>(shapeSearchAction.getPaths ()[l]);
203
207
204
- if (path ->getLength () > 1 )
208
+ if (fullPath ->getLength () > 1 )
205
209
{
206
- path = static_cast <::SoFullPath*>(shapeSearchAction.getPaths ()[l]->copy (1 , static_cast <::SoFullPath*>(shapeSearchAction.getPaths ()[l])->getLength () - 1 ));
210
+ fullPath = static_cast <::SoFullPath*>(shapeSearchAction.getPaths ()[l]->copy (1 , static_cast <::SoFullPath*>(shapeSearchAction.getPaths ()[l])->getLength () - 1 ));
207
211
}
208
212
209
- pathList.append (path );
213
+ pathList.append (fullPath );
210
214
211
215
::SoGetMatrixAction shapeGetMatrixAction (viewportRegion);
212
- shapeGetMatrixAction.apply (path );
216
+ shapeGetMatrixAction.apply (fullPath );
213
217
::SbMatrix shapeMatrix = shapeGetMatrixAction.getMatrix ();
214
218
215
219
if (!scene->isScalingSupported ())
0 commit comments