| 1 | #pragma once |
| 2 | |
| 3 | #include <gfx/seadColor.h> |
| 4 | #include <math/seadBoundBox.h> |
| 5 | #include <math/seadMatrix.h> |
| 6 | #include <math/seadQuat.h> |
| 7 | #include <nn/g3d/ResFile.h> |
| 8 | #include <nn/gfx/gfx_DescriptorSlot.h> |
| 9 | |
| 10 | namespace agl { |
| 11 | class UniformBlock; |
| 12 | } |
| 13 | |
| 14 | namespace nn::gfx { |
| 15 | class ResTexture; |
| 16 | } |
| 17 | |
| 18 | namespace al { |
| 19 | class LayoutTextureRenderObj; |
| 20 | class LiveActor; |
| 21 | class ClippingDirector; |
| 22 | |
| 23 | void updateMaterialCodeGround(LiveActor* actor, const char*); |
| 24 | void updateMaterialCodeAll(LiveActor* actor); |
| 25 | void updateMaterialCodeArea(LiveActor* actor); |
| 26 | void updateMaterialCodeWet(LiveActor* actor, bool); |
| 27 | void updateMaterialCodeWater(LiveActor* actor); |
| 28 | void updateMaterialCodeWater(LiveActor* actor, bool); |
| 29 | void updateMaterialCodePuddle(LiveActor* actor); |
| 30 | void updateMaterialCodePuddle(LiveActor* actor, bool); |
| 31 | void resetMaterialCode(LiveActor* actor); |
| 32 | void showModel(LiveActor* actor); |
| 33 | void showModelIfHide(LiveActor* actor); |
| 34 | bool isHideModel(const LiveActor* actor); |
| 35 | void hideModel(LiveActor* actor); |
| 36 | void hideModelIfShow(LiveActor* actor); |
| 37 | bool isExistModel(const LiveActor* actor); |
| 38 | void switchShowHideModelIfNearCamera(LiveActor* actor, f32); |
| 39 | bool blinkModel(LiveActor* actor, s32, s32, s32); |
| 40 | void calcViewModelSystem(LiveActor* actor); |
| 41 | void calcViewModel(LiveActor* actor); |
| 42 | void showSilhouetteModel(LiveActor* actor); |
| 43 | void hideSilhouetteModel(LiveActor* actor); |
| 44 | bool isSilhouetteModelHidden(const LiveActor* actor); |
| 45 | void showSilhouetteModelIfHide(LiveActor* actor); |
| 46 | void hideSilhouetteModelIfShow(LiveActor* actor); |
| 47 | void setModelAlphaMask(LiveActor* actor, f32); |
| 48 | f32 getModelAlphaMask(const LiveActor* actor); |
| 49 | bool isModelAlphaMask(const LiveActor* actor); |
| 50 | void updateModelAlphaMaskCameraDistance(LiveActor* actor, f32, f32, f32, f32); |
| 51 | bool isExistZPrePass(const LiveActor* actor); |
| 52 | bool isEnableZPrePass(const LiveActor* actor); |
| 53 | void validateZPrePass(LiveActor* actor); |
| 54 | void invalidateZPrePass(LiveActor* actor); |
| 55 | void invalidateOcclusionQuery(LiveActor* actor); |
| 56 | void validateOcclusionQuery(LiveActor* actor); |
| 57 | bool isValidOcclusionQuery(const LiveActor* actor); |
| 58 | void setFixedModelFlag(LiveActor* actor); |
| 59 | void tryInitFixedModelGpuBuffer(LiveActor* actor); |
| 60 | void setIgnoreUpdateDrawClipping(LiveActor* actor, bool value); |
| 61 | void setNeedSetBaseMtxAndCalcAnimFlag(LiveActor* actor, bool value); |
| 62 | bool isViewDependentModel(const LiveActor* actor); |
| 63 | bool isNeedUpdateModel(const LiveActor* actor); |
| 64 | void setEnvTextureMirror(LiveActor* actor, s32); |
| 65 | void setEnvTextureProc3D(LiveActor* actor, s32); |
| 66 | void forceApplyCubeMap(LiveActor* actor, const char* cubeMapName); |
| 67 | void setMaterialProgrammable(LiveActor* actor); |
| 68 | bool isIncludePrepassCullingShape(LiveActor* actor); |
| 69 | bool isExistJoint(const LiveActor* actor, const char*); |
| 70 | s32 getJointIndex(const LiveActor* actor, const char*); |
| 71 | sead::Matrix34f* getJointMtxPtr(const LiveActor* actor, const char*); // return type might be const |
| 72 | sead::Matrix34f* getJointMtxPtrByIndex(const LiveActor* actor, s32); |
| 73 | void getJointLocalTrans(sead::Vector3f*, const LiveActor* actor, const char*); |
| 74 | void calcJointPos(sead::Vector3f*, const LiveActor* actor, const char*); |
| 75 | void calcJointOffsetPos(sead::Vector3f*, const LiveActor* actor, const char*, |
| 76 | const sead::Vector3f&); |
| 77 | void calcJointPosByIndex(sead::Vector3f*, const LiveActor* actor, s32); |
| 78 | void calcJointSideDir(sead::Vector3f*, const LiveActor* actor, const char*); |
| 79 | void calcJointUpDir(sead::Vector3f*, const LiveActor* actor, const char*); |
| 80 | void calcJointFrontDir(sead::Vector3f*, const LiveActor* actor, const char*); |
| 81 | void calcJointScale(sead::Vector3f*, const LiveActor* actor, const char*); |
| 82 | void calcJointQuat(sead::Quatf*, const LiveActor* actor, const char*); |
| 83 | void multVecJointMtx(sead::Vector3f*, const sead::Vector3f&, const LiveActor* actor, const char*); |
| 84 | void multVecJointInvMtx(sead::Vector3f*, const sead::Vector3f&, const LiveActor* actor, |
| 85 | const char*); |
| 86 | void multMtxJointInvMtx(sead::Matrix34f*, const sead::Matrix34f&, const LiveActor* actor, |
| 87 | const char*); |
| 88 | void setJointVisibility(LiveActor* actor, const char*, bool); |
| 89 | bool isJointVisibility(const LiveActor* actor, const char*); |
| 90 | bool isFaceJointXDirDegreeYZ(const LiveActor* actor, const char*, const sead::Vector3f&, f32, f32); |
| 91 | bool isFaceJointYDirDegreeZX(const LiveActor* actor, const char*, const sead::Vector3f&, f32, f32); |
| 92 | bool isFaceJointZDirDegreeXY(const LiveActor* actor, const char*, const sead::Vector3f&, f32, f32); |
| 93 | void calcJointAngleXDirToTargetOnYDir(const LiveActor* actor, const char*, const sead::Vector3f&); |
| 94 | void calcJointAngleXDirToTargetOnZDir(const LiveActor* actor, const char*, const sead::Vector3f&); |
| 95 | void calcJointAngleYDirToTargetOnXDir(const LiveActor* actor, const char*, const sead::Vector3f&); |
| 96 | void calcJointAngleYDirToTargetOnZDir(const LiveActor* actor, const char*, const sead::Vector3f&); |
| 97 | void calcJointAngleZDirToTargetOnXDir(const LiveActor* actor, const char*, const sead::Vector3f&); |
| 98 | void calcJointAngleZDirToTargetOnYDir(const LiveActor* actor, const char*, const sead::Vector3f&); |
| 99 | const char* getMaterialName(const LiveActor* actor, s32); |
| 100 | s32 getMaterialCount(const LiveActor* actor); |
| 101 | bool isExistMaterial(const LiveActor* actor, const char*); |
| 102 | void getMaterialObj(const LiveActor* actor, s32); |
| 103 | void getMaterialObj(const LiveActor* actor, const char*); |
| 104 | s32 getMaterialIndex(const LiveActor* actor, const char*); |
| 105 | bool isExistMaterialTexture(const LiveActor* actor, const char*, const char*); |
| 106 | void getMaterialCategory(const LiveActor* actor, s32); |
| 107 | void tryGetMaterialCategory(const LiveActor* actor, s32); |
| 108 | bool isOnlyMaterialCategoryObject(const LiveActor* actor); |
| 109 | void showMaterial(LiveActor* actor, const char*); |
| 110 | void hideMaterial(LiveActor* actor, const char*); |
| 111 | void showMaterial(LiveActor* actor, s32); |
| 112 | void hideMaterial(LiveActor* actor, s32); |
| 113 | void showMaterialAll(LiveActor* actor); |
| 114 | void tryShowMaterial(LiveActor* actor, s32); |
| 115 | void tryHideMaterial(LiveActor* actor, s32); |
| 116 | void tryShowMaterialAll(LiveActor* actor); |
| 117 | void setModelMaterialParameterF32(const LiveActor* actor, s32, const char*, f32); |
| 118 | void setModelMaterialParameterF32(const LiveActor* actor, const char*, const char*, f32); |
| 119 | void setModelMaterialParameterV2F(const LiveActor* actor, s32, const char*, const sead::Vector2f&); |
| 120 | void setModelMaterialParameterV2F(const LiveActor* actor, const char*, const char*, |
| 121 | const sead::Vector2f&); |
| 122 | void setModelMaterialParameterV3F(const LiveActor* actor, s32, const char*, const sead::Vector3f&); |
| 123 | void setModelMaterialParameterV3F(const LiveActor* actor, const char*, const char*, |
| 124 | const sead::Vector3f&); |
| 125 | void setModelMaterialParameterV4F(const LiveActor* actor, s32, const char*, const sead::Vector4f&); |
| 126 | void setModelMaterialParameterV4F(const LiveActor* actor, const char*, const char*, |
| 127 | const sead::Vector4f&); |
| 128 | void setModelMaterialParameterRgb(const LiveActor* actor, s32, const char*, const sead::Vector3f&); |
| 129 | void setModelMaterialParameterRgb(const LiveActor* actor, const char*, const char*, |
| 130 | const sead::Vector3f&); |
| 131 | void setModelMaterialParameterRgb(const LiveActor* actor, s32, const char*, const sead::Color4f&); |
| 132 | void setModelMaterialParameterRgb(const LiveActor* actor, const char*, const char*, |
| 133 | const sead::Color4f&); |
| 134 | void setModelMaterialParameterRgba(const LiveActor* actor, s32, const char*, const sead::Color4f&); |
| 135 | void setModelMaterialParameterRgba(const LiveActor* actor, const char*, const char*, |
| 136 | const sead::Color4f&); |
| 137 | void setModelMaterialParameterAlpha(const LiveActor* actor, s32, const char*, f32); |
| 138 | void setModelMaterialParameterAlpha(const LiveActor* actor, const char*, const char*, f32); |
| 139 | void setModelMaterialParameterTextureTrans(const LiveActor* actor, const char*, s32, |
| 140 | const sead::Vector2f&); |
| 141 | void getModelMaterialParameterDisplacementScale(const LiveActor* actor, const char*, s32); |
| 142 | void setModelMaterialParameterDisplacementScale(const LiveActor* actor, const char*, s32, f32); |
| 143 | void getModelUniformBlock(const LiveActor* actor, const char*); |
| 144 | void findModelUniformBlock(const LiveActor* actor, const char*); |
| 145 | void swapModelUniformBlock(agl::UniformBlock*); |
| 146 | void flushModelUniformBlock(agl::UniformBlock*); |
| 147 | void getModelDrawCategoryFromShaderAssign(bool*, bool*, bool*, bool*, const LiveActor* actor); |
| 148 | void trySetOcclusionQueryBox(LiveActor* actor, f32); |
| 149 | void trySetOcclusionQueryBox(LiveActor* actor, const sead::BoundBox3f&); |
| 150 | void trySetOcclusionQueryCenter(LiveActor* actor, const sead::Vector3f*); |
| 151 | const char* getModelName(const LiveActor* actor); |
| 152 | bool isModelName(const LiveActor* actor, const char*); |
| 153 | f32 calcModelBoundingSphereRadius(const LiveActor* actor); |
| 154 | void getBoundingSphereCenterAndRadius(sead::Vector3f*, f32*, const LiveActor* actor); |
| 155 | void calcModelBoundingBox(sead::BoundBox3f*, const LiveActor* actor); |
| 156 | void calcModelBoundingBoxMtx(sead::Matrix34f*, const LiveActor* actor); |
| 157 | void submitViewModel(const LiveActor* actor, const sead::Matrix34f&); |
| 158 | void replaceMaterialTextureRef(LiveActor* actor, nn::g3d::TextureRef*, const char*, const char*); |
| 159 | void replaceMaterialResTexture(LiveActor* actor, nn::gfx::ResTexture*, const char*, const char*); |
| 160 | void replaceMaterialResTexture(LiveActor*, const char*, const char*, nn::gfx::DescriptorSlot, |
| 161 | const nn::gfx::TextureView*); |
| 162 | void replaceMaterialLayoutTexture(LiveActor* actor, const LayoutTextureRenderObj*, const char*, |
| 163 | const char*); |
| 164 | void recreateModelDisplayList(const LiveActor* actor); |
| 165 | void calcPolygonNum(const LiveActor* actor, s32); |
| 166 | void calcPolygonNumCurrentLod(const LiveActor* actor); |
| 167 | void calcPolygonNumCurrentLodWithoutVisAnim(const LiveActor* actor); |
| 168 | void getLodLevel(const LiveActor* actor); |
| 169 | void getMaterialLodLevel(const LiveActor* actor); |
| 170 | void getLodLevelNoClamp(const LiveActor* actor); |
| 171 | s32 getLodModelCount(const LiveActor* actor); |
| 172 | void forceLodLevel(LiveActor* actor, s32); |
| 173 | void unforceLodLevel(LiveActor* actor); |
| 174 | bool isExistLodModel(const LiveActor* actor); |
| 175 | bool isEnableMaterialLod(const LiveActor* actor); |
| 176 | void validateLodModel(LiveActor* actor); |
| 177 | void invalidateLodModel(LiveActor* actor); |
| 178 | bool isValidateLodModel(const LiveActor* actor); |
| 179 | bool isExistDitherAnimator(const LiveActor* actor); |
| 180 | bool isValidNearDitherAnim(const LiveActor* actor); |
| 181 | void stopDitherAnimAutoCtrl(LiveActor* actor); |
| 182 | void restartDitherAnimAutoCtrl(LiveActor* actor); |
| 183 | void validateDitherAnim(LiveActor* actor); |
| 184 | void invalidateDitherAnim(LiveActor* actor); |
| 185 | void validateFarDitherIfInvalidateClipping(LiveActor* actor); |
| 186 | void setDitherAnimSphereRadius(LiveActor* actor, f32); |
| 187 | void setDitherAnimBoundingBox(LiveActor* actor, const sead::Vector3f&); |
| 188 | void setDitherAnimMaxAlpha(LiveActor* actor, f32); |
| 189 | void setDitherAnimClippingJudgeLocalOffset(LiveActor* actor, const sead::Vector3f&); |
| 190 | void setDitherAnimClippingJudgeParam(LiveActor* actor, const char*); |
| 191 | void resetDitherAnimClippingJudgeParam(LiveActor* actor); |
| 192 | void getDitherAnimMinNearDitherAlpha(const LiveActor* actor); |
| 193 | f32 getDitherAnimNearClipStartDistance(const LiveActor* actor); |
| 194 | f32 getDitherAnimNearClipEndDistance(const LiveActor* actor); |
| 195 | void calcDitherAnimJudgeDistance(const LiveActor* actor); |
| 196 | void createUniqueShader(LiveActor* actor); |
| 197 | bool isJudgedToClipFrustum(const ClippingDirector*, const sead::Vector3f&, f32, f32); |
| 198 | bool isJudgedToClipFrustum(const LiveActor* actor, const sead::Vector3f&, f32, f32); |
| 199 | bool isJudgedToClipFrustum(const LiveActor* actor, f32, f32); |
| 200 | bool isJudgedToClipFrustumWithoutFar(const ClippingDirector*, const sead::Vector3f&, f32, f32); |
| 201 | bool isJudgedToClipFrustumWithoutFar(const LiveActor* actor, const sead::Vector3f&, f32, f32); |
| 202 | bool isJudgedToClipFrustumWithoutFar(const LiveActor* actor, f32, f32); |
| 203 | } // namespace al |
| 204 | |