XModel(ulong mid) | 原型 | XModel(ulong mid) | | 描述 | 构造函数 | | 参数 | [i]ulong mid: 模型ID | | 返回值 | 无 | ~XModel() | 原型 | ~XModel() | | 描述 | 析构函数 | | 参数 | 无 | | 返回值 | 无 | void init(OpnRecorder * rec = NULL) | 原型 | void init(OpnRecorder * rec = NULL) | | 描述 | 初始化模型的域ID,以支持undo、redo操作。构建模型后必须显示调用。 | | 参数 | [i]OpnRecorder * rec = NULL: 模型数据操作记录器,可为空(此时undo、redo将不被支持,可提高执行效率) | | 返回值 | 无 | const XPart * getPart(ulong id)const | 原型 | const XPart * getPart(ulong id)const | | 描述 | 访问模型部件 | | 参数 | [i]ulong id: 部件ID | | 返回值 | 模型部件指针 | XNode * checkOutNode(const XNode * n) | 原型 | XNode * checkOutNode(const XNode * n) | | 描述 | 以可修改的模式访问模型节点 | | 参数 | [i]const XNode * n: 节点常指针(不可修改) | | 返回值 | 节点指针(可修改) | XElement * checkOutElement(const XElement * e) | 原型 | XElement * checkOutElement(const XElement * e) | | 描述 | 以可修改的模式访问模型单元 | | 参数 | [i]const XElement * e: 单元常指针(不可修改) | | 返回值 | 单元指针(可修改) | XElement * checkOutElement(ulong id) | 原型 | XElement * checkOutElement(ulong id) | | 描述 | 以可修改的模式访问模型单元 | | 参数 | [i]ulong id: 单元ID | | 返回值 | 单元指针(可修改) | XPart * checkOutPart(ulong id) | 原型 | XPart * checkOutPart(ulong id) | | 描述 | 以可修改的模式访问模型部件 | | 参数 | [i]ulong id: 部件ID | | 返回值 | 部件指针(可修改) | XPart * checkOutPart(const XPart * p) | 原型 | XPart * checkOutPart(const XPart * p) | | 描述 | 以可修改的模式访问模型节点 | | 参数 | [i]const XPart * p: 节点常指针(不可修改) | | 返回值 | 节点指针(可修改) | void bindPartSnapshotManager(PartSnapshotManager * pssMgr) | 原型 | void bindPartSnapshotManager(PartSnapshotManager * pssMgr) | | 描述 | 绑定部件快照管理器,用于在某些场景下构建部件快照 | | 参数 | [i]PartSnapshotManager * pssMgr: 部件快照管理器 | | 返回值 | 无 | PartManager * getPartManager() | 原型 | PartManager * getPartManager() | | 描述 | 获取模型部件管理器 | | 参数 | 无 | | 返回值 | 模型部件管理器 | NodeManager * getNodeManager() | 原型 | NodeManager * getNodeManager() | | 描述 | 获取模型节点管理器 | | 参数 | 无 | | 返回值 | | ElementManager * getElemManager() | 原型 | ElementManager * getElemManager() | | 描述 | 获取模型单元管理器 | | 参数 | 无 | | 返回值 | | GeometryManager * getGeometryManager() | 原型 | GeometryManager * getGeometryManager() | | 描述 | 获取模型几何管理器 | | 参数 | 无 | | 返回值 | | const XAssembly * getAssemblyRoot() const | 原型 | const XAssembly * getAssemblyRoot() const | | 描述 | 获取模型装配树根节点 | | 参数 | 无 | | 返回值 | 模型装配树根节点 | const XAssembly * getAuxiliaryRoot() const | 原型 | const XAssembly * getAuxiliaryRoot() const | | 描述 | 获取模型辅助树根节点 | | 参数 | 无 | | 返回值 | 模型辅助树根节点 | const XGeometry * getGeometry(ulong id)const | 原型 | const XGeometry * getGeometry(ulong id)const | | 描述 | 访问模型几何 | | 参数 | [i]ulong id: 模型几何ID | | 返回值 | 模型几何指针(不可修改) | XGeometry * checkOutGeometry(ulong id) | 原型 | XGeometry * checkOutGeometry(ulong id) | | 描述 | 以可修改的模式访问模型几何 | | 参数 | [i]ulong id: 模型几何ID | | 返回值 | 模型几何指针(可修改) | XGeometry * checkOutGeometry(const XGeometry *g) | 原型 | XGeometry * checkOutGeometry(const XGeometry *g) | | 描述 | 以可修改的模式访问模型几何 | | 参数 | [i]const XGeometry *g: 模型几何指针(不可修改) | | 返回值 | 模型几何指针(可修改) | void bindPartIterator(HashIterator * pIter) const | 原型 | void bindPartIterator(HashIterator * pIter) const | | 描述 | 绑定模型部件遍历迭代器 | | 参数 | [i]HashIterator * pIter: 部件遍历迭代器 | | 返回值 | 无 | void bindNodeIterator(HashIterator * pIter)const | 原型 | void bindNodeIterator(HashIterator * pIter)const | | 描述 | 绑定模型节点遍历迭代器 | | 参数 | [i]HashIterator * pIter: 节点遍历迭代器 | | 返回值 | 无 | void bindElementIterator(HashIterator * pIter)const | 原型 | void bindElementIterator(HashIterator * pIter)const | | 描述 | 绑定模型单元遍历迭代器 | | 参数 | [i]HashIterator * pIter: 单元遍历迭代器 | | 返回值 | 无 | void bindGeometryIterator(HashIterator * pIter)const | 原型 | void bindGeometryIterator(HashIterator * pIter)const | | 描述 | 绑定模型几何遍历迭代器 | | 参数 | [i]HashIterator * pIter: 几何遍历迭代器 | | 返回值 | 无 | void bindGeometryIterator(HashIterator * pIter,TypeID gt)const | 原型 | void bindGeometryIterator(HashIterator * pIter,TypeID gt)const | | 描述 | 指定拓扑类型绑定模型几何遍历迭代器,只有拓扑类型一致的几何会被遍历到 | | 参数 | [i]HashIterator * pIter: 指定拓扑类型的遍历迭代器 \\ [i]TypeID gt: 拓扑类型 | | 返回值 | 无 | void removeGeometry(const XGeometry * g) | 原型 | void removeGeometry(const XGeometry * g) | | 描述 | 删除模型几何对象 | | 参数 | [i]const XGeometry * g: 模型几何对象 | | 返回值 | 无 | XGeometry * createGeometry(TypeID t,ulong id = 0,XGeometry * parent = 0) | 原型 | XGeometry * createGeometry(TypeID t,ulong id = 0,XGeometry * parent = 0) | | 描述 | 创建模型几何对象 | | 参数 | [i]TypeID t: 拓扑类型 \\ [i]ulong id = 0: 几何ID,为0时将使用管理器记录的NextID \\ [i]XGeometry * parent = 0: 父拓扑 | | 返回值 | 模型几何对象 | XNode * createNode(const real * coord,ulong nid = 0) | 原型 | XNode * createNode(const real * coord,ulong nid = 0) | | 描述 | 创建模型节点 | | 参数 | [i]const real * coord: 节点坐标 \\ [i]ulong nid = 0: 节点ID,为0时将使用管理器记录的NextID | | 返回值 | 模型节点对象指针 | XAssembly * createAssembly(const char * name, ulong id, XAssembly * parent, bool bAuxiliary = false) | 原型 | XAssembly * createAssembly(const char * name, ulong id, XAssembly * parent, bool bAuxiliary = false) | | 描述 | 创建模型装配体 | | 参数 | [i]const char * name: 装配体名字 \\ [i] ulong id: 装配体ID,为0时将使用部件管理器记录的NextID \\ [i] XAssembly * parent: 父装配体 \\ [i] bool bAuxiliary = false: 是否为辅助对象,默认否 | | 返回值 | 装配体对象指针 | XPart * createPart(const char * name, ulong id, XAssembly * parent, bool bAuxiliary = false) | 原型 | XPart * createPart(const char * name, ulong id, XAssembly * parent, bool bAuxiliary = false) | | 描述 | 创建模型部件对象 | | 参数 | [i]const char * name: 部件名字 \\ [i] ulong id: 部件ID,为0时将使用部件管理器记录的NextID \\ [i] XAssembly * parent: 父装配体,为空时父装配体自动被设置为相应的根节点 \\ [i] bool bAuxiliary = false: 是否为辅助对象,默认否 | | 返回值 | 模型部件对象指针 | void removeNode(const XNode * pNode) | 原型 | void removeNode(const XNode * pNode) | | 描述 | 删除模型节点 | | 参数 | [i]const XNode * pNode: 模型节点 | | 返回值 | 无 | void moveNode(const XNode * n, const real * coord) | 原型 | void moveNode(const XNode * n, const real * coord) | | 描述 | 移动模型节点到新位置(自动更新与节点相关的视图数据) | | 参数 | [i]const XNode * n: 模型节点 \\ [i] const real * coord: 新的坐标 | | 返回值 | 无 | NodePtr getNode(ulong id) const | 原型 | NodePtr getNode(ulong id) const | | 描述 | 访问模型节点 | | 参数 | [i]ulong id: 模型节点ID | | 返回值 | 模型节点指针(不可修改) | XElement * createElement(TypeID et, const NodePtr* pNodes,ulong eid = 0,XGeometry * entity = 0, bool bUpdateNodeElemLink = true) | 原型 | XElement * createElement(TypeID et, const NodePtr* pNodes,ulong eid = 0,XGeometry * entity = 0, bool bUpdateNodeElemLink = true) | | 描述 | 创建模型单元对象 | | 参数 | [i]TypeID et: 单元类型 \\ [i] const NodePtr* pNodes: 单元节点指针数组 \\ [i]ulong eid = 0: 单元ID,为0时将使用单元管理器记录的NextID \\ [i]XGeometry * entity = 0: 单元所属几何对象 \\ [i] bool bUpdateNodeElemLink = true: 是否更新节点的单元链接表 | | 返回值 | 模型单元对象指针 | void removeElement(XElement * pElement, bool bDeleteFreeNode = true) | 原型 | void removeElement(XElement * pElement, bool bDeleteFreeNode = true) | | 描述 | 删除模型单元 | | 参数 | [i]XElement * pElement: 单元指针 \\ [i] bool bDeleteFreeNode = true: 是否删除自由节点(节点的单元链接表为空) | | 返回值 | 无 | void replaceElemNode(XElement* pElem,const XNode * old, const XNode * new_node,bool notDetachOld = false) | 原型 | void replaceElemNode(XElement* pElem,const XNode * old, const XNode * new_node,bool notDetachOld = false) | | 描述 | 替换单元节点 | | 参数 | [i]XElement* pElem: 单元指针 \\ [i]const XNode * old: 被替换的单元节点 \\ [i] const XNode * new_node: 替换后的单元节点 \\ [i]bool notDetachOld = false: 是否不解除替换前的节点单元绑定关系,默认解除 | | 返回值 | 无 | void resetElemNodes(XElement* pElem,const XNode ** ns) | 原型 | void resetElemNodes(XElement* pElem,const XNode ** ns) | | 描述 | 重置单元节点 | | 参数 | [i]XElement* pElem: 单元指针 \\ [i]const XNode ** ns: 单元节点数组 | | 返回值 | 无 | void setElemNode(XElement* pElem,int index, const XNode * new_node) | 原型 | void setElemNode(XElement* pElem,int index, const XNode * new_node) | | 描述 | 设置单元节点 | | 参数 | [i]XElement* pElem: 单元指针 \\ [i]int index: 节点序号 \\ [i] const XNode * new_node: 单元节点指针 | | 返回值 | 无 | void updateNodeElementLink(bool bKeepOld) | 原型 | void updateNodeElementLink(bool bKeepOld) | | 描述 | 更新节点的单元链接表 | | 参数 | [i]bool bKeepOld: 是否保持已有的单元链接表而不是完全重建 | | 返回值 | 无 | void updateNodeElementLink(vector * parts, bool bKeepOld) | 原型 | void updateNodeElementLink(vector * parts, bool bKeepOld) | | 描述 | 更新指定部件数组内节点的单元链接表 | | 参数 | [i]vector * parts: 指定部件数组 \\ [i] bool bKeepOld: 是否保持已有的单元链接表而不是完全重建 | | 返回值 | 无 | void updateNodeElementLink(vector * geoms, bool bKeepOld) | 原型 | void updateNodeElementLink(vector * geoms, bool bKeepOld) | | 描述 | 更新指定几何数组内节点的单元链接表 | | 参数 | [i]vector * geoms: 指定几何数组 \\ [i] bool bKeepOld: 是否保持已有的单元链接表而不是完全重建 | | 返回值 | 无 | void addCellFacet(ElemPtr pFacet, XElement * cell) | 原型 | void addCellFacet(ElemPtr pFacet, XElement * cell) | | 描述 | 为cell单元添加面单元(有限体积法中使用) | | 参数 | [i]ElemPtr pFacet: 面单元(一般为Polygon或者Polyline单元) \\ [i] XElement * cell: Cell单元 | | 返回值 | 无 | void removeCellFacet(ElemPtr facet, XElement * cell) | 原型 | void removeCellFacet(ElemPtr facet, XElement * cell) | | 描述 | 删除Cell单元的面 | | 参数 | [i]ElemPtr facet: Cell面单元(一般为Polygon或者Polyline单元) \\ [i] XElement * cell: Cell单元 | | 返回值 | 无 | void setPolylineNodes(const XNode ** ns, int cnt, XElement* pElem) | 原型 | void setPolylineNodes(const XNode ** ns, int cnt, XElement* pElem) | | 描述 | 设置多折线单元的节点 | | 参数 | [i]const XNode ** ns: 节点数组 \\ [i] int cnt: 节点个数 \\ [i] XElement* pElem:多折线单元指针 | | 返回值 | 无 | void setPolygonNodes(const XNode ** ns, int cnt, XElement* pElem) | 原型 | void setPolygonNodes(const XNode ** ns, int cnt, XElement* pElem) | | 描述 | 设置多边形单元的节点 | | 参数 | [i]const XNode ** ns: 节点数组 \\ [i] int cnt: 节点个数 \\ [i] XElement* pElem: 多边形单元指针 | | 返回值 | 无 | void setCellFacets(const XElement ** facets, int cnt, XElement* pElem) | 原型 | void setCellFacets(const XElement ** facets, int cnt, XElement* pElem) | | 描述 | 设置Cell单元的面信息 | | 参数 | [i]const XElement ** facets: Cell单元面数组 \\ [i] int cnt: 面的个数 \\ [i] XElement* pElem: Cell单元数组 | | 返回值 | 无 | ElemPtr getElement(ulong id) const | 原型 | ElemPtr getElement(ulong id) const | | 描述 | 访问模型单元 | | 参数 | [i]ulong id: 单元ID | | 返回值 | 模型单元指针(不可修改) | void removePart(const XPart * pPart) | 原型 | void removePart(const XPart * pPart) | | 描述 | 删除模型部件 | | 参数 | [i]const XPart * pPart: 模型部件指针 | | 返回值 | 无 | int getPartCount(bool bExcludeAsb = true) const | 原型 | int getPartCount(bool bExcludeAsb = true) const | | 描述 | 获取模型部件个数 | | 参数 | [i]bool bExcludeAsb = true: 是否包含装配体 | | 返回值 | 模型部件个数 | int getElementCount()const | 原型 | int getElementCount()const | | 描述 | 获取模型单元个数 | | 参数 | 无 | | 返回值 | 模型单元个数 | int getNodeCount()const | 原型 | int getNodeCount()const | | 描述 | 获取模型节点个数 | | 参数 | 无 | | 返回值 | 模型节点个数 | int getSurfaceElementCount()const | 原型 | int getSurfaceElementCount()const | | 描述 | 获取模型面单元个数 | | 参数 | 无 | | 返回值 | 模型面单元个数 | int getGeometryCount(TypeID gt)const | 原型 | int getGeometryCount(TypeID gt)const | | 描述 | 获取指定拓扑类型的模型几何对象个数 | | 参数 | [i]TypeID gt: 拓扑类型 | | 返回值 | 模型几何对象个数 | int getGeometryCount() const | 原型 | int getGeometryCount() const | | 描述 | 获取全部模型几何对象个数 | | 参数 | 无 | | 返回值 | 全部模型几何对象个数 | void attachElemToGeom(XGeometry * g, XElement * el) | 原型 | void attachElemToGeom(XGeometry * g, XElement * el) | | 描述 | 绑定几何对象与单元对象的从属关系 | | 参数 | [i]XGeometry * g: 模型几何对象 \\ [i] XElement * el: 模型单元对象 | | 返回值 | 无 | void detachElemFromGeom(XGeometry * g, XElement * el) | 原型 | void detachElemFromGeom(XGeometry * g, XElement * el) | | 描述 | 解除几何对象与单元对象的从属关系 | | 参数 | [i]XGeometry * g: 模型几何对象 \\ [i] XElement * el: 模型单元对象 | | 返回值 | 无 | void attachPartToAssembly(XAssembly * asb, XPart * p) | 原型 | void attachPartToAssembly(XAssembly * asb, XPart * p) | | 描述 | 绑定装配体与部件的从属关系 | | 参数 | [i]XAssembly * asb: 模型装配体对象 \\ [i] XPart * p: 模型部件对象 | | 返回值 | 无 | void detachPartFromAssembly(XAssembly * asb, XPart * p) | 原型 | void detachPartFromAssembly(XAssembly * asb, XPart * p) | | 描述 | 解除装配体与部件的从属关系 | | 参数 | [i]XAssembly * asb: 模型装配体对象 \\ [i] XPart * p: 模型部件对象 | | 返回值 | 无 | void attachPartSnapshot(XPart * p, XPartSnapshot * asb) | 原型 | void attachPartSnapshot(XPart * p, XPartSnapshot * asb) | | 描述 | 绑定部件与部件快照对象的从属关系 | | 参数 | [i]XPart * p: 模型部件对象 \\ [i] XPartSnapshot * asb: 部件快照对象 | | 返回值 | 无 | void detachPartSnapshot(XPart * p, XPartSnapshot * asb) | 原型 | void detachPartSnapshot(XPart * p, XPartSnapshot * asb) | | 描述 | 解除部件与部件快照对象的从属关系 | | 参数 | [i]XPart * p: 模型部件对象 \\ [i] XPartSnapshot * asb: 部件快照对象 | | 返回值 | 无 | void attachGeomToPart(XGeometry * g, XPart * p) | 原型 | void attachGeomToPart(XGeometry * g, XPart * p) | | 描述 | 绑定几何对象与部件对象的从属关系 | | 参数 | [i]XGeometry * g: 模型几何对象 \\ [i] XPart * p: 模型部件对象 | | 返回值 | 无 | void detachGeomFromPart(XGeometry * g, XPart * p) | 原型 | void detachGeomFromPart(XGeometry * g, XPart * p) | | 描述 | 解除几何对象与部件对象的从属关系 | | 参数 | [i]XGeometry * g: 模型几何对象 \\ [i] XPart * p: 模型部件对象 | | 返回值 | 无 | void attachGeomChild(XGeometry * g, const XGeometry * child) | 原型 | void attachGeomChild(XGeometry * g, const XGeometry * child) | | 描述 | 绑定几何对象的拓扑从属关系 | | 参数 | [i]XGeometry * g: 模型几何父对象 \\ [i] const XGeometry * child: 模型几何子对象 | | 返回值 | 无 | void detachGeomChild(XGeometry * g, const XGeometry * child) | 原型 | void detachGeomChild(XGeometry * g, const XGeometry * child) | | 描述 | 解除几何对象的拓扑从属关系 | | 参数 | [i]XGeometry * g: 模型几何父对象 \\ [i] const XGeometry * child: 模型几何子对象 | | 返回值 | 无 | void clear() | 原型 | void clear() | | 描述 | 清空模型并重置模型为初始状态 | | 参数 | 无 | | 返回值 | 无 | void clearViewData() | 原型 | void clearViewData() | | 描述 | 清空模型视图数据 | | 参数 | 无 | | 返回值 | 无 | void updateViewData() | 原型 | void updateViewData() | | 描述 | 更新构建模型视图数据 | | 参数 | 无 | | 返回值 | 无 | bool isViewDataReady() const | 原型 | bool isViewDataReady() const | | 描述 | 判断模型视图数据是否已准备好 | | 参数 | 无 | | 返回值 | 如已准备好返回true,否则返回false | ulong getNextGeometryId() | 原型 | ulong getNextGeometryId() | | 描述 | 获取模型几何对象下一个可用的ID | | 参数 | 无 | | 返回值 | 模型几何对象下一个可用的ID | ulong getNextElementId() | 原型 | ulong getNextElementId() | | 描述 | 获取模型单元对象下一个可用的ID | | 参数 | 无 | | 返回值 | 模型单元对象下一个可用的ID | ulong getNextNodeId() | 原型 | ulong getNextNodeId() | | 描述 | 获取模型节点对象下一个可用的ID | | 参数 | 无 | | 返回值 | 模型节点对象下一个可用的ID | const XBoundBox & getBoundBox() const | 原型 | const XBoundBox & getBoundBox() const | | 描述 | 获取模型的包围盒 | | 参数 | 无 | | 返回值 | 模型的包围盒 | void normalizeBoundBox(const real * origin, real scale) | 原型 | void normalizeBoundBox(const real * origin, real scale) | | 描述 | 归一化模型包围盒 | | 参数 | [i]const real * origin: 归一化基准点 \\ [i] real scale: 归一化系数 | | 返回值 | 无 | void restoreBoundBox(const real * origin, real scale) | 原型 | void restoreBoundBox(const real * origin, real scale) | | 描述 | 恢复模型包围盒(一般在归一化完成计算之后调用) | | 参数 | [i]const real * origin: 归一化基准点 \\ [i] real scale: 归一化系数 | | 返回值 | 无 | void updateBoundBox() | 原型 | void updateBoundBox() | | 描述 | 更新模型包围盒 | | 参数 | 无 | | 返回值 | 无 | void setPartVisible(ulong id,bool bVisible) | 原型 | void setPartVisible(ulong id,bool bVisible) | | 描述 | 设置部件的可见性 | | 参数 | [i]ulong id: 部件ID \\ [i]bool bVisible: 是否可见 | | 返回值 | 无 | void setGeomVisible(ulong id, bool bVisible) | 原型 | void setGeomVisible(ulong id, bool bVisible) | | 描述 | 设置几何对象的可见性 | | 参数 | [i]ulong id: 几何对象ID \\ [i] bool bVisible: 是否可见 | | 返回值 | 无 | XVertex* getVertexByNode(XNode * pNode) | 原型 | XVertex* getVertexByNode(XNode * pNode) | | 描述 | 获取节点上的几何顶点对象 | | 参数 | [i]XNode * pNode: 模型节点对象 | | 返回值 | 如节点上由几何顶点存在,返回该几何对象,否则返回空 | void createDefaultPart() | 原型 | void createDefaultPart() | | 描述 | 构建默认的模型部件,一般在导入网格(网格数据没有部件装配关系)后使用 | | 参数 | 无 | | 返回值 | 无 | void write(XBinaryIO * io) const | 原型 | void write(XBinaryIO * io) const | | 描述 | 将模型数据写入到二进制文件中 | | 参数 | [i]XBinaryIO * io: 二进制文件句柄 | | 返回值 | | void save(const char * fname) const | 原型 | void save(const char * fname) const | | 描述 | 将模型数据保存到文件中 | | 参数 | [i]const char * fname: 文件路径 | | 返回值 | 无 | bool load(const char * fname) | 原型 | bool load(const char * fname) | | 描述 | 从文件中载入模型数据 | | 参数 | [i]const char * fname: 文件路径 | | 返回值 | 成功载入返回true,否则返回false | void saveH5(const char * fname) const | 原型 | void saveH5(const char * fname) const | | 描述 | 将模型数据保存到HDF5文件中 | | 参数 | [i]const char * fname: HDF5文件路径 | | 返回值 | 无 | bool loadH5(const char * fname) | 原型 | bool loadH5(const char * fname) | | 描述 | 从HDF5文件中载入模型数据 | | 参数 | [i]const char * fname: HDF5文件路径 | | 返回值 | 成功载入返回true,否则返回false | ErrorCode read(XBinaryIO * io) | 原型 | ErrorCode read(XBinaryIO * io) | | 描述 | 从二进制文件中读取模型数据 | | 参数 | [i]XBinaryIO * io: 二进制文件句柄 | | 返回值 | 成功读取返回Error_None,否则返回相应错误码 | void write(XH5IO * io, H5Obj * grp) const | 原型 | void write(XH5IO * io, H5Obj * grp) const | | 描述 | 将模型数据写入到HDF5文件中 | | 参数 | [i]XH5IO * io: 二进制文件句柄 \\ [i] H5Obj * grp: 对应的HDF5节点 | | 返回值 | 无 | bool read(XH5IO * io, H5Obj * grp) | 原型 | bool read(XH5IO * io, H5Obj * grp) | | 描述 | 从HDF5文件中读取模型数据 | | 参数 | [i]XH5IO * io: HDF5文件句柄 \\ [i] H5Obj * grp: 对应的HDF5节点 | | 返回值 | 成功读取返回true,否则返回false | void copy(XModel * mdl) | 原型 | void copy(XModel * mdl) | | 描述 | 将另外一个模型的数据复制到本模型中 | | 参数 | [i]XModel * mdl: 被复制的模型对象 | | 返回值 | 无 | bool isVisible() const | 原型 | bool isVisible() const | | 描述 | 模型是否可见 | | 参数 | 无 | | 返回值 | 模型可见返回true,否则返回false | void setVisible(bool b) | 原型 | void setVisible(bool b) | | 描述 | 设置模型的可见性 | | 参数 | [i]bool b: 是否可见 | | 返回值 | 无 | void updateAfterRenumber(TypeID tid) | 原型 | void updateAfterRenumber(TypeID tid) | | 描述 | 在对模型对象重编号之后调用,用以更新对重编号对象的引用 | | 参数 | [i]TypeID tid: 重编号的对象类型 | | 返回值 | | void setGLDataReady(bool bReady) | 原型 | void setGLDataReady(bool bReady) | | 描述 | 设置模型视图数据是否准备完毕 | | 参数 | [i]bool bReady: 模型视图数据是否准备完成 | | 返回值 | 无 | real getNormalizedScale() | 原型 | real getNormalizedScale() | | 描述 | 获取模型归一化系数 | | 参数 | 无 | | 返回值 | 模型归一化系数 | void setNormalizedScale(real s) | 原型 | void setNormalizedScale(real s) | | 描述 | 设置模型归一化系数 | | 参数 | [i]real s: 模型归一化系数 | | 返回值 | 无 | OpnRecorder * getRecorder() | 原型 | OpnRecorder * getRecorder() | | 描述 | 获取模型数据操作记录器 | | 参数 | 无 | | 返回值 | 模型数据操作记录器 | void updateFaceColorByPart(const XPart * p) | 原型 | void updateFaceColorByPart(const XPart * p) | | 描述 | 根据所属部件更新面的颜色 | | 参数 | [i]const XPart * p: 模型部件对象 | | 返回值 | 无 | void setGeomVisible(const XGeometry * g, bool bVisible) | 原型 | void setGeomVisible(const XGeometry * g, bool bVisible) | | 描述 | 设置几何可见性 | | 参数 | [i]const XGeometry * g: 模型几何对象 \\ [i] bool bVisible: 是否可见 | | 返回值 | 无 | void writeNodes(XBinaryIO * io) const | 原型 | void writeNodes(XBinaryIO * io) const | | 描述 | 将模型节点数据写入到二进制文件中 | | 参数 | [i]XBinaryIO * io: 二进制文件句柄 | | 返回值 | 无 | ErrorCode readNodes(XBinaryIO * io,int cnt) | 原型 | ErrorCode readNodes(XBinaryIO * io,int cnt) | | 描述 | 从二进制文件中读取模型节点数据 | | 参数 | [i]XBinaryIO * io: 二进制文件句柄 \\ [i]int cnt: 节点个数 | | 返回值 | 成功读取返回Error_None, 否则返回相应错误码 | void writeElements(XBinaryIO * io) const | 原型 | void writeElements(XBinaryIO * io) const | | 描述 | 将模型单元数据写入到二进制文件中 | | 参数 | [i]XBinaryIO * io: 二进制文件句柄 | | 返回值 | 无 | ErrorCode readElements(XBinaryIO * io) | 原型 | ErrorCode readElements(XBinaryIO * io) | | 描述 | 从二进制文件中读取模型单元数据 | | 参数 | [i]XBinaryIO * io: 二进制文件句柄 | | 返回值 | 成功读取返回Error_None, 否则返回相应错误码 | void writeAssembly(XBinaryIO * io, TreeNode * pItem = 0) const | 原型 | void writeAssembly(XBinaryIO * io, TreeNode * pItem = 0) const | | 描述 | 将装配体数据写入到二进制文件中 | | 参数 | [i]XBinaryIO * io: 二进制文件句柄 \\ [i] TreeNode * pItem = 0: 装配体对应的树节点 | | 返回值 | 无 | ErrorCode readAssembly(XBinaryIO * io, TreeNode * pItem = 0) | 原型 | ErrorCode readAssembly(XBinaryIO * io, TreeNode * pItem = 0) | | 描述 | 从二进制文件中读取装配体 | | 参数 | [i]XBinaryIO * io: 二进制文件句柄 \\ [i] TreeNode * pItem = 0: 装配体对应的树节点 | | 返回值 | 成功读取返回Error_None, 否则返回相应错误码 |