2010-06-03 18:44:55 +00:00
|
|
|
#include "../ogre_nif_loader.hpp"
|
|
|
|
#include "../../bsa/bsa_archive.hpp"
|
2010-01-10 17:32:21 +00:00
|
|
|
|
2010-01-24 19:58:31 +00:00
|
|
|
//#define SCREENSHOT
|
2010-01-10 17:32:21 +00:00
|
|
|
|
2010-01-24 19:58:31 +00:00
|
|
|
#include "ogre_common.cpp"
|
2010-01-10 17:32:21 +00:00
|
|
|
|
2010-01-15 19:34:31 +00:00
|
|
|
//const char* mesh = "meshes\\a\\towershield_steel.nif";
|
|
|
|
//const char* mesh = "meshes\\r\\bonelord.nif";
|
2010-01-17 12:37:20 +00:00
|
|
|
//const char* mesh = "meshes\\m\\text_scroll_open_01.nif";
|
|
|
|
const char* mesh = "meshes\\f\\ex_ashl_a_banner_r.nif";
|
2010-01-15 19:34:31 +00:00
|
|
|
|
2010-01-24 19:58:31 +00:00
|
|
|
void C::doTest()
|
2010-01-10 17:32:21 +00:00
|
|
|
{
|
2010-01-12 13:46:44 +00:00
|
|
|
// Add Morrowind.bsa resource location
|
2011-06-19 17:14:14 +00:00
|
|
|
Bsa::addBSA("../../data/Morrowind.bsa");
|
2010-01-10 17:32:21 +00:00
|
|
|
|
2010-01-12 13:46:44 +00:00
|
|
|
// Insert the mesh
|
2011-06-19 17:14:14 +00:00
|
|
|
NifOgre::NIFLoader::load(mesh);
|
|
|
|
NifOgre::NIFLoader::load(mesh);
|
2010-01-10 17:32:21 +00:00
|
|
|
|
2010-01-17 12:37:20 +00:00
|
|
|
/*
|
2010-01-12 13:46:44 +00:00
|
|
|
SceneNode *node = mgr->getRootSceneNode()->createChildSceneNode("node");
|
|
|
|
Entity *ent = mgr->createEntity("Mesh1", mesh);
|
|
|
|
node->attachObject(ent);
|
2010-01-17 12:37:20 +00:00
|
|
|
|
|
|
|
// Works great for the scroll
|
2010-01-15 19:34:31 +00:00
|
|
|
node->setPosition(0,4,50);
|
|
|
|
node->pitch(Degree(20));
|
|
|
|
node->roll(Degree(10));
|
|
|
|
node->yaw(Degree(-10));
|
2010-01-17 12:37:20 +00:00
|
|
|
|
|
|
|
/* Bone lord
|
2010-01-15 19:34:31 +00:00
|
|
|
node->setPosition(0,-70,170);
|
|
|
|
node->pitch(Degree(-90));
|
2010-01-17 12:37:20 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
// Display it from two different angles - shield and banner
|
2010-01-15 19:34:31 +00:00
|
|
|
const int sep = 45;
|
|
|
|
SceneNode *node = mgr->getRootSceneNode()->createChildSceneNode("node");
|
|
|
|
Entity *ent = mgr->createEntity("Mesh1", mesh);
|
|
|
|
node->attachObject(ent);
|
2010-01-17 12:37:20 +00:00
|
|
|
node->setPosition(sep,0,130);
|
2010-01-15 19:34:31 +00:00
|
|
|
node = node->createChildSceneNode("node2");
|
|
|
|
ent = mgr->createEntity("Mesh2", mesh);
|
|
|
|
node->attachObject(ent);
|
|
|
|
node->setPosition(-2*sep,0,0);
|
|
|
|
node->yaw(Degree(180));
|
|
|
|
//*/
|
2010-01-10 17:32:21 +00:00
|
|
|
}
|