1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#include "fsCNative3dSprite.h"

#include "fs3d/fsC3dPathSprite.h"

#if defined fs3d

#include <fsCore/fsAffineMtx2d.h>
#include <fs3d/fsC3dSprite.h>
#include <fs3d/impl/raylib/fsC3dAnimation.h>

void fsCNative3dSprite::trackSet(fsC3dSprite* const pAnimation)
{
    mTrack = &static_cast<fsC3dModelData*>(pAnimation->mTrack.get()->mModelData.get())->mModel;
//    mTrack->removeFromParent();
    if (fsC3dAnimation * const animPtr = static_cast<fsC3dAnimation*>(pAnimation->mAnimation))<--- Variable 'animPtr' is assigned a value that is never used.
    {
        // mTrack->runAction(cocos2d::RepeatForever::create(animPtr->mAnim));
        // mTrack->onEnter();
        // 		mTrack->setCameraMask((unsigned short)cocos2d::CameraFlag::USER2);
        // 		mTrack->setVisible(false);
    }
}

void fsCNative3dSprite::pathSet(fsI3dAnimation* const pAnimation)<--- The member function 'fsCNative3dSprite::pathSet' can be static.<--- Parameter 'pAnimation' can be declared as pointer to const
{
    // if (fsC3dAnimation* const animPtr = static_cast<fsC3dAnimation*>(pAnimation))
    // {
    //    mTrack = animPtr->mAnim;
    // }
}

void fsCNative3dSprite::animationSet(fsI3dAnimation* const pAnimation)
{
    if (fsC3dAnimation* const animPtr = static_cast<fsC3dAnimation*>(pAnimation))<--- Variable 'animPtr' can be declared as pointer to const
    {
        mAnimation = animPtr->mAnim;
    }
}

void fsCNative3dSprite::renderDo()
{
    if (mTrack)
    {
        // *mModel->transform = *mTrack->bindPose[0];
    }
}

void fsCNative3dSprite::matrixApplyDo(const fsAffineMtx2d& pRenderMatrix)
{
}


fsCNative3dSprite::fsCNative3dSprite(fsI3dModelData* const pModelData) :<--- Parameter 'pModelData' can be declared as pointer to const
fsINative()
{
}

fsCNative3dSprite::~fsCNative3dSprite()
{
}

#endif