Developer Documentation
|
#include <AC>
Classes | |
struct | CustomProperty |
Public Types | |
typedef PointT | Point |
typedef Point::value_type | Scalar |
typedef int | CustomPropertyHandle |
Public Member Functions | |
PolyLineT (bool _closed=false) | |
Constructor. More... | |
PolyLineT (const PolyLineT &_line) | |
Copy Constructor. More... | |
PolyLineT & | operator= (const PolyLineT &)=default |
Use the default = operator. | |
~PolyLineT () | |
Destructor. More... | |
bool | is_closed () const |
Check if the polyline is marked as closed. More... | |
void | set_closed (const bool _c) |
Set if the polyline should be closed and therefore forms a loop. More... | |
size_t | n_vertices () const |
Get number of vertices. More... | |
size_t | n_edges () const |
Get number of edges. More... | |
void | clear () |
Clear the current polyline. More... | |
void | resize (unsigned int _n) |
Resize current polyline. More... | |
void | add_point (const Point &_p) |
Append a point to the polyline. More... | |
void | insert_point (int _idx, const Point &_p) |
insert _p at _idx into polyline More... | |
void | delete_point (int _idx) |
Delete point at _idx. More... | |
Point & | point (unsigned int _i) |
Get a point of the polyline. More... | |
const Point & | point (unsigned int _i) const |
Get a point of the polyline. More... | |
std::vector< Point > & | points () |
Get all points of the polyline. More... | |
const std::vector< Point > & | points () const |
Get all points of the polyline. More... | |
Point & | front () |
Get first point of the polyline ( no range check!!!) More... | |
const Point & | front () const |
Get first point of the polyline ( no range check!!!) More... | |
Point & | back () |
Get last point of the polyline ( no range check!!!) More... | |
const Point & | back () const |
Get last point of the polyline ( no range check!!!) More... | |
Point | edge_vector (unsigned int _i) const |
get the i-th oriented edge vector More... | |
Scalar | length () const |
Compute the length of the polyline (in future cached method) More... | |
Point | position (const Scalar _t) const |
Provide linear paremterization of the polyline in [0,1]. More... | |
Point | position_arclength (const Scalar _t) const |
Same as position but with an arclength parameterization in [0,length()]. More... | |
void | resample_arclength_uniform (const unsigned int _n) |
Perform an uniform arclength resampling while maintaining the start and end point. More... | |
void | subdivide (Scalar _largest) |
Subdivide polyline. More... | |
void | collapse (Scalar _smallest) |
Collapse polyline. More... | |
void | invert () |
Invert polyline that first vertex becomes last. More... | |
void | append (const PolyLineT< PointT > &_pl) |
Append second polyline _pl to this one. More... | |
void | prepend (const PolyLineT< PointT > &_pl) |
Prepend second polyline _pl to polyline. More... | |
void | split_closed (unsigned int _split_idx) |
Split closed polyline at vertex with index _split_idx. More... | |
void | split (unsigned int _split_idx, PolyLineT< PointT > &_new_pl) |
Split closed polyline at vertex with index _split_idx. More... | |
void | remove_subsequent_identical_points (const bool _keep_edge_vertices=false, const double _epsilon=1e-6) |
remove points which are subsequent and lie at the same position More... | |
void | smooth_uniform_laplace () |
Laplacian smoothing. More... | |
void | smooth_uniform_laplace2 () |
Squared laplacian smoothing. More... | |
void | smooth_uniform_laplace3 () |
Cubic laplacian smoothing. More... | |
void | set_to_circle (const PointT _center, const PointT _normal, double _radius, unsigned int _n_samples=100) |
creating a circle with center _center and radius _radius lying in tangent plane specified by _normal More... | |
template<class MeshT , class SpatialSearchT > | |
void | project_to_mesh (const MeshT &_mesh, SpatialSearchT *_ssearch=0) |
Project polyline points to nearest surface points (use spatial search!!!) More... | |
template<class MeshT , class SpatialSearchT > | |
void | project_to_mesh (const std::vector< MeshT * > &_mesh, std::vector< SpatialSearchT * > *_ssearch=0) |
Project polyline points to nearest surface points (use spatial search!!!) More... | |
template<class MeshT , class SpatialSearchT > | |
bool | on_multiple_components (MeshT &_mesh, SpatialSearchT &_ssearch) |
template<class MeshT , class SpatialSearchT > | |
void | split_into_one_per_component (MeshT &_mesh, SpatialSearchT &_ssearch, std::vector< PolyLineT > &out_polylines) |
Scalar | total_gaussian_curvature () |
compute total gaussian curvature of enclosed surface (via Gauss-Bonnet) More... | |
template<class LineNodeT > | |
LineNodeT * | get_line_node (LineNodeT *&_line_node, int _mode=0) |
Conversion PolyLine <-> LineNode. More... | |
template<class LineNodeT > | |
void | set_line_node (LineNodeT *&_line_node, int _mode=0) |
Takes a line node and sets the points of this polyline to the points of the node. More... | |
void | print () const |
Print information string to cerr. More... | |
Scalar | vertex_radius () const |
get ball-radius of vertices More... | |
void | set_vertex_radius (const Scalar _r) |
set ball-radius of vertices More... | |
Scalar | edge_radius () const |
get cylinder-radius of edges More... | |
void | set_edge_radius (const Scalar _r) |
set cylinder-radius of edges More... | |
void | request_vertex_normals () |
void | request_vertex_binormals () |
void | request_vertex_colors () |
void | request_vertex_scalars () |
void | request_vertex_selections () |
void | request_vertex_vhandles () |
void | request_vertex_ehandles () |
void | request_vertex_fhandles () |
void | request_edge_normals () |
void | request_edge_colors () |
void | request_edge_scalars () |
void | request_edge_selections () |
void | request_preimage_directions () |
void | release_vertex_normals () |
void | release_vertex_binormals () |
void | release_vertex_colors () |
void | release_vertex_scalars () |
void | release_vertex_selections () |
void | release_vertex_vhandles () |
void | release_vertex_ehandles () |
void | release_vertex_fhandles () |
void | release_edge_normals () |
void | release_edge_colors () |
void | release_edge_scalars () |
void | release_edge_selections () |
void | release_preimage_directions () |
bool | vertex_normals_available () const |
bool | vertex_binormals_available () const |
bool | vertex_colors_available () const |
bool | vertex_scalars_available () const |
bool | vertex_selections_available () const |
bool | vertex_vhandles_available () const |
bool | vertex_ehandles_available () const |
bool | vertex_fhandles_available () const |
bool | edge_normals_available () const |
bool | edge_colors_available () const |
bool | edge_scalars_available () const |
bool | edge_selections_available () const |
bool | edge_preimage_directions_available () const |
Point & | vertex_normal (unsigned int _i) |
const Point & | vertex_normal (unsigned int _i) const |
Point & | vertex_binormal (unsigned int _i) |
const Point & | vertex_binormal (unsigned int _i) const |
Point & | vertex_color (unsigned int _i) |
const Point & | vertex_color (unsigned int _i) const |
Scalar & | vertex_scalar (unsigned int _i) |
const Scalar & | vertex_scalar (unsigned int _i) const |
unsigned char & | vertex_selection (unsigned int _i) |
const unsigned char & | vertex_selection (unsigned int _i) const |
int & | vertex_vhandle (unsigned int _i) |
const int & | vertex_vhandle (unsigned int _i) const |
int & | vertex_ehandle (unsigned int _i) |
const int & | vertex_ehandle (unsigned int _i) const |
int & | vertex_fhandle (unsigned int _i) |
const int & | vertex_fhandle (unsigned int _i) const |
Point & | edge_normal (unsigned int _i) |
const Point & | edge_normal (unsigned int _i) const |
Point & | edge_color (unsigned int _i) |
const Point & | edge_color (unsigned int _i) const |
Scalar & | edge_scalar (unsigned int _i) |
const Scalar & | edge_scalar (unsigned int _i) const |
unsigned char & | edge_selection (unsigned int _i) |
const unsigned char & | edge_selection (unsigned int _i) const |
Point & | preimage_direction (unsigned int _i) |
const Point & | preimage_direction (unsigned int _i) const |
CustomPropertyHandle | request_custom_property (const std::string &_name, unsigned int _prop_size) |
void | release_custom_property (const std::string &_name) |
void | release_custom_property (CustomPropertyHandle _prop_handle) |
bool | custom_property_available (CustomPropertyHandle _property_handle) const |
bool | custom_property_available (const std::string &_name) const |
void | set_custom_property (CustomPropertyHandle _property_handle, unsigned int _vertex, const void *_data) |
void | get_custom_property (CustomPropertyHandle _property_handle, unsigned int _vertex, void *_dst) const |
void | set_custom_property (const std::string &_name, unsigned int _vertex, const void *_data) |
void | get_custom_property (const std::string &_name, unsigned int _vertex, void *_dst) const |
void | bind_custom_property_to_shader (CustomPropertyHandle _property_handle, const std::string &_shader_input_name, unsigned int _datatype) |
Binding to vertex shader (optional) More... | |
bool | get_custom_property_shader_binding (CustomPropertyHandle _property_handle, unsigned int *_propsize, const char **_input_name, unsigned int *_datatype) const |
Get shader binding information. More... | |
CustomPropertyHandle | get_custom_property_handle (const std::string &_name) const |
const std::string | get_custom_property_name (CustomPropertyHandle _property_handle) const |
unsigned int | get_num_custom_properties () const |
const void * | get_custom_property_buffer (CustomPropertyHandle _property_handle) const |
CustomPropertyHandle | enumerate_custom_property_handles (unsigned int _i) const |
bool | vertex_selected (unsigned int _i) |
bool | edge_selected (unsigned int _i) |
void | select_vertex (unsigned int _i) |
void | select_edge (unsigned int _i) |
void | deselect_vertex (unsigned int _i) |
void | deselect_edge (unsigned int _i) |
void | copy_vertex_complete (const PolyLineT< PointT > &_pl, unsigned int _i, unsigned int _j) |
void | copy_edge_complete (const PolyLineT< PointT > &_pl, unsigned int _i, unsigned int _j) |
Private Types | |
typedef std::map< std::string, CustomProperty * > | CustomPropertyMap |
Private Member Functions | |
template<class MeshT , class SpatialSearchT > | |
Point | find_nearest_point (const MeshT &_mesh, const Point &_point, typename MeshT::FaceHandle &_fh, SpatialSearchT *_ssearch=0, double *_dbest=0) |
template<class MeshT , class SpatialSearchT > | |
unsigned int | component_of (const OpenMesh::PropertyManager< OpenMesh::FPropHandleT< unsigned int >, MeshT > &component, const PointT &pt, SpatialSearchT &_ssearch) |
template<class MeshT > | |
void | mark_components (OpenMesh::PropertyManager< OpenMesh::FPropHandleT< unsigned int >, MeshT > &component) |
template<class PropT > | |
void | request_prop (unsigned int &_ref_count, PropT &_prop) |
template<class PropT > | |
void | release_prop (unsigned int &_ref_count, PropT &_prop) |
template<class IPoint > | |
bool | plane_line_intersection (const IPoint &_p_plane, const IPoint &_n_plane, const IPoint &_p0, const IPoint &_p1, IPoint &_p_int) |
template<class MeshT > | |
void | edge_points_in_segment (const MeshT &_mesh, const Point &_p0, const Point &_p1, const typename MeshT::FaceHandle &_fh0, const typename MeshT::FaceHandle &_fh1, std::vector< Point > &_points, std::vector< typename MeshT::EdgeHandle > &_ehandles) |
CustomProperty * | custom_prop (CustomPropertyHandle _handle) |
const CustomProperty * | custom_prop (CustomPropertyHandle _handle) const |
CustomPropertyHandle | custom_prop_handle (const CustomProperty *) const |
Private Attributes | |
std::vector< Point > | points_ |
List of points in the polyline. More... | |
bool | closed_ |
Connect first and last point? More... | |
Scalar | vertex_radius_ |
ball-radius of vertices More... | |
Scalar | edge_radius_ |
cylinder-radius of edges More... | |
std::vector< Point > | vnormals_ |
std::vector< Point > | vbinormals_ |
std::vector< Point > | vcolors_ |
std::vector< Scalar > | vscalars_ |
std::vector< unsigned char > | vselections_ |
std::vector< int > | vvhandles_ |
std::vector< int > | vehandles_ |
std::vector< int > | vfhandles_ |
std::vector< Point > | enormals_ |
std::vector< Point > | ecolors_ |
std::vector< Scalar > | escalars_ |
std::vector< unsigned char > | eselections_ |
std::vector< Point > | epreimage_direction_ |
unsigned int | ref_count_vnormals_ |
unsigned int | ref_count_vbinormals_ |
unsigned int | ref_count_vcolors_ |
unsigned int | ref_count_vscalars_ |
unsigned int | ref_count_vselections_ |
unsigned int | ref_count_vvhandles_ |
unsigned int | ref_count_vehandles_ |
unsigned int | ref_count_vfhandles_ |
unsigned int | ref_count_enormals_ |
unsigned int | ref_count_ecolors_ |
unsigned int | ref_count_escalars_ |
unsigned int | ref_count_eselections_ |
unsigned int | ref_count_epreimage_direction_ |
CustomPropertyMap | custom_properties |
std::vector< CustomProperty * > | cprop_enum |
/.../PolyLineT.hh>
Brief Description.
A more elaborate description follows.
Definition at line 84 of file PolyLineT.hh.
typedef int ACG::PolyLineT< PointT >::CustomPropertyHandle |
Definition at line 488 of file PolyLineT.hh.
|
private |
Definition at line 720 of file PolyLineT.hh.
typedef PointT ACG::PolyLineT< PointT >::Point |
Definition at line 89 of file PolyLineT.hh.
typedef Point::value_type ACG::PolyLineT< PointT >::Scalar |
Definition at line 90 of file PolyLineT.hh.
|
explicit |
Constructor.
Definition at line 90 of file PolyLineT_impl.hh.
ACG::PolyLineT< PointT >::PolyLineT | ( | const PolyLineT< PointT > & | _line | ) |
Copy Constructor.
Definition at line 115 of file PolyLineT_impl.hh.
|
inline |
Destructor.
Definition at line 102 of file PolyLineT.hh.
void ACG::PolyLineT< PointT >::add_point | ( | const Point & | _p | ) |
Append a point to the polyline.
Definition at line 282 of file PolyLineT_impl.hh.
void ACG::PolyLineT< PointT >::append | ( | const PolyLineT< PointT > & | _pl | ) |
Append second polyline _pl to this one.
Definition at line 1381 of file PolyLineT_impl.hh.
|
inline |
Get last point of the polyline ( no range check!!!)
Definition at line 163 of file PolyLineT.hh.
|
inline |
Get last point of the polyline ( no range check!!!)
Definition at line 166 of file PolyLineT.hh.
void ACG::PolyLineT< PointT >::bind_custom_property_to_shader | ( | CustomPropertyHandle | _property_handle, |
const std::string & | _shader_input_name, | ||
unsigned int | _datatype | ||
) |
Binding to vertex shader (optional)
Bind custom vertex properties to input names in vertex shaders. The number of coordinates of a property is assumed to be _prop_size / bytesize(_datatype), so the property size provided via request_custom_property has to be a multiple of bytesize(_datatype).
_property_handle | handle of property |
_shader_input_name | name id of input data in the vertex shader |
_datatype | type of one property data coordinate, ie GL_FLOAT, GL_UNSIGNED_BYTE ... |
Definition at line 2316 of file PolyLineT_impl.hh.
void ACG::PolyLineT< PointT >::clear | ( | void | ) |
Clear the current polyline.
Definition at line 181 of file PolyLineT_impl.hh.
void ACG::PolyLineT< PointT >::collapse | ( | Scalar | _smallest | ) |
Collapse polyline.
Collapses segments until the smallest interval in the line is larger than the given value
_smallest | smallest interval length after collapsing |
Definition at line 666 of file PolyLineT_impl.hh.
|
private |
Assuming component is a property manager that has been initialized using mark_components(), return the number of the component of the face pt gets projected to using _ssearch.
Definition at line 1978 of file PolyLineT_impl.hh.
void ACG::PolyLineT< PointT >::copy_edge_complete | ( | const PolyLineT< PointT > & | _pl, |
unsigned int | _i, | ||
unsigned int | _j | ||
) |
Definition at line 1302 of file PolyLineT_impl.hh.
void ACG::PolyLineT< PointT >::copy_vertex_complete | ( | const PolyLineT< PointT > & | _pl, |
unsigned int | _i, | ||
unsigned int | _j | ||
) |
Definition at line 1240 of file PolyLineT_impl.hh.
|
private |
Definition at line 2125 of file PolyLineT_impl.hh.
|
private |
Definition at line 2130 of file PolyLineT_impl.hh.
|
private |
Definition at line 2116 of file PolyLineT_impl.hh.
bool ACG::PolyLineT< PointT >::custom_property_available | ( | const std::string & | _name | ) | const |
Definition at line 2307 of file PolyLineT_impl.hh.
bool ACG::PolyLineT< PointT >::custom_property_available | ( | CustomPropertyHandle | _property_handle | ) | const |
Definition at line 2294 of file PolyLineT_impl.hh.
void ACG::PolyLineT< PointT >::delete_point | ( | int | _idx | ) |
Delete point at _idx.
Definition at line 411 of file PolyLineT_impl.hh.
|
inline |
Definition at line 562 of file PolyLineT.hh.
|
inline |
Definition at line 561 of file PolyLineT.hh.
|
inline |
Definition at line 435 of file PolyLineT.hh.
|
inline |
Definition at line 436 of file PolyLineT.hh.
|
inline |
Definition at line 402 of file PolyLineT.hh.
|
inline |
Definition at line 432 of file PolyLineT.hh.
|
inline |
Definition at line 433 of file PolyLineT.hh.
|
inline |
Definition at line 401 of file PolyLineT.hh.
|
private |
Definition at line 1521 of file PolyLineT_impl.hh.
|
inline |
Definition at line 405 of file PolyLineT.hh.
|
inline |
get cylinder-radius of edges
Definition at line 351 of file PolyLineT.hh.
|
inline |
Definition at line 438 of file PolyLineT.hh.
|
inline |
Definition at line 439 of file PolyLineT.hh.
|
inline |
Definition at line 403 of file PolyLineT.hh.
|
inline |
Definition at line 556 of file PolyLineT.hh.
|
inline |
Definition at line 441 of file PolyLineT.hh.
|
inline |
Definition at line 442 of file PolyLineT.hh.
|
inline |
Definition at line 404 of file PolyLineT.hh.
|
inline |
get the i-th oriented edge vector
Definition at line 169 of file PolyLineT.hh.
PolyLineT< PointT >::CustomPropertyHandle ACG::PolyLineT< PointT >::enumerate_custom_property_handles | ( | unsigned int | _i | ) | const |
Definition at line 2377 of file PolyLineT_impl.hh.
|
private |
Compute the closest point on a mesh
_mesh | The corresponding mesh |
_point | Point that should be checked |
_fh | Returns closest face to the given point |
_ssearch | Spatial search structure to speedup search |
_dbest | Returns the distance |
Definition at line 1000 of file PolyLineT_impl.hh.
|
inline |
Get first point of the polyline ( no range check!!!)
Definition at line 157 of file PolyLineT.hh.
|
inline |
Get first point of the polyline ( no range check!!!)
Definition at line 160 of file PolyLineT.hh.
void ACG::PolyLineT< PointT >::get_custom_property | ( | const std::string & | _name, |
unsigned int | _vertex, | ||
void * | _dst | ||
) | const |
Definition at line 2283 of file PolyLineT_impl.hh.
void ACG::PolyLineT< PointT >::get_custom_property | ( | CustomPropertyHandle | _property_handle, |
unsigned int | _vertex, | ||
void * | _dst | ||
) | const |
Definition at line 2253 of file PolyLineT_impl.hh.
const void * ACG::PolyLineT< PointT >::get_custom_property_buffer | ( | CustomPropertyHandle | _property_handle | ) | const |
Definition at line 2357 of file PolyLineT_impl.hh.
PolyLineT< PointT >::CustomPropertyHandle ACG::PolyLineT< PointT >::get_custom_property_handle | ( | const std::string & | _name | ) | const |
Definition at line 2186 of file PolyLineT_impl.hh.
const std::string ACG::PolyLineT< PointT >::get_custom_property_name | ( | CustomPropertyHandle | _property_handle | ) | const |
Definition at line 2198 of file PolyLineT_impl.hh.
bool ACG::PolyLineT< PointT >::get_custom_property_shader_binding | ( | CustomPropertyHandle | _property_handle, |
unsigned int * | _propsize, | ||
const char ** | _input_name, | ||
unsigned int * | _datatype | ||
) | const |
Get shader binding information.
The property has to be bound via bind_custom_property_to_shader before.
_property_handle | handle of property |
_propsize | [out] receives size in bytes of one property element |
_input_name | [out] receives pointer to name id of input data in the vertex shader |
_datatype | [out] receives type of property coordinates |
Definition at line 2332 of file PolyLineT_impl.hh.
LineNodeT * ACG::PolyLineT< PointT >::get_line_node | ( | LineNodeT *& | _line_node, |
int | _mode = 0 |
||
) |
Conversion PolyLine <-> LineNode.
Creates a line node out of the polylline
_line_node | The newly created line node |
_mode | 0 : LineSegments mode, 1: polygon mode |
Definition at line 1074 of file PolyLineT_impl.hh.
unsigned int ACG::PolyLineT< PointT >::get_num_custom_properties |
Definition at line 2371 of file PolyLineT_impl.hh.
void ACG::PolyLineT< PointT >::insert_point | ( | int | _idx, |
const Point & | _p | ||
) |
insert _p at _idx into polyline
_idx | Where to insert |
_p | New point |
Definition at line 346 of file PolyLineT_impl.hh.
void ACG::PolyLineT< PointT >::invert |
Invert polyline that first vertex becomes last.
Definition at line 1351 of file PolyLineT_impl.hh.
|
inline |
Check if the polyline is marked as closed.
If the polyline is closed, the end vertices are connected.
Definition at line 110 of file PolyLineT.hh.
PolyLineT< PointT >::Scalar ACG::PolyLineT< PointT >::length |
Compute the length of the polyline (in future cached method)
Definition at line 478 of file PolyLineT_impl.hh.
|
private |
Enumerate connected components of the property manager's mesh and assign each face its component's number using the property manager.
Definition at line 1930 of file PolyLineT_impl.hh.
size_t ACG::PolyLineT< PointT >::n_edges |
Get number of edges.
Definition at line 211 of file PolyLineT_impl.hh.
|
inline |
Get number of vertices.
Definition at line 119 of file PolyLineT.hh.
bool ACG::PolyLineT< PointT >::on_multiple_components | ( | MeshT & | _mesh, |
SpatialSearchT & | _ssearch | ||
) |
Indicates whether the entire poly line lies on the same connected component of the supplied mesh.
Definition at line 1995 of file PolyLineT_impl.hh.
|
private |
Intersect point with line
_p_plane | Plane point |
_n_plane | Plane normal |
_p0 | Startpoint of line |
_p1 | Endpoint of line |
_p_int | Intersection point |
Definition at line 1487 of file PolyLineT_impl.hh.
|
inline |
Get a point of the polyline.
Definition at line 145 of file PolyLineT.hh.
|
inline |
Get a point of the polyline.
Definition at line 148 of file PolyLineT.hh.
|
inline |
Get all points of the polyline.
Definition at line 151 of file PolyLineT.hh.
|
inline |
Get all points of the polyline.
Definition at line 154 of file PolyLineT.hh.
PolyLineT< PointT >::Point ACG::PolyLineT< PointT >::position | ( | const Scalar | _t | ) | const |
Provide linear paremterization of the polyline in [0,1].
_t | parameter value in [0,1] |
Definition at line 509 of file PolyLineT_impl.hh.
PolyLineT< PointT >::Point ACG::PolyLineT< PointT >::position_arclength | ( | const Scalar | _t | ) | const |
Same as position but with an arclength parameterization in [0,length()].
_t | parameter value in [0,length()] |
Definition at line 522 of file PolyLineT_impl.hh.
|
inline |
Definition at line 444 of file PolyLineT.hh.
|
inline |
Definition at line 445 of file PolyLineT.hh.
void ACG::PolyLineT< PointT >::prepend | ( | const PolyLineT< PointT > & | _pl | ) |
Prepend second polyline _pl to polyline.
Definition at line 1410 of file PolyLineT_impl.hh.
void ACG::PolyLineT< PointT >::print |
Print information string to cerr.
Definition at line 1187 of file PolyLineT_impl.hh.
void ACG::PolyLineT< PointT >::project_to_mesh | ( | const MeshT & | _mesh, |
SpatialSearchT * | _ssearch = 0 |
||
) |
Project polyline points to nearest surface points (use spatial search!!!)
_mesh | The mesh to project to |
_ssearch | A spatial search to improve speed |
Definition at line 931 of file PolyLineT_impl.hh.
void ACG::PolyLineT< PointT >::project_to_mesh | ( | const std::vector< MeshT * > & | _mesh, |
std::vector< SpatialSearchT * > * | _ssearch = 0 |
||
) |
Project polyline points to nearest surface points (use spatial search!!!)
This function projects the polyline points to the closest of the given meshes.
_mesh | vector of meshes that should be used |
_ssearch | A spatial search to improve speed |
Definition at line 952 of file PolyLineT_impl.hh.
void ACG::PolyLineT< PointT >::release_custom_property | ( | const std::string & | _name | ) |
Definition at line 2178 of file PolyLineT_impl.hh.
void ACG::PolyLineT< PointT >::release_custom_property | ( | CustomPropertyHandle | _prop_handle | ) |
Definition at line 2168 of file PolyLineT_impl.hh.
|
inline |
Definition at line 386 of file PolyLineT.hh.
|
inline |
Definition at line 385 of file PolyLineT.hh.
|
inline |
Definition at line 387 of file PolyLineT.hh.
|
inline |
Definition at line 388 of file PolyLineT.hh.
|
inline |
Definition at line 389 of file PolyLineT.hh.
|
private |
Definition at line 1223 of file PolyLineT_impl.hh.
|
inline |
Definition at line 377 of file PolyLineT.hh.
|
inline |
Definition at line 378 of file PolyLineT.hh.
|
inline |
Definition at line 382 of file PolyLineT.hh.
|
inline |
Definition at line 383 of file PolyLineT.hh.
|
inline |
Definition at line 376 of file PolyLineT.hh.
|
inline |
Definition at line 379 of file PolyLineT.hh.
|
inline |
Definition at line 380 of file PolyLineT.hh.
|
inline |
Definition at line 381 of file PolyLineT.hh.
void ACG::PolyLineT< PointT >::remove_subsequent_identical_points | ( | const bool | _keep_edge_vertices = false , |
const double | _epsilon = 1e-6 |
||
) |
remove points which are subsequent and lie at the same position
_keep_edge_vertices | Keep the corresponding edge vertices |
_epsilon | Vertices which are closer than this distance are considered at same position |
Definition at line 1753 of file PolyLineT_impl.hh.
PolyLineT< PointT >::CustomPropertyHandle ACG::PolyLineT< PointT >::request_custom_property | ( | const std::string & | _name, |
unsigned int | _prop_size | ||
) |
Definition at line 2135 of file PolyLineT_impl.hh.
|
inline |
Definition at line 370 of file PolyLineT.hh.
|
inline |
Definition at line 369 of file PolyLineT.hh.
|
inline |
Definition at line 371 of file PolyLineT.hh.
|
inline |
Definition at line 372 of file PolyLineT.hh.
|
inline |
Definition at line 373 of file PolyLineT.hh.
|
private |
Definition at line 1204 of file PolyLineT_impl.hh.
|
inline |
Definition at line 361 of file PolyLineT.hh.
|
inline |
Definition at line 362 of file PolyLineT.hh.
|
inline |
Definition at line 366 of file PolyLineT.hh.
|
inline |
Definition at line 367 of file PolyLineT.hh.
|
inline |
Definition at line 360 of file PolyLineT.hh.
|
inline |
Definition at line 363 of file PolyLineT.hh.
|
inline |
Definition at line 364 of file PolyLineT.hh.
|
inline |
Definition at line 365 of file PolyLineT.hh.
void ACG::PolyLineT< PointT >::resample_arclength_uniform | ( | const unsigned int | _n | ) |
Perform an uniform arclength resampling while maintaining the start and end point.
_n | number of sample points in [2,infinity] |
Definition at line 574 of file PolyLineT_impl.hh.
void ACG::PolyLineT< PointT >::resize | ( | unsigned int | _n | ) |
Resize current polyline.
Definition at line 225 of file PolyLineT_impl.hh.
|
inline |
Definition at line 559 of file PolyLineT.hh.
|
inline |
Definition at line 558 of file PolyLineT.hh.
|
inline |
Set if the polyline should be closed and therefore forms a loop.
_c | Set polyline closed or not? |
Definition at line 116 of file PolyLineT.hh.
void ACG::PolyLineT< PointT >::set_custom_property | ( | const std::string & | _name, |
unsigned int | _vertex, | ||
const void * | _data | ||
) |
Definition at line 2243 of file PolyLineT_impl.hh.
void ACG::PolyLineT< PointT >::set_custom_property | ( | CustomPropertyHandle | _property_handle, |
unsigned int | _vertex, | ||
const void * | _data | ||
) |
Definition at line 2213 of file PolyLineT_impl.hh.
|
inline |
set cylinder-radius of edges
Definition at line 354 of file PolyLineT.hh.
void ACG::PolyLineT< PointT >::set_line_node | ( | LineNodeT *& | _line_node, |
int | _mode = 0 |
||
) |
Takes a line node and sets the points of this polyline to the points of the node.
_line_node | The line node with the data |
_mode | 0 : LineSegments mode, 1: polygon mode |
Definition at line 1137 of file PolyLineT_impl.hh.
void ACG::PolyLineT< PointT >::set_to_circle | ( | const PointT | _center, |
const PointT | _normal, | ||
double | _radius, | ||
unsigned int | _n_samples = 100 |
||
) |
creating a circle with center _center and radius _radius lying in tangent plane specified by _normal
Definition at line 905 of file PolyLineT_impl.hh.
|
inline |
set ball-radius of vertices
Definition at line 348 of file PolyLineT.hh.
void ACG::PolyLineT< PointT >::smooth_uniform_laplace |
Laplacian smoothing.
Definition at line 732 of file PolyLineT_impl.hh.
void ACG::PolyLineT< PointT >::smooth_uniform_laplace2 |
Squared laplacian smoothing.
Definition at line 786 of file PolyLineT_impl.hh.
void ACG::PolyLineT< PointT >::smooth_uniform_laplace3 |
Cubic laplacian smoothing.
Definition at line 843 of file PolyLineT_impl.hh.
void ACG::PolyLineT< PointT >::split | ( | unsigned int | _split_idx, |
PolyLineT< PointT > & | _new_pl | ||
) |
Split closed polyline at vertex with index _split_idx.
_split_idx | Where to split |
_new_pl | The new polyline is returned in this variable |
Definition at line 1457 of file PolyLineT_impl.hh.
void ACG::PolyLineT< PointT >::split_closed | ( | unsigned int | _split_idx | ) |
Split closed polyline at vertex with index _split_idx.
_split_idx | Where to split |
Definition at line 1425 of file PolyLineT_impl.hh.
void ACG::PolyLineT< PointT >::split_into_one_per_component | ( | MeshT & | _mesh, |
SpatialSearchT & | _ssearch, | ||
std::vector< PolyLineT< PointT > > & | out_polylines | ||
) |
Splits the poly line up into multiple poly lines each of which lie entirely on one connected component of the supplied mesh. There will be small gap between the new poly lines.
Definition at line 2024 of file PolyLineT_impl.hh.
void ACG::PolyLineT< PointT >::subdivide | ( | Scalar | _largest | ) |
Subdivide polyline.
Subdivides segments until the longest interval in the line is smaller than the given value
_largest | largest interval length after subdivision |
Definition at line 613 of file PolyLineT_impl.hh.
PolyLineT< PointT >::Scalar ACG::PolyLineT< PointT >::total_gaussian_curvature |
compute total gaussian curvature of enclosed surface (via Gauss-Bonnet)
The enclosed surface is defined to be on the left side of the curve given through N x E This function requires Edge-Normals!!!
Definition at line 1835 of file PolyLineT_impl.hh.
|
inline |
Definition at line 411 of file PolyLineT.hh.
|
inline |
Definition at line 412 of file PolyLineT.hh.
|
inline |
Definition at line 393 of file PolyLineT.hh.
|
inline |
Definition at line 414 of file PolyLineT.hh.
|
inline |
Definition at line 415 of file PolyLineT.hh.
|
inline |
Definition at line 394 of file PolyLineT.hh.
|
inline |
Definition at line 426 of file PolyLineT.hh.
|
inline |
Definition at line 427 of file PolyLineT.hh.
|
inline |
Definition at line 398 of file PolyLineT.hh.
|
inline |
Definition at line 429 of file PolyLineT.hh.
|
inline |
Definition at line 430 of file PolyLineT.hh.
|
inline |
Definition at line 399 of file PolyLineT.hh.
|
inline |
Definition at line 408 of file PolyLineT.hh.
|
inline |
Definition at line 409 of file PolyLineT.hh.
|
inline |
Definition at line 392 of file PolyLineT.hh.
|
inline |
get ball-radius of vertices
Definition at line 345 of file PolyLineT.hh.
|
inline |
Definition at line 417 of file PolyLineT.hh.
|
inline |
Definition at line 418 of file PolyLineT.hh.
|
inline |
Definition at line 395 of file PolyLineT.hh.
|
inline |
Definition at line 555 of file PolyLineT.hh.
|
inline |
Definition at line 420 of file PolyLineT.hh.
|
inline |
Definition at line 421 of file PolyLineT.hh.
|
inline |
Definition at line 396 of file PolyLineT.hh.
|
inline |
Definition at line 423 of file PolyLineT.hh.
|
inline |
Definition at line 424 of file PolyLineT.hh.
|
inline |
Definition at line 397 of file PolyLineT.hh.
|
private |
Connect first and last point?
Definition at line 653 of file PolyLineT.hh.
|
private |
Definition at line 731 of file PolyLineT.hh.
|
private |
Definition at line 728 of file PolyLineT.hh.
|
private |
Definition at line 674 of file PolyLineT.hh.
|
private |
cylinder-radius of edges
Definition at line 659 of file PolyLineT.hh.
|
private |
Definition at line 673 of file PolyLineT.hh.
|
private |
Definition at line 677 of file PolyLineT.hh.
|
private |
Definition at line 675 of file PolyLineT.hh.
|
private |
Definition at line 676 of file PolyLineT.hh.
|
private |
List of points in the polyline.
Definition at line 650 of file PolyLineT.hh.
|
private |
Definition at line 691 of file PolyLineT.hh.
|
private |
Definition at line 690 of file PolyLineT.hh.
|
private |
Definition at line 694 of file PolyLineT.hh.
|
private |
Definition at line 692 of file PolyLineT.hh.
|
private |
Definition at line 693 of file PolyLineT.hh.
|
private |
Definition at line 682 of file PolyLineT.hh.
|
private |
Definition at line 683 of file PolyLineT.hh.
|
private |
Definition at line 687 of file PolyLineT.hh.
|
private |
Definition at line 688 of file PolyLineT.hh.
|
private |
Definition at line 681 of file PolyLineT.hh.
|
private |
Definition at line 684 of file PolyLineT.hh.
|
private |
Definition at line 685 of file PolyLineT.hh.
|
private |
Definition at line 686 of file PolyLineT.hh.
|
private |
Definition at line 665 of file PolyLineT.hh.
|
private |
Definition at line 666 of file PolyLineT.hh.
|
private |
Definition at line 670 of file PolyLineT.hh.
|
private |
ball-radius of vertices
Definition at line 656 of file PolyLineT.hh.
|
private |
Definition at line 671 of file PolyLineT.hh.
|
private |
Definition at line 664 of file PolyLineT.hh.
|
private |
Definition at line 667 of file PolyLineT.hh.
|
private |
Definition at line 668 of file PolyLineT.hh.
|
private |
Definition at line 669 of file PolyLineT.hh.