port from perforce
This commit is contained in:
94
aiwaz/Aiwaz/Resources/Transformation/Transformation.h
Normal file
94
aiwaz/Aiwaz/Resources/Transformation/Transformation.h
Normal file
@@ -0,0 +1,94 @@
|
||||
#pragma once
|
||||
|
||||
#include "IUpdatable.h"
|
||||
#include "ITransformation.h"
|
||||
#include "../ShaderParameterCollection/ShaderParameterCollection.h"
|
||||
|
||||
|
||||
class Transformation
|
||||
: public ShaderParameterCollection
|
||||
, public ITransformation
|
||||
, public IUpdatable
|
||||
{
|
||||
public:
|
||||
// ITransformation
|
||||
Transformation(IEngine& argEngine);
|
||||
virtual ~Transformation();
|
||||
|
||||
virtual void set_TransformationBindings(const TransformationBindings& argData);
|
||||
virtual TransformationBindings get_TransformationBindings() const;
|
||||
|
||||
virtual void set_LocalPosition(const D3DXVECTOR3& argValue);
|
||||
virtual const D3DXVECTOR3& get_LocalPosition() const;
|
||||
virtual const D3DXVECTOR3& get_WorldPosition() const;
|
||||
|
||||
virtual void set_LocalRotationYPR(const D3DXVECTOR3& argValue);
|
||||
virtual const D3DXVECTOR3& get_LocalRotationYPR() const;
|
||||
|
||||
virtual void set_LocalRotation(const D3DXQUATERNION& argValue);
|
||||
virtual const D3DXQUATERNION& get_LocalRotation() const;
|
||||
virtual const D3DXQUATERNION& get_WorldRotation() const;
|
||||
|
||||
virtual const D3DXVECTOR3& get_LocalDirection() const;
|
||||
virtual const D3DXVECTOR3& get_WorldDirection() const;
|
||||
|
||||
virtual const D3DXVECTOR3& get_LocalUpDirection() const;
|
||||
virtual const D3DXVECTOR3& get_WorldUpDirection() const;
|
||||
|
||||
virtual D3DXVECTOR3 get_LocalRightDirection() const;
|
||||
virtual D3DXVECTOR3 get_WorldRightDirection() const;
|
||||
|
||||
virtual void set_LocalScale(const D3DXVECTOR3& argValue);
|
||||
virtual const D3DXVECTOR3& get_LocalScale() const;
|
||||
virtual const D3DXVECTOR3& get_WorldScale() const;
|
||||
|
||||
virtual const D3DXMATRIX& get_WorldMatrix() const;
|
||||
virtual const D3DXMATRIX& get_LocalMatrix() const;
|
||||
|
||||
virtual void set_TransformationParent(ITransformation* argValue);
|
||||
virtual ITransformation* get_TransformationParent() const;
|
||||
virtual void AddTransformation(ITransformation& argTransformation);
|
||||
virtual void RemoveTransformation(ITransformation& argTransformation);
|
||||
virtual const std::vector<ITransformation*>& get_Transformations() const;
|
||||
|
||||
// IUpdatable
|
||||
virtual void Update(bool argForceUpdate);
|
||||
virtual bool get_WantsUpdate() const { return m_IsDirty; }
|
||||
|
||||
virtual void RecreateAllShaderParameters();
|
||||
|
||||
protected:
|
||||
// ICommandUser
|
||||
virtual string8 get_UserName() const { return "Transformation"; }
|
||||
|
||||
protected:
|
||||
D3DXMATRIX m_LocalMatrix;
|
||||
D3DXMATRIX m_WorldMatrix;
|
||||
|
||||
D3DXVECTOR3 m_LocalTranslation;
|
||||
D3DXVECTOR3 m_WorldTranslation;
|
||||
|
||||
D3DXQUATERNION m_LocalRotation;
|
||||
D3DXQUATERNION m_WorldRotation;
|
||||
|
||||
D3DXVECTOR3 m_LocalScale;
|
||||
D3DXVECTOR3 m_WorldScale;
|
||||
|
||||
D3DXVECTOR3 m_LocalDirection;
|
||||
D3DXVECTOR3 m_WorldDirection;
|
||||
|
||||
D3DXVECTOR3 m_LocalUpDirection;
|
||||
D3DXVECTOR3 m_WorldUpDirection;
|
||||
|
||||
D3DXVECTOR3 m_LocalRightDirection;
|
||||
D3DXVECTOR3 m_WorldRightDirection;
|
||||
|
||||
D3DXVECTOR3 m_LastKnownYawPitchRoll;
|
||||
|
||||
bool m_IsDirty;
|
||||
|
||||
TransformationBindings m_TransformationBindings;
|
||||
|
||||
ITransformation* m_ParentTransformation;
|
||||
std::vector<ITransformation*> m_TransformationChildren;
|
||||
};
|
||||
Reference in New Issue
Block a user