Main Content

addView

Add views to view set

Since R2020a

Description

vSet = addView(vSet,viewId) adds the view specified by viewId to the view set, vSet.

example

vSet = addView(vSet,viewId,absPose) specifies the absolute pose of the view.

vSet = addView(___,"PointCloud",ptCloud) specifies the point cloud associated with the view in addition to any of the input argument combinations in previous syntaxes.

vSet = addView(vSet,viewTable) adds one or more views in the table specified by viewTable.

Examples

collapse all

Create an empty point cloud view set.

vSet = pcviewset;

Add a view to the point cloud view set.

viewId  = 1;
ptCloud = pcread("teapot.ply");

vSet = addView(vSet,viewId,"PointCloud",ptCloud);

Update the absolute pose of the view.

rotationAngles = [0 0 0];
translation = [2 0 0];
absPose = rigidtform3d(rotationAngles,translation);
vSet = updateView(vSet,viewId,absPose);

Input Arguments

collapse all

Point cloud view set, specified as a pcviewset object.

View identifier, specified as a positive integer. View identifiers are unique to a specific view.

Absolute pose of the view, specified as a rigidtform3d object.

Point cloud, specified as a pointCloud object.

One or more views, specified as a two-column or three-column table. The table must contain the columns ViewId and AbsolutePose. The Points column is optional.

ColumnDescription
ViewID

View identifier, specified as an integer. View identifiers are unique to a specific view.

AbsolutePoseAbsolute pose of the view, specified as a rigidtform3d object.
PointsPoint cloud for the view, specified as a pointCloud object.

Output Arguments

collapse all

View set with added views, returned as a pcviewset object.

Extended Capabilities

Version History

Introduced in R2020a

expand all

See Also

Objects