DATAKIT API  V2025.1
Dtk_Loop Class Reference

Dtk_Loop is bound of a face it can be outer or inner. More...

+ Inheritance diagram for Dtk_Loop:

Public Member Functions

virtual Dtk_ErrorStatus _Store (void *)
 
Dtk_ErrorStatus AddCoedge (const Dtk_CoedgePtr &inCoedge, const Dtk_bool &inCoedgeOrientation)
 Add coedge to the loop. More...
 
Dtk_ErrorStatus Compute3DBoundaries (Dtk_tab< Dtk_CurvePtr > &out3DBound, Dtk_bool inComputeFlag=0) const
 Compute an array of consecutive 3D curves representing the loop. More...
 
Dtk_ErrorStatus ComputeBoundingBox (Dtk_pnt &outMin, Dtk_pnt &outMax)
 Compute bounding Box of 3d Boundaries if they exist. More...
 
Dtk_ErrorStatus ComputeUVBoundaries (Dtk_tab< Dtk_CurvePtr > &outUVBound, Dtk_bool inComputeFlag=0) const
 Compute an array of consecutive UV curves representing the loop. More...
 
Dtk_ErrorStatus ComputeUVBoundingBox (Dtk_pnt &outMin, Dtk_pnt &outMax, Dtk_bool inComputeFlag=DTK_FALSE)
 Compute bounding Box of UV Boundaries if they exist. More...
 
int DtkDynamicType (const int &inId)
 Get smart pointer type. More...
 
virtual void dump (FILE *file=stdout)
 
Dtk_InfoPtr get_info () const
 
type_detk get_type_detk () const
 Return Type of entity. More...
 
Dtk_ErrorStatus GetCoedge (const Dtk_Size_t &inIndex, Dtk_CoedgePtr &outCoedge, Dtk_bool &outCoedgeOrientation) const
 Get a coedge in the loop. More...
 
Dtk_ErrorStatus GetCoedge (const Dtk_Size_t &inIndex, Dtk_ID &outCoedgeId, Dtk_bool &outCoedgeOrientation) const
 
Dtk_ErrorStatus GetCoedgeIndex (Dtk_CoedgePtr &inCoedge, Dtk_Size_t &outIndex) const
 Get an index of a coedge in the loop. More...
 
const Dtk_IDGetID () const
 Get Internal UniqueID. More...
 
Dtk_Size_t GetNumCoedges () const
 Return number of coedge in the loop. More...
 
Dtk_bool GetOrientation () const
 Return orientation for Loop relative to face. More...
 
Dtk_ErrorStatus GetParentFace (Dtk_FacePtr &outParentFace) const
 Return pointer on parent face. More...
 
virtual Dtk_Size_t GetSize () const
 
Dtk_ID GetTopoID () const
 
Dtk_ErrorStatus GetTopologyStatus () const
 
Dtk_ErrorStatus GetVertexLoop (Dtk_VertexPtr &outVertexLoop) const
 Return vertex loop. More...
 
Dtk_InfoPtrinfo ()
 
Dtk_ErrorStatus InverseCoedgeOrientation () const
 Inverse sens of all coedges in the loop. More...
 
Dtk_bool IsOuter () const
 Return true if Loop is outer. More...
 
Dtk_bool IsVertexLoop () const
 Return true if Loop is a vertex loop. More...
 
virtual void PrepareTransfo ()
 
Dtk_ErrorStatus RemoveCoedgeFromLoop (const Dtk_CoedgePtr &inCoedge)
 
Dtk_ErrorStatus SetCoedges (const Dtk_tab< Dtk_CoedgePtr > &inCoedgeArray, const Dtk_tab< Dtk_bool > &inCoedgeOrientationArray)
 
Dtk_ErrorStatus SetOrientation (const Dtk_bool &inOrientation)
 Set orientation for Loop relative to face. More...
 
Dtk_ErrorStatus SetOuterInfo (const Dtk_bool &inIsOuter)
 
Dtk_ErrorStatus SetParentBody (const Dtk_BodyPtr &inParentBody)
 
Dtk_ErrorStatus SetParentFace (const Dtk_FacePtr &inParentFace)
 Set pointer on parent face. More...
 
Dtk_ErrorStatus SetParentFace (const Dtk_ID &inParentFaceId)
 
void SetTopologyStatus (Dtk_ErrorStatus inStatus)
 
Dtk_ErrorStatus SetVertexLoop (const Dtk_VertexPtr inVertexLoop)
 Set vertex loop. More...
 
virtual Dtk_ErrorStatus Transform (const Dtk_transfo &inTransfo)
 Transform object. More...
 

Static Public Member Functions

static Dtk_LoopPtr Create (const Dtk_BodyPtr &inParentBody)
 Create a loop in a body. More...
 
