#ifndef GGAFLIB_STGUTIL_H_
#define GGAFLIB_STGUTIL_H_
#include "GgafLibCommonHeader.h"
#include "jp/ggaf/dxcore/util/GgafDxUtil.h"

#include "jp/ggaf/lib/util/ColliAAB.h"
#include "jp/ggaf/lib/util/ColliSphere.h"
#include "jp/ggaf/lib/util/ColliAAPrism.h"
#include "jp/ggaf/dxcore/actor/GgafDxGeometricActor.h"

#ifdef UTIL
    #undef UTIL
#endif
#define UTIL GgafLib::StgUtil

namespace GgafLib {

/**
 * 儐乕僥傿儕僥傿 .
 * @version 1.00
 * @since 2008/09/08
 * @author Masatoshi Tsuge
 */
class StgUtil: public GgafDxCore::GgafDxUtil {
public:
    struct Pos {
        coord X;
        coord Y;
        coord Z;
    };

    static inline bool isHit(GgafDxCore::GgafDxGeometricActor* pActor01, ColliAAB* pAAB01,
                             GgafDxCore::GgafDxGeometricActor* pActor02, ColliAAB* pAAB02 ) {
        //亙AAB 偲 AAB亜
        //幉偑堦抳偟側偄妋棪偑崅偦偆側弴斣(X>Z>Y)偵敾掕
        if (pActor01->_x + pAAB01->_x2 >= pActor02->_x + pAAB02->_x1) {
            if (pActor01->_x + pAAB01->_x1 <= pActor02->_x + pAAB02->_x2) {
                if (pActor01->_z + pAAB01->_z2 >= pActor02->_z + pAAB02->_z1) {
                    if (pActor01->_z + pAAB01->_z1 <= pActor02->_z + pAAB02->_z2) {
                        if (pActor01->_y + pAAB01->_y2 >= pActor02->_y + pAAB02->_y1) {
                            if (pActor01->_y + pAAB01->_y1 <= pActor02->_y + pAAB02->_y2) {
                                return true;
                            }
                        }
                    }
                }
            }
        }
        return false;
    }

    static inline bool isHit(GgafDxCore::GgafDxGeometricActor* pActor01, ColliSphere* pSphere01,
                             GgafDxCore::GgafDxGeometricActor* pActor02, ColliSphere* pSphere02 ) {
        //亙媴 偲 媴亜
        //媴1 丗 拞怱揰偺嵗昗P1(x1, y1, z1), 敿宎r1
        //媴2 丗 拞怱揰偺嵗昗P2(x2, y2, z2), 敿宎r2
        //(x2-x1)^2 + (y2-y1)^2 + (z2-z1)^2 <= (r1+r2)^2
        double d2 = (double)((pActor02->_x+pSphere02->_x) - (pActor01->_x+pSphere01->_x)) * ((pActor02->_x+pSphere02->_x) - (pActor01->_x+pSphere01->_x)) +
                    (double)((pActor02->_y+pSphere02->_y) - (pActor01->_y+pSphere01->_y)) * ((pActor02->_y+pSphere02->_y) - (pActor01->_y+pSphere01->_y)) +
                    (double)((pActor02->_z+pSphere02->_z) - (pActor01->_z+pSphere01->_z)) * ((pActor02->_z+pSphere02->_z) - (pActor01->_z+pSphere01->_z));
        if (d2 <= (double)(pSphere02->_r + pSphere01->_r) * (pSphere02->_r + pSphere01->_r)
        ) {
            return true;
        } else {
            return false;
        }
    }

    static inline bool isHit(GgafDxCore::GgafDxGeometricActor* pActor01, ColliAAB*    pAAB01,
                             GgafDxCore::GgafDxGeometricActor* pActor02, ColliSphere* pSphere02) {
        //亙AAB 偲 媴亜
        coord o_scx = pActor02->_x + pSphere02->_cx;
        coord o_scy = pActor02->_y + pSphere02->_cy;
        coord o_scz = pActor02->_z + pSphere02->_cz;
        coord bx1 = pActor01->_x + pAAB01->_x1;
        coord bx2 = pActor01->_x + pAAB01->_x2;
        coord by1 = pActor01->_y + pAAB01->_y1;
        coord by2 = pActor01->_y + pAAB01->_y2;
        coord bz1 = pActor01->_z + pAAB01->_z1;
        coord bz2 = pActor01->_z + pAAB01->_z2;
        double square_length = 0; //媴偺拞怱偲AAB偺嵟抁嫍棧傪擇忔偟偨抣
        if(o_scx < bx1) {
            square_length += (double)(o_scx - bx1) * (o_scx - bx1);
        }
        if(o_scx > bx2) {
            square_length += (double)(o_scx - bx2) * (o_scx - bx2);
        }
        if(o_scy < by1) {
            square_length += (double)(o_scy - by1) * (o_scy - by1);
        }
        if(o_scy > by2) {
            square_length += (double)(o_scy - by2) * (o_scy - by2);
        }
        if(o_scz < bz1) {
            square_length += (double)(o_scz - bz1) * (o_scz - bz1);
        }
        if(o_scz > bz2) {
            square_length += (double)(o_scz - bz2) * (o_scz - bz2);
        }
        //square_length偑媴偺敿宎乮偺擇忔乯傛傝傕抁偗傟偽徴撍偟偰偄傞
        if (square_length <= pSphere02->_rr) {
            return true;
        } else {
            return false;
        }
    }


