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

📄 hinge_constraint.h

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

// IVP_EXPORT_PUBLIC

class hk_Hinge_BP;

class hk_Hinge_Constraint : public hk_Constraint
{
	public:

		hk_Hinge_Constraint( hk_Environment*, const hk_Hinge_BP* ,
							hk_Rigid_Body *a ,hk_Rigid_Body *b );	
		hk_Hinge_Constraint( hk_Local_Constraint_System *, const hk_Hinge_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 strength_factor );

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

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

		void init_constraint(const void*);
		void set_limits( hk_real min, hk_real max );
		void set_friction( hk_real friction );
		void set_motor( hk_real desired_vel, hk_real max_force );
		void write_to_blueprint( hk_Hinge_BP * );

	protected:

		void init_hinge_constraint(const hk_Hinge_BP*);

		hk_Ray m_axis_os[2];
		hk_Vector3 m_axis_perp_os[2];


		hk_real m_tau;			//XXX rename me to m_tau - this is drift stabilization paramater
		hk_real m_strength;		//XXX rename me to m_strength or similar - 1.0 is pure velocity constraint

		hk_Constraint_Limit m_limit; // XXX same as max_force for motor
};

#endif /* HK_PHYSICS_HINGE_CONTRAINT_H */

⌨️ 快捷键说明

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