码迷,mamicode.com
首页 > 其他好文 > 详细

hoops暂时用过的一些方法

时间:2016-11-21 12:43:56      阅读:296      评论:0      收藏:0      [点我收藏+]

标签:返回   subscript   三元组   opera   模式   vector   als   矢量   nts   

(中文全部为谷歌翻译)

 

HC_EXTERNAL void HC_CDECL HC_Show_Shell HC_PROTO ((
HC_KEY, int *, HC_POINT *, int *, int *));

Returns the previous definition of a shell, as referenced by a key.

Parameters:
  key  - Unique numeric identifier pointing to a shell in the database.
  pcount  - Number of valid points in points. Returned to caller. Passed by reference always.
  points  - Vector of x-y-z triplets for the coordinates of the vertices to be used to build the shell. (A simple N x 3 array may also be used. Fortran callers should reverse the subscripts.) Returned to caller. Passed by reference always.
  flist_length  - Total number of integers in face_list. Returned to caller. Passed by reference always.
  face_list  - Encoded description of how to connect the points to build the faces of the shell. Returned to caller. Passed by reference always.

返回shell的先前定义,由键引用。
参数:
key - 指向数据库中的shell的唯一数字标识符。
pcount - 点的有效点数。 返回到调用者。 通过引用总是。
点 - 用于构建外壳的顶点坐标的x-y-z三元组矢量。 (也可以使用一个简单的N×3数组,Fortran调用者应该反转下标。)返回到调用者。 通过引用总是。
flist_length - face_list中的整数的总数。 返回到调用者。 通过引用总是。
face_list - 如何连接点以构建shell的面的编码描述。 返回到调用者。 通过引用总是。

 

 


HC_EXTERNAL void HC_CDECL HC_Show_Shell_Size HC_PROTO ((
HC_KEY, int *, int *));

Finds the size of a given shell. This is useful in determining the size of the data structures that must hold points and face_list.

 

Parameters:
  key  - Unique numeric identifier pointing to a shell in the database.
  pcount  - Number of valid points in points. Returned to caller. Passed by reference always.
  flist_length  - Total number of integers in face_list. Returned to caller. Passed by reference always.
 
查找给定shell的大小。 这在确定必须保持点和face_list的数据结构的大小时很有用。
参数:
key - 指向数据库中的shell的唯一数字标识符。
pcount - 点的有效点数。 返回到调用者。 通过引用总是。
flist_length - face_list中的整数的总数。 返回到调用者。 通过引用总是。

例子:
int a,b,c;
const int q = hc;
HC_Show_Shell_Size(q,&a,&b);

HPoint *d = new HPoint[a];
int *e = new int[b];
HC_Show_Shell(q,&a,d,&b,e);

……

……

delete []d;
delete []e;

 

鼠标的选择模式:

LocalSetOperator(new HOpSelectArea(m_pHView));//正常选择

LocalSetOperator(new HOpObjectTranslate(m_pHView));//移动

LocalSetOperator(new HOpObjectRotate(m_pHView));//旋转

LocalSetOperator(new HOpObjectClash(m_pHView));//检测碰撞

 

设置是否显示顶点

HC_Open_Segment_By_Key (m_pHView->GetSceneKey());
HC_Set_Visibility ("markers only = on");

HC_Set_Visibility ("markers only = off");
HC_Close_Segment ();

操作对象

HC_Open_Segment_By_Key(HC_KShow_Owner_By_Key (hk));
HC_Translate_Object(x,y,z);//平移

HC_Rotate_Object(x,y,z);//绕中心旋转

HC_Rotate_Object_Offaxis(x,y,z,d);//饶任意轴旋转

HC_Close_Segment();

 

hoops暂时用过的一些方法

标签:返回   subscript   三元组   opera   模式   vector   als   矢量   nts   

原文地址:http://www.cnblogs.com/gin304994/p/6084886.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!