DATAKIT API  V2025.1
Dtk_Hatching Class Reference

This is the Hatching class. The hatching fills a close area delimited by boundaries (a set of Dtk_Polyline polylines). The first boundary is the outer bounday, following boundaries are inner boundaries. A hatching area can include several Dtk_HatchingPattern patterns (repetition of decorated/styled lines, dots or simple solid coloring). More...

+ Inheritance diagram for Dtk_Hatching:

Public Member Functions

virtual Dtk_ErrorStatus _Store (void *)
 
Dtk_tab< Dtk_PolylinePtr > & Boundaries ()
 Retrieves the hatching area boundaries as an array(ordered polylines). The first bounday (this->Boundaries[0]) is the outer boundary. More...
 
Dtk_Int32 DtkDynamicType (const Dtk_Int32 &inId)
 Retrieves the dynamic entity type. More...
 
int DtkDynamicType (const int &inId)
 
virtual void dump (FILE *file=stdout)
 
Dtk_tab< Dtk_EntityPtrGeneratePatternGeometries (const Dtk_dir &inXRefDir=Dtk_dir(1., 0., 0.), const Dtk_dir &inNormalDir=Dtk_dir(0., 0., 1.))
 Generate Pattern geometries from Dtk_Hatching. More...
 
Dtk_InfoPtr get_info () const
 
type_detk get_type_detk () const
 
const Dtk_IDGetID () const
 Get Internal UniqueID. More...
 
virtual Dtk_Size_t GetSize () const
 
Dtk_InfoPtrinfo ()
 
Dtk_Hatchingoperator= (const Dtk_Hatching &inToBeAssigned)
 Assignment Operator. More...
 
Dtk_tab< Dtk_HatchingPattern > & Patterns ()
 Retrieves the hatching area patterns. Patterns describes hatch line presentations (angle, pitch etc...) More...
 
virtual void PrepareTransfo ()
 
Dtk_ErrorStatus Transform (const Dtk_transfo &inTransfo)
 Applies a transformation matrix to the entity. //! More...
 

Static Public Member Functions

static Dtk_HatchingPtr Create ()
 Base Constructor. More...
 
static Dtk_HatchingDtkDynamicCast (Dtk_Object *s)
 Performs a dynamic cast - doesn't need RTTI -. More...
 

Protected Types

enum  { _typeID = DTK_TYPE_OBJECT }
 
enum  { _typeID = DTK_TYPE_ENTITY }
 
enum  { _typeID = DTK_TYPE_HATCHING }
 

Protected Member Functions

void _copy (const Dtk_Entity &s)
 
void _copy (const Dtk_Object &s)
 
void _init ()
 
void _reset ()
 
virtual Dtk_ObjectClone ()
 
 Dtk_Hatching ()
 Base Constructor. More...
 
 Dtk_Hatching (const Dtk_Hatching &s)
 Copy Constructor. More...
 
 ~Dtk_Hatching ()
 Destructor. More...
 

Protected Attributes

Dtk_Handle * _Private
 
unsigned long count_
 

Friends

class Dtk_SmartPtr< Dtk_Hatching >
 

Detailed Description

This is the Hatching class. The hatching fills a close area delimited by boundaries (a set of Dtk_Polyline polylines). The first boundary is the outer bounday, following boundaries are inner boundaries. A hatching area can include several Dtk_HatchingPattern patterns (repetition of decorated/styled lines, dots or simple solid coloring).

See also
Please use the Dtk_HatchingPtr class to handle it...

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protectedinherited
Enumerator
_typeID 

◆ anonymous enum

anonymous enum
protectedinherited
Enumerator
_typeID 

◆ anonymous enum

anonymous enum
protected
Enumerator
_typeID 
8187  {
8189  };

Constructor & Destructor Documentation

◆ Dtk_Hatching() [1/2]

Dtk_Hatching::Dtk_Hatching ( )
protected

Base Constructor.

◆ Dtk_Hatching() [2/2]

Dtk_Hatching::Dtk_Hatching ( const Dtk_Hatching s)
protected

Copy Constructor.

◆ ~Dtk_Hatching()

Dtk_Hatching::~Dtk_Hatching ( )
protected

Destructor.

Member Function Documentation

◆ _copy() [1/2]

void Dtk_Entity::_copy ( const Dtk_Entity s)
protectedinherited

◆ _copy() [2/2]

