|
Adesk::Boolean CHollowcore::worldDraw (AcGiWorldDraw *mode)
{
assertReadEnabled () ;
AcGeMatrix3d mMove;
mMove.setTranslation(m_ptOrigin.asVector());
AcGeMatrix3d mRotation;
mRotation.setToRotation(m_dRotation, AcGeVector3d(0,0,1), AcGePoint3d(0,0,0));
AcGeScale3d mScaling(m_vScaling.x, m_vScaling.y, m_vScaling.z);
AcGeMatrix3d matScaling;
mScaling.getMatrix(matScaling);
mode->geometry().pushModelTransform(mMove);
mode->geometry().pushModelTransform(mRotation);
mode->geometry().pushModelTransform(matScaling);
AcDbVoidPtrArray edges;
if(m_rgnBody.explode(edges) == Acad::eOk)
{
while(edges.length() > 0)
{
AcDbObject* pObj = static_cast(edges.at(0));
if(pObj->isKindOf(AcDbLine::desc()))
{
AcDbLine* pLine = static_cast(pObj);
pLine->worldDraw(mode);
}
else if(pObj->isKindOf(AcDbCircle::desc()))
{
AcDbCircle* pCircle = static_cast(pObj);
pCircle->worldDraw(mode);
}
else if(pObj->isKindOf(AcDbArc::desc()))
{
AcDbArc* pArc = static_cast(pObj);
pArc->worldDraw(mode);
}
delete pObj;
edges.removeAt(0);
}
if(m_bShowCores)
DrawCores(mode);
}
mode->geometry().popModelTransform();
mode->geometry().popModelTransform();
mode->geometry().popModelTransform();
return Acad::eOk;
//(AcDbEntity::worldDraw (mode)) ;
} |
|