⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 car_wheel_constraint.h

📁 hl2 source code. Do not use it illegal.
💻 H
字号:
#ifndef HK_PHYSICS_CAR_WHEEL_CONTRAINT_H
#define HK_PHYSICS_CAR_WHEEL_CONTRAINT_H


class hk_Car_Wheel_BP;

class hk_Car_Wheel_Constraint : public hk_Constraint
{
	public:

		hk_Car_Wheel_Constraint( hk_Environment*, const hk_Car_Wheel_BP* ,
							hk_Rigid_Body *a ,hk_Rigid_Body *b );	
		hk_Car_Wheel_Constraint( hk_Local_Constraint_System *, const hk_Car_Wheel_BP *, hk_Rigid_Body *a ,hk_Rigid_Body *b );	

		virtual int get_vmq_storage_size();

		virtual int	setup_and_step_constraint(
				hk_PSI_Info& pi,
				void *mem,
				hk_real tau_factor,
				hk_real damp_factor );

		virtual void step_constraint(
				hk_PSI_Info& pi,
				void *mem,
				hk_real tau_factor,
				hk_real damp_factor );

		void apply_effector_PSI( hk_PSI_Info&, hk_Array<hk_Entity*>* );

		void set_steering_angle( hk_real angle);

		inline void set_wheel_motor( hk_real angular_velocity, hk_real max_force);
	
		virtual void init_constraint(const void*);

	protected:

		void init_car_wheel_constraint(const hk_Car_Wheel_BP*);

		hk_real     m_tau;	
		hk_real		m_damp;

		hk_Constraint_Limit m_suspension_limit;
		hk_Constraint_Limit m_wheel_limit;

		hk_Vector3		m_translation_os_ks[2];
		hk_Vector3		m_hinge_axis_os[2];
		hk_Vector3		m_steering_axis_Ros;	
		hk_Vector3		m_perp_hinge_axis_Aos;		// used for wheel motor
		hk_Vector3		m_initial_hinge_axis_Ros;   // used to recalculate the m_steering_axis_Ros using the set_steering_angle() function
};

#include <hk_physics/constraint/car_wheel/car_wheel_constraint.inl>

#endif /* HK_PHYSICS_CAR_WHEEL_CONTRAINT_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -