Slider doesnt work!

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: Slider doesnt work!

Postby Julio Jerez » Sat Sep 19, 2009 12:05 am

Ok I copy OgreMain in the ogreNewt folder, and I almost comilet teh library
but I get thsoi error

Code: Select all
Error   1   fatal error C1083: Cannot open include file: 'boost/function.hpp': No such file or directory   c:\temp\ogrenew\inc\OgreNewt_Prerequisites.h   41   OgreNewt
Error   2   fatal error C1083: Cannot open include file: 'boost/function.hpp': No such file or directory   c:\temp\ogrenew\inc\OgreNewt_Prerequisites.h   41   OgreNewt

where are these files

#include <boost/function.hpp>
#include <boost/bind.hpp>
#ifndef OGRENEWT_NO_COLLISION_SHAREDPTR
# include <boost/shared_ptr.hpp>
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Slider doesnt work!

Postby PJani » Sat Sep 19, 2009 8:31 am

you can extract OgreNewt anywhere you want...but... you will have to set include, linking folders...

boost...hmm...this one is going to be much longer...you will have to download boost jam... and for these three includes you dont need to build jam... you only need to add include path
C:\boost_1_39_0\ or where ever you will extract boost
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Re: Slider doesnt work!

Postby kallaspriit » Sun Sep 20, 2009 1:19 pm

There is no special directory layout, you just need to get the includes and linking right. And get the latest boost from http://www.boost.org/, set the correct include directory and it should work without problems :P
kallaspriit
 
Posts: 216
Joined: Sun Aug 14, 2005 6:31 pm

Re: Slider doesnt work!

Postby Julio Jerez » Sun Sep 20, 2009 8:07 pm

Ok I have is building but I get this error

    1>Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
    1>Copyright (C) Microsoft Corporation. All rights reserved.
    1>Linking...
    1>LINK : fatal error LNK1104: cannot open file 'OgreMain_d.lib'
    1>Build log was saved at "file://c:\temp\OgreNew\OgreNewt.dir\Debug\BuildLog.htm"
    1>OgreNewt - 1 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


do I dare build Ogre?
Are ther procompiles libraries for Ogre that people can use witout habil to build so many files.
Anyway I will try to bild Ogre but I do not want to waste my evenening compiling code.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Slider doesnt work!

Postby Julio Jerez » Sun Sep 20, 2009 8:34 pm

Yes just like I was expectiong ther are a bunch o libraris that I have to go a chase on the net

1>Compiling...
1>c:\temp\ogre\ogremain\src\ogrefont.cpp(42) : fatal error C1083: Cannot open include file: 'ft2build.h': No such file or directory
1>c:\temp\ogre\ogremain\src\ogrefreeimagecodec.cpp(41) : fatal error C1083: Cannot open include file: 'FreeImage.h': No such file or directory
1>c:\temp\ogre\ogremain\src\ogrezip.cpp(38) : fatal error C1083: Cannot open include file: 'zzip/zzip.h': No such file or directory
2>LINK : warning LNK4224: /OPT:NOWIN98 is no longer supported; ignored
4>LINK : fatal error LNK1104: cannot open file 'OgreMain_d.lib'
2>LINK : fatal error LNK1104: cannot open file 'OgreMain_d.lib'
4>Build log was saved at "file://c:\temp\ogre\PlugIns\OctreeSceneManager\obj\Debug\BuildLog.htm"
2>Build log was saved at "file://c:\temp\ogre\PlugIns\PCZSceneManager\obj\Debug\BuildLog.htm"
7>LINK : warning LNK4224: /OPT:NOWIN98 is no longer supported; ignored
7>LINK : fatal error LNK1104: cannot open file 'OgreMain_d.lib'
7>Build log was saved at "file://c:\temp\ogre\PlugIns\OctreeZone\obj\Debug\BuildLog.htm"
7>Plugin_OctreeZone - 1 error(s), 1 warning(s)
10>c:\temp\ogre\referenceapplication\referenceapplayer\include\ogrerefappprerequisites.h(33) : fatal error C1083: Cannot open include file: 'ode/ode.h': No such file or directory
6>c:\temp\ogre\rendersystems\direct3d9\include\ogred3d9prerequisites.h(46) : fatal error C1083: Cannot open include file: 'd3dx9.h': No such file or directory
11>c:\temp\ogre\samples\common\ceguirenderer\src\ogreceguirenderer.cpp(27) : fatal error C1083: Cannot open include file: 'CEGUI/CEGUIImagesetManager.h': No such file or directory
11>c:\temp\ogre\samples\common\ceguirenderer\include\ogreceguiresourceprovider.h(29) : fatal error C1083: Cannot open include file: 'CEGUI/CEGUIResourceProvider.h': No such file or directory
11>c:\temp\ogre\samples\common\ceguirenderer\src\ogreceguitexture.cpp(27) : fatal error C1083: Cannot open include file: 'CEGUI/CEGUISystem.h': No such file or directory
5>c:\temp\ogre\plugins\cgprogrammanager\include\ogrecgprerequisites.h(33) : fatal error C1083: Cannot open include file: 'Cg/cg.h': No such file or directory