    static inline bool isHit(GgafDxCore::GgafDxGeometricActor* pActor01, ColliAAPrism* pAAPrism01,
                             GgafDxCore::GgafDxGeometricActor* pActor02, ColliAAB*     pAAB02     ) {
        //亙僾儕僘儉 偲 AAB亜
        int aX1 = pActor01->_x + pAAPrism01->_x1;
        int aY1 = pActor01->_y + pAAPrism01->_y1;
        int aZ1 = pActor01->_z + pAAPrism01->_z1;
        int aX2 = pActor01->_x + pAAPrism01->_x2;
        int aY2 = pActor01->_y + pAAPrism01->_y2;
        int aZ2 = pActor01->_z + pAAPrism01->_z2;

        int bX1 = pActor02->_x + pAAB02->_x1;
        int bY1 = pActor02->_y + pAAB02->_y1;
        int bZ1 = pActor02->_z + pAAB02->_z1;
        int bX2 = pActor02->_x + pAAB02->_x2;
        int bY2 = pActor02->_y + pAAB02->_y2;
        int bZ2 = pActor02->_z + pAAB02->_z2;

        if (aZ2 >= bZ1 && aZ1 <= bZ2 && aY2 >= bY1 && aY1 <= bY2 && aX2 >= bX1 && aX1 <= bX2) {
            //偙偺帪揰偱AAB 偲 AAB 側傜偽僸僢僩
            int pos = pAAPrism01->_pos_prism;
            double a = pAAPrism01->_a;
            if (pos & POS_PRISM_XY) { //XY暯柺僗儔僀僗偺僾儕僘儉
                //儚乕儖僪嵗昗偱偺僾儕僘儉嫬奅慄偺愗曅傪媮傔傞 b = y - ax
                double b = ((pActor01->_y+pAAPrism01->_cy) - pAAPrism01->_a * (pActor01->_x+pAAPrism01->_cx)) + pAAPrism01->_b;

                if (pos & POS_PRISM_pp) {
                    //            仾 y+
                    //
                    //        劇劅劅劅劉
                    //        劆乢偙偪劆
                    // x- 仼  劆丂乢傜劆  仺 x+
                    //      劇劑仜丂乢劆
                    //      劆劋劑劅劅劊
                    //      劋劅劊
                    //            伀 y-
                    //
                    //僾儕僘儉嫬奅慄 y = ax + b 偲
                    //仜偺嵗昗(bX2, bY2)丄偲偺埵抲娭學傪峫偊傞
                    //y > ax + b 偱偁傟偽僸僢僩
                    if (bY2 > a * bX2 +  b) {
                        return true;
                    }

                } else if (pos & POS_PRISM_np) {
                    //            仾 y+
                    //
                    //        劇劅劅劅劉
                    //        劆偙偪乛劆
                    // x- 仼  劆傜乛丂劆  仺 x+
                    //        劆乛丂仜劑劉
                    //        劋劅劅劑劊劆Opp
                    //              劋劅劊
                    //            伀 y-
                    //
                    //僾儕僘儉嫬奅慄 y = ax + b 偲
                    //仜偺嵗昗(bX1, bY2)丄偲偺埵抲娭學傪峫偊傞
                    //y > ax + b 偱偁傟偽僸僢僩
                    if (bY2 > a * bX1 +  b) {
                        return true;
                    }

                } else if (pos & POS_PRISM_pn) {
                    //            仾 y+
                    //      劇劅劉
                    //      劆劇劑劅劅劉
                    //      劋劑仜丂乛劆
                    // x- 仼  劆丂乛偙劆  仺 x+
                    //        劆乛偪傜劆
                    //        劋劅劅劅劊
                    //
                    //            伀 y-
                    //
                    //僾儕僘儉嫬奅慄 y = ax + b 偲
                    //仜偺嵗昗(bX2, bY1)丄偲偺埵抲娭學傪峫偊傞
                    //y < ax + b 偱偁傟偽僸僢僩
                    if (bY1 < a * bX2 +  b) {
                        return true;
                    }

                } else { // 偺偙傝偼 POS_PRISM_nn 偺傒偱偁傞
                    //            仾 y+
                    //              劇劅劉
                    //        劇劅劅劑劉劆Opp
                    //        劆乢丂仜劑劊
                    // x- 仼  劆偙乢丂劆  仺 x+
                    //        劆偪傜乢劆
                    //        劋劅劅劅劊
                    //
                    //            伀 y-
                    //
                    //僾儕僘儉嫬奅慄 y = ax + b 偲
                    //仜偺嵗昗(bX1, bY1)丄偲偺埵抲娭學傪峫偊傞
                    //y < ax + b 偱偁傟偽僸僢僩
                    if (bY1 < a * bX1 +  b) {
                        return true;
                    }


                }
            } else if (pos & POS_PRISM_YZ) {//YZ暯柺僗儔僀僗偺僾儕僘儉
                //儚乕儖僪嵗昗偱偺僾儕僘儉嫬奅慄偺愗曅傪媮傔傞 b = z - ay
                int b = ((pActor01->_z+pAAPrism01->_cz) - pAAPrism01->_a * (pActor01->_y+pAAPrism01->_cy)) + pAAPrism01->_b;
                if (pos & POS_PRISM_pp) {
                    //            仾 z+
                    //
                    //        劇劅劅劅劉
                    //        劆乢偙偪劆
                    // y- 仼  劆丂乢傜劆  仺 y+
                    //      劇劑仜丂乢劆
                    //      劆劋劑劅劅劊
                    //      劋劅劊
                    //            伀 z-
                    //
                    //僾儕僘儉嫬奅慄 z = ay + b 偲
                    //仜偺嵗昗(bY2, bZ2)丄偲偺埵抲娭學傪峫偊傞
                    //z > ay + b 偱偁傟偽僸僢僩
                    if (bZ2 > a * bY2 +  b) {
                        return true;
                    }

                } else if (pos & POS_PRISM_np) {
                    //            仾 z+
                    //
                    //        劇劅劅劅劉
                    //        劆偙偪乛劆
                    // y- 仼  劆傜乛丂劆  仺 y+
                    //        劆乛丂仜劑劉
                    //        劋劅劅劑劊劆Opp
                    //              劋劅劊
                    //            伀 z-
                    //
                    //僾儕僘儉嫬奅慄 z = ay + b 偲
                    //仜偺嵗昗(bY1, bZ2)丄偲偺埵抲娭學傪峫偊傞
                    //z > ay + b 偱偁傟偽僸僢僩
                    if (bZ2 > a * bY1 +  b) {
                        return true;
                    }

                } else if (pos & POS_PRISM_pn) {
                    //            仾 z+
                    //      劇劅劉
                    //      劆劇劑劅劅劉
                    //      劋劑仜丂乛劆
                    // y- 仼  劆丂乛偙劆  仺 y+
                    //        劆乛偪傜劆
                    //        劋劅劅劅劊
                    //
                    //            伀 z-
                    //
                    //僾儕僘儉嫬奅慄 z = ay + b 偲
                    //仜偺嵗昗(bY2, bZ1)丄偲偺埵抲娭學傪峫偊傞
                    //z < ay + b 偱偁傟偽僸僢僩
                    if (bZ1 < a * bY2 +  b) {
                        return true;
                    }

                } else { //偺偙傝偼 POS_PRISM_nn 偺傒偱偁傞
                    //            仾 z+
                    //              劇劅劉
                    //        劇劅劅劑劉劆Opp
                    //        劆乢丂仜劑劊
                    // y- 仼  劆偙乢丂劆  仺 y+
                    //        劆偪傜乢劆
                    //        劋劅劅劅劊
                    //
                    //            伀 z-
                    //
                    //僾儕僘儉嫬奅慄 z = ay + b 偲
                    //仜偺嵗昗(bY1, bZ1)丄偲偺埵抲娭學傪峫偊傞
                    //z < ay + b 偱偁傟偽僸僢僩
                    if (bZ1 < a * bY1 +  b) {
                        return true;
                    }
                }

            } else if (pos & POS_PRISM_ZX) {
                //儚乕儖僪嵗昗偱偺僾儕僘儉嫬奅慄偺愗曅傪媮傔傞 b = x - az
                int b = ((pActor01->_x+pAAPrism01->_cx) - pAAPrism01->_a * (pActor01->_z+pAAPrism01->_cz)) + pAAPrism01->_b;
                if (pos & POS_PRISM_pp) {
                    //            仾 x+
                    //
                    //        劇劅劅劅劉
                    //        劆乢偙偪劆
                    // z- 仼  劆丂乢傜劆  仺 z+
                    //      劇劑仜丂乢劆
                    //      劆劋劑劅劅劊
                    //      劋劅劊
                    //            伀 x-
                    //
                    //僾儕僘儉嫬奅慄 x = az + b 偲
                    //仜偺嵗昗(bZ2, bX2)丄偲偺埵抲娭學傪峫偊傞
                    //x > az + b 偱偁傟偽僸僢僩
                    if (bX2 > a * bZ2 +  b) {
                        return true;
                    }

                } else if (pos & POS_PRISM_np) {
                    //            仾 x+
                    //
                    //        劇劅劅劅劉
                    //        劆偙偪乛劆
                    // z- 仼  劆傜乛丂劆  仺 z+
                    //        劆乛丂仜劑劉
                    //        劋劅劅劑劊劆Opp
                    //              劋劅劊
                    //            伀 x-
                    //
                    //僾儕僘儉嫬奅慄 x = az + b 偲
                    //仜偺嵗昗(bZ1, bX2)丄偲偺埵抲娭學傪峫偊傞
                    //x > az + b 偱偁傟偽僸僢僩
                    if (bX2 > a * bZ1 +  b) {
                        return true;
                    }

                } else if (pos & POS_PRISM_pn) {
                    //            仾 x+
                    //      劇劅劉
                    //      劆劇劑劅劅劉
                    //      劋劑仜丂乛劆
                    // z- 仼  劆丂乛偙劆  仺 z+
                    //        劆乛偪傜劆
                    //        劋劅劅劅劊
                    //
                    //            伀 x-
                    //
                    //僾儕僘儉嫬奅慄 x = az + b 偲
                    //仜偺嵗昗(bZ2, bX1)丄偲偺埵抲娭學傪峫偊傞
                    //x < az + b 偱偁傟偽僸僢僩
                    if (bX1 < a * bZ2 +  b) {
                        return true;
                    }

                } else { //巆傝偼 POS_PRISM_nn 偺傒偱偁傞
                    //            仾 x+
                    //              劇劅劉
                    //        劇劅劅劑劉劆Opp
                    //        劆乢丂仜劑劊
                    // z- 仼  劆偙乢丂劆  仺 z+
                    //        劆偪傜乢劆
                    //        劋劅劅劅劊
                    //
                    //            伀 x-
                    //
                    //僾儕僘儉嫬奅慄 x = az + b 偲
                    //仜偺嵗昗(bZ1, bX1)丄偲偺埵抲娭學傪峫偊傞
                    //x < az + b 偱偁傟偽僸僢僩
                    if (bX1 < a * bZ1 +  b) {
                        return true;
                    }
                }
            }
        }
        return false;
    }



    static inline bool isHit(GgafDxCore::GgafDxGeometricActor* pActor01, ColliAAPrism* pAAPrism01,
                             GgafDxCore::GgafDxGeometricActor* pActor02, ColliSphere*  pSphere02  ) {
        //亙僾儕僘儉 偲 媴亜
        //MEMO:尩枾側摉偨傝敾掕寁嶼偼峴偭偰偄傑偣傫丅
        int aX1 = pActor01->_x + pAAPrism01->_x1;
        int aY1 = pActor01->_y + pAAPrism01->_y1;
        int aZ1 = pActor01->_z + pAAPrism01->_z1;
        int aX2 = pActor01->_x + pAAPrism01->_x2;
        int aY2 = pActor01->_y + pAAPrism01->_y2;
        int aZ2 = pActor01->_z + pAAPrism01->_z2;

        //AAB 懳 媴偱傑偢敾掕偡傞
        if (isHit(pActor01, (ColliAAB*)pAAPrism01,
                  pActor02, pSphere02             ) ) {
            //偙偺帪揰偱AAB 懳 媴偱僸僢僩丅偙偙偐傜僾儕僘儉偱傕僸僢僩偐専徹偡傞
            int pos = pAAPrism01->_pos_prism;
            double a = pAAPrism01->_a;
            if (pos & POS_PRISM_XY) { //XY暯柺僗儔僀僗偺僾儕僘儉
                //儚乕儖僪嵗昗偱偺僾儕僘儉嫬奅慄偺愗曅傪媮傔傞 b = y - ax
                double b = ((pActor01->_y+pAAPrism01->_cy) - pAAPrism01->_a * (pActor01->_x+pAAPrism01->_cx)) + pAAPrism01->_b;

                int oppX, oppY;
                int bZc = pActor02->_z + pSphere02->_cz; //媴偺拞怱Z嵗昗
                if (aZ1 < bZc && bZc < aZ2) {
                    //媴偺拞怱Z嵗昗偑僾儕僘儉偺Z暆斖埻撪側傜偽丄梊傔曐帩偟偰偄傞_vIH_x,_vIH_y傪巊梡偟偰
                    //僾儕僘儉幬曈偲嵟抁嫍棧偺墌廃忋偺XY嵗昗傪媮傔傞
                    oppX = (pActor02->_x + pSphere02->_x) + pAAPrism01->_vIH_x * pSphere02->_r;
                    oppY = (pActor02->_y + pSphere02->_y) + pAAPrism01->_vIH_y * pSphere02->_r;
                } else if (bZc >= aZ2) {
                    //媴偺拞怱Z嵗昗偑僾儕僘儉偺Z暆斖埻奜偺応崌
                    //棧傟傞嫍棧偵墳偠偰丄媴懁偺敿宎(pSphere02->_r)傪彫偝偔偟偰嵎暘傪寁嶼
                    //彫偝偔偡傞妱崌偼 ROOT_1_MINUS_XX (1/4墌偺夝偺僥乕僽儖攝楍乯傪巊梡丅
                    //                 |
                    //                 乢
                    //        劇劅劅劅劉 `劅
                    // z- 仼  劆      劆  仺 z+
                    int r = pSphere02->_r * UTIL::ROOT_1_MINUS_XX[(int)((1.0*(bZc - aZ2) / pSphere02->_r)*1000)];
                    oppX = (pActor02->_x + pSphere02->_x) + pAAPrism01->_vIH_x * r;
                    oppY = (pActor02->_y + pSphere02->_y) + pAAPrism01->_vIH_y * r;
                } else { //if (aZ1 >= bZc) {
                    int r = pSphere02->_r * UTIL::ROOT_1_MINUS_XX[(int)((1.0*(aZ1 - bZc) / pSphere02->_r)*1000)];
                    oppX = (pActor02->_x + pSphere02->_x) + pAAPrism01->_vIH_x * r;
                    oppY = (pActor02->_y + pSphere02->_y) + pAAPrism01->_vIH_y * r;
                }

                if (pos & POS_PRISM_pp) {
                    //            仾 y+
                    //
                    //        劇劅劅劅劉
                    //        劆乢偙偪劆
                    // x- 仼  劆丂乢傜劆  仺 x+
                    //       ,劑仜丂乢劆
                    //      劆劋劑劅劅劊
                    //       `劅'
                    //            伀 y-
                    //
                    //僾儕僘儉嫬奅慄 y = ax + b 偲
                    //仜偺嵗昗(bX2, bY2)丄偲偺埵抲娭學傪峫偊傞
                    //y > ax + b 偱偁傟偽僸僢僩
                    if (oppY > a * oppX +  b) {
                        return true;
                    }

                } else if (pos & POS_PRISM_np) {
                    //            仾 y+
                    //
                    //        劇劅劅劅劉
                    //        劆偙偪乛劆
                    // x- 仼  劆傜乛丂劆  仺 x+
                    //        劆乛丂仜劑丄
                    //        劋劅劅劑劊劆Opp
                    //               `劅'
                    //            伀 y-
                    //
                    //僾儕僘儉嫬奅慄 y = ax + b 偲
                    //仜偺嵗昗(bX1, bY2)丄偲偺埵抲娭學傪峫偊傞
                    //y > ax + b 偱偁傟偽僸僢僩
                    if (oppY > a * oppX +  b) {
                        return true;
                    }

                } else if (pos & POS_PRISM_pn) {
                    //            仾 y+
                    //       ,劅丄
                    //      劆劇劑劅劅劉
                    //       `劑仜丂乛劆
                    // x- 仼  劆丂乛偙劆  仺 x+
                    //        劆乛偪傜劆
                    //        劋劅劅劅劊
                    //
                    //            伀 y-
                    //
                    //僾儕僘儉嫬奅慄 y = ax + b 偲
                    //仜偺嵗昗(bX2, bY1)丄偲偺埵抲娭學傪峫偊傞
                    //y < ax + b 偱偁傟偽僸僢僩
                    if (oppY < a * oppX +  b) {
                        return true;
                    }

                } else { // 偺偙傝偼 POS_PRISM_nn 偺傒偱偁傞
                    //            仾 y+
                    //               ,劅丄
                    //        劇劅劅劑劉劆Opp
                    //        劆乢丂仜劑'
                    // x- 仼  劆偙乢丂劆  仺 x+
                    //        劆偪傜乢劆
                    //        劋劅劅劅劊
                    //
                    //            伀 y-
                    //
                    //僾儕僘儉嫬奅慄 y = ax + b 偲
                    //仜偺嵗昗(bX1, bY1)丄偲偺埵抲娭學傪峫偊傞
                    //y < ax + b 偱偁傟偽僸僢僩
                    if (oppY < a * oppX +  b) {
                        return true;
                    }


                }
            } else if (pos & POS_PRISM_YZ) {//YZ暯柺僗儔僀僗偺僾儕僘儉
                //儚乕儖僪嵗昗偱偺僾儕僘儉嫬奅慄偺愗曅傪媮傔傞 b = z - ay
                int b = ((pActor01->_z+pAAPrism01->_cz) - pAAPrism01->_a * (pActor01->_y+pAAPrism01->_cy)) + pAAPrism01->_b;
                int oppY, oppZ;

                int bXc = pActor02->_x + pSphere02->_cx;
                if (aX1 < bXc && bXc < aX2) {
                    oppY = (pActor02->_y + pSphere02->_y) + pAAPrism01->_vIH_x * pSphere02->_r;
                    oppZ = (pActor02->_z + pSphere02->_z) + pAAPrism01->_vIH_y * pSphere02->_r;
                } else {
                    if (bXc >= aX2) {
                        int r = pSphere02->_r * UTIL::ROOT_1_MINUS_XX[(int)((1.0*(bXc - aX2) / pSphere02->_r)*1000)];
                        oppY = (pActor02->_y + pSphere02->_y) + pAAPrism01->_vIH_x * r;
                        oppZ = (pActor02->_z + pSphere02->_z) + pAAPrism01->_vIH_y * r;
                    } else if (aX1 >= bXc) {
                        int r = pSphere02->_r * UTIL::ROOT_1_MINUS_XX[(int)((1.0*(aX1 - bXc) / pSphere02->_r)*1000)];
                        oppY = (pActor02->_y + pSphere02->_y) + pAAPrism01->_vIH_x * r;
                        oppZ = (pActor02->_z + pSphere02->_z) + pAAPrism01->_vIH_y * r;
                    }
                }
                if (pos & POS_PRISM_pp) {
                    //            仾 z+
                    //
                    //        劇劅劅劅劉
                    //        劆乢偙偪劆
                    // y- 仼  劆丂乢傜劆  仺 y+
                    //       ,劑仜丂乢劆
                    //      劆劋劑劅劅劊
                    //       `劅'
                    //            伀 z-
                    //
                    //僾儕僘儉嫬奅慄 z = ay + b 偲
                    //仜偺嵗昗(bY2, bZ2)丄偲偺埵抲娭學傪峫偊傞
                    //z > ay + b 偱偁傟偽僸僢僩
                    if (oppZ > a * oppY +  b) {
                        return true;
                    }

                } else if (pos & POS_PRISM_np) {
                    //            仾 z+
                    //
                    //        劇劅劅劅劉
                    //        劆偙偪乛劆
                    // y- 仼  劆傜乛丂劆  仺 y+
                    //        劆乛丂仜劑丄
                    //        劋劅劅劑劊劆Opp
                    //               `劅'
                    //            伀 z-
                    //
                    //僾儕僘儉嫬奅慄 z = ay + b 偲
                    //仜偺嵗昗(bY1, bZ2)丄偲偺埵抲娭學傪峫偊傞
                    //z > ay + b 偱偁傟偽僸僢僩
                    if (oppZ > a * oppY +  b) {
                        return true;
                    }

                } else if (pos & POS_PRISM_pn) {
                    //            仾 z+
                    //       ,劅丄
                    //      劆劇劑劅劅劉
                    //       `劑仜丂乛劆
                    // y- 仼  劆丂乛偙劆  仺 y+
                    //        劆乛偪傜劆
                    //        劋劅劅劅劊
                    //
                    //            伀 z-
                    //
                    //僾儕僘儉嫬奅慄 z = ay + b 偲
                    //仜偺嵗昗(bY2, bZ1)丄偲偺埵抲娭學傪峫偊傞
                    //z < ay + b 偱偁傟偽僸僢僩
                    if (oppZ < a * oppY +  b) {
                        return true;
                    }

                } else { //偺偙傝偼 POS_PRISM_nn 偺傒偱偁傞
                    //            仾 z+
                    //               ,劅丄
                    //        劇劅劅劑劉劆Opp
                    //        劆乢丂仜劑'
                    // y- 仼  劆偙乢丂劆  仺 y+
                    //        劆偪傜乢劆
                    //        劋劅劅劅劊
                    //
                    //            伀 z-
                    //
                    //僾儕僘儉嫬奅慄 z = ay + b 偲
                    //仜偺嵗昗(bY1, bZ1)丄偲偺埵抲娭學傪峫偊傞
                    //z < ay + b 偱偁傟偽僸僢僩
                    if (oppZ < a * oppY +  b) {
                        return true;
                    }
                }

            } else if (pos & POS_PRISM_ZX) {
                //儚乕儖僪嵗昗偱偺僾儕僘儉嫬奅慄偺愗曅傪媮傔傞 b = x - az
                int b = ((pActor01->_x+pAAPrism01->_cx) - pAAPrism01->_a * (pActor01->_z+pAAPrism01->_cz)) + pAAPrism01->_b;
                int oppZ,oppX;
                int bYc = pActor02->_y + pSphere02->_cy;
                if (aY1 < bYc && bYc < aY2) {
                    oppZ = (pActor02->_z + pSphere02->_z) + pAAPrism01->_vIH_x * pSphere02->_r;
                    oppX = (pActor02->_x + pSphere02->_x) + pAAPrism01->_vIH_y * pSphere02->_r;
                } else {
                    if (bYc >= aY2) {
                        int r = pSphere02->_r * UTIL::ROOT_1_MINUS_XX[(int)((1.0*(bYc - aY2) / pSphere02->_r)*1000)];
                        oppZ = (pActor02->_z + pSphere02->_z) + pAAPrism01->_vIH_x * r;
                        oppX = (pActor02->_x + pSphere02->_x) + pAAPrism01->_vIH_y * r;
                    } else if (aY1 >= bYc) {
                        int r = pSphere02->_r * UTIL::ROOT_1_MINUS_XX[(int)((1.0*(aY1 - bYc) / pSphere02->_r)*1000)];
                        oppZ = (pActor02->_z + pSphere02->_z) + pAAPrism01->_vIH_x * r;
                        oppX = (pActor02->_x + pSphere02->_x) + pAAPrism01->_vIH_y * r;
                    }
                }
                if (pos & POS_PRISM_pp) {
                    //            仾 x+
                    //
                    //        劇劅劅劅劉
                    //        劆乢偙偪劆
                    // z- 仼  劆丂乢傜劆  仺 z+
                    //       ,劑仜丂乢劆
                    //      劆劋劑劅劅劊
                    //       `劅'
                    //            伀 x-
                    //
                    //僾儕僘儉嫬奅慄 x = az + b 偲
                    //仜偺嵗昗(bZ2, bX2)丄偲偺埵抲娭學傪峫偊傞
                    //x > az + b 偱偁傟偽僸僢僩
                    if (oppX > a * oppZ +  b) {
                        return true;
                    }

                } else if (pos & POS_PRISM_np) {
                    //            仾 x+
                    //
                    //        劇劅劅劅劉
                    //        劆偙偪乛劆
                    // z- 仼  劆傜乛丂劆  仺 z+
                    //        劆乛丂仜劑丄
                    //        劋劅劅劑劊劆Opp
                    //               `劅'
                    //            伀 x-
                    //
                    //僾儕僘儉嫬奅慄 x = az + b 偲
                    //仜偺嵗昗(bZ1, bX2)丄偲偺埵抲娭學傪峫偊傞
                    //x > az + b 偱偁傟偽僸僢僩
                    if (oppX > a * oppZ +  b) {
                        return true;
                    }

                } else if (pos & POS_PRISM_pn) {
                    //            仾 x+
                    //       ,劅丄
                    //      劆劇劑劅劅劉
                    //       `劑仜丂乛劆
                    // z- 仼  劆丂乛偙劆  仺 z+
                    //        劆乛偪傜劆
                    //        劋劅劅劅劊
                    //
                    //            伀 x-
                    //
                    //僾儕僘儉嫬奅慄 x = az + b 偲
                    //仜偺嵗昗(bZ2, bX1)丄偲偺埵抲娭學傪峫偊傞
                    //x < az + b 偱偁傟偽僸僢僩
                    if (oppX < a * oppZ +  b) {
                        return true;
                    }

                } else { //巆傝偼 POS_PRISM_nn 偺傒偱偁傞
                    //            仾 x+
                    //               ,劅丄
                    //        劇劅劅劑劉劆Opp
                    //        劆乢丂仜劑'
                    // z- 仼  劆偙乢丂劆  仺 z+
                    //        劆偪傜乢劆
                    //        劋劅劅劅劊
                    //
                    //            伀 x-
                    //
                    //僾儕僘儉嫬奅慄 x = az + b 偲
                    //仜偺嵗昗(bZ1, bX1)丄偲偺埵抲娭學傪峫偊傞
                    //x < az + b 偱偁傟偽僸僢僩
                    if (oppX < a * oppZ +  b) {
                        return true;
                    }
                }
            }
        }
        return false;
    }


    /**
     * 抏傪暋悢屄寕偮 .
     * 敪幩偡傞僔儑僢僩偵丄師偺崁栚偑愝掕偝傟傑偡丅<BR>
     * 丒僔儑僢僩偺 _x, _y, _z 嵗昗 <BR>
     * 丒僔儑僢僩偺 GgafDxKuroko 偺堏摦曽岦丄堏摦懍搙丄壛懍搙<BR>
     * @param prm_x               敪幩尦X嵗昗
     * @param prm_y               敪幩尦Y嵗昗
     * @param prm_z               敪幩尦Z嵗昗
     * @param prm_rz              敪幩曽岦Rz
     * @param prm_ry              敪幩曽岦Ry
     * @param prm_pDepo_Shot      敪幩偡傞僔儑僢僩偺僨億僕僩儕
     * @param prm_r               敪幩尦偲敪幩偡傞僔儑僢僩偺弶婜昞帵埵抲嫍棧(敪幩尦偐傜偺敿宎)丅0傛傝戝偒偄抣偺昁梫桳傝丅
     * @param prm_velo_first      弶抏偺僔儑僢僩弶婜懍搙
     * @param prm_acce            弶抏偺僔儑僢僩弶婜壛懍搙
     * @param prm_set_num         寕偮抏偺崌寁悢
     * @param prm_interval_frames 抏偲抏偺弌尰僼儗乕儉娫妘丅(0傛傝戝偒偄愝掕抣偱丄帪娫嵎懪偪曉偟偺傛偆側墘弌偵側傞丅0 巜掕偼慡抏堦惸敪幩丅乯
     * @param prm_attenuated      弶抏埲崀偺僔儑僢僩弶婜懍搙丒壛懍搙偺尭悐棪(< 1.0)丄埥偄偼憹暆棪(>1.0)
     * @param pFunc_CallBackDispatched 抏偑僨億僕僩儕偐傜 dispach() 偝傟偨帪偵屇傃弌偡僐乕儖僶僢僋丅
     * @return 嵟屻偺敪幩抏偺傾僋僞乕(寕偰側偐偭偨応崌偼 nullptr)
     */
    static GgafDxCore::GgafDxDrawableActor* shotWay001(coord prm_x, coord prm_y, coord prm_z,
                                                       angle prm_rz, angle prm_ry,
                                                       GgafCore::GgafActorDepository* prm_pDepo_Shot,
                                                       coord prm_r,
                                                       velo prm_velo_first, acce prm_acce,
                                                       int prm_set_num, frame prm_interval_frames, float prm_attenuated,
                                                       void (*pFunc_CallBackDispatched)(GgafDxCore::GgafDxDrawableActor*, int, int) = nullptr);

    /**
     * 敪幩尦偑岦偄偰偄傞曽岦乮_rz > _ry乯偵岦偐偭偰 抏傪暋悢屄寕偮 .
     * 敪幩偡傞僔儑僢僩偵丄師偺崁栚偑愝掕偝傟傑偡丅<BR>
     * 丒僔儑僢僩偺 _x, _y, _z 嵗昗 <BR>
     * 丒僔儑僢僩偺 GgafDxKuroko 偺堏摦曽岦丄堏摦懍搙丄壛懍搙<BR>
     * @param prm_from_x          敪幩尦X嵗昗
     * @param prm_from_y          敪幩尦Y嵗昗
     * @param prm_from_z          敪幩尦Z嵗昗
     * @param prm_to_x            栚昗X嵗昗
     * @param prm_to_y            栚昗Y嵗昗
     * @param prm_to_z            栚昗Z嵗昗
     * @param prm_pDepo_Shot      敪幩偡傞僔儑僢僩偺僨億僕僩儕
     * @param prm_r               敪幩尦偲敪幩偡傞僔儑僢僩偺弶婜昞帵埵抲嫍棧(敪幩尦偐傜偺敿宎)丅0傛傝戝偒偄抣偺昁梫桳傝丅
     * @param prm_velo_first      弶抏偺僔儑僢僩弶婜懍搙丅弶抏埲崀偺弶婜懍搙偼 prm_attenuated 傪忔偠偰偄偔丅
     * @param prm_acce            僔儑僢僩弶婜壛懍搙
     * @param prm_set_num         寕偮抏偺崌寁悢
     * @param prm_interval_frames 抏偲抏偺弌尰僼儗乕儉娫妘丅(0傛傝戝偒偄愝掕抣偱丄帪娫嵎懪偪曉偟偺傛偆側墘弌偵側傞丅0 巜掕偼慡抏堦惸敪幩丅乯
     * @param prm_attenuated      弶抏埲崀偺僔儑僢僩弶婜懍搙偺尭悐棪(< 1.0)丄埥偄偼憹暆棪(>1.0)
     * @param pFunc_CallBackDispatched
     * @return 嵟屻偺敪幩抏偺傾僋僞乕(寕偰側偐偭偨応崌偼 nullptr)
     */
    static GgafDxCore::GgafDxDrawableActor* shotWay001(coord prm_from_x, coord prm_from_y, coord prm_from_z,
                                                       coord prm_to_x, coord prm_to_y, coord prm_to_z,
                                                       GgafCore::GgafActorDepository* prm_pDepo_Shot,
                                                       coord prm_r,
                                                       velo prm_velo_first, acce prm_acce,
                                                       int prm_set_num, frame prm_interval_frames, float prm_attenuated,
                                                       void (*pFunc_CallBackDispatched)(GgafDxCore::GgafDxDrawableActor*, int, int) = nullptr);

    /**
     * 敪幩尦偑岦偄偰偄傞曽岦乮_rz > _ry乯偵岦偐偭偰 抏傪暋悢屄寕偮 .
     * 敪幩偡傞僔儑僢僩偵丄師偺崁栚偑愝掕偝傟傑偡丅<BR>
     * 丒僔儑僢僩偺 _x, _y, _z 嵗昗 <BR>
     * 丒僔儑僢僩偺 GgafDxKuroko 偺堏摦曽岦丄堏摦懍搙丄壛懍搙<BR>
     * @param prm_pFrom           敪幩尦
     * @param prm_pDepo_Shot      敪幩偡傞僔儑僢僩偺僨億僕僩儕
     * @param prm_r               敪幩尦偲敪幩偡傞僔儑僢僩偺弶婜昞帵埵抲嫍棧(敪幩尦偐傜偺敿宎)丅0傛傝戝偒偄抣偺昁梫桳傝丅
     * @param prm_velo_first      弶抏偺僔儑僢僩弶婜懍搙丅弶抏埲崀偺弶婜懍搙偼 prm_attenuated 傪忔偠偰偄偔丅
     * @param prm_acce            僔儑僢僩弶婜壛懍搙
     * @param prm_set_num         寕偮抏偺崌寁悢
     * @param prm_interval_frames 抏偲抏偺弌尰僼儗乕儉娫妘丅(0傛傝戝偒偄愝掕抣偱丄帪娫嵎懪偪曉偟偺傛偆側墘弌偵側傞丅0 巜掕偼慡抏堦惸敪幩丅乯
     * @param prm_attenuated      弶抏埲崀偺僔儑僢僩弶婜懍搙偺尭悐棪(< 1.0)丄埥偄偼憹暆棪(>1.0)
     * @param pFunc_CallBackDispatched
     * @return 嵟屻偺敪幩抏偺傾僋僞乕(寕偰側偐偭偨応崌偼 nullptr)
     */
    static GgafDxCore::GgafDxDrawableActor* shotWay001(GgafDxCore::GgafDxGeometricActor* prm_pFrom,
                                                       GgafCore::GgafActorDepository* prm_pDepo_Shot,
                                                       coord prm_r,
                                                       velo prm_velo_first, acce prm_acce,
                                                       int prm_set_num, frame prm_interval_frames, float prm_attenuated,
                                                       void (*pFunc_CallBackDispatched)(GgafDxCore::GgafDxDrawableActor*, int, int) = nullptr);


    /**
     * N-Way抏乮Rz曄壔乯傪暋悢僙僢僩寕偮 .
     * prm_rx, prm_rz, prm_ry = (0,0,0) 偱丄XY暯柺忋偵Rz曄壔偺 N-Way抏 傪曻偪傑偡丅
     * @param prm_x                敪幩尦X嵗昗
     * @param prm_y                敪幩尦Y嵗昗
     * @param prm_z                敪幩尦Z嵗昗
     * @param prm_rx               N Way偺夞揮妏
     * @param prm_rz               敪幩曽岦Rz
     * @param prm_ry               敪幩曽岦Ry
     * @param prm_pDepo_Shot       敪幩偡傞僔儑僢僩偺僨億僕僩儕
     * @param prm_r                敪幩尦偲敪幩偡傞僔儑僢僩偺弶婜昞帵埵抲嫍棧(敪幩尦偐傜偺敿宎)丅0傛傝戝偒偄抣偺昁梫桳傝丅
     * @param prm_way_N            N-Way悢乮Rz曄壔乯
     * @param prm_angClearance_N   N-Way偺娫妘妏搙
     * @param prm_velo_first       N-Way抏弶抏僙僢僩偺僔儑僢僩弶婜懍搙丅弶抏僙僢僩埲崀偺弶婜懍搙偼 prm_attenuated 傪忔偠偰偄偔丅
     * @param prm_acce             N-Way抏奺僙僢僩偺僔儑僢僩弶婜壛懍搙
     * @param prm_set_num          敪幩偡傞 N-Way抏僙僢僩偺崌寁僙僢僩悢
     * @param prm_interval_frames  抏僙僢僩偲抏僙僢僩偺弌尰僼儗乕儉娫妘丅(0傛傝戝偒偄愝掕抣偱丄帪娫嵎懪偪曉偟偺傛偆側墘弌偵側傞丅0 巜掕偼慡僙僢僩堦惸敪幩丅乯
     * @param prm_attenuated       弶抏僙僢僩埲崀偺奺僙僢僩枅偺僔儑僢僩弶婜懍搙偺尭悐棪(< 1.0)丄埥偄偼憹暆棪(>1.0)
     * @param pFunc_CallBackDispatched
     * @return 嵟屻偺敪幩抏偺傾僋僞乕(寕偰側偐偭偨応崌偼 nullptr)
     */
    static GgafDxCore::GgafDxDrawableActor* shotWay002(coord prm_x, coord prm_y, coord prm_z,
                                                       angle prm_rx, angle prm_rz, angle prm_ry,
                                                       GgafCore::GgafActorDepository* prm_pDepo_Shot,
                                                       coord prm_r,
                                                       int prm_way_N,
                                                       angle prm_angClearance_N,
                                                       velo prm_velo_first, acce prm_acce,
                                                       int prm_set_num, frame prm_interval_frames, float prm_attenuated,
                                                       void (*pFunc_CallBackDispatched)(GgafDxCore::GgafDxDrawableActor*, int, int, int) = nullptr);

