MeshLib Java Docs
Loading...
Searching...
No Matches
meshlib.Polyline3 Class Reference
Inheritance diagram for meshlib.Polyline3:

Public Member Functions

 Polyline3 (java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner)
 Polyline3 ()
 Polyline3 (meshlib.Polyline3 _other)
 Polyline3 (meshlib.std_vector_MR_Vector3f contour)
 Polyline3 (meshlib.std_vector_std_vector_MR_Vector3f contours)
 Polyline3 (meshlib.std_vector_MR_VertId comp2firstVert, meshlib.VertCoords ps)
meshlib.Polyline3 assignFromAnother (meshlib.Polyline3 _other)
meshlib.EdgeId addFromPoints (meshlib.Vector3f vs, long num, boolean closed)
meshlib.EdgeId addFromPoints (meshlib.Vector3f vs, long num)
void addPart (meshlib.Polyline3 from, meshlib.VertMap outVmap, meshlib.WholeEdgeMap outEmap)
void addPartByMask (meshlib.Polyline3 from, meshlib.UndirectedEdgeBitSet mask, meshlib.VertMap outVmap, meshlib.EdgeMap outEmap)
void pack (meshlib.VertMap outVmap, meshlib.WholeEdgeMap outEmap)
meshlib.Vector3f orgPnt (meshlib.EdgeId e)
meshlib.Vector3f destPnt (meshlib.EdgeId e)
meshlib.Vector3f edgePoint (meshlib.EdgeId e, float f)
meshlib.Vector3f edgePoint (meshlib.EdgePoint ep)
meshlib.Vector3f edgeCenter (meshlib.EdgeId e)
meshlib.Vector3f edgeVector (meshlib.EdgeId e)
meshlib.LineSegm3f edgeSegment (meshlib.EdgeId e)
meshlib.EdgePoint toEdgePoint (meshlib.VertId v)
meshlib.EdgePoint toEdgePoint (meshlib.EdgeId e, meshlib.Vector3f p)
float edgeLength (meshlib.EdgeId e)
float edgeLengthSq (meshlib.EdgeId e)
meshlib.Vector3f loopDirArea (meshlib.EdgeId e)
float totalLength ()
float averageEdgeLength ()
meshlib.AABBTreePolyline3 getAABBTree ()
meshlib.AABBTreePolyline3 getAABBTreeNotCreate ()
meshlib.Box3f getBoundingBox ()
meshlib.Box3f computeBoundingBox (meshlib.AffineXf3f toWorld)
meshlib.Vector3f findCenterFromPoints ()
void transform (meshlib.AffineXf3f xf)
meshlib.EdgeId splitEdge (meshlib.EdgeId e, meshlib.Vector3f newVertPos)
meshlib.EdgeId splitEdge (meshlib.EdgeId e)
void invalidateCaches ()
meshlib.std_vector_std_vector_MR_Vector3f contours (meshlib.std_vector_std_vector_MR_VertId vertMap)
meshlib.EdgeId addFromEdgePath (meshlib.Mesh mesh, meshlib.std_vector_MR_EdgeId path)
meshlib.EdgeId addFromSurfacePath (meshlib.Mesh mesh, meshlib.std_vector_MR_EdgePoint path)
meshlib.EdgeId addFromGeneralSurfacePath (meshlib.Mesh mesh, meshlib.MeshTriPoint start, meshlib.std_vector_MR_EdgePoint path, meshlib.MeshTriPoint end)
long heapBytes ()
meshlib.PolylineTopology topology ()
void setTopology (meshlib.PolylineTopology value)
meshlib.VertCoords points ()
void setPoints (meshlib.VertCoords value)
Public Member Functions inherited from meshlib.CppObject
final java.lang.foreign.MemorySegment rawPointer ()
final boolean isOwned ()
final void close ()
final java.lang.foreign.MemorySegment release ()

Additional Inherited Members

Protected Member Functions inherited from meshlib.CppObject
 CppObject (java.lang.foreign.MemorySegment ptr, java.util.function.Consumer< java.lang.foreign.MemorySegment > destroy, java.lang.Object owner)

Detailed Description

polyline that stores points of type V Generated from class MR::Polyline3.

Instances created here own their C++ objects, see CppObject.

Constructor & Destructor Documentation

◆ Polyline3() [1/6]

meshlib.Polyline3.Polyline3 ( java.lang.foreign.MemorySegment ptr,
boolean owned,
java.lang.Object owner )

Wraps a pointer from the C bindings. If owned, the object is destroyed when the wrapper dies. owner is kept alive as long as this wrapper is. Not for normal use.

◆ Polyline3() [2/6]

meshlib.Polyline3.Polyline3 ( )

Constructs an empty (default-constructed) instance.

Calls MR_Polyline3_DefaultConstruct().

◆ Polyline3() [3/6]

meshlib.Polyline3.Polyline3 ( meshlib.Polyline3 _other)

Generated from constructor MR::Polyline3::Polyline3. The reference to things referred to by the parameter _other (if any) might be preserved in the constructed object.

Calls MR_Polyline3_ConstructFromAnother().

◆ Polyline3() [4/6]

meshlib.Polyline3.Polyline3 ( meshlib.std_vector_MR_Vector3f contour)

creates polyline from one contour (open or closed) Generated from constructor MR::Polyline3::Polyline3. The reference to the parameter contour might be preserved in the constructed object.

Calls MR_Polyline3_Construct_1_std_vector_MR_Vector3f().

◆ Polyline3() [5/6]

meshlib.Polyline3.Polyline3 ( meshlib.std_vector_std_vector_MR_Vector3f contours)

creates polyline from several contours (each can be open or closed) Generated from constructor MR::Polyline3::Polyline3. The reference to the parameter contours might be preserved in the constructed object.

Calls MR_Polyline3_Construct_1_std_vector_std_vector_MR_Vector3f().

◆ Polyline3() [6/6]

meshlib.Polyline3.Polyline3 ( meshlib.std_vector_MR_VertId comp2firstVert,
meshlib.VertCoords ps )

creates comp2firstVert.size()-1 not-closed polylines each pair (a,b) of indices in

Parameters
comp2firstVertdefines vertex range of a polyline [a,b)
pspoint coordinates Generated from constructor MR::Polyline3::Polyline3. The reference to the parameter comp2firstVert might be preserved in the constructed object. The reference to the parameter ps might be preserved in the constructed object.

Calls MR_Polyline3_Construct_2().

Member Function Documentation

◆ addFromEdgePath()

meshlib.EdgeId meshlib.Polyline3.addFromEdgePath ( meshlib.Mesh mesh,
meshlib.std_vector_MR_EdgeId path )

adds path to this polyline

Returns
the edge from first new to second new vertex Generated from method MR::Polyline3::addFromEdgePath.

Calls MR_Polyline3_addFromEdgePath().

◆ addFromGeneralSurfacePath()

meshlib.EdgeId meshlib.Polyline3.addFromGeneralSurfacePath ( meshlib.Mesh mesh,
meshlib.MeshTriPoint start,
meshlib.std_vector_MR_EdgePoint path,
meshlib.MeshTriPoint end )

adds general path = start-path-end (where both start and end are optional) to this polyline

Returns
the edge from first new to second new vertex Generated from method MR::Polyline3::addFromGeneralSurfacePath.

Calls MR_Polyline3_addFromGeneralSurfacePath().

◆ addFromPoints() [1/2]

meshlib.EdgeId meshlib.Polyline3.addFromPoints ( meshlib.Vector3f vs,
long num )

adds connected line in this, passing progressively via points *[vs, vs+num)

if num > 2 && vs[0] == vs[num-1] then a closed line is created

Returns
the edge from first new to second new vertex Generated from method MR::Polyline3::addFromPoints.

Calls MR_Polyline3_addFromPoints_2().

◆ addFromPoints() [2/2]

meshlib.EdgeId meshlib.Polyline3.addFromPoints ( meshlib.Vector3f vs,
long num,
boolean closed )

adds connected line in this, passing progressively via points *[vs, vs+num)

if closed argument is true then the last and the first points will be additionally connected

Returns
the edge from first new to second new vertex Generated from method MR::Polyline3::addFromPoints.

Calls MR_Polyline3_addFromPoints_3().

◆ addFromSurfacePath()

meshlib.EdgeId meshlib.Polyline3.addFromSurfacePath ( meshlib.Mesh mesh,
meshlib.std_vector_MR_EdgePoint path )

adds path to this polyline

Returns
the edge from first new to second new vertex Generated from method MR::Polyline3::addFromSurfacePath.

Calls MR_Polyline3_addFromSurfacePath().

◆ addPart()

void meshlib.Polyline3.addPart ( meshlib.Polyline3 from,
meshlib.VertMap outVmap,
meshlib.WholeEdgeMap outEmap )

appends polyline (from) in addition to this polyline: creates new edges, verts and points;

Parameters
outVmap,outEmap(optionally) returns mappings: from.id -> this.id Generated from method MR::Polyline3::addPart.

Calls MR_Polyline3_addPart().

◆ addPartByMask()

