Trying to animate creatures

actorid
Jason Hooks 14 years ago
parent 2ac1cc8aee
commit 92509d3b70

@ -34,7 +34,7 @@ namespace MWClass
if (!model.empty())
{
MWRender::Rendering rendering (cellRender, ref->ref);
cellRender.insertMesh ("meshes\\" + model);
cellRender.insertMesh("meshes\\" + model);
cellRender.insertActorPhysics();
ref->mData.setHandle (rendering.end (ref->mData.isEnabled()));
}

@ -7,6 +7,7 @@
#include "../mwworld/refdata.hpp"
#include <OgreMath.h>
#include <Ogre.h>
namespace Ogre
{
@ -42,6 +43,7 @@ namespace MWRender
virtual void insertMesh(const std::string &mesh, Ogre::Vector3 vec, Ogre::Vector3 axis, Ogre::Radian angle, std::string sceneNodeName, std::string sceneParent[], int elements, bool translateFirst) = 0;
virtual void insertMesh(const std::string &mesh, Ogre::Vector3 vec, Ogre::Vector3 axis, Ogre::Radian angle, std::string sceneNodeName, std::string sceneParent[], int elements) = 0;
virtual void insertMesh(const std::string &mesh) = 0;
//virtual Ogre::Entity* insertAndDeliverMesh(const std::string &mesh) = 0;
virtual void scaleMesh(Ogre::Vector3 axis, std::string sceneNodeName[], int elements) = 0;

@ -273,6 +273,21 @@ std::string ExteriorCellRender::insertEnd (bool enable)
return handle;
}
/*
Ogre::Entity* ExteriorCellRender::insertAndDeliverMesh(const std::string &mesh)
{
assert (insert);
NIFLoader::load(mesh);
Entity *ent = mScene.getMgr()->createEntity(mesh);
ent->setDisplaySkeleton(true);
mInsert->attachObject(ent);
return ent;
}*/
// configure lighting according to cell
void ExteriorCellRender::configureAmbient()

@ -6,6 +6,7 @@
#include "OgreColourValue.h"
#include <OgreMath.h>
#include <Ogre.h>
namespace Ogre
{
@ -70,6 +71,7 @@ namespace MWRender
virtual void insertMesh(const std::string &mesh, Ogre::Vector3 vec, Ogre::Vector3 axis, Ogre::Radian angle, std::string sceneNodeName, std::string sceneParent[], int elements, bool translateFirst);
virtual void insertMesh(const std::string &mesh);
//virtual Ogre::Entity* insertAndDeliverMesh(const std::string &mesh);
virtual void rotateMesh(Ogre::Vector3 axis, Ogre::Radian angle, std::string sceneNodeName[], int elements);
virtual void scaleMesh(Ogre::Vector3 axis, std::string sceneNodeName[], int elements);

@ -180,6 +180,23 @@ void InteriorCellRender::insertMesh(const std::string &mesh, Ogre::Vector3 vec,
}
}
/*
Ogre::Entity* InteriorCellRender::insertAndDeliverMesh(const std::string &mesh)
{
assert (insert);
NIFLoader::load(mesh);
Entity *ent = scene.getMgr()->createEntity(mesh);
ent->setDisplaySkeleton(true);
insert->attachObject(ent);
return ent;
}*/
void InteriorCellRender::insertMesh(const std::string &mesh)
{
assert (insert);

@ -6,6 +6,7 @@
#include "OgreColourValue.h"
#include <OgreSceneNode.h>
#include <Ogre.h>
namespace Ogre
{
@ -67,6 +68,7 @@ namespace MWRender
virtual void rotateMesh(Ogre::Vector3 axis, Ogre::Radian angle, std::string sceneNodeName[], int elements);
virtual void scaleMesh(Ogre::Vector3 axis, std::string sceneNodeName[], int elements);
/// insert a mesh related to the most recent insertBegin call.
//virtual Ogre::Entity* insertAndDeliverMesh(const std::string &mesh);
virtual void insertMesh(const std::string &mesh);
virtual void insertMesh(const std::string &mesh, Ogre::Vector3 vec, Ogre::Vector3 axis, Ogre::Radian angle, std::string sceneNodeName, std::string sceneParent[], int elements);
virtual void insertMesh(const std::string &mesh, Ogre::Vector3 vec, Ogre::Vector3 axis, Ogre::Radian angle, std::string sceneNodeName, std::string sceneParent[], int elements, bool translateFirst);

Loading…
Cancel
Save