    /**
     * 敪幩尦偑岦偄偰偄傞曽岦乮_rx, _rz > _ry乯N-Way抏乮Rz曄壔乯傪暋悢僙僢僩寕偮 .
     * 敪幩偡傞僔儑僢僩偵丄師偺崁栚偑愝掕偝傟傑偡丅<BR>
     * 丒僔儑僢僩偺 _x, _y, _z 嵗昗 <BR>
     * 丒僔儑僢僩偺 GgafDxKuroko 偺堏摦曽岦丄堏摦懍搙丄壛懍搙<BR>
     * @param prm_pFrom                  敪幩尦
     * @param prm_pDepo_Shot             敪幩偡傞僔儑僢僩偺僨億僕僩儕
     * @param prm_r                      敪幩尦偲敪幩偡傞僔儑僢僩偺弶婜昞帵埵抲嫍棧(敪幩尦偐傜偺敿宎)丅0傛傝戝偒偄抣偺昁梫桳傝丅
     * @param prm_way_N                  N-Way悢乮Rz曄壔乯
     * @param prm_angClearance_N         N-Way偺娫妘妏搙
     * @param prm_velo_first             N-Way抏弶抏僙僢僩偺僔儑僢僩弶婜懍搙丅弶抏僙僢僩埲崀偺弶婜懍搙偼 prm_attenuated 傪忔偠偰偄偔丅
     * @param prm_acce                   N-Way抏奺僙僢僩偺僔儑僢僩弶婜壛懍搙
     * @param prm_set_num                敪幩偡傞 N-Way抏僙僢僩偺崌寁僙僢僩悢
     * @param prm_interval_frames        抏僙僢僩偲抏僙僢僩偺弌尰僼儗乕儉娫妘丅(0傛傝戝偒偄愝掕抣偱丄帪娫嵎懪偪曉偟偺傛偆側墘弌偵側傞丅0 巜掕偼慡僙僢僩堦惸敪幩丅乯
     * @param prm_attenuated             弶抏僙僢僩埲崀偺奺僙僢僩枅偺僔儑僢僩弶婜懍搙偺尭悐棪(< 1.0)丄埥偄偼憹暆棪(>1.0)
     * @param pFunc_CallBackDispatched
     * @return 嵟屻偺敪幩抏偺傾僋僞乕(寕偰側偐偭偨応崌偼 nullptr)
     */
    static GgafDxCore::GgafDxDrawableActor* shotWay002(GgafDxCore::GgafDxGeometricActor* prm_pFrom,
                                                       GgafCore::GgafActorDepository* prm_pDepo_Shot,
                                                       coord prm_r,
                                                       int prm_way_N,
                                                       angle prm_angClearance_N,
                                                       velo prm_velo_first, acce prm_acce,
                                                       int prm_set_num, frame prm_interval_frames, float prm_attenuated,
                                                       void (*pFunc_CallBackDispatched)(GgafDxCore::GgafDxDrawableActor*, int, int, int) = nullptr);

    /**
     * N*M-Way抏傪暋悢僙僢僩寕偮 .
     * 敪幩偡傞僔儑僢僩偵丄師偺崁栚偑愝掕偝傟傑偡丅<BR>
     * 丒僔儑僢僩偺 _x, _y, _z 嵗昗 <BR>
     * 丒僔儑僢僩偺 GgafDxKuroko 偺堏摦曽岦丄堏摦懍搙丄壛懍搙<BR>
     * @param prm_x                敪幩尦X嵗昗
     * @param prm_y                敪幩尦Y嵗昗
     * @param prm_z                敪幩尦Z嵗昗
     * @param prm_rx               N*M 挿曽宍偺夞揮妏
     * @param prm_rz               敪幩曽岦Rz
     * @param prm_ry               敪幩曽岦Ry
     * @param prm_pDepo_Shot1      敪幩偡傞僔儑僢僩偺僨億僕僩儕偦偺侾
     * @param prm_paUint32_dotmat1 僔儑僢僩偦偺侾傪巊梡偡傞僪僢僩儅僩儕僢僋僗
     * @param prm_pDepo_Shot2      敪幩偡傞僔儑僢僩偺僨億僕僩儕偦偺俀
     * @param prm_paUint32_dotmat2 僔儑僢僩偦偺俀傪巊梡偡傞僪僢僩儅僩儕僢僋僗
     * @param prm_pDepo_Shot3      敪幩偡傞僔儑僢僩偺僨億僕僩儕偦偺俁
     * @param prm_paUint32_dotmat3 僔儑僢僩偦偺俁傪巊梡偡傞僪僢僩儅僩儕僢僋僗
     * @param prm_r                敪幩尦偲敪幩偡傞僔儑僢僩偺弶婜昞帵埵抲嫍棧(敪幩尦偐傜偺敿宎)丅0傛傝戝偒偄抣偺昁梫桳傝丅
     * @param prm_way_N            N-Way悢乮Rz曄壔乯
     * @param prm_way_M            M-Way悢乮Ry曄壔乯
     * @param prm_angClearance_N   N-Way偺娫妘妏搙
     * @param prm_angClearance_M   M-Way偺娫妘妏搙
     * @param prm_velo_first       N*M-Way抏弶抏僙僢僩偺僔儑僢僩弶婜懍搙丅弶抏僙僢僩埲崀偺弶婜懍搙偼 prm_attenuated 傪忔偠偰偄偔丅
     * @param prm_acce             N*M-Way抏奺僙僢僩偺僔儑僢僩弶婜壛懍搙
     * @param prm_set_num          敪幩偡傞 N*M-Way抏僙僢僩偺崌寁僙僢僩悢
     * @param prm_interval_frames  抏僙僢僩偲抏僙僢僩偺弌尰僼儗乕儉娫妘丅(0傛傝戝偒偄愝掕抣偱丄帪娫嵎懪偪曉偟偺傛偆側墘弌偵側傞丅0 巜掕偼慡僙僢僩堦惸敪幩丅乯
     * @param prm_attenuated       弶抏僙僢僩埲崀偺奺僙僢僩枅偺僔儑僢僩弶婜懍搙偺尭悐棪(< 1.0)丄埥偄偼憹暆棪(>1.0)
     * @param pFunc_CallBackDispatched
     * @return 嵟屻偺敪幩抏偺傾僋僞乕(寕偰側偐偭偨応崌偼 nullptr)
     */
    static GgafDxCore::GgafDxDrawableActor* shotWay003(coord prm_x, coord prm_y, coord prm_z,
                                                       angle prm_rx, angle prm_rz, angle prm_ry,
                                                       GgafCore::GgafActorDepository* prm_pDepo_Shot1, uint32_t* prm_paUint32_dotmat1,
                                                       GgafCore::GgafActorDepository* prm_pDepo_Shot2, uint32_t* prm_paUint32_dotmat2,
                                                       GgafCore::GgafActorDepository* prm_pDepo_Shot3, uint32_t* prm_paUint32_dotmat3,
                                                       coord prm_r,
                                                       int prm_way_N, int prm_way_M,
                                                       angle prm_angClearance_N, angle prm_angClearance_M,
                                                       velo prm_velo_first, acce prm_acce,
                                                       int prm_set_num, frame prm_interval_frames, float prm_attenuated,
                                                       void (*pFunc_CallBackDispatched)(GgafDxCore::GgafDxDrawableActor*, int, int, int, int, int) = nullptr);


