[12632] Revert previous commit (see Notes)

This commit is contained in:
billy1arm 2013-05-31 13:50:57 +01:00 committed by Antz
parent 1cd806c02e
commit ef445ea523
1462 changed files with 9689 additions and 7080 deletions

View file

@ -1,4 +1,4 @@
/**
/*
@file CoordinateFrame.h
@maintainer Morgan McGuire, http://graphics.cs.williams.edu
@ -34,7 +34,7 @@
namespace G3D {
class Any;
/**
/*
A rigid body RT (rotation-translation) transformation.
CoordinateFrame abstracts a 4x4 matrix that maps object space to world space:
@ -68,6 +68,8 @@ public:
- CFrame((matrix3 expr), (vector3 expr))
- CFrame::fromXYZYPRDegrees(#, #, #, #, #, #)
- CFrame { rotation = (matrix3 expr), translation = (vector3 expr) }
- Vector3( ... )
- Matrix3( ... )
*/
CoordinateFrame(const Any& any);
@ -88,7 +90,7 @@ public:
bool isIdentity() const;
/**
/*
Initializes to the identity coordinate frame.
*/
CoordinateFrame();
@ -109,6 +111,8 @@ public:
static CoordinateFrame fromXYZYPRRadians(float x, float y, float z, float yaw = 0.0f, float pitch = 0.0f, float roll = 0.0f);
std::string toXYZYPRDegreesString() const;
/** Construct a coordinate frame from translation = (x,y,z) and
rotations (in that order) about Y, object space X, object space
Z. Note that because object-space axes are used, these are not
@ -125,7 +129,7 @@ public:
CoordinateFrame(const CoordinateFrame &other) :
rotation(other.rotation), translation(other.translation) {}
/**
/*
Computes the inverse of this coordinate frame.
*/
inline CoordinateFrame inverse() const {
@ -144,13 +148,13 @@ public:
void getXYZYPRDegrees(float& x, float& y, float& z, float& yaw, float& pitch, float& roll) const;
/**
/*
Produces an XML serialization of this coordinate frame.
@deprecated
*/
std::string toXML() const;
/**
/*
Returns the heading of the lookVector as an angle in radians relative to
the world -z axis. That is, a counter-clockwise heading where north (-z)
is 0 and west (-x) is PI/2.
@ -164,7 +168,7 @@ public:
return angle;
}
/**
/*
Takes the coordinate frame into object space.
this->inverse() * c
*/
@ -180,7 +184,7 @@ public:
return Vector4(rotation * Vector3(v.x, v.y, v.z) + translation * v.w, v.w);
}
/**
/*
Transforms the point into world space.
*/
inline Vector3 pointToWorldSpace(const Vector3& v) const {
@ -190,7 +194,7 @@ public:
rotation[2][0] * v[0] + rotation[2][1] * v[1] + rotation[2][2] * v[2] + translation[2]);
}
/**
/*
Transforms the point into object space. Assumes that the rotation matrix is orthonormal.
*/
inline Vector3 pointToObjectSpace(const Vector3& v) const {
@ -205,7 +209,7 @@ public:
rotation[0][2] * p[0] + rotation[1][2] * p[1] + rotation[2][2] * p[2]);
}
/**
/*
Transforms the vector into world space (no translation).
*/
inline Vector3 vectorToWorldSpace(const Vector3& v) const {
@ -220,7 +224,7 @@ public:
Ray toWorldSpace(const Ray& r) const;
/**
/*
Transforms the vector into object space (no translation).
*/
inline Vector3 vectorToObjectSpace(const Vector3 &v) const {
@ -306,7 +310,7 @@ public:
return rotation.column(0);
}
/**
/*
If a viewer looks along the look vector, this is the viewer's "left".
Useful for strafing motions and building alternative coordinate frames.
*/
@ -314,7 +318,7 @@ public:
return -rotation.column(0);
}
/**
/*
Linearly interpolates between two coordinate frames, using
Quat::slerp for the rotations.
*/