Open CASCADE Technology  7.6.0
Public Member Functions

Poly_Triangulation Class Reference

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...

#include <Poly_Triangulation.hxx>

Inheritance diagram for Poly_Triangulation:
Inheritance graph
[legend]

Public Member Functions

 Poly_Triangulation ()
 Constructs an empty triangulation. More...
 
 Poly_Triangulation (const Standard_Integer theNbNodes, const Standard_Integer theNbTriangles, const Standard_Boolean theHasUVNodes, const Standard_Boolean theHasNormals=false)
 Constructs a triangulation from a set of triangles. The triangulation is initialized without a triangle or a node, but capable of containing specified number of nodes and triangles. 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 ~Poly_Triangulation ()
 Destructor. More...
 
virtual Handle< Poly_TriangulationCopy () 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...
 
const Handle< Poly_TriangulationParameters > & Parameters () const
 Returns initial set of parameters used to generate this triangulation. More...
 
void Parameters (const Handle< Poly_TriangulationParameters > &theParams)
 Updates initial set of parameters used to generate this triangulation. More...
 
virtual void Clear ()
 Clears internal arrays of nodes and all attributes. More...
 
virtual Standard_Boolean HasGeometry () const
 Returns TRUE if triangulation has some geometry. 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...
 
Standard_Boolean HasNormals () const
 Returns Standard_True if nodal normals are defined. More...
 
gp_Pnt Node (Standard_Integer theIndex) const
 Returns a node at the given index. More...
 
void SetNode (Standard_Integer theIndex, const gp_Pnt &thePnt)
 Sets a node coordinates. More...
 
gp_Pnt2d UVNode (Standard_Integer theIndex) const
 Returns UV-node at the given index. More...
 
void SetUVNode (Standard_Integer theIndex, const gp_Pnt2d &thePnt)
 Sets an UV-node coordinates. More...
 
const Poly_TriangleTriangle (Standard_Integer theIndex) const
 Returns triangle at the given index. More...
 
void SetTriangle (Standard_Integer theIndex, const Poly_Triangle &theTriangle)
 Sets a triangle. More...
 
gp_Dir Normal (Standard_Integer theIndex) const
 Returns normal at the given index. More...
 
void Normal (Standard_Integer theIndex, gp_Vec3f &theVec3) const
 Returns normal at the given index. More...
 
void SetNormal (const Standard_Integer theIndex, const gp_Vec3f &theNormal)
 Changes normal at the given index. More...
 
void SetNormal (const Standard_Integer theIndex, const gp_Dir &theNormal)
 Changes normal at the given index. More...
 
Poly_MeshPurpose MeshPurpose () const
 Returns mesh purpose bits. More...
 
void SetMeshPurpose (const Poly_MeshPurpose thePurpose)
 Sets mesh purpose bits. More...
 
const Bnd_BoxCachedMinMax () const
 Returns cached min - max range of triangulation data, which is VOID by default (e.g, no cached information). More...
 
void SetCachedMinMax (const Bnd_Box &theBox)
 Sets a cached min - max range of this triangulation. The bounding box should exactly match actual range of triangulation data without a gap or transformation, or otherwise undefined behavior will be observed. Passing a VOID range invalidates the cache. More...
 
Standard_Boolean HasCachedMinMax () const
 Returns TRUE if there is some cached min - max range of this triangulation. More...
 
void UpdateCachedMinMax ()
 Updates cached min - max range of this triangulation with bounding box of nodal data. More...
 
Standard_Boolean MinMax (Bnd_Box &theBox, const gp_Trsf &theTrsf, const bool theIsAccurate=false) const
 Extends the passed box with bounding box of this triangulation. Uses cached min - max range when available and: More...
 
virtual void DumpJson (Standard_OStream &theOStream, Standard_Integer theDepth=-1) const
 Dumps the content of me into the stream. More...
 
bool IsDoublePrecision () const
 Returns TRUE if node positions are defined with double precision; TRUE by default. More...
 
void SetDoublePrecision (bool theIsDouble)
 Set if node positions should be defined with double or single precision for 3D and UV nodes. Raises exception if data was already allocated. More...
 
