DATAKIT API  V2025.1
Dtk_Kinematic Class Reference

Dtk_Kinematic represents a kinematic. More...

+ Inheritance diagram for Dtk_Kinematic:

Public Member Functions

virtual Dtk_ErrorStatus _Store (void *)
 
void addCommand (Dtk_KinCommandPtr inCommand)
 Add inCommand at the command table. More...
 
void addConstraint (Dtk_KinConstraintPtr inConstraint)
 Add inConstraint at the constraint table. More...
 
void addJoint (Dtk_KinJointPtr inJoint)
 Add inJoint at the joint table. More...
 
void addMechanism (Dtk_KinMechanismPtr inMechanism)
 Add inMechanism at the mechanism table. More...
 
void addParameter (Dtk_KinParameterPtr inParameter)
 Add inParameter at the parameter table. More...
 
void addPart (Dtk_KinPartPtr inPart)
 Adds inPart at the part table. 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_status Dump (FILE *inFile, Dtk_bool initXml=1)
 Write Dump file for kinematic. More...
 
Dtk_InfoPtr get_info () const
 
type_detk get_type_detk () const
 
Dtk_KinCommandPtr getCommand (Dtk_Size_t pos)
 Returns Dtk_KinCommand at position inPos. More...
 
int getCommandPosition (Dtk_KinCommandPtr inCommand)
 Returns the position of the command. More...
 
Dtk_Size_t getCommandSize ()
 Return the attribute tab size. More...
 
Dtk_KinConstraintPtr getConstraint (Dtk_Size_t pos)
 Returns Dtk_KinConstraint at position inPos. More...
 
int getConstraintPosition (Dtk_KinConstraintPtr inConstraint)
 Returns the position of the constraint. More...
 
Dtk_Size_t getConstraintSize ()
 Return the attribute tab size. More...
 
const Dtk_IDGetID () const
 Get Internal UniqueID. More...
 
Dtk_KinJointPtr getJoint (Dtk_Size_t pos)
 Returns Dtk_KinJoint at position inPos. More...
 
int getJointPosition (Dtk_KinJointPtr inJoint)
 Returns the position of the joint. More...
 
Dtk_Size_t getJointSize ()
 Return the attribute tab size. More...
 
Dtk_KinMechanismPtr getMechanism (Dtk_Size_t pos)
 Returns Dtk_KinMechanism at position inPos. More...
 
Dtk_KinMechanismPtr getMechanismByCommand (Dtk_KinCommandPtr inCOmmand)
 Returns the mechanism associated at command inCommand. More...
 
Dtk_KinMechanismPtr getMechanismByJoint (Dtk_KinJointPtr inJoint)
 Returns the mechanism associated at joint inJoint. More...
 
Dtk_KinMechanismPtr getMechanismBySpeedAcceleration (Dtk_KinSpeedAccelerationPtr inSpeed)
 Returns the mechanism associated at speed/acceleration inSpeed. More...
 
int getMechanismPosition (Dtk_KinMechanismPtr inMecha)
 Returns the position of the mechanism. More...
 
Dtk_Size_t getMechanismSize ()
 Return the mechanism tab size. More...
 
Dtk_KinParameterPtr getParameter (Dtk_Size_t pos)
 Returns Dtk_KinParameter at position inPos. More...
 
int getParameterPosition (Dtk_KinParameterPtr inPara)
 Returns the position of the parameter. More...
 
Dtk_Size_t getParameterSize ()
 Return the parameter tab size. More...
 
Dtk_KinPartPtr getPart (Dtk_Size_t pos)
 Returns Dtk_KinPart at position inPos. More...
 
Dtk_KinPartPtr getPartByInstanceName (Dtk_string &inName)
 Returns the part by it instanceName attribute. More...
 
Dtk_KinPartPtr getPartByNumChild (int inNumChild)
 Returns the part by it numChild attribute. More...
 
int getPartPosition (Dtk_KinPartPtr inPart)
 Returns the position of the part. More...
 
int getPartPositionByNumChild (Dtk_KinPartPtr inPart)
 Returns the position of the part that have the same numChild attribut. More...
 
Dtk_Size_t getPartSize ()
 Returns the part tab size. More...
 
Dtk_KinProductPtr getProduct ()
 Sets the product object represented all element compound the CATProduct file. More...
 
virtual Dtk_Size_t GetSize () const
 
Dtk_bool hasCommand (Dtk_KinCommandPtr inCommand)
 Test if a command belong at the command table. More...
 
Dtk_bool hasConstraint (Dtk_KinConstraintPtr inConstraint)
 Test if a constraint belong at the constraint table. More...
 
Dtk_bool hasJoint (Dtk_KinJointPtr inJoint)
 Test if a joint belong at the joint table. More...
 
Dtk_bool hasMechanism (Dtk_KinMechanismPtr inMechanism)
 Test if a mechanism belong at the mechanism table. More...
 
Dtk_bool hasParameter (Dtk_KinParameterPtr inParameter)
 Test if a parameter belong at the parameter table. More...
 
Dtk_bool hasPart (Dtk_KinPartPtr inPart)
 Test if a part belong at the part table. More...
 
Dtk_InfoPtrinfo ()
 
virtual void PrepareTransfo ()
 
void setProduct (Dtk_KinProductPtr inProd)
 Sets the product object represented all element compound the CATProduct file. More...
 
Dtk_ErrorStatus Transform (const Dtk_transfo &inTransfo)
 

Static Public Member Functions

static Dtk_KinematicPtr Create ()
 Base constructor. More...
 
static Dtk_KinematicDtkDynamicCast (Dtk_Object *s)
 Performs a dynamic cast - doesn't need RTTI -. More...
 
static Dtk_KinematicPtr release (Dtk_KinematicPtr inKinematic)
 Delete object. More...
 

Protected Types

enum  { _typeID = DTK_TYPE_OBJECT }
 
enum  { _typeID = DTK_TYPE_ENTITY }
 
enum  { _typeID = DTK_TYPE_KINEMATIC }
 

Protected Member Functions

void _copy (const Dtk_Entity &s)
 
void _copy (const Dtk_Object &s)
 
void _init ()
 
void _reset ()
 
virtual Dtk_ObjectClone ()
 
 Dtk_Kinematic ()
 Default constructor of a generic Kinematics
More...
 
 Dtk_Kinematic (const Dtk_Kinematic &kinematics)
 Copy constructor. More...
 
 ~Dtk_Kinematic ()
 Default destructor of a generic Kinematics. More...
 

Protected Attributes

Dtk_KinCommandTab _commands
 All commands referenced into another object, are defined at this table. More...
 
Dtk_KinConstraintTab _constraints
 All constraints referenced into another object, are defined at this table. More...
 
Dtk_KinJointTab _joints
 All joints referenced into another object, are defined at this table. More...
 
Dtk_KinMechanismTab _mechanisms
 All mechanisms defined a kinematic. More...
 
Dtk_KinParameterTab _parameters
 Parameter can be used for law. More...
 
Dtk_KinPartTab _parts
 All parts referenced into another object, are defined at this table. More...
 
Dtk_Handle * _Private
 
Dtk_KinProductPtr _product
 Tree representation for the component (additional of part table) More...
 
unsigned long count_
 

Friends

class Dtk_SmartPtr< Dtk_Kinematic >
 

Detailed Description

Dtk_Kinematic represents a kinematic.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protectedinherited
Enumerator
_typeID 

◆ anonymous enum

anonymous enum
protectedinherited
Enumerator
_typeID 

◆ anonymous enum

anonymous enum
protected
Enumerator
_typeID 
1828  {
1830  };

Constructor & Destructor Documentation

◆ Dtk_Kinematic() [1/2]

Dtk_Kinematic::Dtk_Kinematic ( )
protected

Default constructor of a generic Kinematics

Parameters
[in/out]
[out]<br>
Returns
Allocated generic Kinematics
Remarks

◆ Dtk_Kinematic() [2/2]

Dtk_Kinematic::Dtk_Kinematic ( const Dtk_Kinematic kinematics)
protected

Copy constructor.

Parameters
mechathe Dtk_Kinematic to be copied

◆ ~Dtk_Kinematic()

Dtk_Kinematic::~Dtk_Kinematic ( )
protected

Default destructor of a generic Kinematics.

Parameters
[in/out]
[out]<br>
Returns
Free generic Kinematics

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()

◆ addCommand()

void Dtk_Kinematic::addCommand ( Dtk_KinCommandPtr  inCommand)

Add inCommand at the command table.

Parameters
inCommandcommand to be added

If the command table doesn't contain inCommand, inCommand is added

◆ addConstraint()

void Dtk_Kinematic::addConstraint ( Dtk_KinConstraintPtr  inConstraint)

Add inConstraint at the constraint table.

Parameters
inConstraintconstraint to be added

If the constraint table doesn't contain inConstraint, inConstraint is added

◆ addJoint()

void Dtk_Kinematic::addJoint ( Dtk_KinJointPtr  inJoint)

Add inJoint at the joint table.

Parameters
inJointjoint to be added

If the joint table doesn't contain inJoint, inJoint is added

◆ addMechanism()

void Dtk_Kinematic::addMechanism ( Dtk_KinMechanismPtr  inMechanism)

Add inMechanism at the mechanism table.

Parameters
inMechanismmechanism to be added

If the mechanism table doesn't contain inMechanism, inMechanism is added

◆ addParameter()

void Dtk_Kinematic::addParameter ( Dtk_KinParameterPtr  inParameter)

Add inParameter at the parameter table.

Parameters
inParameterparameter to be added

If the parameter table doesn't contain inParameter, inParameter is added

◆ addPart()

void Dtk_Kinematic::addPart ( Dtk_KinPartPtr  inPart)

Adds inPart at the part table.

Parameters
inPartpart to be added

If the part table doesn't contain inPart, inPart is added

◆ Clone()

virtual Dtk_Object* Dtk_Kinematic::Clone ( )
protectedvirtual

Implements Dtk_Entity.

1849 { return new Dtk_Kinematic(*this); }

◆ Create()

static Dtk_KinematicPtr Dtk_Kinematic::Create ( )
static

Base constructor.

◆ DtkDynamicCast()

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

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

1871  {
1872  if(s->DtkDynamicType(_typeID))
1873  return static_cast<Dtk_Kinematic*>(s);
1874  return NULL;
1875  }

◆ DtkDynamicType() [1/2]

Dtk_Int32 Dtk_Kinematic::DtkDynamicType ( const Dtk_Int32 inId)

Retrieves the dynamic entity type.

1861  {
1862  if (inId == _typeID)
1863  {
1864  return 1;
1865  }
1866  return Dtk_Entity::DtkDynamicType(inId);
1867  }

◆ DtkDynamicType() [2/2]

◆ dump()

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

◆ Dump()

Dtk_status Dtk_Kinematic::Dump ( FILE *  inFile,
Dtk_bool  initXml = 1 
)

Write Dump file for kinematic.

Parameters
inFilethe output file

Sample

Dtk_string fileName = ...;
File * file = fileName.ouvrir_fichier(DTK_W);
Dtk_Kinematic kinematic;
...
kinematic.Dump(file);

Result

<kinematics name="sample kinematic" id="5_1">
<parts>
<!-- Parts associated at kinematic -->
<!-- part.Dump(inFile, false) -->
</parts>
<constraints>
<!-- Constraints associated at kinematic -->
<!-- constraint.Dump(inFile, false) -->
</constraints>
<joints>
<!-- Joints associated at kinematic -->
<!-- joint.Dump(inFile, false) -->
</joints>
<commands>
<!-- Commands associated at kinematic -->
<!-- command.Dump(inFile, false) -->
</commands>
<mechanisms>
<!-- Mechanisms associated at kinematic -->
<!-- mechanism.Dump(inFile) -->
</Mechanisms>
</kinematics>

◆ get_info()

Dtk_InfoPtr Dtk_Entity::get_info ( ) const
inherited

◆ get_type_detk()

type_detk Dtk_Kinematic::get_type_detk ( ) const
virtual
Returns
The type of the entity type - DTK_TYPE_KINEMATIC -

Implements Dtk_Entity.

1878 { return DTK_TYPE_KINEMATIC; }

◆ getCommand()

Dtk_KinCommandPtr Dtk_Kinematic::getCommand ( Dtk_Size_t  pos)

Returns Dtk_KinCommand at position inPos.

Parameters
inPosposition of element

If position is out bounds returns NULL

◆ getCommandPosition()

int Dtk_Kinematic::getCommandPosition ( Dtk_KinCommandPtr  inCommand)

Returns the position of the command.

Parameters
inCommandcommand required

Returns -1 if the command doesn't found

◆ getCommandSize()

Dtk_Size_t Dtk_Kinematic::getCommandSize ( )

Return the attribute tab size.

◆ getConstraint()

Dtk_KinConstraintPtr Dtk_Kinematic::getConstraint ( Dtk_Size_t  pos)

Returns Dtk_KinConstraint at position inPos.

Parameters
inPosposition of element

If position is out bounds returns

NULL

◆ getConstraintPosition()

int Dtk_Kinematic::getConstraintPosition ( Dtk_KinConstraintPtr  inConstraint)

Returns the position of the constraint.

Parameters
inConstraintConstraint required

Returns -1 if the constraint doesn't found

◆ getConstraintSize()

Dtk_Size_t Dtk_Kinematic::getConstraintSize ( )

Return the attribute tab size.

◆ GetID()

const Dtk_ID& Dtk_Entity::GetID ( ) const
inherited

Get Internal UniqueID.

Returns
InternalID

◆ getJoint()

Dtk_KinJointPtr Dtk_Kinematic::getJoint ( Dtk_Size_t  pos)

Returns Dtk_KinJoint at position inPos.

Parameters
inPosposition of element

If position is out bounds returns

NULL

◆ getJointPosition()

int Dtk_Kinematic::getJointPosition ( Dtk_KinJointPtr  inJoint)

Returns the position of the joint.

Parameters
inJointJoint required

Returns -1 if the joint doesn't found

◆ getJointSize()

Dtk_Size_t Dtk_Kinematic::getJointSize ( )

Return the attribute tab size.

◆ getMechanism()

Dtk_KinMechanismPtr Dtk_Kinematic::getMechanism ( Dtk_Size_t  pos)

Returns Dtk_KinMechanism at position inPos.

Parameters
inPosposition of element

If position is out bounds returns

NULL

◆ getMechanismByCommand()

Dtk_KinMechanismPtr Dtk_Kinematic::getMechanismByCommand ( Dtk_KinCommandPtr  inCOmmand)

Returns the mechanism associated at command inCommand.

◆ getMechanismByJoint()

Dtk_KinMechanismPtr Dtk_Kinematic::getMechanismByJoint ( Dtk_KinJointPtr  inJoint)

Returns the mechanism associated at joint inJoint.

◆ getMechanismBySpeedAcceleration()

Dtk_KinMechanismPtr Dtk_Kinematic::getMechanismBySpeedAcceleration ( Dtk_KinSpeedAccelerationPtr  inSpeed)

Returns the mechanism associated at speed/acceleration inSpeed.

◆ getMechanismPosition()

int Dtk_Kinematic::getMechanismPosition ( Dtk_KinMechanismPtr  inMecha)

Returns the position of the mechanism.

Parameters
inMechaMechanism required

Returns -1 if the mechanism doesn't found

◆ getMechanismSize()

Dtk_Size_t Dtk_Kinematic::getMechanismSize ( )

Return the mechanism tab size.

◆ getParameter()

Dtk_KinParameterPtr Dtk_Kinematic::getParameter ( Dtk_Size_t  pos)

Returns Dtk_KinParameter at position inPos.

Parameters
inPosposition of element

If position is out bounds returns

NULL

◆ getParameterPosition()

int Dtk_Kinematic::getParameterPosition ( Dtk_KinParameterPtr  inPara)

Returns the position of the parameter.

Parameters
inParaParameter required

Returns -1 if the parameter doesn't found

◆ getParameterSize()

Dtk_Size_t Dtk_Kinematic::getParameterSize ( )

Return the parameter tab size.

◆ getPart()

Dtk_KinPartPtr Dtk_Kinematic::getPart ( Dtk_Size_t  pos)

Returns Dtk_KinPart at position inPos.

Parameters
inPosposition of element

If position is out bounds returns NULL

◆ getPartByInstanceName()

Dtk_KinPartPtr Dtk_Kinematic::getPartByInstanceName ( Dtk_string inName)

Returns the part by it instanceName attribute.

◆ getPartByNumChild()

Dtk_KinPartPtr Dtk_Kinematic::getPartByNumChild ( int  inNumChild)

Returns the part by it numChild attribute.

◆ getPartPosition()

int Dtk_Kinematic::getPartPosition ( Dtk_KinPartPtr  inPart)

Returns the position of the part.

Parameters
inPartPart required

Returns -1 if the part doesn't found

◆ getPartPositionByNumChild()

int Dtk_Kinematic::getPartPositionByNumChild ( Dtk_KinPartPtr  inPart)

Returns the position of the part that have the same numChild attribut.

Parameters
inPartPart required

Returns -1 if the part doesn't found

◆ getPartSize()

Dtk_Size_t Dtk_Kinematic::getPartSize ( )

Returns the part tab size.

◆ getProduct()

Dtk_KinProductPtr Dtk_Kinematic::getProduct ( )

Sets the product object represented all element compound the CATProduct file.

◆ GetSize()

◆ hasCommand()

Dtk_bool Dtk_Kinematic::hasCommand ( Dtk_KinCommandPtr  inCommand)

Test if a command belong at the command table.

Parameters
inCommandcommand to be tested

◆ hasConstraint()

Dtk_bool Dtk_Kinematic::hasConstraint ( Dtk_KinConstraintPtr  inConstraint)

Test if a constraint belong at the constraint table.

Parameters
inConstraintConstraint to be tested

◆ hasJoint()

Dtk_bool Dtk_Kinematic::hasJoint ( Dtk_KinJointPtr  inJoint)

Test if a joint belong at the joint table.

Parameters
inJointJoint to be tested

◆ hasMechanism()

Dtk_bool Dtk_Kinematic::hasMechanism ( Dtk_KinMechanismPtr  inMechanism)

Test if a mechanism belong at the mechanism table.

Parameters
inMechanismmechanism to be tested

◆ hasParameter()

Dtk_bool Dtk_Kinematic::hasParameter ( Dtk_KinParameterPtr  inParameter)

Test if a parameter belong at the parameter table.

Parameters
inParameterparameter to be tested

◆ hasPart()

Dtk_bool Dtk_Kinematic::hasPart ( Dtk_KinPartPtr  inPart)

Test if a part belong at the part table.

Parameters
inPartPart to be tested

◆ info()

Dtk_InfoPtr& Dtk_Entity::info ( )
inherited

◆ PrepareTransfo()

virtual void Dtk_Entity::PrepareTransfo ( )
virtualinherited

Reimplemented in Dtk_OffsetSurface.

◆ release()

static Dtk_KinematicPtr Dtk_Kinematic::release ( Dtk_KinematicPtr  inKinematic)
static

Delete object.

◆ setProduct()

void Dtk_Kinematic::setProduct ( Dtk_KinProductPtr  inProd)

Sets the product object represented all element compound the CATProduct file.

◆ Transform()

Dtk_ErrorStatus Dtk_Kinematic::Transform ( const Dtk_transfo inTransfo)
virtual

Implements Dtk_Entity.

Friends And Related Function Documentation

◆ Dtk_SmartPtr< Dtk_Kinematic >

friend class Dtk_SmartPtr< Dtk_Kinematic >
friend

Field Documentation

◆ _commands

Dtk_KinCommandTab Dtk_Kinematic::_commands
protected

All commands referenced into another object, are defined at this table.

◆ _constraints

Dtk_KinConstraintTab Dtk_Kinematic::_constraints
protected

All constraints referenced into another object, are defined at this table.

◆ _joints

Dtk_KinJointTab Dtk_Kinematic::_joints
protected

All joints referenced into another object, are defined at this table.

◆ _mechanisms

Dtk_KinMechanismTab Dtk_Kinematic::_mechanisms
protected

All mechanisms defined a kinematic.

◆ _parameters

Dtk_KinParameterTab Dtk_Kinematic::_parameters
protected

Parameter can be used for law.

◆ _parts

Dtk_KinPartTab Dtk_Kinematic::_parts
protected

All parts referenced into another object, are defined at this table.

◆ _Private

Dtk_Handle* Dtk_Entity::_Private
protectedinherited

◆ _product

Dtk_KinProductPtr Dtk_Kinematic::_product
protected

Tree representation for the component (additional of part table)

◆ count_

unsigned long Dtk_Object::count_
protectedinherited
Dtk_Kinematic::Dump
Dtk_status Dump(FILE *inFile, Dtk_bool initXml=1)
Write Dump file for kinematic.
Dtk_string::ouvrir_fichier
FILE * ouvrir_fichier(const Dtk_string &droits) const
File Utility : Open a file with the given rights.
DTK_TYPE_ENTITY
@ DTK_TYPE_ENTITY
Definition: define.h:466
DTK_TYPE_KINEMATIC
@ DTK_TYPE_KINEMATIC
Definition: define.h:544
Dtk_string
This is a high level string class.
Definition: dtk_string.hpp:58
Dtk_Kinematic::Dtk_Kinematic
Dtk_Kinematic()
Default constructor of a generic Kinematics
DTK_TYPE_OBJECT
@ DTK_TYPE_OBJECT
Definition: define.h:464
Dtk_Kinematic
Dtk_Kinematic represents a kinematic.
Definition: util_kinematics_dtk.hpp:1823
DTK_W
#define DTK_W
Definition: dtk_string.hpp:43
Dtk_Entity::DtkDynamicType
int DtkDynamicType(const int &inId)
Dtk_Kinematic::_typeID
@ _typeID
Definition: util_kinematics_dtk.hpp:1829
Dtk_Entity::_typeID
@ _typeID
Definition: util_ent_dtk.hpp:333
Dtk_Object::_typeID
@ _typeID
Definition: dtk_object.hpp:13
Dtk_Object::DtkDynamicType
virtual int DtkDynamicType(const int &inId)=0