void meshlib.Polyline3.addPartByMask ( meshlib.Polyline3 from,
meshlib.UndirectedEdgeBitSet mask,
meshlib.VertMap outVmap,
meshlib.EdgeMap outEmap )

appends polyline (from) in addition to this polyline: creates new edges, verts and points Generated from method MR::Polyline3::addPartByMask.

Calls MR_Polyline3_addPartByMask().

◆ assignFromAnother()

meshlib.Polyline3 meshlib.Polyline3.assignFromAnother ( meshlib.Polyline3 _other)

Generated from method MR::Polyline3::operator=. The reference to things referred to by the parameter _other (if any) might be preserved in this object.

Calls MR_Polyline3_AssignFromAnother().

◆ averageEdgeLength()

float meshlib.Polyline3.averageEdgeLength ( )

returns average edge length in the polyline Generated from method MR::Polyline3::averageEdgeLength.

Calls MR_Polyline3_averageEdgeLength().

◆ computeBoundingBox()

meshlib.Box3f meshlib.Polyline3.computeBoundingBox ( meshlib.AffineXf3f toWorld)

passes through all valid points and finds the minimal bounding box containing all of them

if toWorld transformation is given then returns minimal bounding box in world space Generated from method MR::Polyline3::computeBoundingBox.

Calls MR_Polyline3_computeBoundingBox().

◆ contours()

convert Polyline to simple contour structures with vector of points inside

if all even edges are consistently oriented, then the output contours will be oriented the same

Parameters
vertMapoptional output map for for each contour point to corresponding VertId Generated from method MR::Polyline3::contours.

Calls MR_Polyline3_contours().

◆ destPnt()

meshlib.Vector3f meshlib.Polyline3.destPnt ( meshlib.EdgeId e)

returns coordinates of the edge destination Generated from method MR::Polyline3::destPnt.

Calls MR_Polyline3_destPnt().

◆ edgeCenter()

meshlib.Vector3f meshlib.Polyline3.edgeCenter ( meshlib.EdgeId e)

returns edge's centroid Generated from method MR::Polyline3::edgeCenter.

Calls MR_Polyline3_edgeCenter().

◆ edgeLength()

float meshlib.Polyline3.edgeLength ( meshlib.EdgeId e)

returns Euclidean length of the edge Generated from method MR::Polyline3::edgeLength.

Calls MR_Polyline3_edgeLength().

◆ edgeLengthSq()

float meshlib.Polyline3.edgeLengthSq ( meshlib.EdgeId e)

returns squared Euclidean length of the edge (faster to compute than length) Generated from method MR::Polyline3::edgeLengthSq.

Calls MR_Polyline3_edgeLengthSq().

◆ edgePoint() [1/2]

meshlib.Vector3f meshlib.Polyline3.edgePoint ( meshlib.EdgeId e,
float f )

returns a point on the edge: origin point for f=0 and destination point for f=1 Generated from method MR::Polyline3::edgePoint.

Calls MR_Polyline3_edgePoint_2().

◆ edgePoint() [2/2]

meshlib.Vector3f meshlib.Polyline3.edgePoint ( meshlib.EdgePoint ep)

computes coordinates of point given as edge and relative position on it Generated from method MR::Polyline3::edgePoint.

Calls MR_Polyline3_edgePoint_1().

◆ edgeSegment()

meshlib.LineSegm3f meshlib.Polyline3.edgeSegment ( meshlib.EdgeId e)

returns line segment of given edge Generated from method MR::Polyline3::edgeSegment.

Calls MR_Polyline3_edgeSegment().

◆ edgeVector()

meshlib.Vector3f meshlib.Polyline3.edgeVector ( meshlib.EdgeId e)

returns vector equal to edge destination point minus edge origin point Generated from method MR::Polyline3::edgeVector.

Calls MR_Polyline3_edgeVector().

◆ findCenterFromPoints()

meshlib.Vector3f meshlib.Polyline3.findCenterFromPoints ( )

computes average position of all valid polyline vertices Generated from method MR::Polyline3::findCenterFromPoints.

Calls MR_Polyline3_findCenterFromPoints().

◆ getAABBTree()

meshlib.AABBTreePolyline3 meshlib.Polyline3.getAABBTree ( )

returns cached aabb-tree for this polyline, creating it if it did not exist in a thread-safe manner Generated from method MR::Polyline3::getAABBTree.

Calls MR_Polyline3_getAABBTree().

◆ getAABBTreeNotCreate()

meshlib.AABBTreePolyline3 meshlib.Polyline3.getAABBTreeNotCreate ( )

returns cached aabb-tree for this polyline, but does not create it if it did not exist Generated from method MR::Polyline3::getAABBTreeNotCreate.