void ResizeNodes (Standard_Integer theNbNodes, Standard_Boolean theToCopyOld)
 Method resizing internal arrays of nodes (synchronously for all attributes). More...
 
void ResizeTriangles (Standard_Integer theNbTriangles, Standard_Boolean theToCopyOld)
 Method resizing an internal array of triangles. More...
 
void AddUVNodes ()
 If an array for UV coordinates is not allocated yet, do it now. More...
 
void RemoveUVNodes ()
 Deallocates the UV nodes array. More...
 
void AddNormals ()
 If an array for normals is not allocated yet, do it now. More...
 
void RemoveNormals ()
 Deallocates the normals array. More...
 
void ComputeNormals ()
 Compute smooth normals by averaging triangle normals. More...
 
Handle< TColgp_HArray1OfPnt > MapNodeArray () const
 Returns the table of 3D points for read-only access or NULL if nodes array is undefined. Poly_Triangulation::Node() should be used instead when possible. Returned object should not be used after Poly_Triangulation destruction. More...
 
Handle< Poly_HArray1OfTriangle > MapTriangleArray () const
 Returns the triangle array for read-only access or NULL if triangle array is undefined. Poly_Triangulation::Triangle() should be used instead when possible. Returned object should not be used after Poly_Triangulation destruction. More...
 
Handle< TColgp_HArray1OfPnt2d > MapUVNodeArray () const
 Returns the table of 2D nodes for read-only access or NULL if UV nodes array is undefined. Poly_Triangulation::UVNode() should be used instead when possible. Returned object should not be used after Poly_Triangulation destruction. More...
 
Handle< TShort_HArray1OfShortReal > MapNormalArray () const
 Returns the table of per-vertex normals for read-only access or NULL if normals array is undefined. Poly_Triangulation::Normal() should be used instead when possible. Returned object should not be used after Poly_Triangulation destruction. More...
 
Poly_Array1OfTriangleInternalTriangles ()
 Returns an internal array of triangles. Triangle()/SetTriangle() should be used instead in portable code. More...
 
Poly_ArrayOfNodesInternalNodes ()
 Returns an internal array of nodes. Node()/SetNode() should be used instead in portable code. More...
 
Poly_ArrayOfUVNodesInternalUVNodes ()
 Returns an internal array of UV nodes. UBNode()/SetUVNode() should be used instead in portable code. More...
 
NCollection_Array1< gp_Vec3f > & InternalNormals ()
 Return an internal array of normals. Normal()/SetNormal() should be used instead in portable code. More...
 
void SetNormals (const Handle< TShort_HArray1OfShortReal > &theNormals)
 
const Poly_Array1OfTriangleTriangles () const
 
Poly_Array1OfTriangleChangeTriangles ()
 
