Monday, December 11, 2023

One Frame Animation

SkeletalMesh->PlayAnimation(MyAnim, false);
SkeletalMesh->bPauseAnims = true;
UAnimSingleNodeInstance* Inst = Cast<UAnimSingleNodeInstance>(AnimInstance);
if ( Inst )
{
    Inst->SetPosition(AnimTime);
}

Wednesday, November 22, 2023

Compile MD5 using openssl on linux

 cc digestMD5.c -o digestMd5 -L/usr/openssl/lib64 -lssl -lcrypto -ldl


I installed openssl into /usr/openssl


Or openssl is located in /opt/openssl

Wednesday, September 13, 2023

Baseball terms

심판 - Umpire


투수 - Pitcher


포수 - Catcher


타자 - Batter


지명타자 - Designated hitter


1루수 - First baseman


2루수 - Second baseman


3루수 - Third baseman


유격수 - Shortstop


좌익수 - Left fielder


중견수 - Center fielder


우익수 - Right fielder


중간계투/구원투수 - Bullpen pitcher


마무리투수 - Closer


주자 - Runner



눈치채셨겠지만


1루는 First base


2루는 Second base


3루는 Third base 입니다.




공을던지다 - Pitch the ball


공을 치다 - Hit the ball


파울 - foul ball


1루타 - single


2루타 - double


3루타 - triple


내야안타 - infield hit


홈런 - homerun


만루홈런 - grand slam


도루 - Stolen base


볼넷 - base on balls


삼진 - Strike out


직구 - Fast ball


변화구 - Breaking ball


내야 땅볼 - Ground out


직선타구 - Line drive


뜬공 - Fly ball


견제구 - Pick-off throw


땅볼 - Ground ball


Thursday, August 24, 2023

Collision detection : Circle vs Rectangle

detection only


int CheckHit( F_RECT *prcRect1, F_CIRCLE *pcrCircle2 )

{

    int             nResult = false;

    float           ar;


    if ( ( pcrCircle2->x > prcRect1->fLeft   - pcrCircle2->r ) &&

         ( pcrCircle2->x < prcRect1->fRight  + pcrCircle2->r ) &&

         ( pcrCircle2->y > prcRect1->fTop    - pcrCircle2->r ) &&

         ( pcrCircle2->y < prcRect1->fBottom + pcrCircle2->r ) )

    {

        nResult = true;

        ar = pcrCircle2->r;

        if ( pcrCircle2->x < prcRect1->fLeft ) {

            if ( ( pcrCircle2->y < prcRect1->fTop ) )

            {

                if ( ( DistanceSqr( prcRect1->fLeft,  prcRect1->fTop,

                                    pcrCircle2->x, pcrCircle2->y ) >= ar * ar ) ) {

                    nResult = false;

                }

            }

            else {

                if ( ( pcrCircle2->y > prcRect1->fBottom ) )

                {

                    if ( ( DistanceSqr( prcRect1->fLeft,  prcRect1->fBottom,

                                        pcrCircle2->x, pcrCircle2->y ) >= ar * ar ) ) {

                        nResult = false;

                    }

                }

            }

        }

        else {

            if ( pcrCircle2->x > prcRect1->fRight ) {

                if ( ( pcrCircle2->y < prcRect1->fTop ) )

                {

                    if ( ( DistanceSqr( prcRect1->fRight,  prcRect1->fTop,

                                        pcrCircle2->x, pcrCircle2->y ) >= ar * ar ) ) {

                        nResult = false;

                    }

                }

                else {

                    if ( ( pcrCircle2->y > prcRect1->fBottom ) )

                    {

                        if ( ( DistanceSqr( prcRect1->fRight,  prcRect1->fBottom,

                                            pcrCircle2->x, pcrCircle2->y ) >= ar * ar ) ) {

                            nResult = false;

                        }

                    }

                }

            }

        }

    }

    return nResult;

}

Task in UnrealEngine

 https://www.youtube.com/watch?v=1lBadANnJaw