jrotation.h

来自「矩阵运算库」· C头文件 代码 · 共 89 行

H
89
字号
// JRotation.h: interface for the JRotation class.
//
//	Lu Ying Jie
//	DV Lab
//
//	date:
//		1st edition :	1999.9
//		2ed edition :	2002.7
//		3th edition :	2003.8
//
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_JROTATION_H__E2B54DEC_A272_11D3_82B8_0000B4B30A86__INCLUDED_)
#define AFX_JROTATION_H__E2B54DEC_A272_11D3_82B8_0000B4B30A86__INCLUDED_


#include "JVector.h"




class JRotation  
{
private:

	double		m_euler[4] ;


public:

	JRotation( ) ;

	JRotation( double A, const JVector & V ) ;

	JRotation( const double * E ) ;

	JRotation( const JRotation & R ) ;


public:

	void	SetAngleAxis( double A, const JVector & V ) ;

	void	SetEuler ( const double * E ) ;

	void	SetMatrix( const double * M ) ;


public:

	void	GetAngleAxis( double * A, JVector * V ) const ;

	void	GetEuler ( double * E ) const ;

	void	GetMatrix( double * M ) const ;


public:

	const JRotation		operator * ( const JRotation & R ) const ;

	const JVector		operator * ( const JVector   & V ) const ;

	const JRotation		operator * ( double a            ) const ;


	JRotation &			operator = ( const JRotation & R ) ;


	JRotation &			operator *=( const JRotation & R ) ;

	JRotation &			operator *=( double a ) ;


public:

	JRotation &		Normalize() ;

	JRotation &		Inverse() ;

	JRotation &		RotateThis( const JRotation & R ) ;

	void			RotateVector( const JVector & V1, JVector * V2 ) const ;

};

#endif // !defined(AFX_JROTATION_H__E2B54DEC_A272_11D3_82B8_0000B4B30A86__INCLUDED_)

⌨️ 快捷键说明

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