Calls MR_Polyline3_getAABBTreeNotCreate().

◆ getBoundingBox()

meshlib.Box3f meshlib.Polyline3.getBoundingBox ( )

returns the minimal bounding box containing all valid vertices (implemented via getAABBTree()) Generated from method MR::Polyline3::getBoundingBox.

Calls MR_Polyline3_getBoundingBox().

◆ heapBytes()

long meshlib.Polyline3.heapBytes ( )

returns the amount of memory this object occupies on heap Generated from method MR::Polyline3::heapBytes.

Calls MR_Polyline3_heapBytes().

◆ invalidateCaches()

void meshlib.Polyline3.invalidateCaches ( )

Invalidates caches (e.g. aabb-tree) after a change in polyline Generated from method MR::Polyline3::invalidateCaches.

Calls MR_Polyline3_invalidateCaches().

◆ loopDirArea()

meshlib.Vector3f meshlib.Polyline3.loopDirArea ( meshlib.EdgeId e)

calculates directed loop area if iterating in e direction .z = FLT_MAX if e does not represent a loop Generated from method MR::Polyline3::loopDirArea.

Calls MR_Polyline3_loopDirArea().

◆ orgPnt()

meshlib.Vector3f meshlib.Polyline3.orgPnt ( meshlib.EdgeId e)

returns coordinates of the edge origin Generated from method MR::Polyline3::orgPnt.

Calls MR_Polyline3_orgPnt().

◆ pack()

void meshlib.Polyline3.pack ( meshlib.VertMap outVmap,
meshlib.WholeEdgeMap outEmap )

tightly packs all arrays eliminating lone edges and invalid verts and points, optionally returns mappings: old.id -> new.id Generated from method MR::Polyline3::pack.

Calls MR_Polyline3_pack().

◆ points()

meshlib.VertCoords meshlib.Polyline3.points ( )

Returns a pointer to a member variable of class MR::Polyline3 named points. The reference to this object might be preserved as the return value.

Calls MR_Polyline3_Get_points().

◆ setPoints()

void meshlib.Polyline3.setPoints ( meshlib.VertCoords value)

Modifies a member variable of class MR::Polyline3 named points. The reference to the parameter value might be preserved in this object in element points.

Calls MR_Polyline3_Set_points().

◆ setTopology()

void meshlib.Polyline3.setTopology ( meshlib.PolylineTopology value)

Modifies a member variable of class MR::Polyline3 named topology. The reference to the parameter value might be preserved in this object in element topology.

Calls MR_Polyline3_Set_topology().

◆ splitEdge() [1/2]

meshlib.EdgeId meshlib.Polyline3.splitEdge ( meshlib.EdgeId e)

same, but split given edge on two equal parts Generated from method MR::Polyline3::splitEdge.

Calls MR_Polyline3_splitEdge_1().

◆ splitEdge() [2/2]

meshlib.EdgeId meshlib.Polyline3.splitEdge ( meshlib.EdgeId e,
meshlib.Vector3f newVertPos )

split given edge on two parts: dest(returned-edge) = org(e) - newly created vertex, org(returned-edge) = org(e-before-split), dest(e) = dest(e-before-split) Generated from method MR::Polyline3::splitEdge.

Calls MR_Polyline3_splitEdge_2().

◆ toEdgePoint() [1/2]

meshlib.EdgePoint meshlib.Polyline3.toEdgePoint ( meshlib.EdgeId e,
meshlib.Vector3f p )

converts edge and point's coordinates into edge-point representation Generated from method MR::Polyline3::toEdgePoint.

Calls MR_Polyline3_toEdgePoint_2().

◆ toEdgePoint() [2/2]

meshlib.EdgePoint meshlib.Polyline3.toEdgePoint ( meshlib.VertId v)

converts vertex into edge-point representation Generated from method MR::Polyline3::toEdgePoint.

Calls MR_Polyline3_toEdgePoint_1().

◆ topology()

meshlib.PolylineTopology meshlib.Polyline3.topology ( )

Returns a pointer to a member variable of class MR::Polyline3 named topology. The reference to this object might be preserved as the return value.

Calls MR_Polyline3_Get_topology().

◆ totalLength()

float meshlib.Polyline3.totalLength ( )

returns total length of the polyline Generated from method MR::Polyline3::totalLength.

Calls MR_Polyline3_totalLength().

◆ transform()

void meshlib.Polyline3.transform ( meshlib.AffineXf3f xf)

applies given transformation to all valid polyline vertices Generated from method MR::Polyline3::transform.

Calls MR_Polyline3_transform().


The documentation for this class was generated from the following file: