Created
September 11, 2012 04:41
-
-
Save lalanikarim/3696006 to your computer and use it in GitHub Desktop.
Generating Cards
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vector3df cardsize(75,107,1); | |
vector3df halfcardsize = cardsize; | |
halfcardsize.Z = 0.5; | |
neRigidBody * rigid = world->CreateRigidBody(); | |
neGeometry * geom = rigid->AddGeometry(); | |
geom->SetBoxSize(irrVectorToTokamak(cardsize)); | |
rigid->UpdateBoundingInfo(); | |
rigid->SetMass(cardmass); | |
rigid->SetInertiaTensor(neBoxInertiaTensor(irrVectorToTokamak(halfcardsize),cardmass)); | |
rigid->SetPos(irrVectorToTokamak(pos)); | |
vector3df rot = cam->getRotation(); | |
quaternion rotQ(rot); | |
rotQ *= PI/180; | |
neQ neRot(rotQ.X,rotQ.Y,rotQ.Z,rotQ.W); | |
rigid->SetRotation(neRot); | |
rigid->SetUserData(sceneCount); | |
rigidBodies[bodyCount] = rigid; | |
bodyCount++; | |
sceneCount++; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment