cee::geo::HitItem Class Reference

Small class containing the result of an intersection between a ray and a part in a GeometryModel. More...

Public Member Functions

 HitItem ()
 Constructs an empty object. More...
 
const Partpart () const
 Returns the part. More...
 
Partpart ()
 Returns the part. More...
 
void setPart (Part *part)
 Sets the part. More...
 
const Vec3dintersectionPoint () const
 Returns the intersection point of the hit item. More...
 
void setIntersectionPoint (const Vec3d &intersectionPoint)
 Sets the intersection point of the hit item. More...
 
size_t itemIndex () const
 Returns the index of the item hit (part local index) More...
 
void setItemIndex (size_t index)
 Sets index of the item hit (part local index) More...
 

Detailed Description

Small class containing the result of an intersection between a ray and a part in a GeometryModel.

See also
cee::geo::GeometryModel

Constructor & Destructor Documentation

cee::geo::HitItem::HitItem ( )

Constructs an empty object.

Member Function Documentation

const cee::Vec3d & cee::geo::HitItem::intersectionPoint ( ) const

Returns the intersection point of the hit item.

size_t cee::geo::HitItem::itemIndex ( ) const

Returns the index of the item hit (part local index)

For DataIndexedTriangles, this is the zero based triangle index

For DataIndexedPolylines, this is the 'part global' zero based line segment index. Example: Part has two polylines: <0, 1, 2> and <1,3,5> Index 0: 0->1 (first line) Index 1: 1->2 (first line) Index 2: 1->3 (second line) Index 3: 3->5 (second line)

For DataPoints, this is the zero based point index.

const Part * cee::geo::HitItem::part ( ) const

Returns the part.

Part * cee::geo::HitItem::part ( )

Returns the part.

void cee::geo::HitItem::setIntersectionPoint ( const Vec3d intersectionPoint)

Sets the intersection point of the hit item.

void cee::geo::HitItem::setItemIndex ( size_t  index)

Sets index of the item hit (part local index)

void cee::geo::HitItem::setPart ( Part part)

Sets the part.