and the is just a few lines

I do not have any of that stuff in my machine and I an not going to polude it that,
I do not even have D3D in it, not to mention stuf like ODE and Cequi,

do not Ogre a precompiled package with that Headers, libraies and dlls that is ready to use?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Slider doesnt work!

Postby PJani » Sun Sep 20, 2009 10:48 pm

OK...i hope this works...

You DO NOT need to build any kind of Ogre...if you are on windows...on linux im not very familiar with ogre(3d card problems)...
You DO NOT need any DirectX Ogre works on OpenGL to.

I REPEAT YOU DO NOT NEED TO BUILD Ogre if you are on windows, because is complite waste of time.

Simply
1. download prebuild ogre packages 40MB - 50MB

2. install ogre

default <Ogre install path> is C:\OgreSDK

3. Change two include paths to:
    <Ogre install path>\include
    <Boost include path>

//you dont have to set this if building static lib of OgreNewt
4. Set linking path to:
    <Ogre install path>\lib
    <Ogre install path>\lib\opt

//you dont have to set this if building static lib of OgreNewt
5. Set linking libs:
    OgreMain_d.lib
    newton.lib

6. press F7 and OgreNewt should compile without any problems


If you need a simple testing sandbox code i will post it.
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Re: Slider doesnt work!

Postby Julio Jerez » Mon Sep 21, 2009 12:03 am

Well I give up trying to get all those dependencies, I wrote a simple joint that I hope you guys undertand,
I did this in the Basic Joint demo of the SDK so that I can test it, and it worked.
It is a base Class, and an example of a Hinge class derived from that base class.

What is different from what you have, is that it reuses the functionality of all of the joints classes that I wrote in the Joint Library, instead of re creating them by interpreting the code.

Here is the Base Class
Code: Select all
// Header file
class Joint
{
   public:
   Joint ();
   virtual ~Joint();

   protected:
   void SetUp (NewtonCustomJoint* joint);

   virtual void SubmitConstraints (dFloat timestep, int threadIndex) {};
   
   static void Destructor (const NewtonUserJoint* me);
   static void SubmitConstraints (const NewtonUserJoint* me, dFloat timestep, int threadIndex);

   NewtonCustomJoint* m_supportJoint;
};


Code: Select all
//cpp file
Joint::Joint ()
{
   m_supportJoint = NULL;
}

Joint::~Joint()
{
   if (m_supportJoint) {
      m_supportJoint->SetUserData (NULL);
      m_supportJoint->SetUserDestructorCallBack (NULL);
      delete m_supportJoint;
   }
}

void Joint::Destructor (const NewtonUserJoint* baseClassJoint)
{
   Joint* me;
   me = (Joint*)(((NewtonCustomJoint*) baseClassJoint)->GetUserData ());
   if (me->m_supportJoint) {
      me->m_supportJoint = NULL;
      delete me;
   }
}

void Joint::SubmitConstraints (const NewtonUserJoint* baseClassJoint, dFloat timestep, int threadIndex)
{
   Joint* me;
   me = (Joint*)(((NewtonCustomJoint*) baseClassJoint)->GetUserData ());
   me->SubmitConstraints(timestep, threadIndex);
}


void Joint::SetUp (NewtonCustomJoint* joint)
{
   m_supportJoint = joint;
   // set the destructor call back
   m_supportJoint->SetUserData (this);
   m_supportJoint->SetUserDestructorCallBack (Destructor);

   // Set the user submitconstraing for when the end app want to customizize existing joint behavior
   m_supportJoint->SetUserSubmintConstraintCallBack (SubmitConstraints);
}


Here is an example code of a Hinge that reuses the existing Custom Hinge of teh Joint Library Newton
Code: Select all
// Header
class Hinge: public Joint
{
   public:
   Hinge (const dMatrix& pinAndPivotFrame, const NewtonBody* child, const NewtonBody* parent);
   ~Hinge();
   void EnableLimits(bool state);
   void SetLimis(dFloat minAngle, dFloat maxAngle);

   // optional if the app want to do more stuff, lfor example motorizing the joint
//   virtual void SubmitConstraints (dFloat timestep, int threadIndex)
//   {
//   }
};


Code: Select all
// code
Hinge::Hinge(const dMatrix& pinAndPivotFrame, const NewtonBody* child, const NewtonBody* parent)
   :Joint ()
{
   SetUp (new CustomHinge (pinAndPivotFrame, child, parent));
}

Hinge::~Hinge()
{
}

