本文整理汇总了C++中AcGeVector3d::rotateBy方法的典型用法代码示例。如果您正苦于以下问题:C++ AcGeVector3d::rotateBy方法的具体用法?C++ AcGeVector3d::rotateBy怎么用?C++ AcGeVector3d::rotateBy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AcGeVector3d
的用法示例。
在下文中一共展示了AcGeVector3d::rotateBy方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: caclEndPoint
void DoubleTunnelDraw::caclEndPoint( AcGePoint3d& endPt1, AcGePoint3d& endPt2 )
{
AcGeVector3d v = m_endPt - m_startPt;
v.normalize();
v.rotateBy( PI * 0.5, AcGeVector3d::kZAxis );
endPt1 = m_endPt + v * m_width * 0.5;
v.rotateBy( PI, AcGeVector3d::kZAxis );
endPt2 = m_endPt + v * m_width * 0.5;
}
示例2: caclEndPoint
void DoubleLine::caclEndPoint( AcGePoint3d& endPt1, AcGePoint3d& endPt2 )
{
AcGeVector3d v = m_ept - m_spt;
v.normalize();
v.rotateBy( PI * 0.5, AcGeVector3d::kZAxis );
endPt1 = m_ept + v * m_width * 0.5;
v.rotateBy( PI, AcGeVector3d::kZAxis );
endPt2 = m_ept + v * m_width * 0.5;
}
示例3: DrawWindLibrary
void DrawCmd::DrawWindLibrary( void )
{
AcDbObjectId objId = ArxUtilHelper::SelectObject( _T( "请选择一条巷道:" ) );
if( objId.isNull() ) return;
if( !ArxUtilHelper::IsEqualType( _T( "LinkedGE" ), objId ) ) return;
AcGePoint3d pt,insertPt;
double angle;
if( !ArxUtilHelper::PromptPt( _T( "\n请指定风库的插入点坐标:" ), pt ) ) return;
if( !GetClosePtAndAngle( objId, pt, angle ) ) return;
AcGeVector3d v = AcGeVector3d(AcGeVector3d::kXAxis);
v.rotateBy(angle - PI/2,AcGeVector3d::kZAxis);
v.normalize();
insertPt = pt + v * 60;
WindLibrary* pWindLib = new WindLibrary( insertPt, angle );
if( pWindLib == 0 ) return;
pWindLib->setRelatedGE( objId ); // 关联巷道
// 初始化并提交到数据库
if( !ArxUtilHelper::PostToModelSpace( pWindLib ) ) delete pWindLib;
}
示例4: update
Adesk::Boolean TunnelDragJig::update()
{
AcGePlane plane;
AcGeVector3d v = ept - spt;
v.normalize();
v.rotateBy( 0.5 * PI, AcGeVector3d::kZAxis );
AcGeVector3d offset = curPt - basePt;
double L = offset.dotProduct( v );
if( L == 0 ) return false;
if( L < 0 )
{
v.negate();
L = -1 * L;
}
AcGePoint3d newSpt = spt + v * L, newEpt = ept + v * L;
// 更新工作面坐标
m_pWS->setSEPoint( newSpt, newEpt );
m_pWS->updateDraw();
return Adesk::kTrue;
}
示例5: getEndPointInExtendAngle
AcGeVector3d DoubleLine::getEndPointInExtendAngle() const
{
AcGeVector3d v = m_endPt - m_startPt;
v.rotateBy( PI, AcGeVector3d::kZAxis ); // 旋转180度
return v;
}
示例6: DrawSegment
static void DrawSegment( AcGiWorldDraw* mode, const AcGePoint3d& spt, const AcGeVector3d& v, double length, double width, double lineWidth )
{
AcGePoint3d ept = spt + v * length;
DrawPolyLine( mode, spt, ept, lineWidth );
AcGeVector3d vv = v;
vv.rotateBy( PI / 2, AcGeVector3d::kZAxis );
AcGePoint3d spt1, spt2;
spt1 = spt + vv * width * 0.5;
vv.rotateBy( PI, AcGeVector3d::kZAxis );
spt2 = spt + vv * width * 0.5;
DrawPolyLine( mode, spt1, spt2, lineWidth );
AcGePoint3d ept1, ept2;
ept1 = ept + vv * width * 0.5;
vv.rotateBy( PI, AcGeVector3d::kZAxis );
ept2 = ept + vv * width * 0.5;
DrawPolyLine( mode, ept1, ept2, lineWidth );
}
示例7: getEndPointInExtendAngle
AcGeVector3d DoubleArcTunnelDraw::getEndPointInExtendAngle() const
{
AcGeCircArc3d arc( m_startPt, m_thirdPt, m_endPt );
AcGePoint3d cenPt = arc.center();
AcGeVector3d v = m_endPt - cenPt;
AcGeVector3d v2 = m_startPt - m_endPt;
AcGeVector3d v3 = v.crossProduct( v2 );
int c = ( v3.z > 0 ? 1 : -1 );
v.rotateBy( c * PI / 2, AcGeVector3d::kZAxis );
return v;
}
示例8: assertWriteEnabled
Acad::ErrorStatus
ArxDbgDbEntity::setRotation(double rot)
{
assertWriteEnabled();
AcGeVector3d xAxis;
ArxDbgUtils::getEcsXAxis(m_zDir, xAxis); // get AutoCAD's arbitrary X-Axis
m_xDir = xAxis.rotateBy(rot, m_zDir); // factor in rotation angle
m_xDir.normalize();
return Acad::eOk;
}
示例9: extendByLength
void DoubleArcTunnelDraw::extendByLength( double length )
{
AcGeCircArc3d arc( m_startPt, m_thirdPt, m_endPt );
AcGePoint3d cenPt = arc.center();
double radius = arc.radius();
AcGeVector3d v = m_endPt - cenPt;
AcGeVector3d v2 = m_startPt - m_endPt;
AcGeVector3d v3 = v.crossProduct( v2 );
int c = ( v3.z > 0 ? 1 : -1 );
v.rotateBy( c * length / radius, AcGeVector3d::kZAxis );
m_endPt = cenPt + v; // 修改圆弧的末点
}