- UID
- 119490
- 积分
- 0
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2004-3-31
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2004-8-19 10:58:51
|
显示全部楼层
总是不行,程序在这,谁帮我看看
void tss()
{
int i ; // Row of ads_matrix
ads_matrix xform; // The transformation matrix
ads_name ssGrp; // The entities that make up transform SS
int rc; // Return code
ads_real sf; // Scale Factor
// Select the entities
acedPrompt("\nSelect enties to scale (transfrom) ");
rc = acedSSGet(NULL, NULL, NULL, NULL, ssGrp);
if(rc != RTNORM)
{
acutPrintf("\nEmpty or invalid selection set ");
return;
}
// Input the scale factor
acedInitGet(RSG_NONULL + RSG_NONEG + RSG_NOZERO, NULL);
//acedGetReal("\nTransformation Scale factor: ", &sf);
// Initialize the matrix
ident_init(xform);
xform[2][2] = 0.0;
// Apply the scaling factor
// to the matrix
//for(i = 0; i <= 3; i++)
//{
// xform = sf;
//}
rc = acedXformSS(ssGrp, xform);
if(rc != RTNORM)
{
acutPrintf("\nFailed in transformation of selection set. ");
}
acedSSFree(ssGrp);
}
void ident_init(ads_matrix id)
{
int i, j;
for(i=0; i<=3; i++)
{
for (j=0; j<=3; j++)
{
id[j] = 0.0;
}
}
for(i=0; i<=3; i++)
{
id = 1.0;
}
} |
|