3DExperience:获得某CATIPLMNavOccurrence的全局位置矩阵(通过CATIMovable与非CATIMovable)

非注释是通过CATIMovable接口获取,注释的是通过CAT3DBagRep类获取。区别在于:在DELMIA中仿真时,通过CATIMovable全局位置矩阵不会变化而通过CAT3DBagRep类获取的可以变化。

ExportedByARKDocumentStructureItf HRESULT ARKEProduct::GetAbsPosition(Transfor &oabsPosition){
	if(_posTag){
		oabsPosition = _currentPos;
		return S_OK;
	}

	_posTag = 1;
	CATIMovable_var spMovable=this;
	spMovable -> GetAbsPosition(_currentPos);
	oabsPosition = _currentPos;
	return S_OK;

	//if(_posRepTag){
	//	oabsPosition = _currentPos;
	//	return S_OK;
	//}

	//_posRepTag = 1;
	//CATI3DGeoVisu *pGeoVisu = NULL;
	//if(SUCCEEDED(this -> QueryInterface(IID_CATI3DGeoVisu,(void**)&pGeoVisu)) && pGeoVisu != NULL){
	//	CAT3DBagRep *pBagRep = (CAT3DBagRep *)pGeoVisu -> GiveRep();
	//	if(pBagRep == NULL){
	//		oabsPosition = Transfor();
	//		return S_OK;
	//	}
	//	pGeoVisu -> Release();
	//	pGeoVisu = NULL;
	//	const CAT4x4Matrix *pMatrix = pBagRep -> GetMatrix();
	//	CATMathDirectionf duf,dvf,dwf;
	//	CATMathPointf tpf;
	//	pMatrix -> GetComponents(duf,dvf,dwf,tpf);
	//	Direction du,dv,dw;
	//	Point tp;
	//	duf.GetValue(du);
	//	dvf.GetValue(dv);
	//	dwf.GetValue(dw);
	//	tpf.GetValue(tp);
	//	ARKIProduct *pFather = NULL;
	//	this -> GetFather(pFather);
	//	if(pFather != NULL){
	//		Transfor fatherPos;
	//		pFather -> GetAbsPosition(fatherPos);
	//		_currentPos = fatherPos*Transfor(CATMath3x3Matrix(du,dv,dw),Vector(tp.GetX(),tp.GetY(),tp.GetZ()));
	//	}
	//	else
	//		_currentPos = Transfor(CATMath3x3Matrix(du,dv,dw),Vector(tp.GetX(),tp.GetY(),tp.GetZ()));
	//}

	//oabsPosition = _currentPos;
	//return S_OK;
}
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值