sceneGraphExportOptions
Description
The sceneGraphExportOptions
object enables you to specify options
for customizing exported scene graph files.
Creation
Description
options = sceneGraphExportOptions
creates a default export
options configuration object.
options = sceneGraphExportOptions(
specifies properties using one or more name-value arguments. For example,
Name=Value
)ExportSceneGraph=false
specifies not to export a scene graph file
when exporting to the ASAM OpenSCENARIO® format.
Properties
FormatName
— Format of scene graph file to export
"auto"
(default) |
"OpenSceneGraph"
Format of the scene graph file to export, specified as
"OpenSceneGraph"
. Specify this option to export a new scene graph
file for the scenario. To reuse an existing scene graph file, specify the
ExistingFileName
property instead.
Example: options =
sceneGraphExportOptions(FormatName="OpenSceneGraph");
exports a scene graph
file to the OpenSceneGraph format.
NewFileName
— Name of new scene graph file to be generated
"auto"
(default) | string scalar | character vector
Name of the new scene graph file to be generated, specified as a string scalar or character vector. By default, RoadRunner generates a new OpenSceneGraph file with the same name as the exported ASAM OpenSCENARIO file.
ExistingFileName
— Name of previously exported scene graph file
"auto"
(default) | string scalar | character vector
Name of a previously exported scene graph file, specified as a string scalar or
character vector. Specify this property to reuse an existing scene, which can reduce
export time. If you specify FormatName
, then RoadRunner ignores this property and generates a new scene graph file.
ExportSceneGraph
— Option to export scene graph file
"auto"
(default) | true
or 1
| false
or 0
Option to export a scene graph file, specified as a logical 1
(true
) or 0
(false
).
By default, RoadRunner exports a scene graph file. To skip the scene graph file when exporting to
an ASAM OpenSCENARIO format, set this property to false
.
Example: options =
sceneGraphExportOptions(ExportSceneGraph=false);
specifies for RoadRunner not to export a scene graph file when exporting to an ASAM OpenSCENARIO format.
OpenSceneGraphOptions
— Export options for OpenSceneGraph file
"auto"
(default) |
openSceneGraphExportOptions
object
Export options for the OpenSceneGraph file, specified as an openSceneGraphExportOptions
object. Do not specify this property if you specify ExistingFileName
,
or if ExportSceneGraph
is false
.
Example: options =
sceneGraphExportOptions(OpenSceneGraphOptions=osgOps);
specifies the
OpenSceneGraph export options object osgOps
for the exported open
scene graph file.
Examples
Specify OpenSceneGraph File Options During Scenario Export
When you export your RoadRunner scenario, you can simultaneously specify options for exporting an
OpenSceneGraph file by using the openSceneGraphExportOptions
object
and the sceneGraphExportOptions
object.
Create a roadrunner
object, specifying the path to an existing
project. For example, this code shows the path to a project, on a Windows® machine, located at "C:\RR\MyProject"
. This code
assumes that RoadRunner is installed in the default location, and returns an object,
rrApp
, that provides functions for performing basic tasks such as
opening, closing, and saving scenes and
projects.
rrApp = roadrunner(ProjectFolder="C:\RR\MyProject");
Open an existing scenario in RoadRunner Scenario by using the openScenario
function with the
roadrunner
object rrApp
and the filename of the
specific scenario that you want to open.
filename = "TrajectoryCutIn.rrscenario";
openScenario(rrApp,filename)
Create an openSceneGraphExportOptions
object to specify options
for the OpenSceneGraph file to be created on export.
osgOps = openSceneGraphExportOptions(SplitMeshes=true);
Set export options for the scene graph file by creating a
sceneGraphExportOptions
object, specifying the
OpenSceneGraphOptions
property as the
openSceneGraphExportOptions
object created in the previous step.
Optionally, specify the FormatName
and NewFileName
properties.
sgeOps = sceneGraphExportOptions(FormatName="OpenSceneGraph",NewFileName="MySceneGraph.osgb",ExportSceneGraph=true,OpenSceneGraphOptions=osgOps);
Specify your scene graph export options object to the
SceneGraphOptions
property of an
openScenarioExportOptions
object. Then, export your scenario using
the exportScenario
function, specifying the
openScenarioExportOptions
object as input. For more information on
exporting your scenario with MATLAB®, see exportScenario
(RoadRunner Scenario).
filename = "TrajectoryCutIn.rrscenario.xosc"; formatname = "OpenSCENARIO"; options = openScenarioExportOptions(SceneGraphOptions=sgeOps); exportScenario(rrApp,filename,formatname,options)
Version History
Introduced in R2024a
See Also
roadrunner
| openScenarioExportOptions
| openScenario2ExportOptions
| exportScenario
Topics
- Simulate a RoadRunner Scenario Using MATLAB Functions (RoadRunner Scenario)
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 (한국어)