DATAKIT API  V2025.1
Dtk_View Class Reference

This is the view class. More...

+ Inheritance diagram for Dtk_View:

Public Member Functions

virtual Dtk_ErrorStatus _Store (void *)
 
Dtk_ErrorStatus Add2dEntities (const Dtk_tab< Dtk_2dEntityPtr > &in2DEntitiesArray)
 Adds an array of 2D entities to the view. More...
 
Dtk_ErrorStatus Add2dEntity (const Dtk_2dEntityPtr &in2DEntity)
 Adds a 2D entity to the view. More...
 
Dtk_ErrorStatus Add2dGeometricalEntity (const Dtk_EntityPtr &inGeomElt) const
 Adds a drawing geometrical entity to the view. More...
 
Dtk_ErrorStatus AddBodies (Dtk_tab< Dtk_BodyPtr > inBodyArray)
 Adds an array of bodies displayed in the view. More...
 
Dtk_ErrorStatus AddBody (const Dtk_BodyPtr &inBody)
 Adds a Body displayed in the view. More...
 
Dtk_ErrorStatus AddEntities (const Dtk_tab< Dtk_EntityPtr > &inEntitiesArray)
 Adds an array of 2D entities, Dtk_Hatching, curve and point to the view ( other type are not supported ) More...
 
Dtk_ErrorStatus AddEntity (const Dtk_EntityPtr &inEnt)
 Adds an entity, Dtk_Hatching, curve and point to the view ( other type are not supported ) More...
 
Dtk_ErrorStatus AddOLEObject (const Dtk_OLEObjectPtr &inOLEObject)
 Adds a Dtk_OLEObjectPtr to the view. More...
 
Dtk_ErrorStatus AddOLEObjects (const Dtk_tab< Dtk_OLEObjectPtr > &inOleObjects)
 Adds an array of Dtk_OLEObjectPtr to the view. More...
 
Dtk_ErrorStatus AddPicture (const Dtk_picturePtr &inPicture)
 Adds a picture to the view. More...
 
Dtk_ErrorStatus AddPictures (const Dtk_tab< Dtk_picturePtr > &inPicturesArray)
 Adds an array of pictures to the view. More...
 
Dtk_Double64Angle ()
 Retrieves the Dtk_View angle - get/set-. More...
 
const Dtk_Double64Angle () const
 Retrieves the Dtk_View angle - read only -. 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_2dEntityPtr Get2dEntity (const Dtk_Size_t &inPos) const
 Retrieves the ith 2D entity. More...
 
Dtk_EntityPtr Get2dGeometricalEntity (const Dtk_Size_t &inPos) const
 Retrieves the ith geometrical entity. More...
 
Dtk_InfoPtr get_info () const
 
type_detk get_type_detk () const
 
Dtk_BodyPtr GetBody (const Dtk_Size_t &inPos) const
 Retrieves the ith Body. More...
 
Dtk_PlaneSurfacePtr GetClipping (const Dtk_Size_t &inPos) const
 
const Dtk_CompositeEntityPtrGetClippingBoundary () const
 
const Dtk_IDGetID () const
 Get Internal UniqueID. More...
 
Dtk_Size_t GetNum2dEntities () const
 Retrieves the 2D entities number - read only -. More...
 
Dtk_Size_t GetNum2dGeometricalEntity () const
 Retrieves the number of geometrical entity to the view. More...
 
Dtk_Size_t GetNumBodies () const
 Retrieves the bodies number to be dispalyed- read only -. More...
 
Dtk_Size_t GetNumOLEObjects () const
 Retrieves the number of OLE Objects in the Dtk_View. More...
 
Dtk_Size_t GetNumPictures () const
 Retrieves the pictures number - read only -. More...
 
Dtk_OLEObjectPtr GetOLEObject (const Dtk_Size_t &inIndex) const
 Retrieves the OLE Object at index. More...
 
Dtk_picturePtr GetPicture (const Dtk_Size_t &inPos) const
 Retrieves the ith Picture. More...
 
virtual Dtk_Size_t GetSize () const
 
Dtk_ViewDisplayPtr GetViewDisplay ()
 GetDisplayMode for 3D entity. More...
 
Dtk_InfoPtrinfo ()
 
Dtk_2dEntityPtr operator[] (const Dtk_Size_t &inPos) const
 Retrieves the ith 2D entity. More...
 
virtual void PrepareTransfo ()
 
Dtk_Double64Scale ()
 Retrieves the Dtk_View scale - get/set-. More...
 
const Dtk_Double64Scale () const
 Retrieves the Dtk_View scale - read only -. More...
 
void SetClippingBoundary (const Dtk_CompositeEntityPtr &inBoundary) const
 Sets the clipping boundary informations. More...
 
