Open3D (C++ API)  0.11.0
Namespaces | Data Structures | Functions
open3d::io::rpc Namespace Reference

Namespaces

 messages
 

Data Structures

class  BufferConnection
 Implements a connection writing to a buffer. More...
 
class  Connection
 
class  ConnectionBase
 Base class for all connections. More...
 
class  DummyReceiver
 
class  ReceiverBase
 

Functions

std::shared_ptr< messages::StatusUnpackStatusFromReply (const zmq::message_t &msg, size_t &offset, bool &ok)
 
bool ReplyIsOKStatus (const zmq::message_t &msg)
 Convenience function for checking if the message is an OK. More...
 
bool ReplyIsOKStatus (const zmq::message_t &msg, size_t &offset)
 
std::string CreateSerializedRequestMessage (const std::string &msg_id)
 Creates a serialized Request message for testing purposes. More...
 
std::tuple< const void *, size_t > GetZMQMessageDataAndSize (const zmq::message_t &msg)
 
std::tuple< int32_t, std::string > GetStatusCodeAndStr (const messages::Status &status)
 
bool SetPointCloud (const geometry::PointCloud &pcd, const std::string &path, int time, const std::string &layer, std::shared_ptr< ConnectionBase > connection)
 
bool SetTriangleMesh (const geometry::TriangleMesh &mesh, const std::string &path, int time, const std::string &layer, std::shared_ptr< ConnectionBase > connection)
 
bool SetMeshData (const core::Tensor &vertices, const std::string &path, int time, const std::string &layer, const std::map< std::string, core::Tensor > &vertex_attributes, const core::Tensor &faces, const std::map< std::string, core::Tensor > &face_attributes, const core::Tensor &lines, const std::map< std::string, core::Tensor > &line_attributes, const std::map< std::string, core::Tensor > &textures, std::shared_ptr< ConnectionBase > connection)
 
bool SetLegacyCamera (const camera::PinholeCameraParameters &camera, const std::string &path, int time, const std::string &layer, std::shared_ptr< ConnectionBase > connection)
 
bool SetTime (int time, std::shared_ptr< ConnectionBase > connection)
 
bool SetActiveCamera (const std::string &path, std::shared_ptr< ConnectionBase > connection)
 
zmq::context_t & GetZMQContext ()
 Returns the zeromq context for this process. More...
 

Function Documentation

◆ CreateSerializedRequestMessage()

std::string open3d::io::rpc::CreateSerializedRequestMessage ( const std::string &  msg_id)

Creates a serialized Request message for testing purposes.

◆ GetStatusCodeAndStr()

std::tuple< int32_t, std::string > open3d::io::rpc::GetStatusCodeAndStr ( const messages::Status status)

◆ GetZMQContext()

zmq::context_t & open3d::io::rpc::GetZMQContext ( )

Returns the zeromq context for this process.

◆ GetZMQMessageDataAndSize()

std::tuple< const void *, size_t > open3d::io::rpc::GetZMQMessageDataAndSize ( const zmq::message_t &  msg)

◆ ReplyIsOKStatus() [1/2]

bool open3d::io::rpc::ReplyIsOKStatus ( const zmq::message_t &  msg)

Convenience function for checking if the message is an OK.

◆ ReplyIsOKStatus() [2/2]

bool open3d::io::rpc::ReplyIsOKStatus ( const zmq::message_t &  msg,
size_t &  offset 
)

Convenience function for checking if the message is an OK.

Parameters
offset
See also
UnpackStatusFromReply

◆ SetActiveCamera()

bool open3d::io::rpc::SetActiveCamera ( const std::string &  path,
std::shared_ptr< ConnectionBase connection = std::shared_ptr< ConnectionBase >() 
)

Sets the object with the specified path as the active camera.

Parameters
pathPath descriptor defining a location in the scene tree. E.g., 'mygroup/mycam'.
connectionThe connection object used for sending the data. If nullptr a default connection object will be used.

◆ SetLegacyCamera()

bool open3d::io::rpc::SetLegacyCamera ( const camera::PinholeCameraParameters camera,
const std::string &  path = "",
int  time = 0,
const std::string &  layer = "",
std::shared_ptr< ConnectionBase connection = std::shared_ptr< ConnectionBase >() 
)

Function for sending Camera data.

Parameters
cameraThe PinholeCameraParameters object.
pathPath descriptor defining a location in the scene tree. E.g., 'mygroup/mycam'.
timeThe time point associated with the object.
layerThe layer for this object.
connectionThe connection object used for sending the data. If nullptr a default connection object will be used.

