Hi ppl,
Im trying to use IrrPhysX but on examples found here, i need the class that implement it:
SPhysxAndNodePair
It is used on all examples but i dont find the file that have it, so, where is it?
SPhysxAndNodePair - where is it?
Code: Select all
// A struct to hold both the physical and visual representations of an object
struct SPhysxAndNodePair {
SPhysxAndNodePair() {
PhysxObject = NULL;
SceneNode = NULL;
}
void updateTransformation() {
if (PhysxObject->getType() == EOT_CLOTH) { // If it's a cloth we just need to update it (for tearing purposes)
((IClothPhysxObject*)PhysxObject)->update();
} else { // Otherwise we update its transformation
core::vector3df vec;
// Update the node's position to that of the physx object
PhysxObject->getPosition(vec);
SceneNode->setPosition(vec);
// Update the node's rotation to that of the physx object
PhysxObject->getRotation(vec);
SceneNode->setRotation(vec);
}
}
IPhysxObject* PhysxObject;
scene::ISceneNode* SceneNode;
};IrrPhysx-v0_2 for Irrlicht 1.5\examples\CommonCode\ShapeCreation.h