void Hinge::EnableLimits(bool state)
{
   ((CustomHinge*)m_supportJoint)->EnableLimits(state);
}

void Hinge::SetLimis(dFloat minAngle, dFloat maxAngle)
{
   ((CustomHinge*)m_supportJoint)->SetLimis(minAngle, maxAngle);
}



here is how you can use it
Code: Select all
      Hinge* hinge = new Hinge (pinAndPivot, link1, NULL);
      hinge->EnableLimits (true);
      hinge->SetLimis (-30.0f * 3.141592f/180.0f, 30.0f * 3.141592f/180.0f);



As you can see it is very easy to make all of the Joint in the Newton Joint Library without having to imitate them, Just derive form base and write few wraper funtion to redirect to teh base call joint.
I hope you understand this, if you have do not have problem with some of the porting I can help, but basically all you need to do is to make use the Ogre Classes instead of the Object that I am using.

Who is the maintainer of the Wraper you, kallaspriit or Melven?

If we agree on this and you can get it integrated into OgreNewt, there are still some things missing like GetInfo but those are minor thing consmetic funtionality tha can be added on demand,
the important thing is that this base class allows true code reusing, and You can get the complete full pawaaaaa of the Joint Library and then some more,
For exampel I see you guys have a 2d Joint,
This Base call joint also supports the Creation us Custom joint by End User Joint like your 2d joint, but we can worrie about that later.

Ah one last thing, I do not think you need two classes: Joint and CustomJoint since te eCustom joints contain all of the Joints and many more, plus they are all open source.
I know this can be seene as big rewrite but I believe it is worth trying, because I really beleive is will be more beneficial to many users to get all the funtionality, plsu egiven then teh avility to add on featire tah has not being
implemeneted.
There are some soficaticated joint in Netwon like he Player controller, polley, Keneamtic controller (very handy)

Later I will put this anwer in the FAQ, maybe it can give soem release to some poeple.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Slider doesnt work!

Postby PJani » Mon Sep 21, 2009 12:46 am

The maintainer of OgreNewt is walaber. :wink:
Im trying to contribute as much as posible to OgreNewt project and to Newton, the only problem is i dont have much documentation only the samples and outdated wiki.

I will try to change as much as posible.
I see now what you were trying to say :P, i will try to rewrite joints :p
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Re: Slider doesnt work!

Postby Julio Jerez » Thu Sep 24, 2009 11:39 am

Wondering if the code for the Joint base class helped, it has been few days and you did not say anything
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Slider doesnt work!

Postby PJani » Thu Sep 24, 2009 6:29 pm

I test it :p, now i have other work to do, i will return to OgreNewt and Newton soon.
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Re: Slider doesnt work!

Postby kallaspriit » Fri Sep 25, 2009 7:33 am

Julio, did you get OgreNewt to compile? It really isn't that hard, what platform are you using? As it was already pointed out, you don't even need compile Ogre although that is not hard either, all the dependencies can be downloaded in a single archive and there are tutorials in wiki to build on pretty much any system supported. For VS, check this out.

It is still easier to get precompiled package, install, get OgreNewt from SVN http://svn.ogre3d.org/svnroot/ogreaddon ... t/newton20, get Boost from http://www.boost.org/, set the correct include and library directories and it should compile out of the box.

Let us know the problems you get and we'll try to help :D
kallaspriit
 
Posts: 216
Joined: Sun Aug 14, 2005 6:31 pm

Re: Slider doesnt work!

Postby Julio Jerez » Fri Sep 25, 2009 1:25 pm

when I try to get the precompiled Package I get these errors
There is a problem with this website's security certificate.

The security certificate presented by this website was issued for a different website's address.

Security certificate problems may indicate an attempt to fool you or intercept any data you send to the server.
We recommend that you close this webpage and do not continue to this website.
Click here to close this webpage.
Continue to this website (not recommended).
More information

If you arrived at this page by clicking a link, check the website address in the address bar to be sure that it is the address you were expecting.
When going to a website with an address such as https://example.com, try adding the 'www' to the address, https://www.example.com.
If you choose to ignore this error and continue, do not enter private information into the website.

For more information, see "Certificate Errors" in Internet Explorer Help.


I tryed to get then one at a time, but there are too many Libraries that I need to install,
for example it needs D3D SDK and I do not have it installed, and I do not plan to, I only use the runtime for testing demos.

I rather let you guys do it, It is not my intention to be and Ogre expert.
I am hoping the Class is clear enought tah you guys canre write for Ogrenewt insteaed fo recreating the same code.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Slider doesnt work!

Postby Stucuk » Fri Sep 25, 2009 6:49 pm

Thats because they are redirecting to sourceforge.net's svn. Try This which is the actual url.

P.S I don't see the point in the redirect. Its not like the URL is much shorter and easyer to remember.
User avatar
Stucuk
 
Posts: 801
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland

Previous

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 4 guests

cron