Provides a triangulation for a surface, a set of surfaces, or more generally a shape. A triangulation consists of an approximate representation of the actual shape, using a collection of points and triangles. The points are located on the surface. The edges of the triangles connect adjacent points with a straight line that approximates the true curve on the surface. A triangulation comprises:
More...
|
| Poly_Triangulation (const Standard_Integer nbNodes, const Standard_Integer nbTriangles, const Standard_Boolean UVNodes) |
| Constructs a triangulation from a set of triangles. The triangulation is initialized without a triangle or a node, but capable of containing nbNodes nodes, and nbTriangles triangles. Here the UVNodes flag indicates whether 2D nodes will be associated with 3D ones, (i.e. to enable a 2D representation). More...
|
|
| Poly_Triangulation (const TColgp_Array1OfPnt &Nodes, const Poly_Array1OfTriangle &Triangles) |
| Constructs a triangulation from a set of triangles. The triangulation is initialized with 3D points from Nodes and triangles from Triangles. More...
|
|
| Poly_Triangulation (const TColgp_Array1OfPnt &Nodes, const TColgp_Array1OfPnt2d &UVNodes, const Poly_Array1OfTriangle &Triangles) |
| Constructs a triangulation from a set of triangles. The triangulation is initialized with 3D points from Nodes, 2D points from UVNodes and triangles from Triangles, where coordinates of a 2D point from UVNodes are the (u, v) parameters of the corresponding 3D point from Nodes on the surface approximated by the constructed triangulation. More...
|
|
virtual Handle< Poly_Triangulation > | Copy () const |
| Creates full copy of current triangulation. More...
|
|
| Poly_Triangulation (const Handle< Poly_Triangulation > &theTriangulation) |
| Copy constructor for triangulation. More...
|
|
Standard_Real | Deflection () const |
| Returns the deflection of this triangulation. More...
|
|
void | Deflection (const Standard_Real theDeflection) |
| Sets the deflection of this triangulation to theDeflection. See more on deflection in Polygon2D. More...
|
|
void | RemoveUVNodes () |
| Deallocates the UV nodes. More...
|
|
Standard_Integer | NbNodes () const |
| Returns the number of nodes for this triangulation. More...
|
|
Standard_Integer | NbTriangles () const |
| Returns the number of triangles for this triangulation. More...
|
|
Standard_Boolean | HasUVNodes () const |
| Returns Standard_True if 2D nodes are associated with 3D nodes for this triangulation. More...
|
|
const TColgp_Array1OfPnt & | Nodes () const |
| Returns the table of 3D nodes (3D points) for this triangulation. More...
|
|
TColgp_Array1OfPnt & | ChangeNodes () |
| Returns the table of 3D nodes (3D points) for this triangulation. The returned array is shared. Therefore if the table is selected by reference, you can, by simply modifying it, directly modify the data structure of this triangulation. More...
|
|
const gp_Pnt & | Node (const Standard_Integer theIndex) const |
| Returns node at the given index. Raises Standard_OutOfRange exception if theIndex is less than 1 or greater than NbNodes. More...
|
|
gp_Pnt & | ChangeNode (const Standard_Integer theIndex) |
| Give access to the node at the given index. Raises Standard_OutOfRange exception if theIndex is less than 1 or greater than NbNodes. More...
|
|
const TColgp_Array1OfPnt2d & | UVNodes () const |
| Returns the table of 2D nodes (2D points) associated with each 3D node of this triangulation. The function HasUVNodes checks if 2D nodes are associated with the 3D nodes of this triangulation. Const reference on the 2d nodes values. More...
|
|
TColgp_Array1OfPnt2d & | ChangeUVNodes () |
| Returns the table of 2D nodes (2D points) associated with each 3D node of this triangulation. Function ChangeUVNodes shares the returned array. Therefore if the table is selected by reference, you can, by simply modifying it, directly modify the data structure of this triangulation. More...
|
|
const gp_Pnt2d & | UVNode (const Standard_Integer theIndex) const |
| Returns UVNode at the given index. Raises Standard_OutOfRange exception if theIndex is less than 1 or greater than NbNodes. More...
|
|
gp_Pnt2d & | ChangeUVNode (const Standard_Integer theIndex) |
| Give access to the UVNode at the given index. Raises Standard_OutOfRange exception if theIndex is less than 1 or greater than NbNodes. More...
|
|
const Poly_Array1OfTriangle & | Triangles () const |
| Returns the table of triangles for this triangulation. More...
|
|
Poly_Array1OfTriangle & | ChangeTriangles () |
| Returns the table of triangles for this triangulation. Function ChangeUVNodes shares the returned array. Therefore if the table is selected by reference, you can, by simply modifying it, directly modify the data structure of this triangulation. More...
|
|
const Poly_Triangle & | Triangle (const Standard_Integer theIndex) const |
| Returns triangle at the given index. Raises Standard_OutOfRange exception if theIndex is less than 1 or greater than NbTriangles. More...
|
|
Poly_Triangle & | ChangeTriangle (const Standard_Integer theIndex) |
| Give access to the triangle at the given index. Raises Standard_OutOfRange exception if theIndex is less than 1 or greater than NbTriangles. More...
|
|
void | SetNormals (const Handle< TShort_HArray1OfShortReal > &theNormals) |
| Sets the table of node normals. raises exception if length of theNormals != 3*NbNodes. More...
|
|
const TShort_Array1OfShortReal & | Normals () const |
| Returns the table of node normals. More...
|
|
TShort_Array1OfShortReal & | ChangeNormals () |
| Gives access to the table of node normals. More...
|
|
Standard_Boolean | HasNormals () const |
| Returns Standard_True if nodal normals are defined. More...
|
|
const gp_Dir | Normal (const Standard_Integer theIndex) const |
|
void | SetNormal (const Standard_Integer theIndex, const gp_Dir &theNormal) |
| Changes normal at the given index. Raises Standard_OutOfRange exception. More...
|
|
Public Member Functions inherited from Standard_Transient |
| Standard_Transient () |
| Empty constructor. More...
|
|
| Standard_Transient (const Standard_Transient &) |
| Copy constructor – does nothing. More...
|
|
Standard_Transient & | operator= (const Standard_Transient &) |
| Assignment operator, needed to avoid copying reference counter. More...
|
|
virtual | ~Standard_Transient () |
| Destructor must be virtual. More...
|
|
virtual void | Delete () const |
| Memory deallocator for transient classes. More...
|
|
virtual const opencascade::handle< Standard_Type > & | DynamicType () const |
| Returns a type descriptor about this object. More...
|
|
Standard_Boolean | IsInstance (const opencascade::handle< Standard_Type > &theType) const |
| Returns a true value if this is an instance of Type. More...
|
|
Standard_Boolean | IsInstance (const Standard_CString theTypeName) const |
| Returns a true value if this is an instance of TypeName. More...
|
|
Standard_Boolean | IsKind (const opencascade::handle< Standard_Type > &theType) const |
| Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
|
|
Standard_Boolean | IsKind (const Standard_CString theTypeName) const |
| Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
|
|
Standard_Transient * | This () const |
| Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero. More...
|
|
Standard_Integer | GetRefCount () const |
| Get the reference counter of this object. More...
|
|
void | IncrementRefCounter () const |
| Increments the reference counter of this object. More...
|
|
Standard_Integer | DecrementRefCounter () const |
| Decrements the reference counter of this object; returns the decremented value. More...
|
|
Provides a triangulation for a surface, a set of surfaces, or more generally a shape. A triangulation consists of an approximate representation of the actual shape, using a collection of points and triangles. The points are located on the surface. The edges of the triangles connect adjacent points with a straight line that approximates the true curve on the surface. A triangulation comprises:
- A table of 3D nodes (3D points on the surface).
- A table of triangles. Each triangle (Poly_Triangle object) comprises a triplet of indices in the table of 3D nodes specific to the triangulation.
- A table of 2D nodes (2D points), parallel to the table of 3D nodes. This table is optional. If it exists, the coordinates of a 2D point are the (u, v) parameters of the corresponding 3D point on the surface approximated by the triangulation.
- A deflection (optional), which maximizes the distance from a point on the surface to the corresponding point on its approximate triangulation. In many cases, algorithms do not need to work with the exact representation of a surface. A triangular representation induces simpler and more robust adjusting, faster performances, and the results are as good. This is a Transient class.