TA的每日心情 | 开心 昨天 06:36 |
---|
签到天数: 15 天 [LV.4]偶尔看看III
管理员
- 积分
- 1308
|
- static void zffObjectARX采用MyCommand6(void)
- {
- AcDbObjectId secondId;
- AcDbObjectId minutId;
- AcDbObjectId HourId;
- AcDbEntity* pSecond=NULL;
- AcDbEntity* pMinute=NULL;
- AcDbEntity* pHour=NULL;
- AcDbHandle haSecond(采用T("209"));
- AcDbHandle haMinut(采用T("1FC"));
- AcDbHandle haHour(采用T("1FB"));
- AcDbDatabase* pDb=acdbHostApplicationServices()->workingDatabase();
- pDb->getAcDbObjectId(secondId,false,haSecond);
- pDb->getAcDbObjectId(minutId,false,haMinut);
- pDb->getAcDbObjectId(HourId,false,haHour);
- double ang=pi()/30;
- AcGeMatrix3d rotate,minut,hour;
- rotate.setToRotation(-ang,AcGeVector3d::kZAxis,AcGePoint3d(100,100,0));
- minut.setToRotation(-ang/60,AcGeVector3d::kZAxis,AcGePoint3d(100,100,0));
- hour.setToRotation(-ang/720,AcGeVector3d::kZAxis,AcGePoint3d(100,100,0));
- while (1)
- {
- clock采用t start=clock();
- clock采用t time=CLOCKS采用PER采用SEC;
- while (clock()-start<time)
- ;
- acdbOpenObject(pSecond,secondId,AcDb::kForWrite);
- acdbOpenObject(pMinute,minutId,AcDb::kForWrite);
- acdbOpenObject(pHour,HourId,AcDb::kForWrite);
- pSecond->transformBy(rotate);
- pMinute->transformBy(minut);
- pHour->transformBy(hour);
- pSecond->close();
- pMinute->close();
- pHour->close();
- pSecond=NULL;
- pMinute=NULL;
- pHour=NULL;
- actrTransactionManager->queueForGraphicsFlush();
- actrTransactionManager->flushGraphics();
- acedUpdateDisplay();
- }
- }
复制代码 |
|