Struct realsense_rust::frame::PointsFrame[][src]

pub struct PointsFrame { /* fields omitted */ }
Expand description

Holds the raw data pointer and derived data for an RS2 Points frame.

All fields in this struct are initialized during struct creation (via try_from). Everything called from here during runtime should be valid as long as the Frame is in scope… like normal Rust.

Implementations

Gets vertices of the point cloud.

Retrieve the texture coordinates (uv map) for the point cloud.

Safety

The librealsense2 C++ API directly casts the rs2_pixel* returned from rs2_get_frame_texture_coordinates() into a texture_coordinate*, thereby re-interpreting [[c_int; 2]; N] as [[c_float; 2]; N] values. Note that C does not generally guarantee that sizeof(int) == sizeof(float).

Gets number of points in the point cloud.

Trait Implementations

Formats the value using the given formatter. Read more

Drop the raw pointer stored with this struct whenever it goes out of scope.

Identifies the corresponding Rs2Extension for the type implementing this trait.

Identifies the stream kind corresponding to a given type implementing this trait.

Predicate for checking if the RS2 frame’s stream has the same kind as the frame category.

Get the stream profile associated with the frame.

Get the sensor associated with the frame.

Get the frame timestamp.

Get the RealSense timestamp domain for the current timestamp.

Get frame metadata. Read more

Test whether the metadata arguemnt is supported by the frame.

Get (and own) the underlying frame pointer for this frame. Read more

Attempt to construct a points frame from a raw pointer to rs2_frame

All members of the PointsFrame struct are validated and populated during this call.

Errors

There are a number of errors that may occur if the data in the rs2_frame is not valid, all of type FrameConstructionError.

See FrameConstructionError documentation for more details.

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.