// 座標変換
CATMathVector2Df dir1f( 0.f, 1.f);
CATMathVector2Df dir2f( -1.f, 0.f);
CATMathPoint2Df oriP;
CAT3x3Matrix RevMatrix( dir1f, dir2f, oriP);
// create text
CATMathPoint2Df iPoint;// = ((CAT2DViewer*)_CustomComponent001)->GetModelCoordinates( CATMathPoint2Df( 0.f, 0.f));
float iHeight = 1.f;
CAT2DAnnotationTextGP* pAnnoTxt = new CAT2DAnnotationTextGP( iPoint, "_TEST", TOP_LEFT, iHeight, 1);
// create customrep
CAT2DCustomRep* p2DCustomRep = new CAT2DCustomRep();
// put GP test in
p2DCustomRep->AddGP( pAnnoTxt, graphicAttributeSet);
// create BagRep( can define a callback)
CAT2DBagRep* pBagRep = new CAT2DBagRep();
// put customrep in
pBagRep->AddChild( *p2DCustomRep );
// 位置変更
pBagRep->SetMatrix( RevMatrix);
//pBagRep->ComputeBoundingElement( );
// 2DView更新
((CAT2DViewer*)_CustomComponent001)->AddRep(pBagRep); |