Chinaunix首页 | 论坛 | 博客
  • 博客访问: 133196
  • 博文数量: 53
  • 博客积分: 121
  • 博客等级: 入伍新兵
  • 技术积分: 570
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-04 10:59
文章分类
文章存档

2020年(1)

2013年(48)

2012年(4)

我的朋友

分类: LINUX

2013-10-14 23:31:50


P:\_xfile_2010_02\povray-3.6.chm::/S/18.html#L59

iso_copy_out_to_desktop.pl "sdb1:\sdb1\all_chm\linux_src_chm_0.iso\\_xfile_2010_02\\povray-3.6.chm"

比起 现在的版本 这个版本 更加容易  分析

main(int argc, char **argv)
    povray_cooperate();
        povray_init();
        
         Send_RenderStarted(opts.Options & CONTINUE_TRACE);

         fix_up_scene_name();
         fix_up_animation_values();
         fix_up_rendering_window();

         init_output_file_handle();
         Send_RenderOptions();
         FrameLoop();
         Send_RenderDone(withtime);
            Do_Cooperate(2);
             POVMS_ProcessMessages(POVMS_Render_Context, false) == kFalseErr)
    



#==========================================================================
#核心业务
FrameLoop()
 FrameRender()
    
   Initialize_Noise();

   POVFPU_Init();

   Initialize_Mesh_Code();

   Parse();
        Create_Camera();
        Create_Texture();
        Create_Pigment();
        Create_Finish();
        
          IncludeHeader(opts.Header_File_Name);

        Parse_Frame ();
        Post_Media(Frame.Atmosphere);

        Terminate_Tokenizer();
        Destroy_Textures(Default_Texture);
        Destroy_Camera(Default_Camera);
        Destroy_Random_Generators();


    Initialize_Atmosphere_Code();
    Initialize_BBox_Code();
    Initialize_Lighting_Code();
    Initialize_VLBuffer_Code();
    Initialize_Radiosity_Code();

    Build_Bounding_Slabs(&Root_Object);

    Build_Vista_Buffer();

    Build_Light_Buffers();

    variable_store(STORE);


    Send_ParseStatistics();

    InitBacktraceEverything();
    BuildPhotonMaps();

    #开始渲染
       Initialize_Renderer();
    Read_Rendered_Part(Actual_Output_Name);

    
    Start_Tracing_Radiosity_Preview(opts.PreviewGridSize_Start, opts.PreviewGridSize_End);

    Start_Tracing_Mosaic_Preview(opts.PreviewGridSize_Start, opts.PreviewGridSize_End);

    Start_Adaptive_Tracing();
    Start_Non_Adaptive_Tracing();
        #==========================================================================
        Do_Cooperate(0);
        Prune_Vista_Tree(Current_Line_Number);

        #追踪一个像素
        trace_pixel(x, Current_Line_Number, Current_Line[x], unclippedColour);
            Trace(&Camera_Ray, ColourUnclipped, 1.0);
                Intersection(&New_Intersection, Object, Ray))
                    Ray_In_Bound (Ray,Object->Bound))
                    All_Intersections (Object, Ray, Depth_Stack))
                        ((*((x)->Methods->All_Intersections_Method)) (x,y,z))
                    
                Intersect_BBox_Tree(Root_Object, Ray,
                    Check_And_Enqueue(Frame_Queue, Root, &Root->BBox, &rayinfo);
                    Check_And_Enqueue(Frame_Queue, Node->Node[i], &Node->Node[i]->BBox, &rayinfo);
                    Intersection(&New_Intersection, (OBJECT *)Node->Node, Ray))

                    
                IsObjectInCSG(Best_Intersection.Object,photonOptions.photonObject))
            
        do_anti_aliasing(x, Current_Line_Number, Current_Line[x]);
        plot_pixel(x, Current_Line_Number, Current_Line[x]);
            Compensate_For_Alpha_AA(c,Colour);
            extract_colors(c, &Red, &Green, &Blue, &Alpha, &grey);
            POV_DISPLAY_PLOT(opts.Preview_RefCon, x, y, Red, Green, Blue, Alpha);
        #==========================================================================
    



    

#==========================================================================
#消息接受 处理函数, 的注册, 这是下面的物体
typedef struct Method_Struct METHODS;
Bicubic_Patch_Methods Blob_Methods Box_Methods CSG_Intersection_Methods CSG_Merge_Methods CSG_Union_Methods Cone_Methods
Disc_Methods Ellipsoid_Methods Fractal_Methods HField_Methods IsoSurface_Methods Lathe_Methods Light_Source_Methods
Mesh_Methods Parametric_Methods Plane_Methods Poly_Methods Polygon_Methods Prism_Methods Quadric_Methods Smooth_Color_Triangle_Methods
Smooth_Triangle_Methods Sor_Methods Sphere_Methods Sphere_Sweep_Methods Superellipsoid_Methods TTF_Methods Torus_Methods Triangle_Methods

阅读(1110) | 评论(1) | 转发(0) |
0

上一篇:ext2fsd 源码 分析

下一篇:lame mp3 源码 分析

给主人留下些什么吧!~~

seuliujiaguo2014-01-11 15:27:17

写的很好,就是不够详细啊!