| 1 | #include "Library/Obj/DepthShadowModel.h" |
| 2 | |
| 3 | #include "Library/LiveActor/ActorClippingFunction.h" |
| 4 | #include "Library/LiveActor/ActorInitFunction.h" |
| 5 | #include "Library/LiveActor/ActorInitUtil.h" |
| 6 | |
| 7 | namespace al { |
| 8 | DepthShadowModel::DepthShadowModel(LiveActor* parent, const ActorInitInfo& info, |
| 9 | const char* executorDrawName, bool isVisible) |
| 10 | : LiveActor("デプスシャドウモデル" ) { |
| 11 | initActorSceneInfo(actor: this, info); |
| 12 | initPoseKeeper(poseKeeper: parent->getPoseKeeper()); |
| 13 | initActorModelKeeperByHost(this, parent); |
| 14 | initExecutorDraw(actor: this, info, executorDrawName); |
| 15 | initActorClipping(actor: this, initInfo: info); |
| 16 | |
| 17 | mPos.set(getClippingCenterPos(actor: parent)); |
| 18 | |
| 19 | setClippingInfo(actor: this, getClippingRadius(actor: parent), &mPos); |
| 20 | |
| 21 | mIsVisible = isVisible; |
| 22 | |
| 23 | makeActorAlive(); |
| 24 | } |
| 25 | |
| 26 | DepthShadowModel::DepthShadowModel(LiveActor* parent, const ActorInitInfo& info, |
| 27 | const char* childArchiveName, const char* childSuffix, |
| 28 | bool isVisible) |
| 29 | : LiveActor("デプスシャドウモデル" ) { |
| 30 | initChildActorWithArchiveNameWithPlacementInfo(actor: this, initInfo: info, archiveName: childArchiveName, suffix: childSuffix); |
| 31 | |
| 32 | mIsVisible = isVisible; |
| 33 | |
| 34 | makeActorAlive(); |
| 35 | } |
| 36 | |
| 37 | void DepthShadowModel::initAfterPlacement() { |
| 38 | if (!mIsVisible) |
| 39 | return; |
| 40 | |
| 41 | tryExpandClippingByDepthShadowLength(actor: this, &mPos); |
| 42 | } |
| 43 | } // namespace al |
| 44 | |