本文整理汇总了C++中HeeksObj::Owner方法的典型用法代码示例。如果您正苦于以下问题:C++ HeeksObj::Owner方法的具体用法?C++ HeeksObj::Owner怎么用?C++ HeeksObj::Owner使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HeeksObj
的用法示例。
在下文中一共展示了HeeksObj::Owner方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetGripperPositionsTransformed
void HeeksObj::GetGripperPositionsTransformed(std::list<GripData> *list, bool just_for_endof)
{
#ifdef HEEKSCAD
//TODO: We want to transform these coords by whatever has happened to the draw matrix on the way down to our level
//For right now we are just grabbing the sketches coord system, but this isn't right and won't work when parts or
//assemblies come around.
//For that matter it has gotten out of control with the addition of faces and edges to pads
std::list<GripData> newlist;
GetGripperPositions(&newlist,just_for_endof);
gp_Trsf mat;
#ifdef MULTIPLE_OWNERS
HeeksObj* owner = Owner();
CSketch *sketch = dynamic_cast<CSketch*>(owner);
#else
CSketch *sketch = dynamic_cast<CSketch*>(m_owner);
#endif
if(sketch && sketch->m_coordinate_system)
mat = sketch->m_coordinate_system->GetMatrix();
#ifdef MULTIPLE_OWNERS
CPad *pad = dynamic_cast<CPad*>(owner);
if(!pad && owner)
pad = dynamic_cast<CPad*>(owner->Owner());
#else
CPad *pad = dynamic_cast<CPad*>(m_owner);
if(!pad && m_owner)
pad = dynamic_cast<CPad*>(m_owner->m_owner);
#endif
if(pad && pad->m_sketch->m_coordinate_system)
mat = pad->m_sketch->m_coordinate_system->GetMatrix();
std::list<GripData>::iterator it;
for(it = newlist.begin(); it != newlist.end(); ++it)
{
GripData gd = *it;
gp_Pnt pnt(gd.m_x,gd.m_y,gd.m_z);
pnt.Transform(mat);
gd.m_x = pnt.X();
gd.m_y = pnt.Y();
gd.m_z = pnt.Z();
list->push_back(gd);
}
#else
GetGripperPositions(list,just_for_endof);
#endif
}