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

📄 ragdoll_constraint.h

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


class hk_Ragdoll_Constraint_BP;
class hk_Local_Constraint_System;
class hk_Ragdoll_Constraint_Work;

// IVP_EXPORT_PUBLIC

class hk_Ragdoll_Constraint : public hk_Constraint
{
	public:

		hk_Ragdoll_Constraint( hk_Environment *,             const hk_Ragdoll_Constraint_BP *, hk_Rigid_Body *a ,hk_Rigid_Body *b );	
		hk_Ragdoll_Constraint( hk_Local_Constraint_System *, const hk_Ragdoll_Constraint_BP *, hk_Rigid_Body *a ,hk_Rigid_Body *b );	

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

		virtual int get_vmq_storage_size();

		inline virtual int	setup_and_step_constraint( hk_PSI_Info& pi, void *mem, hk_real tau_factor, hk_real damp_factor );
			//: uses the mem as a vmq storage, returns the bytes needed to store its vmq_storage

		virtual void step_constraint( hk_PSI_Info& pi, void *mem, hk_real tau_factor, hk_real damp_factor );
			//: use the mem as a vmq storage setup before

		virtual void init_constraint(const void *);
		//: update all parameters of the ragdoll constraint,

		void init_ragdoll_constraint(const hk_Ragdoll_Constraint_BP *, hk_Local_Constraint_System *sys = HK_NULL);
		//: update all parameters of the ragdoll constraint,

		void write_to_blueprint( hk_Ragdoll_Constraint_BP * );

	protected:

		void apply_angular_part(hk_PSI_Info& pi, hk_Ragdoll_Constraint_Work&,
				hk_real tau_factor, hk_real strength_factor);

	protected:

		hk_Transform m_transform_os_ks[2];
		hk_Constraint_Limit	m_limits[3];
		hk_Constraint_Limit_BP	m_inputLimits[3];

		hk_real m_strength;
		hk_real m_tau;
		bool m_constrainTranslation;

};

#endif /* HK_PHYSICS_RAGDOLL_CONTRAINT_H */

⌨️ 快捷键说明

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