Ogre and physx SDK integration notes

Source: Internet
Author: User

Anyway, writing 3D real-time programs from the ground up, although high, but huge trouble, ogre and physx have been quite mature in the past two years, rapid development is no better. but it is a little complicated to integrate. Record it here for future reference.

Ogre SDK vc8 version (I once tried to hard convert the SDK of vc7 into a project of vc8, and the result can be compiled in the past, but the execution crashes the machine, Khan)

Physx SDK v2.4.1 is now working on hardware...

Test and modify project: Sample project demo_camera_track

Add Project Properties

C/C ++ (installed in this directory by default ):

C:/program files/ageia technologies/ageia physx SDK/v2.4.1/sdks/Foundation/include
C:/program files/ageia technologies/ageia physx SDK/v2.4.1/sdks/physics/include
C:/program files/ageia technologies/ageia physx SDK/v2.4.1/sdks/physxloader/include

Linker:

Add the directory of the additional library: C:/program files/ageia technologies/ageia physx SDK/v2.4.1/sdks/lib/Win32

Add additional dependencies: physxloader. Lib

Add the header file in cameratrack. cpp:

# Include "nxphysics. H" (it must start with or hundreds of errors !!)

Then add the initialization, exit the physx function, and call physx that's it in the callback.

Here, a box is used. I am wondering why scenenode * cannot convert objects to the world using a 44 matrix.
Two functions .....:

// Float glmat [16];
// Actor-> getglobalpose (). getcolumnmajor44 (glmat );
Nxvec3 cubepos = actor-> getglobalposition ();
Cubenode-> setposition (cubepos. X, cubepos. Y, cubepos. z );
Nxquat cubequat = actor-> getglobalorientationquat ();
Cubenode-> setorientation (cubequat. W, cubequat. X, cubequat. Y, cubequat. z );

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.