CR的代码文本

all for learning about the world
  订阅 订阅  :: 管理

2011年6月2日

摘要: 1 Joint Creation Joint提供了一种联系俩Actor的途径。典型的例子如门上的合页,人物的肩膀。.创建Joint的方法:PxRevoluteJointCreate(PxPhysics&physics,PxRigidActor*actor0,constPxTransform&localFrame0,PxRigidActor*actor1,constPxTransform&localFrame1);必须有一个Actor可以动,是PxRigidDynamic,要不就是PxArticulationLink. 另一个Actor无所谓。localFrame参数表示 阅读全文

posted @ 2011-06-02 16:28 mumuliang 阅读(3579) 评论(1) 推荐(0) 编辑

摘要: Shape是PxGeometry的体现。一个Shape包括:PxGeometry, PxMetarial,和shape相对它所属的actor的pose(orientation and positionActor),肯定是这个PxActor创建的。多个shape可以凑成一组(成为一个Compound)在同一个Actor中。和PhysX 2.x类似, 创建Shape是需定义一个PxGeometry. 也就是说每一个Shape都有它自己的PxGeometry类型. PhysX既有的PxGeometry如下.1)for static and dynamic Actors:Spheres, Capsul 阅读全文

posted @ 2011-06-02 16:07 mumuliang 阅读(3428) 评论(4) 推荐(0) 编辑

摘要: 1 The SDK Object 首先用全局函数PxCreatePhysics创建一个PxPhysics对象。#include"PxPhysicsAPI.h"boolrecordMemoryAllocations=true;staticPxDefaultErrorCallbackgDefaultErrorCallback;staticPxDefaultAllocatorgDefaultAllocatorCallback;mSDK=PxCreatePhysics(PX_PHYSICS_VERSION,gDefaultAllocatorCallback,gDefaultErro 阅读全文

posted @ 2011-06-02 14:06 mumuliang 阅读(3767) 评论(7) 推荐(1) 编辑