Skip to content
Snippets Groups Projects
Commit 516409d1 authored by Tazpn's avatar Tazpn
Browse files

Bug fix with Matrix44 Transpose which didn't do anything.

Add helper methods to transform shape and fix some typos.
parent 2ea47b96
No related branches found
No related tags found
No related merge requests found
...@@ -55,14 +55,14 @@ public: ...@@ -55,14 +55,14 @@ public:
//--BEGIN MISC CUSTOM CODE--// //--BEGIN MISC CUSTOM CODE--//
/*! /*!
* Gets the dimentions of the box. * Gets the dimensions of the box.
* \return The dimentions of the bounding box. * \return The dimensions of the bounding box.
*/ */
NIFLIB_API Vector3 GetDimensions() const; NIFLIB_API Vector3 GetDimensions() const;
/*! /*!
* Sets the dimentions of the box. * Sets the dimensions of the box.
* \param value The new dimentions for the bounding box. * \param value The new dimensions for the bounding box.
*/ */
NIFLIB_API void SetDimensions( const Vector3 & value ); NIFLIB_API void SetDimensions( const Vector3 & value );
......
...@@ -58,6 +58,43 @@ public: ...@@ -58,6 +58,43 @@ public:
NIFLIB_API virtual const Type & GetType() const; NIFLIB_API virtual const Type & GetType() const;
//--BEGIN MISC CUSTOM CODE--// //--BEGIN MISC CUSTOM CODE--//
/*!
* Get the shape's material. This determines the type of noises the object makes as it collides in Oblivion.
* \return The Oblivion material used by this collision shape.
*/
NIFLIB_API HavokMaterial GetMaterial() const;
/*!
* Sets the shape's material. This determines the type of noises the object makes as it collides in Oblivion.
* \param[in] value The new material for this shape to use.
*/
NIFLIB_API void SetMaterial( HavokMaterial value );
/*!
* Retrieves the shape object that this body is using.
* \return The shape object being used by this body.
*/
NIFLIB_API Ref<bhkShape > GetShape() const;
/*!
* Sets the shape object that this body will use.
* \param[in] value The new shape object for this body to use.
*/
NIFLIB_API void SetShape( bhkShape * value );
/* This is a conveniance function that allows you to retrieve the full 4x4 matrix transform of a node. It accesses the "Rotation," "Translation," and "Scale" attributes and builds a complete 4x4 transformation matrix from them.
* \return A 4x4 transformation matrix built from the node's transform attributes.
*/
NIFLIB_API virtual Matrix44 GetTransform() const;
/*!
* This is a conveniance function that allows you to set the rotation, scale, and translation of an AV object with a 4x4 matrix transform.
* \n A 4x4 transformation matrix to set the AVObject's transform attributes with.
*/
NIFLIB_API virtual void SetTransform( const Matrix44 & value );
//--END CUSTOM CODE--// //--END CUSTOM CODE--//
protected: protected:
/*! The shape that this object transforms. */ /*! The shape that this object transforms. */
......
...@@ -388,10 +388,10 @@ bool Matrix44::operator!=( const Matrix44 & rh ) const { ...@@ -388,10 +388,10 @@ bool Matrix44::operator!=( const Matrix44 & rh ) const {
Matrix44 Matrix44::Transpose() const { Matrix44 Matrix44::Transpose() const {
const Matrix44 & t = *this; const Matrix44 & t = *this;
return Matrix44( t[0][0], t[0][1], t[0][2], t[0][3], return Matrix44( t[0][0], t[1][0], t[2][0], t[3][0],
t[1][0], t[1][1], t[1][2], t[1][3], t[0][1], t[1][1], t[2][1], t[3][1],
t[2][0], t[2][1], t[2][2], t[2][3], t[0][2], t[1][2], t[2][2], t[3][2],
t[3][0], t[3][1], t[3][2], t[3][3] ); t[0][3], t[1][3], t[2][3], t[3][3] );
} }
Matrix33 Matrix44::Submatrix( int skip_r, int skip_c ) const { Matrix33 Matrix44::Submatrix( int skip_r, int skip_c ) const {
......
...@@ -131,4 +131,29 @@ std::list<NiObjectRef> bhkTransformShape::GetRefs() const { ...@@ -131,4 +131,29 @@ std::list<NiObjectRef> bhkTransformShape::GetRefs() const {
} }
//--BEGIN MISC CUSTOM CODE--// //--BEGIN MISC CUSTOM CODE--//
Ref<bhkShape > bhkTransformShape::GetShape() const {
return shape;
}
void bhkTransformShape::SetShape( bhkShape * value ) {
shape = value;
}
HavokMaterial bhkTransformShape::GetMaterial() const {
return material;
}
void bhkTransformShape::SetMaterial( HavokMaterial value ) {
material = value;
}
Matrix44 bhkTransformShape::GetTransform() const {
return transform;
}
void bhkTransformShape::SetTransform(const Matrix44 & value ) {
transform = value;
}
//--END CUSTOM CODE--// //--END CUSTOM CODE--//
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment