Added MD5 (md5mesh works, md5anim has not yet been tested) and STL. new unittests, although not yet complete (material system, normals). Bugfixes (GFn and MDL7). Added HMP5 support. Rewrote MD2 and MD3 to be more stable.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@77 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
@@ -94,4 +94,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef _DEBUG
|
||||
# define AI_DEBUG_INVALIDATE_PTR(ptr) ptr = 0;
|
||||
#else
|
||||
# define AI_DEBUG_INVALIDATE_PTR(ptr)
|
||||
#endif
|
||||
|
||||
#endif // !! AI_DEFINES_H_INC
|
||||
|
||||
@@ -213,7 +213,7 @@ struct aiMaterialProperty
|
||||
*
|
||||
* Keys are case insensitive.
|
||||
*/
|
||||
C_STRUCT aiString* mKey;
|
||||
C_STRUCT aiString mKey;
|
||||
|
||||
/** Size of the buffer mData is pointing to, in bytes
|
||||
* This value may not be 0.
|
||||
|
||||
@@ -66,6 +66,9 @@ struct aiQuaternion
|
||||
/** Construct from an axis angle pair */
|
||||
aiQuaternion( aiVector3D axis, float angle);
|
||||
|
||||
/** Construct from a normalized quaternion stored in a vec3 */
|
||||
aiQuaternion( aiVector3D normalized);
|
||||
|
||||
/** Returns a matrix representation of the quaternion */
|
||||
aiMatrix3x3 GetMatrix() const;
|
||||
|
||||
@@ -170,7 +173,22 @@ inline aiQuaternion::aiQuaternion( aiVector3D axis, float angle)
|
||||
z = axis.z * sin_a;
|
||||
w = cos_a;
|
||||
}
|
||||
// ---------------------------------------------------------------------------
|
||||
// Construction from am existing, normalized quaternion
|
||||
inline aiQuaternion::aiQuaternion( aiVector3D normalized)
|
||||
{
|
||||
x = normalized.x;
|
||||
y = normalized.y;
|
||||
z = normalized.z;
|
||||
|
||||
float t = 1.0f - (normalized.x * normalized.x) -
|
||||
(normalized.y * normalized.y) - (normalized.z * normalized.z);
|
||||
|
||||
if (t < 0.0f)
|
||||
w = 0.0f;
|
||||
else w = sqrt (t);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user