Docstoc

Object Oriented programming

Document Sample
Object Oriented programming Powered By Docstoc
					Object-Oriented Graphics
           &
     Web Graphics

       2002.8.28
        신승영
                  Graphical Objects
                   Representation
   In Traditional imperative programming
       Know how to render itself.


                        Data
         Application                 Function
                       Result
    Object-Oriented programming
   Related term
       Object
            As modules with which we build programs
       Attributes : properties of the module
       Methods : functions
       Message : to object to invoke a methods

                             Message
        Application                       Object method
Object-Oriented programming


   Advantage of OOP
       Reuse of code
       Extension, inheritance
       Abstraction
                         Scene Graphs
   Scene = objects + lights + camera
   Scene graph : representation of a scene
                                   Scene


      Color         Translate   Object 1    Translate     Object 3


                     Rotate     Translate    Rotate
                                                        Camera view 2


                                Object 2
    Camera view 1
               Scene Graphs
glPushAttrib     glPushMatrix
glPushMatrix     glTranslate
glColor          glRotate
glTranslate      glObject3()
glRotate         glPopMatrix
Object1()        glPopAttrib
glTranslate
Object2()
glPopMatrix
Scene Graph & OpenGL


 Scene Graph              OpenGL
 Database – includes      Rendering
all the elements of the    engine
         scene
                 Tree Structures
    CSG(Constructive Solid Geometry) Trees

                          1.Cube with a hole
                          2. Solid cube composed of two
                          different materials.



    Wire frame that has
       two possible
      interpretations
                        CGS Trees
   Three set operations
       Union : all points that are either in A or B
       Intersection : all points that are in both A and B
       Set difference : set of points that are in A and
        are not in B
              CGS Trees
   CGS tree representation
                    BSP Tress
   BSP(binary spatial-partition) tree
       scene culling, collision detection
       http://symbolcraft.com/pjl/graphics/bsp/bsptreedemo_k
        orean.html
         Quadtrees & Octrees
   Quadtree : partition of plan(2D)
   Octree : partition of space(3D)
       Voxels :   volume data sets that consist of volume
        elements
          Graphics and Web
   Client-server graphics
   Graphical information efficiently
   Promises of communicating information in a
    multitude of forms
   Implement graphical applications that are
    independent of the API
   Web3D : Java3D, VRML

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:8
posted:10/1/2012
language:Latin
pages:13