static Dtk_LoopPtr Create (const Dtk_BodyPtr &inParentBody, Dtk_UInt32 inCoedgeReserve)
 Create a loop in a body. More...
 
static Dtk_LoopDtkDynamicCast (Dtk_Object *s)
 

Protected Types

enum  { _typeID = DTK_TYPE_TOPOLOGICAL_REPRESENTATION_ITEM }
 
enum  { _typeID = DTK_TYPE_ENTITY }
 
enum  { _typeID = DTK_TYPE_LOOP }
 

Protected Member Functions

void _Clone (Dtk_TopologicalEntityPtr &outTopo, Dtk_Body *_inParentBody)
 
void _copy (const Dtk_Entity &s)
 
void _Copy (const Dtk_Loop &inTopo, Dtk_Body *inParentBody)
 
void _copy (const Dtk_Object &s)
 
void _init ()
 
void _Init ()
 
void _reset ()
 
void _Reset ()
 
virtual Dtk_ObjectClone ()
 
 Dtk_Loop ()
 
 Dtk_Loop (const Dtk_Loop &inTopo, Dtk_Body *inParentBody)
 
Dtk_ErrorStatus GetParentBody (Dtk_Body *&outParentBody) const
 
Dtk_ErrorStatus SetCoedge (const Dtk_Size_t &inIndex, const Dtk_CoedgePtr &inCoedge, const Dtk_bool &inOrientation)
 
virtual ~Dtk_Loop ()
 

Protected Attributes

Dtk_Handle * _Private
 
unsigned long count_
 

Friends

class Dtk_SmartPtr< Dtk_Loop >
 
class Dtk_TopologicalEntity
 

Detailed Description

Dtk_Loop is bound of a face it can be outer or inner.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protectedinherited
Enumerator
_typeID 

◆ anonymous enum

anonymous enum
protectedinherited
Enumerator
_typeID 

◆ anonymous enum

anonymous enum
protected
Enumerator
_typeID 
388 { _typeID = DTK_TYPE_LOOP };

Constructor & Destructor Documentation

◆ Dtk_Loop() [1/2]

Dtk_Loop::Dtk_Loop ( )
protected

◆ Dtk_Loop() [2/2]

Dtk_Loop::Dtk_Loop ( const Dtk_Loop inTopo,
Dtk_Body inParentBody 
)
protected

◆ ~Dtk_Loop()

virtual Dtk_Loop::~Dtk_Loop ( )
protectedvirtual

Member Function Documentation

◆ _Clone()

void Dtk_Loop::_Clone ( Dtk_TopologicalEntityPtr outTopo,
Dtk_Body _inParentBody 
)
protectedvirtual

Implements Dtk_TopologicalEntity.

◆ _copy() [1/2]

void Dtk_Entity::_copy ( const Dtk_Entity s)
protectedinherited

◆ _Copy()

void Dtk_Loop::_Copy ( const Dtk_Loop inTopo,
Dtk_Body inParentBody 
)
protected

◆ _copy() [2/2]

void Dtk_Object::_copy ( const Dtk_Object s)
protectedinherited

◆ _init()

void Dtk_Entity::_init ( )
protectedinherited

◆ _Init()

void Dtk_Loop::_Init ( )
protected

◆ _reset()

void Dtk_Entity::_reset ( )
protectedinherited

◆ _Reset()

void Dtk_Loop::_Reset ( )
protected

◆ _Store()

virtual Dtk_ErrorStatus Dtk_Loop::_Store ( void *  )
virtual

Reimplemented from Dtk_Entity.

◆ AddCoedge()

Dtk_ErrorStatus Dtk_Loop::AddCoedge ( const Dtk_CoedgePtr inCoedge,
const Dtk_bool inCoedgeOrientation 
)

Add coedge to the loop.

Parameters
[in]inCoedge : pointer on coedge you add
[in]inCoedgeOrientation : orientation of coedge in the loop (true is loop and coedge go in same sens)
Returns
Dtk_ErrorStatus: dtkNoError if OK

◆ Clone()

virtual Dtk_Object* Dtk_TopologicalEntity::Clone ( )
protectedvirtualinherited

Implements Dtk_Entity.

37 {return NULL;}

◆ Compute3DBoundaries()

Dtk_ErrorStatus Dtk_Loop::Compute3DBoundaries ( Dtk_tab< Dtk_CurvePtr > &  out3DBound,
Dtk_bool  inComputeFlag = 0 
) const

Compute an array of consecutive 3D curves representing the loop.

Parameters
[out]

◆ ComputeBoundingBox()

Dtk_ErrorStatus Dtk_Loop::ComputeBoundingBox ( Dtk_pnt outMin,
Dtk_pnt outMax 
)

