x
Yes
No
Do you want to visit DriveHQ English website?
首页
产品服务
价格
免费试用
下载客户端
关于我们
云文件服务
|
云备份服务
|
FTP服务
|
企业邮箱服务
|
网站托管
|
客户端软件
云文件服务
云备份服务
FTP服务
企业级邮箱服务
网站托管
客户端软件
btWheelInfo.h - Hosted on DriveHQ Cloud IT Platform
返回上层目录
上传
下载
共享
发布
新建文件夹
新建文件
复制
剪切
删除
粘贴
评论
升级服务
路径: \\game3dprogramming\materials\DarkPuzzle\libs\bullet_src\BulletDynamics\Vehicle\btWheelInfo.h
旋转
特效
属性
历史版本
/* * Copyright (c) 2005 Erwin Coumans http://continuousphysics.com/Bullet/ * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies. * Erwin Coumans makes no representations about the suitability * of this software for any purpose. * It is provided "as is" without express or implied warranty. */ #ifndef WHEEL_INFO_H #define WHEEL_INFO_H #include "LinearMath/btVector3.h" #include "LinearMath/btTransform.h" class btRigidBody; struct btWheelInfoConstructionInfo { btVector3 m_chassisConnectionCS; btVector3 m_wheelDirectionCS; btVector3 m_wheelAxleCS; btScalar m_suspensionRestLength; btScalar m_maxSuspensionTravelCm; btScalar m_wheelRadius; btScalar m_suspensionStiffness; btScalar m_wheelsDampingCompression; btScalar m_wheelsDampingRelaxation; btScalar m_frictionSlip; bool m_bIsFrontWheel; }; /// btWheelInfo contains information per wheel about friction and suspension. struct btWheelInfo { struct RaycastInfo { //set by raycaster btVector3 m_contactNormalWS;//contactnormal btVector3 m_contactPointWS;//raycast hitpoint btScalar m_suspensionLength; btVector3 m_hardPointWS;//raycast starting point btVector3 m_wheelDirectionWS; //direction in worldspace btVector3 m_wheelAxleWS; // axle in worldspace bool m_isInContact; void* m_groundObject; //could be general void* ptr }; RaycastInfo m_raycastInfo; btTransform m_worldTransform; btVector3 m_chassisConnectionPointCS; //const btVector3 m_wheelDirectionCS;//const btVector3 m_wheelAxleCS; // const or modified by steering btScalar m_suspensionRestLength1;//const btScalar m_maxSuspensionTravelCm; btScalar getSuspensionRestLength() const; btScalar m_wheelsRadius;//const btScalar m_suspensionStiffness;//const btScalar m_wheelsDampingCompression;//const btScalar m_wheelsDampingRelaxation;//const btScalar m_frictionSlip; btScalar m_steering; btScalar m_rotation; btScalar m_deltaRotation; btScalar m_rollInfluence; btScalar m_engineForce; btScalar m_brake; bool m_bIsFrontWheel; void* m_clientInfo;//can be used to store pointer to sync transforms... btWheelInfo(btWheelInfoConstructionInfo& ci) { m_suspensionRestLength1 = ci.m_suspensionRestLength; m_maxSuspensionTravelCm = ci.m_maxSuspensionTravelCm; m_wheelsRadius = ci.m_wheelRadius; m_suspensionStiffness = ci.m_suspensionStiffness; m_wheelsDampingCompression = ci.m_wheelsDampingCompression; m_wheelsDampingRelaxation = ci.m_wheelsDampingRelaxation; m_chassisConnectionPointCS = ci.m_chassisConnectionCS; m_wheelDirectionCS = ci.m_wheelDirectionCS; m_wheelAxleCS = ci.m_wheelAxleCS; m_frictionSlip = ci.m_frictionSlip; m_steering = btScalar(0.); m_engineForce = btScalar(0.); m_rotation = btScalar(0.); m_deltaRotation = btScalar(0.); m_brake = btScalar(0.); m_rollInfluence = btScalar(0.1); m_bIsFrontWheel = ci.m_bIsFrontWheel; } void updateWheel(const btRigidBody& chassis,RaycastInfo& raycastInfo); btScalar m_clippedInvContactDotSuspension; btScalar m_suspensionRelativeVelocity; //calculated by suspension btScalar m_wheelsSuspensionForce; btScalar m_skidInfo; }; #endif //WHEEL_INFO_H
btWheelInfo.h
网页地址
文件地址
上一页
5/5 下一页
下载
( 3 KB )
Comments
Total ratings:
0
Average rating:
无评论
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.