Poly_TriangleChangeTriangle (const Standard_Integer theIndex)
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (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_TransientThis () 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...
 

late-load deferred data interface

Bnd_BoxmyCachedMinMax
 Returns number of deferred nodes that can be loaded using LoadDeferredData(). Note: this is estimated values, which might be different from actually loaded values. Always check triangulation size of actually loaded data in code to avoid out-of-range issues. More...
 
Standard_Real myDeflection
 Returns number of deferred nodes that can be loaded using LoadDeferredData(). Note: this is estimated values, which might be different from actually loaded values. Always check triangulation size of actually loaded data in code to avoid out-of-range issues. More...
 
Poly_ArrayOfNodes myNodes
 Returns number of deferred nodes that can be loaded using LoadDeferredData(). Note: this is estimated values, which might be different from actually loaded values. Always check triangulation size of actually loaded data in code to avoid out-of-range issues. More...
 
Poly_Array1OfTriangle myTriangles
 Returns number of deferred nodes that can be loaded using LoadDeferredData(). Note: this is estimated values, which might be different from actually loaded values. Always check triangulation size of actually loaded data in code to avoid out-of-range issues. More...
 
Poly_ArrayOfUVNodes myUVNodes
 Returns number of deferred nodes that can be loaded using LoadDeferredData(). Note: this is estimated values, which might be different from actually loaded values. Always check triangulation size of actually loaded data in code to avoid out-of-range issues. More...
 
NCollection_Array1< gp_Vec3fmyNormals
 Returns number of deferred nodes that can be loaded using LoadDeferredData(). Note: this is estimated values, which might be different from actually loaded values. Always check triangulation size of actually loaded data in code to avoid out-of-range issues. More...
 
Poly_MeshPurpose myPurpose
 Returns number of deferred nodes that can be loaded using LoadDeferredData(). Note: this is estimated values, which might be different from actually loaded values. Always check triangulation size of actually loaded data in code to avoid out-of-range issues. More...
 
Handle< Poly_TriangulationParametersmyParams
 Returns number of deferred nodes that can be loaded using LoadDeferredData(). Note: this is estimated values, which might be different from actually loaded values. Always check triangulation size of actually loaded data in code to avoid out-of-range issues. More...
 
virtual Standard_Integer NbDeferredNodes () const
 Returns number of deferred nodes that can be loaded using LoadDeferredData(). Note: this is estimated values, which might be different from actually loaded values. Always check triangulation size of actually loaded data in code to avoid out-of-range issues. More...
 
virtual Standard_Integer NbDeferredTriangles () const
 Returns number of deferred triangles that can be loaded using LoadDeferredData(). Note: this is estimated values, which might be different from actually loaded values Always check triangulation size of actually loaded data in code to avoid out-of-range issues. More...
 
virtual Standard_Boolean HasDeferredData () const
 Returns TRUE if there is some triangulation data that can be loaded using LoadDeferredData(). More...
 
virtual Standard_Boolean LoadDeferredData (const Handle< OSD_FileSystem > &theFileSystem=Handle< OSD_FileSystem >())
 Loads triangulation data into itself from some deferred storage using specified shared input file system. More...
 
virtual Handle< Poly_TriangulationDetachedLoadDeferredData (const Handle< OSD_FileSystem > &theFileSystem=Handle< OSD_FileSystem >()) const
 Loads triangulation data into new Poly_Triangulation object from some deferred storage using specified shared input file system. More...
 
virtual Standard_Boolean UnloadDeferredData ()
 Releases triangulation data if it has connected deferred storage. More...
 
virtual Handle< Poly_TriangulationcreateNewEntity () const
 Creates new triangulation object (can be inheritor of Poly_Triangulation). More...
 
virtual Standard_Boolean loadDeferredData (const Handle< OSD_FileSystem > &theFileSystem, const Handle< Poly_Triangulation > &theDestTriangulation) const
 Load triangulation data from deferred storage using specified shared input file system. More...
 
void unsetCachedMinMax ()
 Clears cached min - max range saved previously. More...
 
virtual Bnd_Box computeBoundingBox (const gp_Trsf &theTrsf) const
 Calculates bounding box of nodal data. More...
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object. More...
 
- Static Public Member Functions inherited from Standard_Transient
static const char * get_type_name ()
 Returns a type descriptor about this object. More...
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class. More...
 

Detailed Description

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:

Constructor & Destructor Documentation

◆ Poly_Triangulation() [1/5]

Poly_Triangulation::Poly_Triangulation ( )

Constructs an empty triangulation.

◆ Poly_Triangulation() [2/5]

Poly_Triangulation::Poly_Triangulation ( const Standard_Integer  theNbNodes,
const Standard_Integer  theNbTriangles,
const Standard_Boolean  theHasUVNodes,
const Standard_Boolean  theHasNormals = false 
)

Constructs a triangulation from a set of triangles. The triangulation is initialized without a triangle or a node, but capable of containing specified number of nodes and triangles.

Parameters
theNbNodes[in] number of nodes to allocate
theNbTriangles[in] number of triangles to allocate
theHasUVNodes[in] indicates whether 2D nodes will be associated with 3D ones, (i.e. to enable a 2D representation)
theHasNormals[in] indicates whether normals will be given and associated with nodes

◆ Poly_Triangulation() [3/5]

Poly_Triangulation::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.

◆ Poly_Triangulation() [4/5]

Poly_Triangulation::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.

◆ ~Poly_Triangulation()

virtual Poly_Triangulation::~Poly_Triangulation ( )
virtual

Destructor.

◆ Poly_Triangulation() [5/5]

Poly_Triangulation::Poly_Triangulation ( const Handle< Poly_Triangulation > &  theTriangulation)

Copy constructor for triangulation.

Member Function Documentation

◆ AddNormals()

void Poly_Triangulation::AddNormals ( )

If an array for normals is not allocated yet, do it now.

◆ AddUVNodes()

void Poly_Triangulation::AddUVNodes ( )

If an array for UV coordinates is not allocated yet, do it now.

◆ CachedMinMax()

const Bnd_Box& Poly_Triangulation::CachedMinMax ( ) const

Returns cached min - max range of triangulation data, which is VOID by default (e.g, no cached information).

◆ ChangeTriangle()

Poly_Triangle& Poly_Triangulation::ChangeTriangle ( const Standard_Integer  theIndex)
inline
Deprecated:
("Deprecated method, SetTriangle() should be used instead")

◆ ChangeTriangles()

Poly_Array1OfTriangle& Poly_Triangulation::ChangeTriangles ( )
inline
Deprecated:
("Deprecated method, SetTriangle() should be used instead")

◆ Clear()

virtual void Poly_Triangulation::Clear ( )
virtual

Clears internal arrays of nodes and all attributes.

◆ computeBoundingBox()

virtual Bnd_Box Poly_Triangulation::computeBoundingBox ( const gp_Trsf theTrsf) const
protectedvirtual

Calculates bounding box of nodal data.

Parameters
theTrsf[in] optional transformation.

◆ ComputeNormals()

void Poly_Triangulation::ComputeNormals ( )

Compute smooth normals by averaging triangle normals.

◆ Copy()

virtual Handle< Poly_Triangulation > Poly_Triangulation::Copy ( ) const
virtual

Creates full copy of current triangulation.

◆ createNewEntity()

virtual Handle< Poly_Triangulation > Poly_Triangulation::createNewEntity ( ) const
inlineprotectedvirtual

Creates new triangulation object (can be inheritor of Poly_Triangulation).

◆ Deflection() [1/2]

Standard_Real Poly_Triangulation::Deflection ( ) const
inline

Returns the deflection of this triangulation.

◆ Deflection() [2/2]

void Poly_Triangulation::Deflection ( const Standard_Real  theDeflection)
inline

Sets the deflection of this triangulation to theDeflection. See more on deflection in Polygon2D.

◆ DetachedLoadDeferredData()

virtual Handle< Poly_Triangulation > Poly_Triangulation::DetachedLoadDeferredData ( const Handle< OSD_FileSystem > &  theFileSystem = HandleOSD_FileSystem >()) const
virtual

Loads triangulation data into new Poly_Triangulation object from some deferred storage using specified shared input file system.

◆ DumpJson()

virtual void Poly_Triangulation::DumpJson ( Standard_OStream theOStream,
Standard_Integer  theDepth = -1 
) const
virtual

Dumps the content of me into the stream.

◆ HasCachedMinMax()

Standard_Boolean Poly_Triangulation::HasCachedMinMax ( ) const
inline

Returns TRUE if there is some cached min - max range of this triangulation.

◆ HasDeferredData()

virtual Standard_Boolean Poly_Triangulation::HasDeferredData ( ) const
inlinevirtual

Returns TRUE if there is some triangulation data that can be loaded using LoadDeferredData().

Reimplemented in RWGltf_GltfLatePrimitiveArray.

◆ HasGeometry()

virtual Standard_Boolean Poly_Triangulation::HasGeometry ( ) const
inlinevirtual

Returns TRUE if triangulation has some geometry.

◆ HasNormals()

Standard_Boolean Poly_Triangulation::HasNormals ( ) const
inline

Returns Standard_True if nodal normals are defined.

◆ HasUVNodes()

Standard_Boolean Poly_Triangulation::HasUVNodes ( ) const
inline

Returns Standard_True if 2D nodes are associated with 3D nodes for this triangulation.

◆ InternalNodes()

Poly_ArrayOfNodes& Poly_Triangulation::InternalNodes ( )
inline

Returns an internal array of nodes. Node()/SetNode() should be used instead in portable code.

◆ InternalNormals()

NCollection_Array1<gp_Vec3f>& Poly_Triangulation::InternalNormals ( )
inline

Return an internal array of normals. Normal()/SetNormal() should be used instead in portable code.

◆ InternalTriangles()

Poly_Array1OfTriangle& Poly_Triangulation::InternalTriangles ( )
inline

Returns an internal array of triangles. Triangle()/SetTriangle() should be used instead in portable code.

◆ InternalUVNodes()

Poly_ArrayOfUVNodes& Poly_Triangulation::InternalUVNodes ( )
inline

Returns an internal array of UV nodes. UBNode()/SetUVNode() should be used instead in portable code.

◆ IsDoublePrecision()

bool Poly_Triangulation::IsDoublePrecision ( ) const
inline

Returns TRUE if node positions are defined with double precision; TRUE by default.

◆ loadDeferredData()

virtual Standard_Boolean Poly_Triangulation::loadDeferredData ( const Handle< OSD_FileSystem > &  theFileSystem,
const Handle< Poly_Triangulation > &  theDestTriangulation 
) const
inlineprotectedvirtual

Load triangulation data from deferred storage using specified shared input file system.

Reimplemented in RWMesh_TriangulationSource.

◆ LoadDeferredData()

virtual Standard_Boolean Poly_Triangulation::LoadDeferredData ( const Handle< OSD_FileSystem > &  theFileSystem = HandleOSD_FileSystem >())
virtual

Loads triangulation data into itself from some deferred storage using specified shared input file system.

◆ MapNodeArray()

Handle< TColgp_HArray1OfPnt > Poly_Triangulation::MapNodeArray ( ) const

Returns the table of 3D points for read-only access or NULL if nodes array is undefined. Poly_Triangulation::Node() should be used instead when possible. Returned object should not be used after Poly_Triangulation destruction.

◆ MapNormalArray()

Handle< TShort_HArray1OfShortReal > Poly_Triangulation::MapNormalArray ( ) const

Returns the table of per-vertex normals for read-only access or NULL if normals array is undefined. Poly_Triangulation::Normal() should be used instead when possible. Returned object should not be used after Poly_Triangulation destruction.

◆ MapTriangleArray()

Handle< Poly_HArray1OfTriangle > Poly_Triangulation::MapTriangleArray ( ) const

Returns the triangle array for read-only access or NULL if triangle array is undefined. Poly_Triangulation::Triangle() should be used instead when possible. Returned object should not be used after Poly_Triangulation destruction.

◆ MapUVNodeArray()

Handle< TColgp_HArray1OfPnt2d > Poly_Triangulation::MapUVNodeArray ( ) const

Returns the table of 2D nodes for read-only access or NULL if UV nodes array is undefined. Poly_Triangulation::UVNode() should be used instead when possible. Returned object should not be used after Poly_Triangulation destruction.

◆ MeshPurpose()

Poly_MeshPurpose Poly_Triangulation::MeshPurpose ( ) const
inline

Returns mesh purpose bits.

◆ MinMax()

Standard_Boolean Poly_Triangulation::MinMax ( Bnd_Box theBox,
const gp_Trsf theTrsf,
const bool  theIsAccurate = false 
) const

Extends the passed box with bounding box of this triangulation. Uses cached min - max range when available and:

  • input transformation theTrsf has no rotation part;
  • theIsAccurate is set to FALSE;
  • no triangulation data available (e.g. it is deferred and not loaded).
    Parameters
    theBox[in] [out] bounding box to extend by this triangulation
    theTrsf[in] optional transformation
    theIsAccurate[in] when FALSE, allows using a cached min - max range of this triangulation even for non-identity transformation.
    Returns
    FALSE if there is no any data to extend the passed box (no both triangulation and cached min - max range).

◆ NbDeferredNodes()

virtual Standard_Integer Poly_Triangulation::NbDeferredNodes ( ) const
inlinevirtual

Returns number of deferred nodes that can be loaded using LoadDeferredData(). Note: this is estimated values, which might be different from actually loaded values. Always check triangulation size of actually loaded data in code to avoid out-of-range issues.

Reimplemented in RWMesh_TriangulationSource.

◆ NbDeferredTriangles()

virtual Standard_Integer Poly_Triangulation::NbDeferredTriangles ( ) const
inlinevirtual

Returns number of deferred triangles that can be loaded using LoadDeferredData(). Note: this is estimated values, which might be different from actually loaded values Always check triangulation size of actually loaded data in code to avoid out-of-range issues.

Reimplemented in RWMesh_TriangulationSource.

◆ NbNodes()

Standard_Integer Poly_Triangulation::NbNodes ( ) const
inline

Returns the number of nodes for this triangulation.

◆ NbTriangles()

Standard_Integer Poly_Triangulation::NbTriangles ( ) const
inline

Returns the number of triangles for this triangulation.

◆ Node()

gp_Pnt Poly_Triangulation::Node ( Standard_Integer  theIndex) const
inline

Returns a node at the given index.

◆ Normal() [1/2]

gp_Dir Poly_Triangulation::Normal ( Standard_Integer  theIndex) const
inline

Returns normal at the given index.

◆ Normal() [2/2]

void Poly_Triangulation::Normal ( Standard_Integer  theIndex,
gp_Vec3f theVec3 
) const
inline

Returns normal at the given index.

◆ Parameters() [1/2]

const Handle< Poly_TriangulationParameters >& Poly_Triangulation::Parameters ( ) const
inline

Returns initial set of parameters used to generate this triangulation.

◆ Parameters() [2/2]

void Poly_Triangulation::Parameters ( const Handle< Poly_TriangulationParameters > &  theParams)
inline

Updates initial set of parameters used to generate this triangulation.

◆ RemoveNormals()

void Poly_Triangulation::RemoveNormals ( )

Deallocates the normals array.

◆ RemoveUVNodes()

void Poly_Triangulation::RemoveUVNodes ( )

Deallocates the UV nodes array.

◆ ResizeNodes()

void Poly_Triangulation::ResizeNodes ( Standard_Integer  theNbNodes,
Standard_Boolean  theToCopyOld 
)

Method resizing internal arrays of nodes (synchronously for all attributes).

Parameters
theNbNodes[in] new number of nodes
theToCopyOld[in] copy old nodes into the new array

◆ ResizeTriangles()

void Poly_Triangulation::ResizeTriangles ( Standard_Integer  theNbTriangles,
Standard_Boolean  theToCopyOld 
)

Method resizing an internal array of triangles.

Parameters
theNbTriangles[in] new number of triangles
theToCopyOld[in] copy old triangles into the new array

◆ SetCachedMinMax()

void Poly_Triangulation::SetCachedMinMax ( const Bnd_Box theBox)

Sets a cached min - max range of this triangulation. The bounding box should exactly match actual range of triangulation data without a gap or transformation, or otherwise undefined behavior will be observed. Passing a VOID range invalidates the cache.

◆ SetDoublePrecision()

void Poly_Triangulation::SetDoublePrecision ( bool  theIsDouble)

Set if node positions should be defined with double or single precision for 3D and UV nodes. Raises exception if data was already allocated.

◆ SetMeshPurpose()

void Poly_Triangulation::SetMeshPurpose ( const Poly_MeshPurpose  thePurpose)
inline

Sets mesh purpose bits.

◆ SetNode()

void Poly_Triangulation::SetNode ( Standard_Integer  theIndex,
const gp_Pnt thePnt 
)
inline

Sets a node coordinates.

◆ SetNormal() [1/2]

void Poly_Triangulation::SetNormal ( const Standard_Integer  theIndex,
const gp_Dir theNormal 
)
inline

Changes normal at the given index.

◆ SetNormal() [2/2]

void Poly_Triangulation::SetNormal ( const Standard_Integer  theIndex,
const gp_Vec3f theNormal 
)
inline

Changes normal at the given index.

◆ SetNormals()

void Poly_Triangulation::SetNormals ( const Handle< TShort_HArray1OfShortReal > &  theNormals)
Deprecated:
("Deprecated method, SetNormal() should be used instead")

◆ SetTriangle()

void Poly_Triangulation::SetTriangle ( Standard_Integer  theIndex,
const Poly_Triangle theTriangle 
)
inline

Sets a triangle.

◆ SetUVNode()

void Poly_Triangulation::SetUVNode ( Standard_Integer  theIndex,
const gp_Pnt2d thePnt 
)
inline

Sets an UV-node coordinates.

◆ Triangle()

const Poly_Triangle& Poly_Triangulation::Triangle ( Standard_Integer  theIndex) const
inline

Returns triangle at the given index.

◆ Triangles()

const Poly_Array1OfTriangle& Poly_Triangulation::Triangles ( ) const
inline
Deprecated:
("Deprecated method, Triangle() should be used instead")

◆ UnloadDeferredData()

virtual Standard_Boolean Poly_Triangulation::UnloadDeferredData ( )
virtual

Releases triangulation data if it has connected deferred storage.

◆ unsetCachedMinMax()

void Poly_Triangulation::unsetCachedMinMax ( )
protected

Clears cached min - max range saved previously.

◆ UpdateCachedMinMax()

void Poly_Triangulation::UpdateCachedMinMax ( )
inline

Updates cached min - max range of this triangulation with bounding box of nodal data.

◆ UVNode()

gp_Pnt2d Poly_Triangulation::UVNode ( Standard_Integer  theIndex) const
inline

Returns UV-node at the given index.

Field Documentation

◆ myCachedMinMax

Bnd_Box* Poly_Triangulation::myCachedMinMax
protected

Returns number of deferred nodes that can be loaded using LoadDeferredData(). Note: this is estimated values, which might be different from actually loaded values. Always check triangulation size of actually loaded data in code to avoid out-of-range issues.

◆ myDeflection

Standard_Real Poly_Triangulation::myDeflection
protected

Returns number of deferred nodes that can be loaded using LoadDeferredData(). Note: this is estimated values, which might be different from actually loaded values. Always check triangulation size of actually loaded data in code to avoid out-of-range issues.

◆ myNodes

Poly_ArrayOfNodes Poly_Triangulation::myNodes
protected

Returns number of deferred nodes that can be loaded using LoadDeferredData(). Note: this is estimated values, which might be different from actually loaded values. Always check triangulation size of actually loaded data in code to avoid out-of-range issues.

◆ myNormals

NCollection_Array1<gp_Vec3f> Poly_Triangulation::myNormals
protected

Returns number of deferred nodes that can be loaded using LoadDeferredData(). Note: this is estimated values, which might be different from actually loaded values. Always check triangulation size of actually loaded data in code to avoid out-of-range issues.

◆ myParams

Handle< Poly_TriangulationParameters > Poly_Triangulation::myParams
protected

Returns number of deferred nodes that can be loaded using LoadDeferredData(). Note: this is estimated values, which might be different from actually loaded values. Always check triangulation size of actually loaded data in code to avoid out-of-range issues.

◆ myPurpose

Poly_MeshPurpose Poly_Triangulation::myPurpose
protected

Returns number of deferred nodes that can be loaded using LoadDeferredData(). Note: this is estimated values, which might be different from actually loaded values. Always check triangulation size of actually loaded data in code to avoid out-of-range issues.

◆ myTriangles

Poly_Array1OfTriangle Poly_Triangulation::myTriangles
protected

Returns number of deferred nodes that can be loaded using LoadDeferredData(). Note: this is estimated values, which might be different from actually loaded values. Always check triangulation size of actually loaded data in code to avoid out-of-range issues.

◆ myUVNodes

Poly_ArrayOfUVNodes Poly_Triangulation::myUVNodes
protected

Returns number of deferred nodes that can be loaded using LoadDeferredData(). Note: this is estimated values, which might be different from actually loaded values. Always check triangulation size of actually loaded data in code to avoid out-of-range issues.


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