Open3D (C++ API)
0.17.0
|
Namespaces | |
Data Structures | |
class | BufferConnection |
Implements a connection writing to a buffer. More... | |
class | Connection |
class | ConnectionBase |
Base class for all connections. More... | |
class | DummyMessageProcessor |
class | DummyReceiver |
class | MessageProcessorBase |
class | ZMQReceiver |
Class for the server side receiving requests from a client. More... | |
Functions | |
std::shared_ptr< messages::Status > | UnpackStatusFromReply (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) |
std::shared_ptr< zmq::message_t > | CreateStatusOKMsg () |
std::shared_ptr< t::geometry::Geometry > | MeshDataToGeometry (const messages::MeshData &mesh_data) |
messages::MeshData | GeometryToMeshData (const t::geometry::TriangleMesh &trimesh) |
messages::MeshData | GeometryToMeshData (const t::geometry::PointCloud &pcd) |
messages::MeshData | GeometryToMeshData (const t::geometry::LineSet &ls) |
std::tuple< std::string, double, std::shared_ptr< t::geometry::Geometry > > | DataBufferToMetaGeometry (std::string &data) |
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 | SetTriangleMesh (const t::geometry::TriangleMesh &mesh, const std::string &path, int time, const std::string &layer, std::shared_ptr< ConnectionBase > connection) |
bool | SetMeshData (const std::string &path, int time, const std::string &layer, const core::Tensor &vertices, 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::string &material, const std::map< std::string, float > &material_scalar_attributes, const std::map< std::string, std::array< float, 4 >> &material_vector_attributes, const std::map< std::string, t::geometry::Image > &texture_maps, const std::string &o3d_type, 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) |
std::shared_ptr< zmq::context_t > | GetZMQContext () |
Returns the zeromq context for this process. More... | |
void | DestroyZMQContext () |
std::string open3d::io::rpc::CreateSerializedRequestMessage | ( | const std::string & | msg_id | ) |
Creates a serialized Request message for testing purposes.
std::shared_ptr< zmq::message_t > open3d::io::rpc::CreateStatusOKMsg | ( | ) |
std::tuple< std::string, double, std::shared_ptr< t::geometry::Geometry > > open3d::io::rpc::DataBufferToMetaGeometry | ( | std::string & | data | ) |
This function returns the geometry, the path and the time stored in a SetMeshData message. data
must contain the Request header message followed by the SetMeshData message. The function returns a null pointer for the geometry if not successful.
void open3d::io::rpc::DestroyZMQContext | ( | ) |
Destroys the zeromq context for this process. On windows this needs to be called manually for a clean shutdown of the process.
messages::MeshData open3d::io::rpc::GeometryToMeshData | ( | const t::geometry::LineSet & | ls | ) |
Creates MeshData from a LineSet. This function returns the MeshData object for serialization.
messages::MeshData open3d::io::rpc::GeometryToMeshData | ( | const t::geometry::PointCloud & | pcd | ) |
Creates MeshData from a TriangleMesh. This function returns the MeshData object for serialization.
messages::MeshData open3d::io::rpc::GeometryToMeshData | ( | const t::geometry::TriangleMesh & | trimesh | ) |
Creates MeshData from a TriangleMesh. This function returns the MeshData object for serialization.
std::tuple< int32_t, std::string > open3d::io::rpc::GetStatusCodeAndStr | ( | const messages::Status & | status | ) |
std::shared_ptr< zmq::context_t > open3d::io::rpc::GetZMQContext | ( | ) |
Returns the zeromq context for this process.
std::tuple< const void *, size_t > open3d::io::rpc::GetZMQMessageDataAndSize | ( | const zmq::message_t & | msg | ) |
std::shared_ptr< t::geometry::Geometry > open3d::io::rpc::MeshDataToGeometry | ( | const messages::MeshData & | mesh_data | ) |
Converts MeshData to a geometry type. MeshData can store TriangleMesh, PointCloud, and LineSet. The function returns a pointer to the base class Geometry. The pointer is null if the conversion is not successful. Note that the msgpack object backing the memory for mesh_data
must be alive for calling this function.
bool open3d::io::rpc::ReplyIsOKStatus | ( | const zmq::message_t & | msg | ) |
Convenience function for checking if the message is an OK.
bool open3d::io::rpc::ReplyIsOKStatus | ( | const zmq::message_t & | msg, |
size_t & | offset | ||
) |
Convenience function for checking if the message is an OK.
offset |
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.
path | Path descriptor defining a location in the scene tree. E.g., 'mygroup/mycam'. |
connection | The connection object used for sending the data. If nullptr a default connection object will be used. |
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.
camera | The PinholeCameraParameters object. |
path | Path descriptor defining a location in the scene tree. E.g., 'mygroup/mycam'. |
time | The time point associated with the object. |
layer | The layer for this object. |
connection | The connection object used for sending the data. If nullptr a default connection object will be used. |
bool open3d::io::rpc::SetMeshData | ( | const std::string & | path = "" , |
int | time = 0 , |
||
const std::string & | layer = "" , |
||
const core::Tensor & | vertices = core::Tensor({0}, core::Float32) , |
||
const std::map< std::string, core::Tensor > & | vertex_attributes = std::map< std::string, core::Tensor >() , |
||
const core::Tensor & | faces = core::Tensor({0}, core::Int32) , |
||
const std::map< std::string, core::Tensor > & | face_attributes = std::map< std::string, core::Tensor >() , |
||
const core::Tensor & | lines = core::Tensor({0}, core::Int32) , |
||
const std::map< std::string, core::Tensor > & | line_attributes = std::map< std::string, core::Tensor >() , |
||
const std::string & | material = "" , |
||
const std::map< std::string, float > & | material_scalar_attributes = std::map< std::string, float >() , |
||
const std::map< std::string, std::array< float, 4 >> & | material_vector_attributes = std::map< std::string, std::array< float, 4 >>() , |
||
const std::map< std::string, t::geometry::Image > & | texture_maps = std::map< std::string, t::geometry::Image >() , |
||
const std::string & | o3d_type = "" , |
||
std::shared_ptr< ConnectionBase > | connection = std::shared_ptr< ConnectionBase >() |
||
) |
Function for sending general mesh data.
path | Path descriptor defining a location in the scene tree. E.g., 'mygroup/mypoints'. |
time | The time point associated with the object. |
layer | The layer for this object. |
vertices | Tensor with vertices of shape [N,3] |
vertex_attributes | Map with Tensors storing vertex attributes. The first dim of each attribute must match the number of vertices. |
faces | Tensor 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_attributes | Map with Tensors storing face attributes. The first dim of each attribute must match the number of faces. |
lines | Tensor 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_attributes | Map with Tensors storing line attributes. The first dim of each attribute must match the number of lines. |
material | Basic material model for rendering a DrawableGeometry (e.g. defaultLit or defaultUnlit). Must be non-empty if any material attributes or texture maps are provided. |
material_scalar_attributes | Map of material scalar attributes for a DrawableGeometry Material (e.g. "point_size", "line_width" or "base_reflectance") |
material_vector_attributes | Map of material 4-vector attributes for a DrawableGeometry Material (e.g. "base_color" or "absorption_color") |
texture_maps | Map of t::geometry::Image for storing textures. |
o3d_type | The type of the geometry. This is one of "PointCloud", "LineSet", "TriangleMesh". This argument should be specified for partial data that has no primary key data, e.g., a triangle mesh without vertices but with other attribute tensors. |
connection | The connection object used for sending the data. If nullptr a default connection object will be used. |
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.
pcd | The PointCloud object. |
path | Path descriptor defining a location in the scene tree. E.g., 'mygroup/mypoints'. |
time | The time point associated with the object. |
layer | The layer for this object. |
connection | The connection object used for sending the data. If nullptr a default connection object will be used. |
bool open3d::io::rpc::SetTime | ( | int | time, |
std::shared_ptr< ConnectionBase > | connection = std::shared_ptr< ConnectionBase >() |
||
) |
Sets the time in the external visualizer.
time | The time value |
connection | The connection object used for sending the data. If nullptr a default connection object will be used. |
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.
mesh | The TriangleMesh object. |
path | Path descriptor defining a location in the scene tree. E.g., 'mygroup/mypoints'. |
time | The time point associated with the object. |
layer | The layer for this object. |
connection | The connection object used for sending the data. If nullptr a default connection object will be used. |
bool open3d::io::rpc::SetTriangleMesh | ( | const t::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.
mesh | The TriangleMesh object. |
path | Path descriptor defining a location in the scene tree. E.g., 'mygroup/mypoints'. |
time | The time point associated with the object. |
layer | The layer for this object. |
connection | The connection object used for sending the data. If nullptr a default connection object will be used. |
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.
msg | The message that contains the Reply and the Status messages. |
offset | Byte 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. |
ok | Output variable which will be set to true if the unpacking was successful. |
ok
to see if the returned object is valid.