Dtk_ErrorStatus SetClippingPlane (const Dtk_Size_t &inPos, const Dtk_pnt &inLocation, const Dtk_dir &inRefAxis, const Dtk_dir &inNormalAxis)
 Sets the ith clipping plane informations. More...
 
void SetViewDisplay (Dtk_ViewDisplayPtr inDisplay)
 SetDisplayMode for 3D entity to be displayed. More...
 
Dtk_ErrorStatus Transform (const Dtk_transfo &inTransfo)
 Applies a transformation matrix to the entity. //! More...
 
Dtk_transfoTransformationMatrix ()
 Retrieves the Dtk_View transformation matrix - get/set-. More...
 
const Dtk_transfoTransformationMatrix () const
 Retrieves the Dtk_View transformation matrix - read only -. More...
 

Static Public Member Functions

static Dtk_ViewPtr Create ()
 Base constructor. More...
 
static Dtk_ViewPtr Create (const Dtk_View &inToBeCopied)
 Copy constructor. More...
 
static Dtk_ViewPtr Create (Dtk_View &&inToBeMoved)
 \MoveConstructor{inToBeMoved} More...
 
static Dtk_ViewDtkDynamicCast (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_VIEW }
 

Protected Member Functions

void _copy (const Dtk_Entity &s)
 
void _copy (const Dtk_Object &s)
 
void _init ()
 
void _reset ()
 
virtual Dtk_ObjectClone ()
 
 Dtk_View ()
 
 Dtk_View (const Dtk_View &s)
 
 Dtk_View (Dtk_View &&s) DTK_NOEXCEPT
 
 ~Dtk_View ()
 Destructor. More...
 

Protected Attributes

Dtk_Handle * _Private
 
unsigned long count_
 

Friends

class Dtk_SmartPtr< Dtk_View >
 
std::ostream & operator<< (std::ostream &o, const Dtk_View &d)
 

Detailed Description

This is the view class.

See also
Please use the Dtk_ViewPtr 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 
7125  {
7127  };

Constructor & Destructor Documentation

◆ Dtk_View() [1/3]

Dtk_View::Dtk_View ( )
protected
See also
Create()

◆ Dtk_View() [2/3]

Dtk_View::Dtk_View ( const Dtk_View s)
protected

◆ Dtk_View() [3/3]

Dtk_View::Dtk_View ( Dtk_View &&  s)
protected

◆ ~Dtk_View()

Dtk_View::~Dtk_View ( )
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()

◆ Add2dEntities()

Dtk_ErrorStatus Dtk_View::Add2dEntities ( const Dtk_tab< Dtk_2dEntityPtr > &  in2DEntitiesArray)

Adds an array of 2D entities to the view.

Parameters
in2DEntitiesArrayArray of 2D entities to be added.
Returns
DtkNoError if OK.

◆ Add2dEntity()

Dtk_ErrorStatus Dtk_View::Add2dEntity ( const Dtk_2dEntityPtr in2DEntity)

Adds a 2D entity to the view.

Parameters
in2DEntity2D entity to be added.
Returns
DtkNoError if OK.

◆ Add2dGeometricalEntity()

Dtk_ErrorStatus Dtk_View::Add2dGeometricalEntity ( const Dtk_EntityPtr inGeomElt) const

Adds a drawing geometrical entity to the view.

Parameters
inGeomEltgeometrical entity to be added. only Dtk_pnt and Dtk_Curve are allowed
Returns
DtkNoError if OK. dtkErrorTypeNotsupported if entity isn't a Curve or a point

◆ AddBodies()

Dtk_ErrorStatus Dtk_View::AddBodies ( Dtk_tab< Dtk_BodyPtr inBodyArray)

Adds an array of bodies displayed in the view.

Parameters
inBodyArrayArray of bodies to be displayed.
Returns
DtkNoError if OK.

◆ AddBody()

Dtk_ErrorStatus Dtk_View::AddBody ( const Dtk_BodyPtr inBody)

Adds a Body displayed in the view.

Parameters
inBodyBody to be displayed.
Returns
DtkNoError if OK.

◆ AddEntities()

Dtk_ErrorStatus Dtk_View::AddEntities ( const Dtk_tab< Dtk_EntityPtr > &  inEntitiesArray)

Adds an array of 2D entities, Dtk_Hatching, curve and point to the view ( other type are not supported )

Parameters
inEntitiesArrayArray of entities to be added.
Returns
DtkNoError if OK.

◆ AddEntity()

Dtk_ErrorStatus Dtk_View::AddEntity ( const Dtk_EntityPtr inEnt)

Adds an entity, Dtk_Hatching, curve and point to the view ( other type are not supported )

Parameters
inEntEntity to be added.
Returns
DtkNoError if OK.

◆ AddOLEObject()

Dtk_ErrorStatus Dtk_View::AddOLEObject ( const Dtk_OLEObjectPtr inOLEObject)

Adds a Dtk_OLEObjectPtr to the view.

Parameters
inOLEObjectDtk_OLEObjectPtr to be added.
Returns
dtkNoError if OK.

◆ AddOLEObjects()

Dtk_ErrorStatus Dtk_View::AddOLEObjects ( const Dtk_tab< Dtk_OLEObjectPtr > &  inOleObjects)

Adds an array of Dtk_OLEObjectPtr to the view.

Parameters
inOleObjectsArray of Dtk_OLEObjectPtr to be added.
Returns
dtkNoError if OK.

◆ AddPicture()

Dtk_ErrorStatus Dtk_View::AddPicture ( const Dtk_picturePtr inPicture)

Adds a picture to the view.

Parameters
inPicturePicture to be added.
Returns
dtkNoError if OK.

◆ AddPictures()

Dtk_ErrorStatus Dtk_View::AddPictures ( const Dtk_tab< Dtk_picturePtr > &  inPicturesArray)

Adds an array of pictures to the view.

Parameters
inPicturesArrayArray of pictures to be added.
Returns
dtkNoError if OK.

◆ Angle() [1/2]

Dtk_Double64& Dtk_View::Angle ( )

Retrieves the Dtk_View angle - get/set-.

Returns
The Dtk_View angle.
See also
Angle() const

◆ Angle() [2/2]

const Dtk_Double64& Dtk_View::Angle ( ) const

Retrieves the Dtk_View angle - read only -.

Returns
The Dtk_View angle.
See also
Angle()

◆ Clone()

virtual Dtk_Object* Dtk_View::Clone ( )
protectedvirtual

Implements Dtk_Entity.

7136 { return new Dtk_View(*this); }

◆ Create() [1/3]

static Dtk_ViewPtr Dtk_View::Create ( )
static

Base constructor.

◆ Create() [2/3]

static Dtk_ViewPtr Dtk_View::Create ( const Dtk_View inToBeCopied)
static

Copy constructor.

Parameters
inToBeCopiedObject to copy.

◆ Create() [3/3]

static Dtk_ViewPtr Dtk_View::Create ( Dtk_View &&  inToBeMoved)
static

\MoveConstructor{inToBeMoved}

◆ DtkDynamicCast()

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

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

◆ DtkDynamicType() [1/2]

Dtk_Int32 Dtk_View::DtkDynamicType ( const Dtk_Int32 inId)

Retrieves the dynamic entity type.

◆ DtkDynamicType() [2/2]

◆ dump()

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

◆ Get2dEntity()

Dtk_2dEntityPtr Dtk_View::Get2dEntity ( const Dtk_Size_t inPos) const

Retrieves the ith 2D entity.

Parameters
inPos2D entity index.
Returns
the inPos'th 2D entity.

◆ Get2dGeometricalEntity()

Dtk_EntityPtr Dtk_View::Get2dGeometricalEntity ( const Dtk_Size_t inPos) const

Retrieves the ith geometrical entity.

Parameters
inPosgeometrical entity index.
Returns
the inPos'th geometrical entity.

◆ get_info()

Dtk_InfoPtr Dtk_Entity::get_info ( ) const
inherited

◆ get_type_detk()

type_detk Dtk_View::get_type_detk ( ) const
virtual
Returns
The type of the entity type - DTK_TYPE_VIEW -

Implements Dtk_Entity.

7153  {
7154  return DTK_TYPE_VIEW;
7155  }

◆ GetBody()

Dtk_BodyPtr Dtk_View::GetBody ( const Dtk_Size_t inPos) const

Retrieves the ith Body.

Parameters
inPosBody index.
Returns
the inPos'th Body.

◆ GetClipping()

Dtk_PlaneSurfacePtr Dtk_View::GetClipping ( const Dtk_Size_t inPos) const
Returns
The ith clipping
Parameters
inPosclipping plane index.
Returns
the inPos'th clipping plane.

◆ GetClippingBoundary()

const Dtk_CompositeEntityPtr& Dtk_View::GetClippingBoundary ( ) const
Returns
The clipping boundary
the Dtk_CompositeEntityPtr which defines the boundary.

◆ GetID()

const Dtk_ID& Dtk_Entity::GetID ( ) const
inherited

Get Internal UniqueID.

Returns
InternalID

◆ GetNum2dEntities()

Dtk_Size_t Dtk_View::GetNum2dEntities ( ) const

Retrieves the 2D entities number - read only -.

Returns
The 2D entities number.

◆ GetNum2dGeometricalEntity()

Dtk_Size_t Dtk_View::GetNum2dGeometricalEntity ( ) const

Retrieves the number of geometrical entity to the view.

Returns
size of the array

◆ GetNumBodies()

Dtk_Size_t Dtk_View::GetNumBodies ( ) const

Retrieves the bodies number to be dispalyed- read only -.

Returns
The bodies number.

◆ GetNumOLEObjects()

Dtk_Size_t Dtk_View::GetNumOLEObjects ( ) const

Retrieves the number of OLE Objects in the Dtk_View.

◆ GetNumPictures()

Dtk_Size_t Dtk_View::GetNumPictures ( ) const

Retrieves the pictures number - read only -.

Returns
The pictures number.

◆ GetOLEObject()

Dtk_OLEObjectPtr Dtk_View::GetOLEObject ( const Dtk_Size_t inIndex) const

Retrieves the OLE Object at index.

◆ GetPicture()

Dtk_picturePtr Dtk_View::GetPicture ( const Dtk_Size_t inPos) const

Retrieves the ith Picture.

Parameters
inPosPicture index.
Returns
the inPos'th Picture.

◆ GetSize()

◆ GetViewDisplay()

Dtk_ViewDisplayPtr Dtk_View::GetViewDisplay ( )

GetDisplayMode for 3D entity.

Returns
The Display View.

◆ info()

Dtk_InfoPtr& Dtk_Entity::info ( )
inherited

◆ operator[]()

Dtk_2dEntityPtr Dtk_View::operator[] ( const Dtk_Size_t inPos) const

Retrieves the ith 2D entity.

Parameters
inPos2D entity index.
Returns
the inPos'th 2D entity.
See also
Get2dEntity(const Dtk_Size_t &)

◆ PrepareTransfo()

virtual void Dtk_Entity::PrepareTransfo ( )
virtualinherited

Reimplemented in Dtk_OffsetSurface.

◆ Scale() [1/2]

Dtk_Double64& Dtk_View::Scale ( )

Retrieves the Dtk_View scale - get/set-.

Returns
The Dtk_View scale.
See also
Scale() const

◆ Scale() [2/2]

const Dtk_Double64& Dtk_View::Scale ( ) const

Retrieves the Dtk_View scale - read only -.

Returns
The Dtk_View scale.
See also
Scale()

◆ SetClippingBoundary()

void Dtk_View::SetClippingBoundary ( const Dtk_CompositeEntityPtr inBoundary) const

Sets the clipping boundary informations.

◆ SetClippingPlane()

Dtk_ErrorStatus Dtk_View::SetClippingPlane ( const Dtk_Size_t inPos,
const Dtk_pnt inLocation,
const Dtk_dir inRefAxis,
const Dtk_dir inNormalAxis 
)

Sets the ith clipping plane informations.

Parameters
inPosThe clipping plane index.
inLocationThe clipping plane location.
inRefAxisThe clipping plane reference axis.
inNormalAxisThe clipping plane normal axis.
Returns
DtkNoError if OK.

◆ SetViewDisplay()

void Dtk_View::SetViewDisplay ( Dtk_ViewDisplayPtr  inDisplay)

SetDisplayMode for 3D entity to be displayed.

Parameters
inDisplayBody index.

◆ Transform()

Dtk_ErrorStatus Dtk_View::Transform ( const Dtk_transfo inTransfo)
virtual

Applies a transformation matrix to the entity. //!

Parameters
inTransfoThe transformation matrix to apply.

Implements Dtk_Entity.

◆ TransformationMatrix() [1/2]

Dtk_transfo& Dtk_View::TransformationMatrix ( )

Retrieves the Dtk_View transformation matrix - get/set-.

Returns
The Dtk_View transformation matrix.
See also
TransformationMatrix() const

◆ TransformationMatrix() [2/2]

const Dtk_transfo& Dtk_View::TransformationMatrix ( ) const

Retrieves the Dtk_View transformation matrix - read only -.

Returns
The Dtk_View transformation matrix.
See also
TransformationMatrix()

Friends And Related Function Documentation

◆ Dtk_SmartPtr< Dtk_View >

friend class Dtk_SmartPtr< Dtk_View >
friend

◆ operator<<

std::ostream& operator<< ( std::ostream &  o,
const Dtk_View d 
)
friend

Field Documentation

◆ _Private

Dtk_Handle* Dtk_View::_Private
protected

◆ count_

unsigned long Dtk_Object::count_
protectedinherited
DTK_TYPE_ENTITY
@ DTK_TYPE_ENTITY
Definition: define.h:466
Dtk_View::Dtk_View
Dtk_View()
DTK_TYPE_OBJECT
@ DTK_TYPE_OBJECT
Definition: define.h:464
DTK_TYPE_VIEW
@ DTK_TYPE_VIEW
Definition: define.h:444
Dtk_View::_typeID
@ _typeID
Definition: util_draw_dtk.hpp:7126
Dtk_Entity::_typeID
@ _typeID
Definition: util_ent_dtk.hpp:333
Dtk_Object::_typeID
@ _typeID
Definition: dtk_object.hpp:13