[657] | 1 | <HTML> |
---|
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
---|
| 3 | <!-- Created on , 12 2006 by texi2html 1.64 --> |
---|
| 4 | <!-- |
---|
| 5 | Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author) |
---|
| 6 | Karl Berry <karl@freefriends.org> |
---|
| 7 | Olaf Bachmann <obachman@mathematik.uni-kl.de> |
---|
| 8 | and many others. |
---|
| 9 | Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de> |
---|
| 10 | Send bugs and suggestions to <texi2html@mathematik.uni-kl.de> |
---|
| 11 | |
---|
| 12 | --> |
---|
| 13 | <HEAD> |
---|
| 14 | <TITLE>OGRE Manual v1.0.7: The Core Objects</TITLE> |
---|
| 15 | |
---|
| 16 | <META NAME="description" CONTENT="OGRE Manual v1.0.7: The Core Objects"> |
---|
| 17 | <META NAME="keywords" CONTENT="OGRE Manual v1.0.7: The Core Objects"> |
---|
| 18 | <META NAME="resource-type" CONTENT="document"> |
---|
| 19 | <META NAME="distribution" CONTENT="global"> |
---|
| 20 | <META NAME="Generator" CONTENT="texi2html 1.64"> |
---|
| 21 | <LINK TYPE="text/css" rel="stylesheet" href="../style.css"> |
---|
| 22 | </HEAD> |
---|
| 23 | |
---|
| 24 | <BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000"> |
---|
| 25 | |
---|
| 26 | <A NAME="SEC4"></A> |
---|
| 27 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> |
---|
| 28 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC3"> < </A>]</TD> |
---|
| 29 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top"> Up </A>]</TD> |
---|
| 30 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_5.html#SEC8"> > </A>]</TD> |
---|
| 31 | <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD> |
---|
| 32 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD> |
---|
| 33 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> |
---|
| 34 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD> |
---|
| 35 | </TR></TABLE> |
---|
| 36 | <HR SIZE=1> |
---|
| 37 | <H1> 2. The Core Objects </H1> |
---|
| 38 | <!--docid::SEC4::--> |
---|
| 39 | <A NAME="SEC5"></A> |
---|
| 40 | <H2> Introduction </H2> |
---|
| 41 | <!--docid::SEC5::--> |
---|
| 42 | <P> |
---|
| 43 | |
---|
| 44 | This tutorial gives you a quick summary of the core objects that you will use in OGRE and what they are used for. |
---|
| 45 | </P><P> |
---|
| 46 | |
---|
| 47 | <A NAME="SEC6"></A> |
---|
| 48 | <H2> A Word About Namespaces </H2> |
---|
| 49 | <!--docid::SEC6::--> |
---|
| 50 | <P> |
---|
| 51 | |
---|
| 52 | OGRE uses a C++ feature called namespaces. This lets you put classes, enums, structures, anything really within a 'namespace' scope which is an easy way to prevent name clashes, i.e. situations where you have 2 things called the same thing. Since OGRE is designed to be used inside other applications, I wanted to be sure that name clashes would not be a problem. Some people prefix their classes/types with a short code because some compilers don't support namespaces, but I chose to use them because they are the 'right' way to do it. Sorry if you have a non-compliant compiler, but hey, the C++ standard has been defined for years, so compiler writers really have no excuse anymore. If your compiler doesn't support namespaces then it's probably because it's sh*t - get a better one. ;) |
---|
| 53 | </P><P> |
---|
| 54 | |
---|
| 55 | This means every class, type etc should be prefixed with 'Ogre::', e.g. 'Ogre::Camera', 'Ogre::Vector3' etc which means if elsewhere in your application you have used a Vector3 type you won't get name clashes. To avoid lots of extra typing you can add a 'using namespace Ogre;' statement to your code which means you don't have to type the 'Ogre::' prefix unless there is ambiguity (in the situation where you have another definition with the same name). |
---|
| 56 | </P><P> |
---|
| 57 | |
---|
| 58 | <A NAME="SEC7"></A> |
---|
| 59 | <H2> UML Diagram </H2> |
---|
| 60 | <!--docid::SEC7::--> |
---|
| 61 | <P> |
---|
| 62 | |
---|
| 63 | Shown below is a UML diagram of the core objects and how they relate to each other. Even if you don't know UML I'm sure you can work out the gist... |
---|
| 64 | </P><P> |
---|
| 65 | |
---|
| 66 | <CENTER><IMG SRC="images/uml-overview.png" ALT="images/uml-overview"></CENTER> |
---|
| 67 | </P><P> |
---|
| 68 | |
---|
| 69 | More details on these objects can be found in the following sections. |
---|
| 70 | </P><P> |
---|
| 71 | |
---|
| 72 | <A NAME="The Root Object"></A> |
---|
| 73 | <HR SIZE=1> |
---|
| 74 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> |
---|
| 75 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_3.html#SEC3"> < </A>]</TD> |
---|
| 76 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top"> Up </A>]</TD> |
---|
| 77 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_5.html#SEC8"> > </A>]</TD> |
---|
| 78 | <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD> |
---|
| 79 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD> |
---|
| 80 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> |
---|
| 81 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD> |
---|
| 82 | </TR></TABLE> |
---|
| 83 | <BR> |
---|
| 84 | <FONT SIZE="-1"> |
---|
| 85 | This document was generated |
---|
| 86 | by <I>Steve Streeting</I> on <I>, 12 2006</I> |
---|
| 87 | using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html |
---|
| 88 | "><I>texi2html</I></A> |
---|
| 89 | |
---|
| 90 | </BODY> |
---|
| 91 | </HTML> |
---|