Compute bounding Box of 3d Boundaries if they exist.

Parameters
[out]

◆ ComputeUVBoundaries()

Dtk_ErrorStatus Dtk_Loop::ComputeUVBoundaries ( Dtk_tab< Dtk_CurvePtr > &  outUVBound,
Dtk_bool  inComputeFlag = 0 
) const

Compute an array of consecutive UV curves representing the loop.

Parameters
[out]

◆ ComputeUVBoundingBox()

Dtk_ErrorStatus Dtk_Loop::ComputeUVBoundingBox ( Dtk_pnt outMin,
Dtk_pnt outMax,
Dtk_bool  inComputeFlag = DTK_FALSE 
)

Compute bounding Box of UV Boundaries if they exist.

Parameters
[out]

◆ Create() [1/2]

static Dtk_LoopPtr Dtk_Loop::Create ( const Dtk_BodyPtr inParentBody)
static

Create a loop in a body.

Parameters
[in]inParentBody: parent body
Returns
static Dtk_LoopPtr

◆ Create() [2/2]

static Dtk_LoopPtr Dtk_Loop::Create ( const Dtk_BodyPtr inParentBody,
Dtk_UInt32  inCoedgeReserve 
)
static

Create a loop in a body.

Parameters
[in]inParentBody: parent body
[in]inCoedgeReserve: Coedge size to reserve
Returns
static Dtk_LoopPtr

◆ DtkDynamicCast()

static Dtk_Loop* Dtk_Loop::DtkDynamicCast ( Dtk_Object s)
static

◆ DtkDynamicType()

int Dtk_Loop::DtkDynamicType ( const int &  inId)
virtual

Get smart pointer type.

Parameters
[in]inId:
Returns
int

Reimplemented from Dtk_TopologicalEntity.

◆ dump()

virtual void Dtk_Object::dump ( FILE *  file = stdout)
virtualinherited

◆ get_info()

Dtk_InfoPtr Dtk_Entity::get_info ( ) const
inherited

◆ get_type_detk()

type_detk Dtk_Loop::get_type_detk ( ) const
virtual

Return Type of entity.

Returns
enum type_detk

Reimplemented from Dtk_TopologicalEntity.

◆ GetCoedge() [1/2]

Dtk_ErrorStatus Dtk_Loop::GetCoedge ( const Dtk_Size_t inIndex,
Dtk_CoedgePtr outCoedge,
Dtk_bool outCoedgeOrientation 
) const

Get a coedge in the loop.

Parameters
[in]inIndex index of coedge to get
[out]outCoedge : pointer on coedge you ask
[out]outCoedgeOrientation : orientation of coedge in the loop
Returns
Dtk_ErrorStatus: dtkNoError if OK

◆ GetCoedge() [2/2]

Dtk_ErrorStatus Dtk_Loop::GetCoedge ( const Dtk_Size_t inIndex,
Dtk_ID outCoedgeId,
Dtk_bool outCoedgeOrientation 
) const

◆ GetCoedgeIndex()

Dtk_ErrorStatus Dtk_Loop::GetCoedgeIndex ( Dtk_CoedgePtr inCoedge,
Dtk_Size_t outIndex 
) const

Get an index of a coedge in the loop.

Parameters
[in]inCoedge : pointer on coedge you want the index
[out]outIndex index of the coedge
Returns
Dtk_ErrorStatus: dtkNoError if found

◆ GetID()

const Dtk_ID& Dtk_Entity::GetID ( ) const
inherited

Get Internal UniqueID.

Returns
InternalID

◆ GetNumCoedges()

Dtk_Size_t Dtk_Loop::GetNumCoedges ( ) const

Return number of coedge in the loop.

◆ GetOrientation()

Dtk_bool Dtk_Loop::GetOrientation ( ) const

Return orientation for Loop relative to face.

Returns
True if material is on the left

◆ GetParentBody()

Dtk_ErrorStatus Dtk_Loop::GetParentBody ( Dtk_Body *&  outParentBody) const
protected

◆ GetParentFace()

Dtk_ErrorStatus Dtk_Loop::GetParentFace ( Dtk_FacePtr outParentFace) const

Return pointer on parent face.

Parameters
[out]

◆ GetSize()

virtual Dtk_Size_t Dtk_Loop::GetSize ( ) const
virtual

Reimplemented from Dtk_Entity.

◆ GetTopoID()

Dtk_ID Dtk_Loop::GetTopoID ( ) const
virtual

Reimplemented from Dtk_TopologicalEntity.

◆ GetTopologyStatus()

Dtk_ErrorStatus Dtk_Loop::GetTopologyStatus ( ) const

◆ GetVertexLoop()