    /**
     * 敪幩尦偑岦偄偰偄傞曽岦乮_rx > _rz > _ry乯偵岦偐偭偰 N*M-Way抏傪暋悢僙僢僩寕偮 .
     * 敪幩偡傞僔儑僢僩偵丄師偺崁栚偑愝掕偝傟傑偡丅<BR>
     * 丒僔儑僢僩偺 _x, _y, _z 嵗昗 <BR>
     * 丒僔儑僢僩偺 GgafDxKuroko 偺堏摦曽岦丄堏摦懍搙丄壛懍搙<BR>
     * @param prm_pFrom            敪幩尦
     * @param prm_pDepo_Shot1      敪幩偡傞僔儑僢僩偺僨億僕僩儕偦偺侾
     * @param prm_paUint32_dotmat1 僔儑僢僩偦偺侾傪巊梡偡傞僪僢僩儅僩儕僢僋僗
     * @param prm_pDepo_Shot2      敪幩偡傞僔儑僢僩偺僨億僕僩儕偦偺俀
     * @param prm_paUint32_dotmat2 僔儑僢僩偦偺俀傪巊梡偡傞僪僢僩儅僩儕僢僋僗
     * @param prm_pDepo_Shot3      敪幩偡傞僔儑僢僩偺僨億僕僩儕偦偺俁
     * @param prm_paUint32_dotmat3 僔儑僢僩偦偺俁傪巊梡偡傞僪僢僩儅僩儕僢僋僗
     * @param prm_r                敪幩尦偲敪幩偡傞僔儑僢僩偺弶婜昞帵埵抲嫍棧(敪幩尦偐傜偺敿宎)丅0傛傝戝偒偄抣偺昁梫桳傝丅
     * @param prm_way_N            N-Way悢乮Rz曄壔乯
     * @param prm_way_M            M-Way悢乮Ry曄壔乯
     * @param prm_angClearance_N   N-Way偺娫妘妏搙
     * @param prm_angClearance_M   M-Way偺娫妘妏搙
     * @param prm_velo_first       N*M-Way抏弶抏僙僢僩偺僔儑僢僩弶婜懍搙丅弶抏僙僢僩埲崀偺弶婜懍搙偼 prm_attenuated 傪忔偠偰偄偔丅
     * @param prm_acce             N*M-Way抏奺僙僢僩偺僔儑僢僩弶婜壛懍搙
     * @param prm_set_num          敪幩偡傞 N*M-Way抏僙僢僩偺崌寁僙僢僩悢
     * @param prm_interval_frames  抏僙僢僩偲抏僙僢僩偺弌尰僼儗乕儉娫妘丅(0傛傝戝偒偄愝掕抣偱丄帪娫嵎懪偪曉偟偺傛偆側墘弌偵側傞丅0 巜掕偼慡僙僢僩堦惸敪幩丅乯
     * @param prm_attenuated       弶抏僙僢僩埲崀偺奺僙僢僩枅偺僔儑僢僩弶婜懍搙偺尭悐棪(< 1.0)丄埥偄偼憹暆棪(>1.0)
     * @param pFunc_CallBackDispatched
     * @return 嵟屻偺敪幩抏偺傾僋僞乕(寕偰側偐偭偨応崌偼 nullptr)
     */
    static GgafDxCore::GgafDxDrawableActor* shotWay003(GgafDxCore::GgafDxGeometricActor* prm_pFrom,
                                                       GgafCore::GgafActorDepository* prm_pDepo_Shot1, uint32_t* prm_paUint32_dotmat1,
                                                       GgafCore::GgafActorDepository* prm_pDepo_Shot2, uint32_t* prm_paUint32_dotmat2,
                                                       GgafCore::GgafActorDepository* prm_pDepo_Shot3, uint32_t* prm_paUint32_dotmat3,
                                                       coord prm_r,
                                                       int prm_way_N, int prm_way_M,
                                                       angle prm_angClearance_N, angle prm_angClearance_M,
                                                       velo prm_velo_first, acce prm_acce,
                                                       int prm_set_num, frame prm_interval_frames, float prm_attenuated,
                                                       void (*pFunc_CallBackDispatched)(GgafDxCore::GgafDxDrawableActor*, int, int, int, int, int) = nullptr);



    /**
     * 奼嶶曻幩抏傪暋悢僙僢僩摨帪偵寕偮 .
     * 敪幩偡傞僔儑僢僩偵丄師偺崁栚偑愝掕偝傟傑偡丅<BR>
     * 丒僔儑僢僩偺 _x, _y, _z 嵗昗 <BR>
     * 丒僔儑僢僩偺 GgafDxKuroko 偺堏摦曽岦丄堏摦懍搙丄壛懍搙<BR>
     * @param prm_x               敪幩尦X嵗昗
     * @param prm_y               敪幩尦Y嵗昗
     * @param prm_z               敪幩尦Z嵗昗
     * @param prm_rz              敪幩曽岦Rz
     * @param prm_ry              敪幩曽岦Ry
     * @param prm_pDepo_Shot      敪幩偡傞僔儑僢僩偺僨億僕僩儕
     * @param prm_r               敪幩尦偲敪幩偡傞僔儑僢僩偺弶婜昞帵埵抲嫍棧(敪幩尦偐傜偺敿宎)丅0傛傝戝偒偄抣偺昁梫桳傝丅
     * @param prm_radial_way_num  侾僙僢僩曻幩Way悢
     * @param prm_expanse_angle   曻幩抏偺徠幩妏(0 乣 D180ANG丅夰拞揹摂偺岝偺峀偑傝妏偺傛偆側僀儊乕僕丅彫偝偄偲抏偺娫妘偑嫹偄)
     * @param prm_velo_first      弶抏僙僢僩偺僔儑僢僩弶婜懍搙丅弶抏僙僢僩埲崀偺弶婜懍搙偼 prm_attenuated 傪忔偠偰偄偔丅
     * @param prm_acce            奺僙僢僩偺僔儑僢僩弶婜壛懍搙
     * @param prm_set_num         寕偮曻幩WAY抏偺崌寁僙僢僩悢
     * @param prm_interval_frames 抏僙僢僩偲抏僙僢僩偺弌尰僼儗乕儉娫妘丅(0傛傝戝偒偄愝掕抣偱丄帪娫嵎懪偪曉偟偺傛偆側墘弌偵側傞丅0 巜掕偼慡僙僢僩堦惸敪幩丅乯
     * @param prm_attenuated      弶抏僙僢僩埲崀偺僙僢僩枅偺僔儑僢僩弶婜懍搙尭悐棪(< 1.0)丄埥偄偼憹暆棪(>1.0)
     * @param pFunc_CallBackDispatched 僨億僕僩儕(prm_pDepo_Shot)偐傜 dispatch() 偝傟偰丄
     *                                 堏摦曽岦丄弶婜懍搙丄壛懍搙偑愝掕偝傟偨屻偵僐乕儖僶僢僋偝傟傞娭悢傪愝掕丅
     *                                 堷悢偵偼師偺抣偑堷偒搉偝傟傞丅
     *                                 void f(GgafDxCore::GgafDxDrawableActor* prm_pActor, int prm_dispatch_num, int prm_set_index, int prm_way_index)
     *                                 prm_pActor         dispatch()偝傟偨抏偺傾僋僞乕
     *                                 prm_dispatch_num   壗夞栚偺 dispatch() 偺抏偐  (1乣)
     *                                 prm_set_index      曻幩WAY抏壗僙僢僩栚偱偁傞偐 (0乣)
     *                                 prm_way_index      壗WAY栚偺抏偱偁傞偐         (0乣)
     * @return 嵟屻偺敪幩抏偺傾僋僞乕(寕偰側偐偭偨応崌偼 nullptr)
     */
    static GgafDxCore::GgafDxDrawableActor* shotWay004(coord prm_x, coord prm_y, coord prm_z,
                                                       angle prm_rz, angle prm_ry,
                                                       GgafCore::GgafActorDepository* prm_pDepo_Shot,
                                                       coord prm_r,
                                                       int prm_radial_way_num, angle prm_expanse_angle,
                                                       velo prm_velo_first, acce prm_acce,
                                                       int prm_set_num, frame prm_interval_frames, float prm_attenuated,
                                                       void (*pFunc_CallBackDispatched)(GgafDxCore::GgafDxDrawableActor*, int, int, int) = nullptr);

    /**
     * 敪幩尦偑岦偄偰偄傞曽岦乮_rz > _ry乯偵岦偐偭偰奼嶶曻幩抏傪暋悢僙僢僩摨帪偵寕偮 .
     * 敪幩偡傞僔儑僢僩偵丄師偺崁栚偑愝掕偝傟傑偡丅<BR>
     * 丒僔儑僢僩偺 _x, _y, _z 嵗昗 <BR>
     * 丒僔儑僢僩偺 GgafDxKuroko 偺堏摦曽岦丄堏摦懍搙丄壛懍搙<BR>
     * @param prm_pFrom           敪幩尦
     * @param prm_pDepo_Shot      敪幩偡傞僔儑僢僩偺僨億僕僩儕
     * @param prm_r               敪幩尦偲敪幩偡傞僔儑僢僩偺弶婜昞帵埵抲嫍棧(敪幩尦偐傜偺敿宎)丅0傛傝戝偒偄抣偺昁梫桳傝丅
     * @param prm_radial_way_num  侾僙僢僩曻幩Way悢
     * @param prm_expanse_angle   曻幩抏偺徠幩拞怱妏(0 乣 D180ANG丅夰拞揹摂偺岝偺峀偑傝偺惉偡妏偺傛偆側僀儊乕僕丅彫偝偄偲抏偺娫妘偑嫹偄)
     * @param prm_velo_first      弶抏僙僢僩偺僔儑僢僩弶婜懍搙
     * @param prm_acce            弶抏僙僢僩偺僔儑僢僩弶婜壛懍搙
     * @param prm_set_num         寕偮曻幩WAY抏偺崌寁僙僢僩悢
     * @param prm_interval_frames 抏僙僢僩偲抏僙僢僩偺弌尰僼儗乕儉娫妘丅(0傛傝戝偒偄愝掕抣偱丄帪娫嵎懪偪曉偟偺傛偆側墘弌偵側傞丅0 巜掕偼慡僙僢僩堦惸敪幩丅乯
     * @param prm_attenuated      弶抏僙僢僩埲崀偺僙僢僩枅偺僔儑僢僩弶婜懍搙丒壛懍搙偺尭悐棪(> 1.0)丄埥偄偼憹暆棪(>1.0)
     * @param pFunc_CallBackDispatched 僨億僕僩儕(prm_pDepo_Shot)偐傜 dispatch() 偝傟偰丄
     *                                 堏摦曽岦丄弶婜懍搙丄壛懍搙偑愝掕偝傟偨屻偵僐乕儖僶僢僋偝傟傞娭悢傪愝掕丅
     *                                 堷悢偵偼師偺抣偑堷偒搉偝傟傞丅
     *                                 void f(GgafDxCore::GgafDxDrawableActor* prm_pActor, int prm_dispatch_num, int prm_set_index, int prm_way_index)
     *                                 prm_pActor         dispatch()偝傟偨抏偺傾僋僞乕
     *                                 prm_dispatch_num   壗夞栚偺 dispatch() 偺抏偐  (1乣)
     *                                 prm_set_index      曻幩WAY抏壗僙僢僩栚偱偁傞偐 (0乣)
     *                                 prm_way_index      壗WAY栚偺抏偱偁傞偐         (0乣)
     * @return 嵟屻偺敪幩抏偺傾僋僞乕(寕偰側偐偭偨応崌偼 nullptr)
     */
    static GgafDxCore::GgafDxDrawableActor* shotWay004(GgafDxCore::GgafDxGeometricActor* prm_pFrom,
                                                       GgafCore::GgafActorDepository* prm_pDepo_Shot,
                                                       coord prm_r,
                                                       int prm_radial_way_num, angle prm_expanse_angle,
                                                       velo prm_velo_first, acce prm_acce,
                                                       int prm_set_num, frame prm_interval_frames, float prm_attenuated,
                                                       void (*pFunc_CallBackDispatched)(GgafDxCore::GgafDxDrawableActor*, int, int, int) = nullptr);

    /**
     * 墿嬥妏奼嶶曻幩抏傪暋悢僙僢僩摨帪偵寕偮 .
     * 敪幩偡傞僔儑僢僩偵丄師偺崁栚偑愝掕偝傟傑偡丅<BR>
     * 丒僔儑僢僩偺 _x, _y, _z 嵗昗 <BR>
     * 丒僔儑僢僩偺 GgafDxKuroko 偺堏摦曽岦丄堏摦懍搙丄壛懍搙<BR>
     * @param prm_x               敪幩尦X嵗昗
     * @param prm_y               敪幩尦Y嵗昗
     * @param prm_z               敪幩尦Z嵗昗
     * @param prm_rz              敪幩曽岦Rz
     * @param prm_ry              敪幩曽岦Ry
     * @param prm_pDepo_Shot      敪幩偡傞僔儑僢僩偺僨億僕僩儕
     * @param prm_r               敪幩尦偲敪幩偡傞僔儑僢僩偺弶婜昞帵埵抲嫍棧(敪幩尦偐傜偺敿宎)丅0傛傝戝偒偄抣偺昁梫桳傝丅
     * @param prm_way_num         侾僙僢僩敪幩悢(1乣999)
     * @param prm_first_expanse_angle   敪幩抏偺弶婜徠幩妏(0 乣 D180ANG丅夰拞揹摂偺岝偺峀偑傝妏偺傛偆側僀儊乕僕丅彫偝偄偲抏偺娫妘偑嫹偄)
     * @param prm_inc_expanse_angle     1抏枅偵壛嶼偡傞徠幩妏嵎暘(0 乣 D180ANG)
     * @param prm_velo_first      弶抏僙僢僩偺僔儑僢僩弶婜懍搙丅弶抏僙僢僩埲崀偺弶婜懍搙偼 prm_attenuated 傪忔偠偰偄偔丅
     * @param prm_acce            奺僙僢僩偺僔儑僢僩弶婜壛懍搙
     * @param prm_set_num         寕偮曻幩WAY抏偺崌寁僙僢僩悢
     * @param prm_interval_frames 抏僙僢僩偲抏僙僢僩偺弌尰僼儗乕儉娫妘丅(0傛傝戝偒偄愝掕抣偱丄帪娫嵎懪偪曉偟偺傛偆側墘弌偵側傞丅0 巜掕偼慡僙僢僩堦惸敪幩丅乯
     * @param prm_attenuated      弶抏僙僢僩埲崀偺僙僢僩枅偺僔儑僢僩弶婜懍搙尭悐棪(< 1.0)丄埥偄偼憹暆棪(>1.0)
     * @param pFunc_CallBackDispatched
     * @return 嵟屻偺敪幩抏偺傾僋僞乕(寕偰側偐偭偨応崌偼 nullptr)
     */
    static GgafDxCore::GgafDxDrawableActor* shotWayGoldenAng(coord prm_x, coord prm_y, coord prm_z,
                                                             angle prm_rz, angle prm_ry,
                                                             GgafCore::GgafActorDepository* prm_pDepo_Shot,
                                                             coord prm_r,
                                                             int prm_way_num,
                                                             angle prm_first_expanse_angle, angle prm_inc_expanse_angle,
                                                             velo prm_velo_first, acce prm_acce,
                                                             int prm_set_num, frame prm_interval_frames, float prm_attenuated,
                                                             void (*pFunc_CallBackDispatched)(GgafDxCore::GgafDxDrawableActor*, int, int, int) = nullptr);

    /**
     * 敪幩尦偑岦偄偰偄傞曽岦乮_rz > _ry乯偵岦偐偭偰墿嬥妏奼嶶曻幩抏傪暋悢僙僢僩摨帪偵寕偮 .
     * 敪幩偡傞僔儑僢僩偵丄師偺崁栚偑愝掕偝傟傑偡丅<BR>
     * 丒僔儑僢僩偺 _x, _y, _z 嵗昗 <BR>
     * 丒僔儑僢僩偺 GgafDxKuroko 偺堏摦曽岦丄堏摦懍搙丄壛懍搙<BR>
     * @param prm_pFrom           敪幩尦
     * @param prm_pDepo_Shot      敪幩偡傞僔儑僢僩偺僨億僕僩儕
     * @param prm_r               敪幩尦偲敪幩偡傞僔儑僢僩偺弶婜昞帵埵抲嫍棧(敪幩尦偐傜偺敿宎)丅0傛傝戝偒偄抣偺昁梫桳傝丅
     * @param prm_way_num         侾僙僢僩敪幩悢(1乣999)
     * @param prm_first_expanse_angle   敪幩抏偺弶婜徠幩妏(0 乣 D180ANG丅夰拞揹摂偺岝偺峀偑傝妏偺傛偆側僀儊乕僕丅彫偝偄偲抏偺娫妘偑嫹偄)
     * @param prm_inc_expanse_angle     1抏枅偵壛嶼偡傞徠幩妏嵎暘(0 乣 D180ANG)
     * @param prm_velo_first      弶抏僙僢僩偺僔儑僢僩弶婜懍搙丅弶抏僙僢僩埲崀偺弶婜懍搙偼 prm_attenuated 傪忔偠偰偄偔丅
     * @param prm_acce            奺僙僢僩偺僔儑僢僩弶婜壛懍搙
     * @param prm_set_num         寕偮曻幩WAY抏偺崌寁僙僢僩悢
     * @param prm_interval_frames 抏僙僢僩偲抏僙僢僩偺弌尰僼儗乕儉娫妘丅(0傛傝戝偒偄愝掕抣偱丄帪娫嵎懪偪曉偟偺傛偆側墘弌偵側傞丅0 巜掕偼慡僙僢僩堦惸敪幩丅乯
     * @param prm_attenuated      弶抏僙僢僩埲崀偺僙僢僩枅偺僔儑僢僩弶婜懍搙尭悐棪(< 1.0)丄埥偄偼憹暆棪(>1.0)
     * @param pFunc_CallBackDispatched
     * @return 嵟屻偺敪幩抏偺傾僋僞乕(寕偰側偐偭偨応崌偼 nullptr)
     */
    static GgafDxCore::GgafDxDrawableActor* shotWayGoldenAng(GgafDxCore::GgafDxGeometricActor* prm_pFrom,
                                                             GgafCore::GgafActorDepository* prm_pDepo_Shot,
                                                             coord prm_r,
                                                             int prm_way_num,
                                                             angle prm_first_expanse_angle, angle prm_inc_expanse_angle,
                                                             velo prm_velo_first, acce prm_acce,
                                                             int prm_set_num, frame prm_interval_frames, float prm_attenuated,
                                                             void (*pFunc_CallBackDispatched)(GgafDxCore::GgafDxDrawableActor*, int, int, int) = nullptr);


};

}
#endif /*GGAFLIB_STGUTIL_H_*/
