コード例 #1
0
        // read from binary reader
        internal RwFrame(BinaryReader reader, List <RwFrame> frameList)
        {
            Transform = reader.ReadMatrix4x3();
            int parentIndex = reader.ReadInt32();

            UserFlags = reader.ReadInt32();

            Children = new List <RwFrame>();

            if (parentIndex != -1)
            {
                mParent = frameList[parentIndex];
            }
            else
            {
                mParent = null;
            }
        }
コード例 #2
0
 /// <summary>
 /// Construct a new scene node with a given local transform, node parent and user flag.
 /// </summary>
 /// <param name="transform">The local transformation matrix of the node.</param>
 /// <param name="parent">The parent node of the scene node.</param>
 /// <param name="userFlag">The user flag to set.</param>
 public RwFrame(Matrix4x4 transform, RwFrame parent, int userFlag)
 {
     Transform = transform;
     UserFlags = userFlag;
     Parent    = parent;
 }