void Dtk_Object::_copy ( const Dtk_Object s)
protectedinherited

◆ _init()

void Dtk_Entity::_init ( )
protectedinherited

◆ _reset()

void Dtk_Entity::_reset ( )
protectedinherited

◆ _Store()

◆ Boundaries()

Dtk_tab<Dtk_PolylinePtr>& Dtk_Hatching::Boundaries ( )

Retrieves the hatching area boundaries as an array(ordered polylines). The first bounday (this->Boundaries[0]) is the outer boundary.

Returns
The boundaries

◆ Clone()

virtual Dtk_Object* Dtk_Hatching::Clone ( )
protectedvirtual

Implements Dtk_Entity.

8199 { return new Dtk_Hatching(*this); }

◆ Create()

static Dtk_HatchingPtr Dtk_Hatching::Create ( )
static

Base Constructor.

◆ DtkDynamicCast()

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

Performs a dynamic cast - doesn't need RTTI -.

◆ DtkDynamicType() [1/2]

Dtk_Int32 Dtk_Hatching::DtkDynamicType ( const Dtk_Int32 inId)

Retrieves the dynamic entity type.

◆ DtkDynamicType() [2/2]

◆ dump()

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

◆ GeneratePatternGeometries()

Dtk_tab< Dtk_EntityPtr > Dtk_Hatching::GeneratePatternGeometries ( const Dtk_dir inXRefDir = Dtk_dir(1., 0., 0.),
const Dtk_dir inNormalDir = Dtk_dir(0., 0., 1.) 
)

Generate Pattern geometries from Dtk_Hatching.

Parameters
inXRefDirX reference vector - (1,0,0) by default -.
inNormalDirNormal vector - (0,0,1) by default -.
Returns
The generated geometries as Dtk_tab< Dtk_EntityPtr >
Remarks
At this moment, we only handle hatching patterns - no point/fill pattern -.

◆ get_info()

Dtk_InfoPtr Dtk_Entity::get_info ( ) const
inherited

◆ get_type_detk()

type_detk Dtk_Hatching::get_type_detk ( ) const
virtual

Implements Dtk_Entity.

◆ GetID()

const Dtk_ID& Dtk_Entity::GetID ( ) const
inherited

Get Internal UniqueID.

Returns
InternalID

◆ GetSize()

◆ info()

Dtk_InfoPtr& Dtk_Entity::info ( )
inherited

◆ operator=()

Dtk_Hatching& Dtk_Hatching::operator= ( const Dtk_Hatching inToBeAssigned)

Assignment Operator.

Parameters
inToBeAssignedObject to copy.

◆ Patterns()

Dtk_tab<Dtk_HatchingPattern>& Dtk_Hatching::Patterns ( )

Retrieves the hatching area patterns. Patterns describes hatch line presentations (angle, pitch etc...)

Returns
The patterns as Dtk_HatchingPattern objects

◆ PrepareTransfo()

virtual void Dtk_Entity::PrepareTransfo ( )
virtualinherited

Reimplemented in Dtk_OffsetSurface.

◆ Transform()

Dtk_ErrorStatus Dtk_Hatching::Transform ( const Dtk_transfo inTransfo)
virtual

Applies a transformation matrix to the entity. //!

Parameters
inTransfoThe transformation matrix to apply.

Implements Dtk_Entity.

Friends And Related Function Documentation

◆ Dtk_SmartPtr< Dtk_Hatching >

friend class Dtk_SmartPtr< Dtk_Hatching >
friend

Field Documentation

◆ _Private

Dtk_Handle* Dtk_Hatching::_Private
protected

◆ count_

unsigned long Dtk_Object::count_
protectedinherited
Dtk_Hatching::_typeID
@ _typeID
Definition: util_draw_dtk.hpp:8188
DTK_TYPE_ENTITY
@ DTK_TYPE_ENTITY
Definition: define.h:466
DTK_TYPE_OBJECT
@ DTK_TYPE_OBJECT
Definition: define.h:464
Dtk_Hatching::Dtk_Hatching
Dtk_Hatching()
Base Constructor.
Dtk_Entity::_typeID
@ _typeID
Definition: util_ent_dtk.hpp:333
Dtk_Object::_typeID
@ _typeID
Definition: dtk_object.hpp:13
DTK_TYPE_HATCHING
@ DTK_TYPE_HATCHING
Definition: define.h:558