◆ SetMeshData()

bool open3d::io::rpc::SetMeshData ( const core::Tensor vertices,
const std::string &  path = "",
int  time = 0,
const std::string &  layer = "",
const std::map< std::string, core::Tensor > &  vertex_attributes = std::map< std::string, core::Tensor >(),
const core::Tensor faces = core::Tensor({0}, core::Dtype::Int32),
const std::map< std::string, core::Tensor > &  face_attributes = std::map< std::string, core::Tensor >(),
const core::Tensor lines = core::Tensor({0}, core::Dtype::Int32),
const std::map< std::string, core::Tensor > &  line_attributes = std::map< std::string, core::Tensor >(),
const std::map< std::string, core::Tensor > &  textures = std::map< std::string, core::Tensor >(),
std::shared_ptr< ConnectionBase connection = std::shared_ptr< ConnectionBase >() 
)

Function for sending general mesh data.

Parameters
verticesTensor with vertices of shape [N,3]
pathPath descriptor defining a location in the scene tree. E.g., 'mygroup/mypoints'.
timeThe time point associated with the object.
layerThe layer for this object.
vertex_attributesMap with Tensors storing vertex attributes. The first dim of each attribute must match the number of vertices.
facesTensor with vertex indices defining the faces. The Tensor is of rank 1 or 2. A rank 2 Tensor with shape [num_faces,n] defines num_faces n-gons. If the rank is 1 then polys of different lengths are stored sequentially. Each polygon is stored as a sequence 'n i1 i2 ... in' with n>=3. The type of the array must be int32_t or int64_t
face_attributesMap with Tensors storing face attributes. The first dim of each attribute must match the number of faces.
linesTensor with vertex indices defining the lines. The Tensor is of rank 1 or 2. A rank 2 Tensor with shape [num_lines,n] defines num_lines linestrips. If the rank is 1 then linestrips of different lengths are stored sequentially. Each linestrips is stored as a sequence 'n i1 i2 ... in' with n>=2. The type of the array must be int32_t or int64_t
line_attributesMap with Tensors storing line attributes. The first dim of each attribute must match the number of lines.
texturesMap of Tensors for storing textures.
connectionThe connection object used for sending the data. If nullptr a default connection object will be used.

◆ SetPointCloud()

bool open3d::io::rpc::SetPointCloud ( const geometry::PointCloud pcd,
const std::string &  path = "",
int  time = 0,
const std::string &  layer = "",
std::shared_ptr< ConnectionBase connection = std::shared_ptr< ConnectionBase >() 
)

Function for sending a PointCloud.

Parameters
pcdThe PointCloud object.
pathPath descriptor defining a location in the scene tree. E.g., 'mygroup/mypoints'.
timeThe time point associated with the object.
layerThe layer for this object.
connectionThe connection object used for sending the data. If nullptr a default connection object will be used.

◆ SetTime()

bool open3d::io::rpc::SetTime ( int  time,
std::shared_ptr< ConnectionBase connection = std::shared_ptr< ConnectionBase >() 
)

Sets the time in the external visualizer.

Parameters
timeThe time value
connectionThe connection object used for sending the data. If nullptr a default connection object will be used.

◆ SetTriangleMesh()

bool open3d::io::rpc::SetTriangleMesh ( const geometry::TriangleMesh mesh,
const std::string &  path = "",
int  time = 0,
const std::string &  layer = "",
std::shared_ptr< ConnectionBase connection = std::shared_ptr< ConnectionBase >() 
)

Function for sending a TriangleMesh.

Parameters
pcdThe TriangleMesh object.
pathPath descriptor defining a location in the scene tree. E.g., 'mygroup/mypoints'.
timeThe time point associated with the object.
layerThe layer for this object.
connectionThe connection object used for sending the data. If nullptr a default connection object will be used.

◆ UnpackStatusFromReply()

std::shared_ptr< messages::Status > open3d::io::rpc::UnpackStatusFromReply ( const zmq::message_t &  msg,
size_t &  offset,
bool &  ok 
)

Helper function for unpacking the Status message from a reply.

Parameters
msgThe message that contains the Reply and the Status messages.
offsetByte offset into the message. Defines where to start parsing the message. The offset will be updated and will point to the first byte after the parse messages. If unpacking fails offset will be set to the end of the message.
okOutput variable which will be set to true if the unpacking was successful.
Returns
The extracted Status message object. Check
Parameters
okto see if the returned object is valid.