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
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.
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
.
CouldNotGetTimestamp
CouldNotGetTimestampDomain
CouldNotGetFrameStreamProfile
CouldNotGetPointCount
CouldNotGetData
See FrameConstructionError
documentation for more details.
Auto Trait Implementations
impl RefUnwindSafe for PointsFrame
impl !Sync for PointsFrame
impl Unpin for PointsFrame
impl UnwindSafe for PointsFrame