DATAKIT API  V2025.1
Dtk_Oriented2dBBox Class Reference

This is the base bounding box class.
It's used into a lot of 2D Entities
This class represents the base bounding box used in the texts entities.

The Dtk_Oriented2dBBox uses an anchor point notion. Here the 9 anchor point types:

. More...

Public Member Functions

Dtk_pntBottomLeftPoint ()
 Retrieves the bottom left point. More...
 
Dtk_pnt BottomLeftPoint () const
 Retrieves the bottom left point - Read Only -. More...
 
void Clear ()
 Clear elements. More...
 
 Dtk_Oriented2dBBox ()
 Base constructor. More...
 
 Dtk_Oriented2dBBox (const Dtk_Oriented2dBBox &s)
 Copy constructor. More...
 
 Dtk_Oriented2dBBox (const Dtk_pnt &inBottomLeft, const Dtk_Double64 &inXLength, const Dtk_Double64 inYLenght, const Dtk_dir &inRefAxis=Dtk_dir(1, 0, 0), const Dtk_dir &inNormalAxis=Dtk_dir(0, 0, 1))
 Full featured constructor. More...
 
void Extend (const Dtk_Double64 &inTopExtend, const Dtk_Double64 &inBottomExtend, const Dtk_Double64 &inLeftExtend, const Dtk_Double64 &inRightExtend)
 Extend the bounding box. More...
 
void Extend (const Dtk_Double64 &inXExtend, const Dtk_Double64 &inYExtend)
 Extend the bounding box. More...
 
Dtk_ErrorStatus GetAnchorPoints (Dtk_pnt(&outTabPnts)[DTK_NB_ANCHOR_TYPES]) const
 Processes all the anchor points. More...
 
Dtk_pnt GetBottomCenterPoint () const
 Retrieves the bottom center point - Read Only -. More...
 
Dtk_pnt GetBottomLeftPoint () const
 Retrieves the bottom left point - Read Only -. More...
 
Dtk_pnt GetBottomRightPoint () const
 Retrieves the bottom right point - Read Only -. More...
 
Dtk_pnt GetMiddleCenterPoint () const
 Retrieves the middle center point - Read Only -. More...
 
Dtk_pnt GetMiddleLeftPoint () const
 Retrieves the middle left point - Read Only -. More...
 
Dtk_pnt GetMiddleRightPoint () const
 Retrieves the middle right point - Read Only -. More...
 
Dtk_pnt GetPoint (const enum Dtk_anchor_type &inAnchorType) const
 Retrieves the point with inAnchorType type. More...
 
Dtk_pnt GetTopCenterPoint () const
 Retrieves the top center point - Read Only -. More...
 
Dtk_pnt GetTopLeftPoint () const
 Retrieves the top left point - Read Only -. More...
 
Dtk_pnt GetTopRightPoint () const
 Retrieves the top right point - Read Only -. More...
 
Dtk_Double64 GetXLength () const
 Retrieves the X length - Read Only -. More...
 
Dtk_Double64 GetYLength () const
 Retrieves the Y length - Read Only -. More...
 
Dtk_bool IsInside (const Dtk_pnt &inPoint) const
 Test if a point is inside Dtk_Oriented2dBBox class. More...
 
void Merge (const Dtk_Oriented2dBBox &inOriented2dBBox)
 Merges the Dtk_Oriented2dBBox to another one. More...
 
void Merge (const Dtk_pnt &inPoint)
 Merges the Dtk_Oriented2dBBox to an additional point. More...
 
Dtk_Oriented2dBBoxoperator= (const Dtk_Oriented2dBBox &inToBeAssigned)
 Assignment Operator. More...
 
Dtk_ErrorStatus ProcessDistance (const Dtk_Oriented2dBBox &inReferenceBBox, Dtk_Double64 &outTopOffSet, Dtk_Double64 &outBottomOffSet, Dtk_Double64 &outRightOffSet, Dtk_Double64 &outLeftOffSet) const
 Process distance - Read Only -. More...
 
Dtk_Int32 ProcessIntersectionWithCircle (const Dtk_pnt &inCenter, const Dtk_Double64 &inRadius, Dtk_tab< Dtk_pnt > &outIntersectionPnts) const
 Processes intersection points with a circle on the same plane as the boundingbox, giving its center and its radius. More...
 
Dtk_Int32 ProcessIntersectionWithLine (const Dtk_LinePtr inLine, Dtk_pnt &outIntersectionPnt1, Dtk_pnt &outIntersectionPnt2, Dtk_Double64 &outIntersectionParam1, Dtk_Double64 &outIntersectionParam2, const Dtk_bool &inTestComplanarity=DTK_FALSE) const
 Processes intersection points with a line. More...
 
Dtk_Int32 ProcessIntersectionWithLine (const Dtk_pnt &inPntA, const Dtk_pnt &inPntB, Dtk_pnt &outIntersectionPnt1, Dtk_pnt &outIntersectionPnt2, const Dtk_bool &inTestComplanarity=DTK_FALSE) const
 Processes intersection points with a line giving two points on the line. More...
 
Dtk_Int32 ProcessIntersectionWithSegment (const Dtk_pnt &inPntA, const Dtk_pnt &inPntB, Dtk_pnt &outIntersectionPnt1, Dtk_pnt &outIntersectionPnt2, const Dtk_bool &inTestComplanarity=DTK_FALSE) const
 Processes intersection points with a segment giving its ends. More...
 
Dtk_Int32 ProcessIntersectionWithSegment (const Dtk_pnt &inPntA, const Dtk_pnt &inPntB, Dtk_tab< Dtk_pnt > &outIntersectionPnts, const Dtk_bool &inTestComplanarity=DTK_FALSE) const
 Processes intersection points with a segment giving its ends. More...
 
void Reverse ()
 Reverses the bounding box X local vector and Y local vector orientation are reversed. More...
 
void Rotate (const Dtk_Double64 &inAngleInRadian)
 Rotates the bounding box. More...
 
void SetBottomCenterPoint (const Dtk_pnt &inNewPoint)
 Sets the bottom center point. More...
 
void SetBottomLeftPoint (const Dtk_pnt &inNewPoint)
 Sets the bottom left point. More...
 
void SetBottomRightPoint (const Dtk_pnt &inNewPoint)
 Sets the bottom right point. More...
 
void SetLocalVectors (const Dtk_dir &inNewXVector, const Dtk_dir &inNewYVector)
 Sets the X and Y local vectors. More...
 
void SetMiddleCenterPoint (const Dtk_pnt &inNewPoint)
 Sets the middle center point. More...
 
void SetMiddleLeftPoint (const Dtk_pnt &inNewPoint)
 Sets the middle left point. More...
 
void SetMiddleRightPoint (const Dtk_pnt &inNewPoint)
 Sets the middle right point. More...
 
void SetPoint (const Dtk_pnt &inNewPoint, const enum Dtk_anchor_type &inAnchorType)
 Sets the point with inAnchorType type. More...
 
void SetTopCenterPoint (const Dtk_pnt &inNewPoint)
 Sets the top center point. More...
 
void SetTopLeftPoint (const Dtk_pnt &inNewPoint)
 Sets the top left point. More...
 
void SetTopRightPoint (const Dtk_pnt &inNewPoint)
 Sets the top right point. More...
 
void SetXLength (const Dtk_Double64 &inNewXlength)
 Retrieves the X length. More...
 
void SetXLocalVector (const Dtk_dir &inNewXVector)
 Sets the X local vector. More...
 
void SetYLength (const Dtk_Double64 &inNewXlength)
 Retrieves the Y length. More...
 
void SetYLocalVector (const Dtk_dir &inNewYVector)
 Sets the Y local vector. More...
 
void Transform (const Dtk_transfo &inTransfo)
 Applies a transformation matrix to the bounding box. More...
 
void Translate (const Dtk_dir &inTranslation)
 Translates the text giving a translation vector. More...
 
Dtk_dirXLocalVector ()
 Retrieves the X local vector. More...
 
Dtk_dir XLocalVector () const
 Retrieves the X local vector - Read Only -. More...
 
Dtk_dirYLocalVector ()
 Retrieves the Y local vector. More...
 
Dtk_dir YLocalVector () const
 Retrieves the Y local vector - Read Only -. More...
 
 ~Dtk_Oriented2dBBox ()
 Destructor. More...
 

Protected Member Functions

void _Copy (const Dtk_Oriented2dBBox &s)
 
void _Init ()
 
void _Reset ()
 

Protected Attributes

Dtk_pnt _BottomLeftPnt
 
Dtk_Double64 _XLength
 
Dtk_dir _XLocalVector
 
Dtk_Double64 _YLength
 
Dtk_dir _YLocalVector
 

Detailed Description

This is the base bounding box class.
It's used into a lot of 2D Entities
This class represents the base bounding box used in the texts entities.

The Dtk_Oriented2dBBox uses an anchor point notion. Here the 9 anchor point types:

.

Anchor Type Samples

Constructor & Destructor Documentation

◆ Dtk_Oriented2dBBox() [1/3]

Dtk_Oriented2dBBox::Dtk_Oriented2dBBox ( )

Base constructor.

◆ Dtk_Oriented2dBBox() [2/3]

Dtk_Oriented2dBBox::Dtk_Oriented2dBBox ( const Dtk_pnt inBottomLeft,
const Dtk_Double64 inXLength,
const Dtk_Double64  inYLenght,
const Dtk_dir inRefAxis = Dtk_dir(1, 0, 0),
const Dtk_dir inNormalAxis = Dtk_dir(0, 0, 1) 
)

Full featured constructor.

Parameters
inBottomLeftBottom left point
inXLengthX length
inYLenghtY length
inRefAxisRef axis
inNormalAxisNormal axis

◆ Dtk_Oriented2dBBox() [3/3]

Dtk_Oriented2dBBox::Dtk_Oriented2dBBox ( const Dtk_Oriented2dBBox s)

Copy constructor.

Parameters
sObject to copy.

◆ ~Dtk_Oriented2dBBox()

Dtk_Oriented2dBBox::~Dtk_Oriented2dBBox ( )

Destructor.

Member Function Documentation

◆ _Copy()

void Dtk_Oriented2dBBox::_Copy ( const Dtk_Oriented2dBBox s)
protected
504  {
508  _XLength = s._XLength;
509  _YLength = s._YLength;
510  }

◆ _Init()

void Dtk_Oriented2dBBox::_Init ( )
protected
488  {
489  Dtk_Size_t i = 0;
490 
491  for (i = 0; i < 3; i++)
492  {
493  _BottomLeftPnt[i] = 0.0;
494  _XLocalVector[i] = 0.0;
495  _YLocalVector[i] = 0.0;
496  }
497  _XLocalVector[0] = 1.0;
498  _YLocalVector[1] = 1.0;
499  _XLength = 0.0;
500  _YLength = 0.0;
501  }

◆ _Reset()

void Dtk_Oriented2dBBox::_Reset ( )
protected
512 {}

◆ BottomLeftPoint() [1/2]

Dtk_pnt& Dtk_Oriented2dBBox::BottomLeftPoint ( )

Retrieves the bottom left point.

Returns
The bottom left point
737  {
738  return _BottomLeftPnt;
739  }

◆ BottomLeftPoint() [2/2]

Dtk_pnt Dtk_Oriented2dBBox::BottomLeftPoint ( ) const

Retrieves the bottom left point - Read Only -.

Returns
The bottom left point
553  {
554  return _BottomLeftPnt;
555  }

◆ Clear()

void Dtk_Oriented2dBBox::Clear ( )

Clear elements.

536  {
537  _Reset();
538  _Init();
539  }

◆ Extend() [1/2]

void Dtk_Oriented2dBBox::Extend ( const Dtk_Double64 inTopExtend,
const Dtk_Double64 inBottomExtend,
const Dtk_Double64 inLeftExtend,
const Dtk_Double64 inRightExtend 
)

Extend the bounding box.

Parameters
inTopExtendExtend the top of the bounding box
inBottomExtendExtend the bottom of the bounding box
inLeftExtendExtend the left of the bounding box
inRightExtendExtend the right of the bounding box
Returns
dtkNoError if OK

◆ Extend() [2/2]

void Dtk_Oriented2dBBox::Extend ( const Dtk_Double64 inXExtend,
const Dtk_Double64 inYExtend 
)

Extend the bounding box.

Parameters
inXExtendExtend the bounding box horizontally
inYExtendExtend the bounding box vertically
Returns
dtkNoError if OK

◆ GetAnchorPoints()

Dtk_ErrorStatus Dtk_Oriented2dBBox::GetAnchorPoints ( Dtk_pnt(&)  outTabPnts[DTK_NB_ANCHOR_TYPES]) const

Processes all the anchor points.

Parameters
outTabPntsthe resulting anchor point array
Returns
dtkNoError if OK

◆ GetBottomCenterPoint()

Dtk_pnt Dtk_Oriented2dBBox::GetBottomCenterPoint ( ) const

Retrieves the bottom center point - Read Only -.

Returns
The bottom center point
582  {
584  }

◆ GetBottomLeftPoint()

Dtk_pnt Dtk_Oriented2dBBox::GetBottomLeftPoint ( ) const

Retrieves the bottom left point - Read Only -.

Returns
The bottom left point
See also
BottomLeftPoint()
561  {
562  return BottomLeftPoint();
563  }

◆ GetBottomRightPoint()

Dtk_pnt Dtk_Oriented2dBBox::GetBottomRightPoint ( ) const

Retrieves the bottom right point - Read Only -.

Returns
The bottom right point
605  {
607  }

◆ GetMiddleCenterPoint()

Dtk_pnt Dtk_Oriented2dBBox::GetMiddleCenterPoint ( ) const

Retrieves the middle center point - Read Only -.

Returns
The middle center point
589  {
591  + 0.5*_XLength*_XLocalVector;
592  }

◆ GetMiddleLeftPoint()

Dtk_pnt Dtk_Oriented2dBBox::GetMiddleLeftPoint ( ) const

Retrieves the middle left point - Read Only -.

Returns
The middle left point
568  {
570  }

◆ GetMiddleRightPoint()

Dtk_pnt Dtk_Oriented2dBBox::GetMiddleRightPoint ( ) const

Retrieves the middle right point - Read Only -.

Returns
The middle right point
612  {
615  }

◆ GetPoint()

Dtk_pnt Dtk_Oriented2dBBox::GetPoint ( const enum Dtk_anchor_type inAnchorType) const

Retrieves the point with inAnchorType type.

Parameters
inAnchorTypeThe point anchor type
Returns
The point

◆ GetTopCenterPoint()

Dtk_pnt Dtk_Oriented2dBBox::GetTopCenterPoint ( ) const

Retrieves the top center point - Read Only -.

Returns
The top center point
597  {
599  + 0.5*_XLength*_XLocalVector;
600  }

◆ GetTopLeftPoint()

Dtk_pnt Dtk_Oriented2dBBox::GetTopLeftPoint ( ) const

Retrieves the top left point - Read Only -.

Returns
The top left point
575  {
577  }

◆ GetTopRightPoint()

Dtk_pnt Dtk_Oriented2dBBox::GetTopRightPoint ( ) const

Retrieves the top right point - Read Only -.

Returns
The top right point
620  {
622  }

◆ GetXLength()

Dtk_Double64 Dtk_Oriented2dBBox::GetXLength ( ) const

Retrieves the X length - Read Only -.

Returns
The X length
627  {
628  return _XLength;
629  }

◆ GetYLength()

Dtk_Double64 Dtk_Oriented2dBBox::GetYLength ( ) const

Retrieves the Y length - Read Only -.

Returns
The Y length
634  {
635  return _YLength;
636  }

◆ IsInside()

Dtk_bool Dtk_Oriented2dBBox::IsInside ( const Dtk_pnt inPoint) const

Test if a point is inside Dtk_Oriented2dBBox class.

Parameters
inPointThe point

return true if the point is inside Dtk_Oriented2dBBox class

◆ Merge() [1/2]

void Dtk_Oriented2dBBox::Merge ( const Dtk_Oriented2dBBox inOriented2dBBox)

Merges the Dtk_Oriented2dBBox to another one.

Parameters
inOriented2dBBoxThe Dtk_Oriented2dBBox to be merged
See also
Merge

◆ Merge() [2/2]

void Dtk_Oriented2dBBox::Merge ( const Dtk_pnt inPoint)

Merges the Dtk_Oriented2dBBox to an additional point.

Parameters
inPointThe inPoint to be merged
See also
Merge

◆ operator=()

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

Assignment Operator.

Parameters
inTobeAssignedObject to copy.

◆ ProcessDistance()

Dtk_ErrorStatus Dtk_Oriented2dBBox::ProcessDistance ( const Dtk_Oriented2dBBox inReferenceBBox,
Dtk_Double64 outTopOffSet,
Dtk_Double64 outBottomOffSet,
Dtk_Double64 outRightOffSet,
Dtk_Double64 outLeftOffSet 
) const

Process distance - Read Only -.

Parameters
inReferenceBBoxThe reference bounding box
outTopOffSetThe result top offset
outBottomOffSetThe result bottom offset
outRightOffSetThe result right offset
outLeftOffSetThe result left offset

◆ ProcessIntersectionWithCircle()

Dtk_Int32 Dtk_Oriented2dBBox::ProcessIntersectionWithCircle ( const Dtk_pnt inCenter,
const Dtk_Double64 inRadius,
Dtk_tab< Dtk_pnt > &  outIntersectionPnts 
) const

Processes intersection points with a circle on the same plane as the boundingbox, giving its center and its radius.

Parameters
inCenterThe center of the circle.
inRadiusThe radius of the circle.
outIntersectionPntsThe tab of intersection points
Returns
Number of intersections
Warning
For internal use only

◆ ProcessIntersectionWithLine() [1/2]

Dtk_Int32 Dtk_Oriented2dBBox::ProcessIntersectionWithLine ( const Dtk_LinePtr  inLine,
Dtk_pnt outIntersectionPnt1,
Dtk_pnt outIntersectionPnt2,
Dtk_Double64 outIntersectionParam1,
Dtk_Double64 outIntersectionParam2,
const Dtk_bool inTestComplanarity = DTK_FALSE 
) const

Processes intersection points with a line.

Parameters
inLine: the line to process
outIntersectionPnt1The 1st intersection point - if exists -
outIntersectionPnt2The 2nd intersection point - if exists -
outIntersectionParam1The 1st intersection parameter - if exists -
outIntersectionParam2The 2nd intersection parameter - if exists -
inTestComplanarityIf DTK_TRUE the method will test if inPntA and inPntB are on the same plane than the Bounding Box.
Returns
0 If No intersection.
1 If 1 intersection.
2 If 2 intersections.
3 If an infinity of intersections.
-1 if inPntA and inPntB are not on the same plane than the Bounding Box.
Warning
For internal use only

◆ ProcessIntersectionWithLine() [2/2]

Dtk_Int32 Dtk_Oriented2dBBox::ProcessIntersectionWithLine ( const Dtk_pnt inPntA,
const Dtk_pnt inPntB,
Dtk_pnt outIntersectionPnt1,
Dtk_pnt outIntersectionPnt2,
const Dtk_bool inTestComplanarity = DTK_FALSE 
) const

Processes intersection points with a line giving two points on the line.

Parameters
inPntAThe 1st point of the line
inPntBThe 2nd point of the line
outIntersectionPnt1The 1st intersection point - if exists -
outIntersectionPnt2The 2nd intersection point - if exists -
inTestComplanarityIf DTK_TRUE the method will test if inPntA and inPntB are on the same plane than the Bounding Box.
Returns
0 If No intersection.
1 If 1 intersection.
2 If 2 intersections.
3 If an infinity of intersections.
-1 if inPntA and inPntB are not on the same plane than the Bounding Box.
Warning
For internal use only

◆ ProcessIntersectionWithSegment() [1/2]

Dtk_Int32 Dtk_Oriented2dBBox::ProcessIntersectionWithSegment ( const Dtk_pnt inPntA,
const Dtk_pnt inPntB,
Dtk_pnt outIntersectionPnt1,
Dtk_pnt outIntersectionPnt2,
const Dtk_bool inTestComplanarity = DTK_FALSE 
) const

Processes intersection points with a segment giving its ends.

Parameters
inPntAThe 1st end of the segment.
inPntBThe 2nd end of the segment.
outIntersectionPnt1The 1st intersection point - if exists -
outIntersectionPnt2The 2nd intersection point - if exists -
inTestComplanarityIf DTK_TRUE the method will test if inPntA and inPntB are on the same plane than the Bounding Box.
Returns
0 If No intersection.
1 If 1 intersection.
2 If 2 intersections.
3 If an infinity of intersections.
-1 if inPntA and inPntB are not on the same plane than the Bounding Box.
Warning
For internal use only

◆ ProcessIntersectionWithSegment() [2/2]

Dtk_Int32 Dtk_Oriented2dBBox::ProcessIntersectionWithSegment ( const Dtk_pnt inPntA,
const Dtk_pnt inPntB,
Dtk_tab< Dtk_pnt > &  outIntersectionPnts,
const Dtk_bool inTestComplanarity = DTK_FALSE 
) const

Processes intersection points with a segment giving its ends.

Parameters
inPntAThe 1st end of the segment.
inPntBThe 2nd end of the segment.
outIntersectionPntsThe list of intersection points
inTestComplanarityIf DTK_TRUE the method will test if inPntA and inPntB are on the same plane than the Bounding Box.
Returns
0 If No intersection.
1 If 1 intersection.
2 If 2 intersections.
3 If an infinity of intersections.
-1 if inPntA and inPntB are not on the same plane than the Bounding Box.
Warning
For internal use only

◆ Reverse()

void Dtk_Oriented2dBBox::Reverse ( )

Reverses the bounding box X local vector and Y local vector orientation are reversed.

Returns
dtkNoError if OK

◆ Rotate()

void Dtk_Oriented2dBBox::Rotate ( const Dtk_Double64 inAngleInRadian)

Rotates the bounding box.

Parameters
inAngleInRadianThe angle in radian
Returns
dtkNoError if OK

◆ SetBottomCenterPoint()

void Dtk_Oriented2dBBox::SetBottomCenterPoint ( const Dtk_pnt inNewPoint)

Sets the bottom center point.

Parameters
inNewPointThe new bottom center point

◆ SetBottomLeftPoint()

void Dtk_Oriented2dBBox::SetBottomLeftPoint ( const Dtk_pnt inNewPoint)

Sets the bottom left point.

Parameters
inNewPointThe new bottom left point

◆ SetBottomRightPoint()

void Dtk_Oriented2dBBox::SetBottomRightPoint ( const Dtk_pnt inNewPoint)

Sets the bottom right point.

Parameters
inNewPointThe new bottom right point

◆ SetLocalVectors()

void Dtk_Oriented2dBBox::SetLocalVectors ( const Dtk_dir inNewXVector,
const Dtk_dir inNewYVector 
)

Sets the X and Y local vectors.

Parameters
inNewXVectorThe new X local vector
inNewYVectorThe new Y local vector
673  {
674  _XLocalVector = inNewXVector;
675  _YLocalVector = inNewYVector;
679  _YLocalVector = TmpZ / _XLocalVector;
680  }

◆ SetMiddleCenterPoint()

void Dtk_Oriented2dBBox::SetMiddleCenterPoint ( const Dtk_pnt inNewPoint)

Sets the middle center point.

Parameters
inNewPointThe new middle center point

◆ SetMiddleLeftPoint()

void Dtk_Oriented2dBBox::SetMiddleLeftPoint ( const Dtk_pnt inNewPoint)

Sets the middle left point.

Parameters
inNewPointThe new middle left point

◆ SetMiddleRightPoint()

void Dtk_Oriented2dBBox::SetMiddleRightPoint ( const Dtk_pnt inNewPoint)

Sets the middle right point.

Parameters
inNewPointThe new middle right point

◆ SetPoint()

void Dtk_Oriented2dBBox::SetPoint ( const Dtk_pnt inNewPoint,
const enum Dtk_anchor_type inAnchorType 
)

Sets the point with inAnchorType type.

Parameters
inNewPointThe new point
inAnchorTypeThe point anchor type

◆ SetTopCenterPoint()

void Dtk_Oriented2dBBox::SetTopCenterPoint ( const Dtk_pnt inNewPoint)

Sets the top center point.

Parameters
inNewPointThe new top center point

◆ SetTopLeftPoint()

void Dtk_Oriented2dBBox::SetTopLeftPoint ( const Dtk_pnt inNewPoint)

Sets the top left point.

Parameters
inNewPointThe new top left point

◆ SetTopRightPoint()

void Dtk_Oriented2dBBox::SetTopRightPoint ( const Dtk_pnt inNewPoint)

Sets the top right point.

Parameters
inNewPointThe new top right point

◆ SetXLength()

void Dtk_Oriented2dBBox::SetXLength ( const Dtk_Double64 inNewXlength)

Retrieves the X length.

