your solution of setting the path relatibe to an inveroment variable is moch more flexible, so a, godn to adopt that fo teh Netwon SDK.

so I will set the math to the newton SDK to teh same enviromenet variable you use fo Netwon NEWTON_HOME
Moderators: Sascha Willems, walaber
namespace OgreNewt
{
PlayerController::PlayerController(OgreNewt::Body * child, Ogre::Real stairHeight, Ogre::Real kinematicCushion)
:Joint(), m_body(child)
{
dMatrix globalFrame (GetIdentityMatrix());
globalFrame.m_front = dVector (0.0f, 1.0f, 0.0f, 0.0f); // up direction in global Space
globalFrame.m_up = dVector (0.0f, 0.0f, -1.0f, 0.0f); // ogre front dir is the -z direction
globalFrame.m_right = globalFrame.m_front * globalFrame.m_up; // strafing direction in global Space
// convert the ogre matrix to a newton matrix
// Ogre::Matrix4 localframe4x4 (localFrame3x3);
// Converters::Matrix4ToMatrix (localframe4x4, &localframe[0][0]);
// create a newton player controller
CustomPlayerController* controller;
controller = new CustomPlayerController (globalFrame, child->getNewtonBody(), stairHeight, kinematicCushion);
SetSupportJoint(controller);
}
PlayerController::~PlayerController()
{
}
void PlayerController::getVelocity(Ogre::Real& forwardSpeed, Ogre::Real& sideSpeed, Ogre::Radian& heading) const
{
dFloat dir;
dir = 0.0f;
sideSpeed = 0.0f;
forwardSpeed = 0.0f;
CustomPlayerController* joint = (CustomPlayerController*) m_joint;
if (joint) {
joint->GetVelocity (forwardSpeed, sideSpeed, dir);
}
heading = dir;
}
void PlayerController::setVelocity(Ogre::Real forwardSpeed, Ogre::Real sideSpeed, Ogre::Radian heading)
{
CustomPlayerController* joint = (CustomPlayerController*) m_joint;
if (joint) {
joint->SetVelocity (forwardSpeed, sideSpeed, heading.valueRadians());
}
}
} // end NAMESPACE OgreNewt
------ Build started: Project: Demo07_CustomJoints, Configuration: Release Win32 ------
Compiling...
OgreNewtonApplication.cpp
c:\users\priit kallas\desktop\ogrenewt\demos\demo07_customjoints\MyCustomBallSocket.h(11) : error C2039: 'BallAndSocket' : is not a member of 'OgreNewt'
c:\users\priit kallas\desktop\ogrenewt\demos\demo07_customjoints\MyCustomBallSocket.h(11) : error C2504: 'BallAndSocket' : base class undefined
.\OgreNewtonApplication.cpp(110) : error C2440: '=' : cannot convert from 'MyCustomBallSocket *' to 'OgreNewt::Joint *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
.\OgreNewtonApplication.cpp(115) : error C2440: '=' : cannot convert from 'MyCustomBallSocket *' to 'OgreNewt::Joint *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
MyCustomBallSocket.cpp
c:\users\priit kallas\desktop\ogrenewt\demos\demo07_customjoints\MyCustomBallSocket.h(11) : error C2039: 'BallAndSocket' : is not a member of 'OgreNewt'
c:\users\priit kallas\desktop\ogrenewt\demos\demo07_customjoints\MyCustomBallSocket.h(11) : error C2504: 'BallAndSocket' : base class undefined
.\MyCustomBallSocket.cpp(5) : error C2039: 'BallAndSocket' : is not a member of 'OgreNewt'
.\MyCustomBallSocket.cpp(6) : error C2614: 'MyCustomBallSocket' : illegal member initialization: 'BallAndSocket' is not a base or member
Build log was saved at "file://c:\Users\Priit Kallas\Desktop\OgreNewt\demos\obj\Release\Demo07_CustomJoints\BuildLog.htm"
Demo07_CustomJoints - 8 error(s), 0 warning(s)
------ Build started: Project: Demo04_Raycasting, Configuration: Release Win32 ------
Compiling...
OgreNewtonApplication.cpp
.\OgreNewtonApplication.cpp(111) : error C2039: 'BallAndSocket' : is not a member of 'OgreNewt'
.\OgreNewtonApplication.cpp(111) : error C2061: syntax error : identifier 'BallAndSocket'
.\OgreNewtonApplication.cpp(116) : error C2039: 'BallAndSocket' : is not a member of 'OgreNewt'
.\OgreNewtonApplication.cpp(116) : error C2061: syntax error : identifier 'BallAndSocket'
Build log was saved at "file://c:\Users\Priit Kallas\Desktop\OgreNewt\demos\obj\Release\Demo04_Raycasting\BuildLog.htm"
Demo04_Raycasting - 4 error(s), 0 warning(s)
------ Build started: Project: Demo06_SimpleBuoyancy, Configuration: Release Win32 ------
Compiling...
OgreNewtonApplication.cpp
.\OgreNewtonApplication.cpp(113) : error C2039: 'BallAndSocket' : is not a member of 'OgreNewt'
.\OgreNewtonApplication.cpp(113) : error C2061: syntax error : identifier 'BallAndSocket'
.\OgreNewtonApplication.cpp(118) : error C2039: 'BallAndSocket' : is not a member of 'OgreNewt'
.\OgreNewtonApplication.cpp(118) : error C2061: syntax error : identifier 'BallAndSocket'
Build log was saved at "file://c:\Users\Priit Kallas\Desktop\OgreNewt\demos\obj\Release\Demo06_SimpleBuoyancy\BuildLog.htm"
Demo06_SimpleBuoyancy - 4 error(s), 0 warning(s)
========== Build: 0 succeeded, 3 failed, 9 up-to-date, 0 skipped ==========
------ Rebuild All started: Project: OgreNewt, Configuration: Release Win32 ------
Deleting intermediate and output files for project 'OgreNewt', configuration 'Release|Win32'
Compiling...
OgreNewt_Stdafx.cpp
Compiling...
OgreNewt_World.cpp
OgreNewt_Vehicle.cpp
OgreNewt_Tools.cpp
OgreNewt_RayCast.cpp
OgreNewt_PlayerController.cpp
OgreNewt_MaterialPair.cpp
OgreNewt_MaterialID.cpp
OgreNewt_Joint.cpp
OgreNewt_Debugger.cpp
OgreNewt_ContactJoint.cpp
OgreNewt_ContactCallback.cpp
OgreNewt_CollisionSerializer.cpp
OgreNewt_CollisionPrimitives.cpp
OgreNewt_Collision.cpp
OgreNewt_BodyInAABBIterator.cpp
OgreNewt_Body.cpp
OgreNewt_BasicJoints.cpp
OgreNewt_BasicFrameListener.cpp
Generating Code...
Linking...
Creating library lib\OgreNewt.lib and object lib\OgreNewt.exp
Embedding manifest...
Performing Post-Build Event...
1 file(s) copied.
1 file(s) copied.
1 file(s) copied.
1 file(s) copied.
1 file(s) copied.
1 file(s) copied.
1 file(s) copied.
1 file(s) copied.
1 file(s) copied.
1 file(s) copied.
1 file(s) copied.
1 file(s) copied.
Build log was saved at "file://d:\OgreNewt\obj\release\BuildLog.htm"
OgreNewt - 0 error(s), 0 warning(s)
------ Rebuild All started: Project: Demo09_PlayerController, Configuration: Release Win32 ------
Deleting intermediate and output files for project 'Demo09_PlayerController', configuration 'Release|Win32'
Compiling...
OgreNewtonFrameListener.cpp
OgreNewtonApplication.cpp
demo09.cpp
Linking...
Generating code
Finished generating code
Embedding manifest...
Build log was saved at "file://d:\OgreNewt\demos\obj\Release\Demo09_PlayerController\BuildLog.htm"
Demo09_PlayerController - 0 error(s), 0 warning(s)
------ Rebuild All started: Project: Demo07_CustomJoints, Configuration: Release Win32 ------
Deleting intermediate and output files for project 'Demo07_CustomJoints', configuration 'Release|Win32'
Compiling...
OgreNewtonFrameListener.cpp
OgreNewtonApplication.cpp
d:\ogrenewt\demos\demo07_customjoints\MyCustomBallSocket.h(11) : error C2039: 'BallAndSocket' : is not a member of 'OgreNewt'
d:\ogrenewt\demos\demo07_customjoints\MyCustomBallSocket.h(11) : error C2504: 'BallAndSocket' : base class undefined
.\OgreNewtonApplication.cpp(110) : error C2440: '=' : cannot convert from 'MyCustomBallSocket *' to 'OgreNewt::Joint *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
.\OgreNewtonApplication.cpp(115) : error C2440: '=' : cannot convert from 'MyCustomBallSocket *' to 'OgreNewt::Joint *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
MyCustomBallSocket.cpp
d:\ogrenewt\demos\demo07_customjoints\MyCustomBallSocket.h(11) : error C2039: 'BallAndSocket' : is not a member of 'OgreNewt'
d:\ogrenewt\demos\demo07_customjoints\MyCustomBallSocket.h(11) : error C2504: 'BallAndSocket' : base class undefined
.\MyCustomBallSocket.cpp(5) : error C2039: 'BallAndSocket' : is not a member of 'OgreNewt'
.\MyCustomBallSocket.cpp(6) : error C2614: 'MyCustomBallSocket' : illegal member initialization: 'BallAndSocket' is not a base or member
demo07.cpp
Build log was saved at "file://d:\OgreNewt\demos\obj\Release\Demo07_CustomJoints\BuildLog.htm"
Demo07_CustomJoints - 8 error(s), 0 warning(s)
------ Rebuild All started: Project: Demo06_SimpleBuoyancy, Configuration: Release Win32 ------
Deleting intermediate and output files for project 'Demo06_SimpleBuoyancy', configuration 'Release|Win32'
Compiling...
OgreNewtonFrameListener.cpp
OgreNewtonApplication.cpp
.\OgreNewtonApplication.cpp(113) : error C2039: 'BallAndSocket' : is not a member of 'OgreNewt'
.\OgreNewtonApplication.cpp(113) : error C2061: syntax error : identifier 'BallAndSocket'
.\OgreNewtonApplication.cpp(118) : error C2039: 'BallAndSocket' : is not a member of 'OgreNewt'
.\OgreNewtonApplication.cpp(118) : error C2061: syntax error : identifier 'BallAndSocket'
demo06.cpp
Build log was saved at "file://d:\OgreNewt\demos\obj\Release\Demo06_SimpleBuoyancy\BuildLog.htm"
Demo06_SimpleBuoyancy - 4 error(s), 0 warning(s)
------ Rebuild All started: Project: Demo04_Raycasting, Configuration: Release Win32 ------
Deleting intermediate and output files for project 'Demo04_Raycasting', configuration 'Release|Win32'
Compiling...
OgreNewtonFrameListener.cpp
OgreNewtonApplication.cpp
.\OgreNewtonApplication.cpp(111) : error C2039: 'BallAndSocket' : is not a member of 'OgreNewt'
.\OgreNewtonApplication.cpp(111) : error C2061: syntax error : identifier 'BallAndSocket'
.\OgreNewtonApplication.cpp(116) : error C2039: 'BallAndSocket' : is not a member of 'OgreNewt'
.\OgreNewtonApplication.cpp(116) : error C2061: syntax error : identifier 'BallAndSocket'
demo04.cpp
Build log was saved at "file://d:\OgreNewt\demos\obj\Release\Demo04_Raycasting\BuildLog.htm"
Demo04_Raycasting - 4 error(s), 0 warning(s)
------ Rebuild All started: Project: Demo03_CollisionCallbacks, Configuration: Release Win32 ------
Deleting intermediate and output files for project 'Demo03_CollisionCallbacks', configuration 'Release|Win32'
Compiling...
OgreNewtonFrameListener.cpp
OgreNewtonApplication.cpp
demo03.cpp
ConveyorMatCallback.cpp
ConveyorBelt.cpp
Linking...
Generating code
Finished generating code
Embedding manifest...
Build log was saved at "file://d:\OgreNewt\demos\obj\Release\Demo03_CollisionCallbacks\BuildLog.htm"
Demo03_CollisionCallbacks - 0 error(s), 0 warning(s)
------ Rebuild All started: Project: Demo01_TheBasics, Configuration: Release Win32 ------
Deleting intermediate and output files for project 'Demo01_TheBasics', configuration 'Release|Win32'
Compiling...
OgreNewtonFrameListener.cpp
OgreNewtonApplication.cpp
demo01.cpp
Linking...
Generating code
Finished generating code
Embedding manifest...
Build log was saved at "file://d:\OgreNewt\demos\obj\Release\Demo01_TheBasics\BuildLog.htm"
Demo01_TheBasics - 0 error(s), 0 warning(s)
------ Rebuild All started: Project: Demo02_Joints, Configuration: Release Win32 ------
Deleting intermediate and output files for project 'Demo02_Joints', configuration 'Release|Win32'
Compiling...
OgreNewtonFrameListener.cpp
OgreNewtonApplication.cpp
.\OgreNewtonApplication.cpp(161) : error C2039: 'BallAndSocket' : is not a member of 'OgreNewt'
.\OgreNewtonApplication.cpp(161) : error C2061: syntax error : identifier 'BallAndSocket'
demo02.cpp
Build log was saved at "file://d:\OgreNewt\demos\obj\Release\Demo02_Joints\BuildLog.htm"
Demo02_Joints - 2 error(s), 0 warning(s)
========== Rebuild All: 4 succeeded, 4 failed, 0 skipped ==========
1>------ Build started: Project: OgreNewt, Configuration: Debug Win32 ------
1>Compiling...
1>OgreNewt_Stdafx.cpp
1>Compiling...
1>OgreNewt_World.cpp
1>OgreNewt_Vehicle.cpp
1>OgreNewt_Tools.cpp
1>OgreNewt_RayCast.cpp
1>OgreNewt_PlayerController.cpp
1>OgreNewt_MaterialPair.cpp
1>OgreNewt_MaterialID.cpp
1>OgreNewt_Joint.cpp
1>OgreNewt_Debugger.cpp
1>OgreNewt_ContactJoint.cpp
1>OgreNewt_ContactCallback.cpp
1>OgreNewt_CollisionSerializer.cpp
1>OgreNewt_CollisionPrimitives.cpp
1>OgreNewt_Collision.cpp
1>OgreNewt_BodyInAABBIterator.cpp
1>OgreNewt_Body.cpp
1>OgreNewt_BasicJoints.cpp
1>OgreNewt_BasicFrameListener.cpp
1>Generating Code...
1>Linking...
1>LINK : fatal error LNK1181: cannot open input file 'dMath.lib'
1>Build log was saved at "file://d:\OgreNewt\obj\debug\BuildLog.htm"
1>OgreNewt - 1 error(s), 0 warning(s)
2>------ Build started: Project: Demo01_TheBasics, Configuration: Debug Win32 ------
2>Compiling...
2>demo01.cpp
2>OgreNewtonApplication.cpp
2>OgreNewtonFrameListener.cpp
2>Generating Code...
2>Linking...
2>LINK : fatal error LNK1181: cannot open input file '..\..\lib\ogrenewt_d.lib'
2>Build log was saved at "file://d:\OgreNewt\demos\obj\Debug\Demo01_TheBasics\BuildLog.htm"
2>Demo01_TheBasics - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========
Deleting intermediate and output files for project 'Demo07_CustomJoints', configuration 'Release|Win32'
Compiling...
Users browsing this forum: No registered users and 3 guests