lecture5 - CSE472 Computer Graphics Scene Graph Data...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
1 CSE472 Computer Graphics Scene Graph Data Structures Modeling/Rendering C++ Classes
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 CSE472 Computer Graphics Modeling/Rendering Graphical Model Rendering Output Device Rendering Parameters
Background image of page 2
3 CSE472 Computer Graphics Does OpenGL Support Modeling NO! OpenGL only renders You can skip the model, but… Difficult to deal with variable objects Loaded objects? It is often assumed you will utilize some modeling API Open Inventor from SGI is an example Video games, High end modeling, etc.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 CSE472 Computer Graphics Why Modeling is Important All of the model is in a uniform format Alternative rendering can be supported Advanced techniques can be supported Shadows, Transparency, Fog, etc. Auxiliary functions can be supported Level of detail, navigation, collision detection Store static content Textures, bump maps
Background image of page 4
5 CSE472 Computer Graphics Project 1 You must, I repeat, must implement the entire room as a graphical model that is then rendered. Do not simply draw your float using OpenGL calls!
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 CSE472 Computer Graphics Standards for Modeling There are surprisingly few standards for modeling Models tend to be VERY application specific Games have different requirements from CAD, which has different requirements from animation, etc. Models tend to be very “programmer visible”
Background image of page 6
7 CSE472 Computer Graphics What a Model Is… Fundamentally: A Data Structure Typically a set of objects that represent the elements of a “scene graph” Scene graph: Hierarchical representation of a graphical scene
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
8 CSE472 Computer Graphics A Simple Polygon Model… class CPolygon { public: CPolygon(); virtual ~CPolygon(); void glRender(); void AddVertex(double x, double y, double z); private: // A polygon is a list of vertices std::list< CGrPoint > m_vertices; }; Note: Too Simple, don’t use
Background image of page 8
9 CSE472 Computer Graphics That CGrPoint class… class CGrPoint { public: CGrPoint() {} CGrPoint(double x, double y, double z=0, double w=1.) {m[0] = x; m[1] = y; m[2] = z; m[3] = w;} CGrPoint(const CGrPoint &p) {m[0]=p.m[0]; m[1]=p.m[1]; m[2]=p.m[2]; m[3]=p.m[3];} CGrPoint &operator=(const CGrPoint &p) {m[0]=p.m[0]; m[1]=p.m[1]; m[2]=p.m[2]; m[3]=p.m[3]; return *this;} double X() const {return m[0];} double X(double p) {return m[0] = p;}
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/25/2008 for the course CSE 472 taught by Professor Owen during the Spring '08 term at Michigan State University.

Page1 / 31

lecture5 - CSE472 Computer Graphics Scene Graph Data...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online