Setting up a hkaTwoJointsIkSolver

Setting up a hkaTwoJointsIkSolver

hi again,first all Thanks for all the help
so, as I said in my last post, i want that my character(based on GDC2005Demo) pick up an weaponand it can shot it and more things, (my character haves an animation that simulate pick up a weapon, only when it is near from him) ChrisaDeveloper Support Engineer said me that i need toconsider using an hkLocalFrame to tag the weapon such that the character knows where and how to hold it. after said me thatOnce I have this 'grip' transform, I might try using the hkaTwoJointsIkSolver to determine the updated pose that will reach this grip and blend this pose in over time to pick the weapon up. Once the hand reaches the grip, Ican keyframe the weapon's grip transform to match the hand bone transform and begin blending the pose back out to simply be the underlying i have a own class that contain the hkLocalFrame

class MpFrameCollector : public hkLocalFrameCollector
	struct Frame
		const hkLocalFrame* m_frame;
		hkReal m_distance;
	std::vector m_frames;

	hkReal distance;
	void addFrame( const hkLocalFrame* frame, hkReal distance )
		Frame temFrame;
		temFrame.m_distance = distance;
		temFrame.m_frame = frame;

class MpFrame : public hkLocalFrame
	hkTransform m_currentTransform;
	const char* m_Name;
	const hkLocalFrameGroup* m_group;
	std::vector m_childs;
	const hkLocalFrame* m_parent;

	int m_numChild;

	hkVector4 m_target;
	hkReal m_maxDistance;
	MpFrameCollector m_frameCollector;

	MpFrame(const char* Name, const hkVector4& target, hkReal maxDistance);

	void getLocalTransform( hkTransform& transform ) const;

	/// Sets the local space transform
	void setLocalTransform( const hkTransform& transform );

	const char* getName() const;

	const hkLocalFrame* getParentFrame() const;

	void setParentFrame( const hkLocalFrame* parentFrame );

	int getNumChildFrames() const;

	hkLocalFrame* getChildFrame( int i ) const;

	const hkLocalFrameGroup* getGroup() const;

	void setGroup( const hkLocalFrameGroup* localFrameGroup );

	void getNearbyFrames( const hkVector4& target, hkReal maxDistance, hkLocalFrameCollector& collector ) const;

	void AddChildFrameToFrameCollector( MpFrame& frame, hkReal distance );

so that i have to Do ?maybe setup hkaTwoJointsIkSolver ?how to do it ? i know that the setup ishkaTwoJointsIkSolver::Setupor what more i Have to do before setuphkaTwoJointsIkSolver?tips/tutorials that can somebody let or help me ......thanks, really really i need a support........

1 post / novo 0
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.