Parameters
inNewXlengthExtend the new X length of the bounding box
Returns
The X length

◆ SetXLocalVector()

void Dtk_Oriented2dBBox::SetXLocalVector ( const Dtk_dir inNewXVector)

Sets the X local vector.

Parameters
inNewXVectorThe new X local vector
655  {
656  _XLocalVector = inNewXVector;
658  }

◆ SetYLength()

void Dtk_Oriented2dBBox::SetYLength ( const Dtk_Double64 inNewXlength)

Retrieves the Y length.

Parameters
inNewXlengthExtend the new Y length of the bounding box
Returns
The Y length

◆ SetYLocalVector()

void Dtk_Oriented2dBBox::SetYLocalVector ( const Dtk_dir inNewYVector)

Sets the Y local vector.

Parameters
inNewYVectorThe new Y local vector
663  {
664  _YLocalVector = inNewYVector;
666  }

◆ Transform()

void Dtk_Oriented2dBBox::Transform ( const Dtk_transfo inTransfo)

Applies a transformation matrix to the bounding box.

Parameters
inTransfoThe transformation matrix
Returns
dtkNoError if OK

◆ Translate()

void Dtk_Oriented2dBBox::Translate ( const Dtk_dir inTranslation)

Translates the text giving a translation vector.

Parameters
inTranslateDirthe translation vector
Returns
dtkNoError if OK

◆ XLocalVector() [1/2]

Dtk_dir& Dtk_Oriented2dBBox::XLocalVector ( )

Retrieves the X local vector.

Returns
The X local vector
744  {
745  return _XLocalVector;
746  }

◆ XLocalVector() [2/2]

Dtk_dir Dtk_Oriented2dBBox::XLocalVector ( ) const

Retrieves the X local vector - Read Only -.

Returns
The X local vector
641  {
642  return _XLocalVector;
643  }

◆ YLocalVector() [1/2]

Dtk_dir& Dtk_Oriented2dBBox::YLocalVector ( )

Retrieves the Y local vector.

Returns
The Y local vector
751  {
752  return _YLocalVector;
753  }

◆ YLocalVector() [2/2]

Dtk_dir Dtk_Oriented2dBBox::YLocalVector ( ) const

Retrieves the Y local vector - Read Only -.

Returns
The Y local vector
648  {
649  return _YLocalVector;
650  }

Field Documentation

◆ _BottomLeftPnt

Dtk_pnt Dtk_Oriented2dBBox::_BottomLeftPnt
protected

◆ _XLength

Dtk_Double64 Dtk_Oriented2dBBox::_XLength
protected

◆ _XLocalVector

Dtk_dir Dtk_Oriented2dBBox::_XLocalVector
protected

◆ _YLength

Dtk_Double64 Dtk_Oriented2dBBox::_YLength
protected

◆ _YLocalVector

Dtk_dir Dtk_Oriented2dBBox::_YLocalVector
protected
Dtk_Oriented2dBBox::_XLocalVector
Dtk_dir _XLocalVector
Definition: util_draw_dtk.hpp:482
Dtk_Oriented2dBBox::BottomLeftPoint
Dtk_pnt BottomLeftPoint() const
Retrieves the bottom left point - Read Only -.
Definition: util_draw_dtk.hpp:552
Dtk_Oriented2dBBox::_Init
void _Init()
Definition: util_draw_dtk.hpp:487
Dtk_Size_t
size_t Dtk_Size_t
Definition: define.h:712
Dtk_Oriented2dBBox::_Reset
void _Reset()
Definition: util_draw_dtk.hpp:512
Dtk_Oriented2dBBox::_YLocalVector
Dtk_dir _YLocalVector
Definition: util_draw_dtk.hpp:483
Dtk_Oriented2dBBox::_XLength
Dtk_Double64 _XLength
Definition: util_draw_dtk.hpp:484
Dtk_Oriented2dBBox::_YLength
Dtk_Double64 _YLength
Definition: util_draw_dtk.hpp:485
Dtk_dir::normalize
int normalize()
Dtk_Oriented2dBBox::_BottomLeftPnt
Dtk_pnt _BottomLeftPnt
Definition: util_draw_dtk.hpp:481
Dtk_dir
This is a mathematical direction class.
Definition: dtk_dir.hpp:15