Changes

Jump to: navigation, search

User:Dsventura

1,084 bytes added, 09:16, 5 April 2011
added tutorial to add to framework (not done)
To put all of this into the framework, we create an XObject class which is derived from Object. This will hold model information as well as the animation controller. It will also hold information that allows us to change animation sets and the speed of the animation. (refer to XObject.h)
<h2>Putting It Into The Framework</h2>
<h3>Configuration.h</h3>
Assuming you put your animations into ../../resources/animations, put this into config:
<pre>#define ANIMATION_DIRECTORY L"resources\\animations"</pre>
The utilities function will handle going up 2 directory levels.
<h3>Display.cpp</h3>
Pass the display device to XObject (Display::setup()):
<pre>XObject::connectDevice(d3dd);</pre>
<h3>Utilities.cpp</h3>
to be added...
<h3>Object</h3>
1. Throw this into the header file:
<pre>#include "MeshHierarchy.h"</pre>
2. Make a default contructor for Object. Textures and what-not are handled already. (Note: May want to change parameters if, for example, you want to make a non-opaque XObject)
<pre>
Object::Object(Colour c) : category(OPAQUE_OBJECT), graphic(NULL), texture(NULL),
material(NULL), shine(NULL) {
if (!coordinator)
error(L"Object::00 Couldn\'t access the Scene Coordinator");
else if(!coordinator->add(this))
error(L"Object::01 Couldn\'t add object to the Scene Coordinator");
}
</pre>
<h2>Known Issues</h2>
<h3>CreateFrame() and CreateMeshContainer</h3>
1
edit

Navigation menu