changeWorldSettings
Description
changeWorldSettings(
modifies the world settings of the active scene, including the world origin and scene
extents. rrApp
,Name=Value
)
Examples
Change World Settings of RoadRunner Scene
Modify world settings of active scene in RoadRunner using the changeWorldSettings
function. This example assumes that RoadRunner is installed in its default location in Windows.
Specify the path to an existing project. For example, this code shows the path to a project located on C:\RR\MyProject
. The function returns a roadrunner
object, rrApp
, that provides functions for performing basic workflow tasks such as opening, closing, and saving scenes and projects.
projectFolder = "C:\RR\MyProject"; rrApp = roadrunner(projectFolder, InstallationFolder='C:\Program Files\RoadRunner R2023b\bin\win64');
Open an existing scene in the current RoadRunner project.
filename = "FourWayStop.rrscene";
openScene(rrApp,filename);
Change the world origin of the scene. Specify the world origin as a 1-by-2 matrix which contains the latitude and longitude.
changeWorldSettings(rrApp, WorldOrigin=[42.3021 -71.3747]);
Input Arguments
rrApp
— RoadRunner application
roadrunner
object
RoadRunner application associated with a project, specified as a
roadrunner
object. This object provides functions
for performing common workflow tasks such as opening, closing, and saving scenes and
projects. rrApp
provides functions that support importing data from
files and exporting scenes to other formats from RoadRunner.
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Example: changeWorldSettings(rrApp, WorldOrigin=[42.3021
-71.3747])
ClearWorldProjection
— Clear current world projection
false or 0
(default) | true or 1
Clear the current world projection, specified as logical 0
(false)
or logical 1 (true)
. It clears the current
world projection if it is set to true. When set to true, it is an error to specify a
world origin.
WorldOrigin
— World origin of scene
matrix
World origin of the scene, specified as a 1-by-2 array [latitude
longitude]
. By default, the world origin is not changed.
TransformScene
— Flag to transform scene
false or 0
(default) | true or 1
Flag to transform scene, specified as logical 0 (false)
or
logical 1 (true)
. It transforms the scene after changing the
world origin if it is set to logical 1 (true)
. Transforming the
scene can be a costly operation, but it attempts to maintain the correct world
location.
SceneCenter
— Center of scene
matrix
Center of the scene, specified as a 1-by-2 array [x y]
. By
default, the center of the scene is not changed.
SceneExtents
— Extent of scene
matrix
Extent of the scene, specified as a 1-by-2 array [x y]
. By
default, the center of the scene is not changed.
Version History
Introduced in R2023b
See Also
Topics
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)