コード例 #1
0
ファイル: Rect.cpp プロジェクト: AzureCrab/StarEngine
	float32 Rect::GetRealLeft() const
	{
		float32 realLeft(m_LeftTop.x);
		realLeft = realLeft > m_LeftBottom.x ? m_LeftBottom.x : realLeft;
		realLeft = realLeft > m_RightBottom.x ? m_RightBottom.x : realLeft;
		realLeft = realLeft > m_RightTop.x ? m_RightTop.x : realLeft;
		return realLeft;
	}
コード例 #2
0
void
AsdkSmiley::setMouth( const AcGePoint3d& left, const AcGePoint3d& bottom, const AcGePoint3d& right )
{
    assertWriteEnabled();
    AcGePoint3d realLeft( left ), realBottom( bottom ), realRight( right );

    double topY = center()[Y] + eyesHeight() - eyeSize();
    double diff = 0.0;

    if (( left[Y] - topY ) > diff ){
        diff = left[Y] - topY;
    }
    if (( bottom[Y] - topY ) > diff ){
        diff = bottom[Y] - topY;
    }
    if (( right[Y] - topY ) > diff ){
        diff = right[Y] - topY;
    }
    
    AcGeVector3d vec( 0, diff, 0 );
    mmoutharc.set( realLeft - vec, realBottom - vec, realRight - vec );
    recordGraphicsModified();
}