Geoscience Reference
In-Depth Information
explains the following steps in greater detail than provided here. We i rst
need to make sure that all virtual reality worlds are closed and deleted.
out = vrwho;
for i=1:length(out)
while (get(out(i),'opencount')~=0)
close(out(i));
end
delete(out(i));
end
We then create a new virtual reality world myworld using vrworld .
myworld = vrworld('');
open(myworld)
Our world then needs a shape and a grid. We create the shape newShape with
the name Landscape and the grid newGrid using vrnode . h e function vrnode
creates a handle to either an existing or a new node.
shapeName = ['Landscape'];
newShape = vrnode(myworld,shapeName,'Shape');
newGrid = vrnode(newShape,'geometry','DEM','ElevationGrid');
We can access the contents of the variable newShape from the vrworld class in
a similar manner to structure arrays, e.g., by typing
getfield(newShape.geometry)
which lists a number of the dei ning parameters of newShape such as, for
example, the color. h e nodes of the world can be accessed using one of the
two commands
nodes(myworld)
mynodes = get(myworld,'Nodes')
We can access the i elds of the node Landscape using one of the two commands
fields(myworld.Landscape)
fields(mynodes.DEM)
and the DEM using
fields(myworld(1))
fields(mynodes(2))
both with a detailed output of all the parameter settings of the nodes. We can
also list the i elds in newShape and newGrid using
fields(newShape)
Search WWH ::




Custom Search