Dtk_ErrorStatus Dtk_Loop::GetVertexLoop ( Dtk_VertexPtr outVertexLoop) const

Return vertex loop.

Parameters
[out]outVertexLoop : pointer on vertex loop
Returns
Dtk_ErrorStatus: dtkNoError if OK

◆ info()

Dtk_InfoPtr& Dtk_Entity::info ( )
inherited

◆ InverseCoedgeOrientation()

Dtk_ErrorStatus Dtk_Loop::InverseCoedgeOrientation ( ) const

Inverse sens of all coedges in the loop.

Returns
Dtk_ErrorStatus: dtkNoError if OK

◆ IsOuter()

Dtk_bool Dtk_Loop::IsOuter ( ) const

Return true if Loop is outer.

◆ IsVertexLoop()

Dtk_bool Dtk_Loop::IsVertexLoop ( ) const

Return true if Loop is a vertex loop.

◆ PrepareTransfo()

virtual void Dtk_Entity::PrepareTransfo ( )
virtualinherited

Reimplemented in Dtk_OffsetSurface.

◆ RemoveCoedgeFromLoop()

Dtk_ErrorStatus Dtk_Loop::RemoveCoedgeFromLoop ( const Dtk_CoedgePtr inCoedge)

◆ SetCoedge()

Dtk_ErrorStatus Dtk_Loop::SetCoedge ( const Dtk_Size_t inIndex,
const Dtk_CoedgePtr inCoedge,
const Dtk_bool inOrientation 
)
protected

◆ SetCoedges()

Dtk_ErrorStatus Dtk_Loop::SetCoedges ( const Dtk_tab< Dtk_CoedgePtr > &  inCoedgeArray,
const Dtk_tab< Dtk_bool > &  inCoedgeOrientationArray 
)

◆ SetOrientation()

Dtk_ErrorStatus Dtk_Loop::SetOrientation ( const Dtk_bool inOrientation)

Set orientation for Loop relative to face.

Parameters
[in]:inOrientationTrue if material is on the left
Returns
Dtk_ErrorStatus: dtkNoError if OK

◆ SetOuterInfo()

Dtk_ErrorStatus Dtk_Loop::SetOuterInfo ( const Dtk_bool inIsOuter)

◆ SetParentBody()

Dtk_ErrorStatus Dtk_Loop::SetParentBody ( const Dtk_BodyPtr inParentBody)
virtual

Reimplemented from Dtk_TopologicalEntity.

◆ SetParentFace() [1/2]

Dtk_ErrorStatus Dtk_Loop::SetParentFace ( const Dtk_FacePtr inParentFace)

Set pointer on parent face.

Parameters
[in]

◆ SetParentFace() [2/2]

Dtk_ErrorStatus Dtk_Loop::SetParentFace ( const Dtk_ID inParentFaceId)

◆ SetTopologyStatus()

void Dtk_Loop::SetTopologyStatus ( Dtk_ErrorStatus  inStatus)

◆ SetVertexLoop()

Dtk_ErrorStatus Dtk_Loop::SetVertexLoop ( const Dtk_VertexPtr  inVertexLoop)

Set vertex loop.

Parameters
[in]inVertexLoop : pointer on vertex loop
Returns
Dtk_ErrorStatus: dtkNoError if OK

◆ Transform()

virtual Dtk_ErrorStatus Dtk_TopologicalEntity::Transform ( const Dtk_transfo inTransfo)
virtualinherited

Transform object.

Parameters
[in]inTransfo: matrix to apply
Returns
Dtk_ErrorStatus

Implements Dtk_Entity.

Friends And Related Function Documentation

◆ Dtk_SmartPtr< Dtk_Loop >

friend class Dtk_SmartPtr< Dtk_Loop >
friend

◆ Dtk_TopologicalEntity

friend class Dtk_TopologicalEntity
friend

Field Documentation

◆ _Private

Dtk_Handle* Dtk_Loop::_Private
protected

◆ count_

unsigned long Dtk_Object::count_
protectedinherited
DTK_TYPE_ENTITY
@ DTK_TYPE_ENTITY
Definition: define.h:466
Dtk_TopologicalEntity::_typeID
@ _typeID
Definition: util_topology_dtk.hpp:29
Dtk_Loop::_typeID
@ _typeID
Definition: util_topology_dtk.hpp:388
Dtk_Entity::_typeID
@ _typeID
Definition: util_ent_dtk.hpp:333
DTK_TYPE_LOOP
@ DTK_TYPE_LOOP
Definition: define.h:134
DTK_TYPE_TOPOLOGICAL_REPRESENTATION_ITEM
@ DTK_TYPE_TOPOLOGICAL_REPRESENTATION_ITEM
Definition: define.h:167