|
| LineSet (const core::Device &device=core::Device("CPU:0")) |
| Construct an empty LineSet on the provided device. More...
|
|
| LineSet (const core::Tensor &point_positions, const core::Tensor &line_indices) |
|
virtual | ~LineSet () override |
|
LineSet | To (const core::Device &device, bool copy=false) const |
|
LineSet | Clone () const |
| Returns copy of the line set on the same device. More...
|
|
std::string | ToString () const |
| Text description. More...
|
|
const TensorMap & | GetPointAttr () const |
| Getter for point_attr_ TensorMap. Used in Pybind. More...
|
|
TensorMap & | GetPointAttr () |
| Getter for point_attr_ TensorMap. More...
|
|
core::Tensor & | GetPointAttr (const std::string &key) |
|
core::Tensor & | GetPointPositions () |
|
const TensorMap & | GetLineAttr () const |
| Getter for line_attr_ TensorMap. Used in Pybind. More...
|
|
TensorMap & | GetLineAttr () |
| Getter for line_attr_ TensorMap. More...
|
|
core::Tensor & | GetLineAttr (const std::string &key) |
|
core::Tensor & | GetLineIndices () |
|
core::Tensor & | GetLineColors () |
|
const core::Tensor & | GetPointAttr (const std::string &key) const |
|
void | RemovePointAttr (const std::string &key) |
|
const core::Tensor & | GetPointPositions () const |
|
const core::Tensor & | GetLineAttr (const std::string &key) const |
|
void | RemoveLineAttr (const std::string &key) |
|
const core::Tensor & | GetLineIndices () const |
|
const core::Tensor & | GetLineColors () const |
|
void | SetPointAttr (const std::string &key, const core::Tensor &value) |
|
void | SetPointPositions (const core::Tensor &value) |
|
void | SetLineAttr (const std::string &key, const core::Tensor &value) |
|
void | SetLineIndices (const core::Tensor &value) |
| Set the value of the "indices" attribute in line_attr_. More...
|
|
void | SetLineColors (const core::Tensor &value) |
|
bool | HasPointAttr (const std::string &key) const |
|
bool | HasPointPositions () const |
|
bool | HasLineAttr (const std::string &key) const |
|
bool | HasLineIndices () const |
|
bool | HasLineColors () const |
|
LineSet & | Clear () override |
| Clear all data in the line set. More...
|
|
bool | IsEmpty () const override |
| Returns !HasPointPositions(), line indices are ignored. More...
|
|
core::Tensor | GetMinBound () const |
| Returns the max bound for point coordinates. More...
|
|
core::Tensor | GetMaxBound () const |
| Returns the max bound for point coordinates. More...
|
|
core::Tensor | GetCenter () const |
| Returns the center for point coordinates. More...
|
|
LineSet & | Transform (const core::Tensor &transformation) |
| Transforms the points and lines of the LineSet. More...
|
|
LineSet & | Translate (const core::Tensor &translation, bool relative=true) |
| Translates the points and lines of the LineSet. More...
|
|
LineSet & | Scale (double scale, const core::Tensor ¢er) |
| Scales the points and lines of the LineSet. More...
|
|
LineSet & | Rotate (const core::Tensor &R, const core::Tensor ¢er) |
| Rotates the points and lines of the line set. Custom attributes (e.g.: point or line normals) are not transformed. More...
|
|
core::Device | GetDevice () const override |
| Returns the device attribute of this LineSet. More...
|
|
open3d::geometry::LineSet | ToLegacy () const |
| Convert to a legacy Open3D LineSet. More...
|
|
AxisAlignedBoundingBox | GetAxisAlignedBoundingBox () const |
| Create an axis-aligned bounding box from point attribute "positions". More...
|
|
TriangleMesh | ExtrudeRotation (double angle, const core::Tensor &axis, int resolution=16, double translation=0.0, bool capping=true) const |
|
TriangleMesh | ExtrudeLinear (const core::Tensor &vector, double scale=1.0, bool capping=true) const |
|
virtual | ~Geometry () |
|
GeometryType | GetGeometryType () const |
| Returns one of registered geometry types. More...
|
|
int | Dimension () const |
| Returns whether the geometry is 2D or 3D. More...
|
|
std::string | GetName () const |
|
void | SetName (const std::string &name) |
|
| IsDevice ()=default |
|
virtual | ~IsDevice ()=default |
|
bool | IsCPU () const |
|
bool | IsCUDA () const |
|
| DrawableGeometry () |
|
| ~DrawableGeometry () |
|
bool | HasMaterial () const |
| Check if a material has been applied to this Geometry with SetMaterial. More...
|
|
visualization::rendering::Material & | GetMaterial () |
| Get material associated with this Geometry. More...
|
|
const visualization::rendering::Material & | GetMaterial () const |
| Get const reference to material associated with this Geometry. More...
|
|
void | SetMaterial (const visualization::rendering::Material &material) |
| Set the material properties associate with this Geometry. More...
|
|
A LineSet contains points and lines joining them and optionally attributes on the points and lines.
The LineSet class stores the attribute data in key-value pairs for flexibility, where the key is a string representing the attribute name and value is a Tensor containing the attribute data.
By default, there are two sets of dictionaries: point_attr_
and line_attr_
. In most cases, the length of an attribute should be equal to the length of the data corresponding to the primary key. For instance, point_attr_["colors"]
should have the same length as point_attr_["positions"]
.
Although the attributes are all stored in a key-value pair dictionary, the attributes have different levels:
- Default attributes {"positions", "indices"}.
- Created by default, required for all LineSets.
- The "positions" tensor must have shape {N,3} while the "indices" tensor must have shape {N,2} and DtypeCode Int.
- The device of "positions" and "indices" must be consistent and they determine the device of the LineSet.
- Usage:
- Commonly used attributes: line colors.
- Not created by default.
- The tensor must be of shape {N,3}.
- For all attributes, the device must be consistent with the device of the LineSet.
- Value tensors can have any Dtype.
- Usage:
- Line colors (stored at line_attr_["colors"])
- Custom attributes, e.g. {"labels"}.
- Not created by default. Users can add their own custom attributes.
- For all attributes, the device must be consistent with the device of the LineSet.
- Value tensors can have any Dtype.
- Usage:
Note that {Get|Set|Has}{Point|Line}Attr()
functions also work "positions" and "indices".
Construct a LineSet from points and lines.
The input tensors will be directly used as the underlying storage of the line set (no memory copy). If the tensor is created in-place from a pre-allocated buffer, the tensor has a fixed size and thus the resulting LineSet will have a fixed size and calling to functions like SynchronizedPushBack
will raise an exception.
The resulting LineSet will have the same dtype and device as the tensor. The device for points
must be consistent with lines
.
- Parameters
-
point_positions | A tensor with element shape {3}. |
line_indices | A tensor with element shape {2} and Int DtypeCode. |
Transforms the points and lines of the LineSet.
Custom attributes (e.g.: point or line normals) are not transformed.
Transformation matrix is a 4x4 matrix. T (4x4) = [[ R(3x3) t(3x1) ], [ O(1x3) s(1x1) ]] (s = 1 for Transformation without scaling)
It applies the following general transform to each positions
and normals
. |x'| | R(0,0) R(0,1) R(0,2) t(0)| |x| |y'| = | R(1,0) R(1,1) R(1,2) t(1)| @ |y| |z'| | R(2,0) R(2,1) R(2,2) t(2)| |z| |w'| | O(0,0) O(0,1) O(0,2) s | |1|
[x, y, z] = [x', y', z'] / w'
- Parameters
-
transformation | Transformation [Tensor of shape {4,4}]. |
- Returns
- Transformed line set.