Code Search for Developers
 
 
  

DopeJP.cpp from Project OGRE Lia Game (POGLI Game) at Krugle


Show DopeJP.cpp syntax highlighted

#include "DopeJP.h"
#include "DopeEscena.h"

namespace Dope
{

    //-------------------------------------------------------------------------
    JP::JP(const String& name) : Entidad(name)
    {
        setUp(name);
    }
    //-------------------------------------------------------------------------
    JP::~JP()
    {

    }
    //-------------------------------------------------------------------------
    void JP::setUp(const String& name)
    {
        // Create visual presence
        SceneManager* sm = Escena::getSingleton().getSceneManager();
        mEntity = sm->createEntity(name, "Cube.mesh");
        mSceneNode = sm->getRootSceneNode()->createChildSceneNode(name);
        mSceneNode->attachObject(mEntity);
		mSceneNode->setScale(0.5,0.5,0.5);
        // Add reverse reference
        mEntity->setUserObject(this);

        // Create mass body
        mOdeBody = new dBody(Escena::getSingleton().getOdeWorld()->id());
        // Set reverse reference
        mOdeBody->setData(this);
        // Set mass 
        setMassSphere(0.1, 25); // TODO change to more realistic values

        this->setBounceParameters(0.3, 0.1);
        this->setSoftness(0.0f);
        this->setFriction(Math::POS_INFINITY);

        // Create collision proxy
        dSphere* odeSphere = new dSphere(0, 25);
        mCollisionProxies.push_back(odeSphere);
        updateCollisionProxies();


    }


}




See more files for this project here

Project OGRE Lia Game (POGLI Game)

Video juego desarrollado en OGRE, multiplataforma (a nivel de codigo fuente). Proyecto desarrollado como tesis para la facultad de ingenieria, UNAM, Mexico

Project homepage: http://sourceforge.net/projects/tesis-h4l9k-jp
Programming language(s): C++
License: other

  DOPE.vcproj
  DopeCamara.cpp
  DopeDemo.cpp
  DopeEntidad.cpp
  DopeEscena.cpp
  DopeJP.cpp
  DopeJoint.cpp
  DopeJointSubtypes.cpp
  DopePlano.cpp
  Dope_demo.cbp
  Makefile