
本站地址:http://www.bajiao123.com

托管的 Direct3D之 使用 Frame Hierarchy 创建动画(翻译)
// matrixes for the individual frames in the hierarchy. if(this.SetupCustomTransform != null) { this.SetupCustomTransform(this, null); } // Begin recusively rendering the frames. // Use the identity matrix as the custom transform for the entire // frame hierarchy. this.RenderFrame(this.rootFrame.FrameHierarchy, Matrix.Identity); return true; } protected void RenderFrame(Frame frame, Matrix parentTransformationMatrix) { // First, render all sibling frames at this level passing the parent´s // aggregated transformation matrix. if(frame.FrameSibling != null) { this.RenderFrame(frame.FrameSibling, parentTransformationMatrix); } // Aggregate the transformation matrix to be used for this frame. // 1. Apply the frames transformation as specified in the x-file. // 2. Apply the custom transformation for this individual frame. // 3. Apply the parent´s aggregated transformation matrix. Matrix tm = frame.TransformationMatrix * ((CustomFrame)frame).CustomTransform * parentTransformationMatrix; // G << 上一页 [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] ... 下一页 >>
本站地址:http://www.bajiao123.com

