XPart(ulong id)
| 原型 | XPart(ulong id) |
| 描述 | 构造函数 |
| 参数 | [i]ulong id: 部件ID |
| 返回值 | 无 |
~XPart()
| 原型 | ~XPart() |
| 描述 | 析构函数 |
| 参数 | 无 |
| 返回值 | 无 |
const XModel * getModel() const
| 原型 | const XModel * getModel() const |
| 描述 | 获取部件所属模型 |
| 参数 | 无 |
| 返回值 | 部件所属模型指针 |
virtual void clear()
| 原型 | virtual void clear() |
| 描述 | 清空部件 |
| 参数 | 无 |
| 返回值 | 无 |
virtual void write(XBinaryIO * io)const
| 原型 | virtual void write(XBinaryIO * io)const |
| 描述 | 将部件数据写入到二进制文件中 |
| 参数 | [i]XBinaryIO * io: 二进制文件句柄 |
| 返回值 | 无 |
virtual ErrorCode read(PartManager * pMgr,XBinaryIO * io)
| 原型 | virtual ErrorCode read(PartManager * pMgr,XBinaryIO * io) |
| 描述 | 从二进制文件中读取部件数据 |
| 参数 | [i]PartManager * pMgr: 部件管理器 [i]XBinaryIO * io: 二进制文件句柄 |
| 返回值 | 如成功读取返回Error_None, 否则返回相应错误码 |
bool isVisible() const
| 原型 | bool isVisible() const |
| 描述 | 部件是否可见 |
| 参数 | 无 |
| 返回值 | 可见返回true,否则返回false |
void setVisible(bool b)
| 原型 | void setVisible(bool b) |
| 描述 | 设置部件的可见性 |
| 参数 | [i]bool b: 部件可见性 |
| 返回值 | 无 |
bool isAuxiliary() const
| 原型 | bool isAuxiliary() const |
| 描述 | 是否辅助部件 |
| 参数 | 无 |
| 返回值 | 是辅助部件返回true,否则返回false |
void setAuxiliary(bool b)
| 原型 | void setAuxiliary(bool b) |
| 描述 | 设置辅助部件 |
| 参数 | [i]bool b: 是否辅助部件 |
| 返回值 | 无 |
RGBAColor getColor() const
| 原型 | RGBAColor getColor() const |
| 描述 | 获取部件颜色 |
| 参数 | 无 |
| 返回值 | 部件颜色 |
void setColor(RGBAColor c)
| 原型 | void setColor(RGBAColor c) |
| 描述 | 设置部件颜色 |
| 参数 | [i]RGBAColor c: 部件颜色 |
| 返回值 | 无 |
ulong getReferencePartID() const
| 原型 | ulong getReferencePartID() const |
| 描述 | 获取参考部件ID |
| 参数 | 无 |
| 返回值 | 参考部件ID |
void setReferencePartID(ulong p)
| 原型 | void setReferencePartID(ulong p) |
| 描述 | 设置参考部件ID |
| 参数 | [i]ulong p: 参考部件ID |
| 返回值 | 无 |
XAssembly * toAssembly()
| 原型 | XAssembly * toAssembly() |
| 描述 | 转换为装配体对象 |
| 参数 | 无 |
| 返回值 | 装配体对象指针(可修改) |
const XAssembly * toAssembly() const
| 原型 | const XAssembly * toAssembly() const |
| 描述 | 转换为装配体对象 |
| 参数 | 无 |
| 返回值 | 装配体对象指针(不可修改) |
ulong getGeometryCount() const
| 原型 | ulong getGeometryCount() const |
| 描述 | 获取几何对象个数 |
| 参数 | 无 |
| 返回值 | 部件几何对象个数 |
void bindGeometryIterator(OrderItemIterator<XGeometry> * pIter)const
| 原型 | void bindGeometryIterator(OrderItemIterator<XGeometry> * pIter)const |
| 描述 | 绑定几何对象访问迭代器 |
| 参数 | [i]OrderItemIterator<XGeometry> * pIter: 几何对象访问迭代器 |
| 返回值 | 无 |
const XGeometry * getFirstGeometry() const
| 原型 | const XGeometry * getFirstGeometry() const |
| 描述 | 获取部件的第一个几何对象 |
| 参数 | 无 |
| 返回值 | 部件的第一个几何对象 |
ulong getPartSnapshotCount() const
| 原型 | ulong getPartSnapshotCount() const |
| 描述 | 获取部件快照的个数 |
| 参数 | 无 |
| 返回值 | 部件快照的个数 |
void bindPartSnapshotIterator(OrderItemIterator<XPartSnapshot> * pIter)const
| 原型 | void bindPartSnapshotIterator(OrderItemIterator<XPartSnapshot> * pIter)const |
| 描述 | 绑定部件快照对象访问迭代器 |
| 参数 | [i]OrderItemIterator<XPartSnapshot> * pIter: 部件快照对象访问迭代器 |
| 返回值 | 无 |
const XPartSnapshot * getFirstPartSnapshot() const
| 原型 | const XPartSnapshot * getFirstPartSnapshot() const |
| 描述 | 获取部件的第一个快照对象 |
| 参数 | 无 |
| 返回值 | 部件的第一个快照对象 |
const XPartSnapshot * getLastSnapshot() const
| 原型 | const XPartSnapshot * getLastSnapshot() const |
| 描述 | 获取部件的最后一个快照对象 |
| 参数 | 无 |
| 返回值 | 部件的最后一个快照对象 |
const XAssembly * getParentAssembly() const
| 原型 | const XAssembly * getParentAssembly() const |
| 描述 | 获取部件的父装配体对象 |
| 参数 | 无 |
| 返回值 | 部件的父装配体对象 |
void setParentAssembly(const XAssembly * a)
| 原型 | void setParentAssembly(const XAssembly * a) |
| 描述 | 设置部件的父装配体对象 |
| 参数 | [i]const XAssembly * a: 部件的父装配体对象 |
| 返回值 | 无 |
TMatrix44<double> & getTrMatrix()
| 原型 | TMatrix44<double> & getTrMatrix() |
| 描述 | 获取部件的变换矩阵 |
| 参数 | 无 |
| 返回值 | 部件的变换矩阵(可修改) |
const TMatrix44<double> & getTrMatrix() const
| 原型 | const TMatrix44<double> & getTrMatrix() const |
| 描述 | 获取部件的变换矩阵 |
| 参数 | 无 |
| 返回值 | 部件的变换矩阵(不可修改) |
void detach(XGeometry * g, GeometryManager * geomMgr)
| 原型 | void detach(XGeometry * g, GeometryManager * geomMgr) |
| 描述 | 解除部件与几何对象的从属关系 |
| 参数 | [i]XGeometry * g: 几何对象 [i] GeometryManager * geomMgr: 几何对象管理器 |
| 返回值 | 无 |
void attach(XGeometry * g, GeometryManager * geomMgr)
| 原型 | void attach(XGeometry * g, GeometryManager * geomMgr) |
| 描述 | 绑定部件与几何对象的从属关系 |
| 参数 | [i]XGeometry * g: 几何对象 [i] GeometryManager * geomMgr: 几何对象管理器 |
| 返回值 | 无 |
void detach(XPartSnapshot * pss, PartSnapshotManager * pssMgr)
| 原型 | void detach(XPartSnapshot * pss, PartSnapshotManager * pssMgr) |
| 描述 | 解除部件与快照对象的从属关系 |
| 参数 | [i]XPartSnapshot * pss: 部件快照对象 [i] PartSnapshotManager * pssMgr: 部件快照对象管理器 |
| 返回值 | 无 |
void attach(XPartSnapshot * pss, PartSnapshotManager * pssMgr)
| 原型 | void attach(XPartSnapshot * pss, PartSnapshotManager * pssMgr) |
| 描述 | 绑定部件与快照对象的从属关系 |
| 参数 | [i]XPartSnapshot * pss: 部件快照对象 [i] PartSnapshotManager * pssMgr: 部件快照对象管理器 |
| 返回值 | 无 |