x
Yes
No
Do you want to visit DriveHQ English website?
首页
产品服务
价格
免费试用
下载客户端
关于我们
云文件服务
|
云备份服务
|
FTP服务
|
企业邮箱服务
|
网站托管
|
客户端软件
云文件服务
云备份服务
FTP服务
企业级邮箱服务
网站托管
客户端软件
RigidPhysObj.h - Hosted on DriveHQ Cloud IT Platform
返回上层目录
上传
下载
共享
发布
新建文件夹
新建文件
复制
剪切
删除
粘贴
评论
升级服务
路径: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\GameFactory\RigidPhysObj.h
旋转
特效
属性
历史版本
#pragma once #include "precompiled.h" #include "LoadedPhysObj.h" namespace GameFactory{ class RigidPhysObj: public LoadedPhysObj { private: NxActor* mActor; //NxActorDesc* mActorDesc; protected: virtual void NXU_notifyActor(NxActor *actor, const char *userProperties); //Vec3 mWorldPosition; //GFQuat mWorldOrientation; public: RigidPhysObj(const String& nameResource, VisualObject* visualObject); RigidPhysObj(NxActor* actor, VisualObject* visualObject); ~RigidPhysObj(); virtual const inline Vec3 GetPosition() const{ //return *(reinterpret_cast
(&(mActor->getGlobalPosition()))); //return mWorldPosition; return mActor->getGlobalPosition();//getGlobalPosition does not return a reference }; virtual const inline GFQuat GetOrientation() const{ //return mWorldOrientation; return mActor->getGlobalOrientationQuat(); }; virtual inline void SetPosition(const Vec3& pos){ //myassert(false);//cannot set position for rigidbody object, pls refer to ControllablePhysObj //mActor->moveGlobalPosition(pos); //myassert(false); //if (mActor->readBodyFlag(NX_BF_KINEMATIC)) // mActor->moveGlobalPosition(pos); //else // mActor->setGlobalPosition(pos); mActor->setGlobalPosition(pos); //mWorldPosition = pos; }; virtual inline void SetOrientation(const GFQuat& q){ //if (mActor->readBodyFlag(NX_BF_KINEMATIC)) // mActor->moveGlobalOrientationQuat(q); //else // mActor->setGlobalOrientationQuat(q); mActor->setGlobalOrientationQuat(q); //mWorldOrientation = q; } //inline const Vec3& GetSetPosition() const{ // return mWorldPosition; //} //inline const GFQuat& GetSetOrientation() const{ // return mWorldOrientation; //} virtual void SetCollisionEnable(bool enabled); virtual void RegisterPhysicalEventHandler(PhysicalEventHandler* physicalEventHandler); void ApplyForce(const Vec3& force); void ApplyTorque(const Vec3& torque); void Stop(); inline bool IsIdle(){return mActor->isSleeping();}; }; }
RigidPhysObj.h
网页地址
文件地址
上一页
41/55
下一页
下载
( 2 KB )
Comments
Total ratings:
0
Average rating:
无评论
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.