Пример #1
0
 public BranchIndex(int Level, int Index, int BottomVerticesIndex, int TopVerticesIndex, Vector3 Rotation, BranchIndex From, BranchIndex Previous, GameObject _GameObject, int Age = 0)
     : base(Index, OrganType.Branch, From, _GameObject, Age)
 {
     m_Level = Level;
     m_BottomVerticesIndex = BottomVerticesIndex;
     m_TopVerticesIndex    = TopVerticesIndex;
     m_Rotation            = Rotation;
     m_Previous            = Previous;
 }
Пример #2
0
    public bool IsMatch(BranchIndex _BranchIndex)
    {
        if (!IsTheLevelTheSame(_BranchIndex))
        {
            return(false);                                  //不属于同一级的枝干
        }
        switch (Convert.ToInt32(IsFirstBranchInBranch()) + Convert.ToInt32(_BranchIndex.IsFirstBranchInBranch()))
        {
        case 0:
            return(IsTheSameIndex(_BranchIndex));

        case 1:
            return(false);

        case 2:
            return(IsTheSameRelativeRotationAngles(_BranchIndex));

        default:
            throw new Exception("Unknown Exception.");
        }
    }
Пример #3
0
 public bool IsTheSameRelativeRotationAngles(BranchIndex _BranchIndex)
 {
     return(this.RelativeRotation.Equals(_BranchIndex.RelativeRotation));
 }