extendedObjectMesh
Description
The extendedObjectMesh
represents the 3-D
geometry of an object. The 3-D geometry is represented by faces and vertices. Use these object
meshes to specify the geometry of an actor
for simulating lidar sensor data using lidarPointCloudGenerator
.
Creation
Syntax
Description
returns an mesh
= extendedObjectMesh('cuboid'
)extendedObjectMesh
object, that defines a cuboid with unit
dimensions. The origin of the cuboid is located at its geometric center.
returns a hollow cylinder mesh with unit dimensions. The cylinder mesh has 20 equally
spaced vertices around its circumference. The origin of the cylinder is located at its
geometric center. The height is aligned with the z-axis.mesh
= extendedObjectMesh('cylinder'
)
returns a cylinder mesh with mesh
= extendedObjectMesh('cylinder'
,n
)n
equally spaced vertices around its
circumference.
returns a sphere mesh with unit dimensions. The sphere mesh has 119 vertices and 180
faces. The origin of the sphere is located at its center.mesh
= extendedObjectMesh('sphere'
)
additionally allows you to specify the resolution, mesh
= extendedObjectMesh('sphere'
,n
)n
, of the
spherical mesh. The sphere mesh has (n
+
1)2 - 2 vertices and
2n
(n
- 1) faces.
returns a mesh from faces and vertices. mesh
= extendedObjectMesh(vertices
,faces
)vertices
and
faces
set the Vertices
and
Faces
properties respectively.
Properties
Object Functions
Use the object functions to develop new meshes.
translate | Translate mesh along coordinate axes |
rotate | Rotate mesh about coordinate axes |
scale | Scale mesh in each dimension |
applyTransform | Apply forward transformation to mesh vertices |
join | Join two object meshes |
scaleToFit | Auto-scale object mesh to match specified cuboid dimensions |
show | Display the mesh as a patch on the current axes |
Examples
Tips
You can use the prebuilt meshes as a starting point to develop your own meshes. The table lists the details of the meshes.
driving.scenario.bicycleMesh | Mesh representation of bicycle in driving scenario |
driving.scenario.carMesh | Mesh representation of car in driving scenario. |
driving.scenario.pedestrianMesh | Mesh representation of pedestrian in driving scenario. |
driving.scenario.truckMesh | Mesh representation of truck in driving scenario. |
You can view the source files of the meshes to understand how to develop new meshes. At the MATLAB® command line, enter:
edit driving.scenario.XXXXMesh
XXXXMesh
with the name of the mesh.Version History
Introduced in R2020a