21 Vector3D upVector, forwardVector, rightVector;
45 case XForward: forwardVector.
X = 1;
break;
46 case YForward: forwardVector.
Y = 1;
break;
50 default: forwardVector.
Z = 1;
break;
60 case XUp: upVector.
X = 1;
break;
61 case ZUp: upVector.
Z = 1;
break;
62 case XNUp: upVector.
X = -1;
break;
63 case YNUp: upVector.
Y = -1;
break;
64 case ZNUp: upVector.
Z = -1;
break;
65 default: upVector.
Y = 1;
break;
Declares the CameraLayout class for managing camera orientation and axis alignment.
UpAxis
Defines possible up axes for the camera.
@ XNUp
Up along the negative X-axis.
@ XUp
Up along the positive X-axis.
@ ZNUp
Up along the negative Z-axis.
@ ZUp
Up along the positive Z-axis.
@ YUp
Up along the positive Y-axis.
@ YNUp
Up along the negative Y-axis.
void CalculateTransform()
Calculates the camera's transformation based on its axes.
Quaternion rotation
Rotation representing the camera's orientation.
Quaternion GetRotation()
Retrieves the camera's rotation.
ForwardAxis GetForwardAxis()
Retrieves the camera's forward axis.
ForwardAxis
Defines possible forward axes for the camera.
@ XForward
Forward along the positive X-axis.
@ XNForward
Forward along the negative X-axis.
@ ZNForward
Forward along the negative Z-axis.
@ YNForward
Forward along the negative Y-axis.
@ YForward
Forward along the positive Y-axis.
UpAxis upAxis
The camera's up axis.
bool VerifyTransform()
Verifies the validity of the camera's transformation.
ForwardAxis forwardAxis
The camera's forward axis.
Vector3D GetForwardVector()
Retrieves the camera's forward vector.
UpAxis GetUpAxis()
Retrieves the camera's up axis.
CameraLayout(ForwardAxis forwardAxis, UpAxis upAxis)
Constructs a CameraLayout with specified forward and up axes.
Vector3D GetUpVector()
Retrieves the camera's up vector.
A mathematical construct representing a rotation in 3D space.
Quaternion UnitQuaternion() const
Returns a unit quaternion (normalized) version of this quaternion.
Handles 3D rotations and conversions between various rotation representations.
Quaternion GetQuaternion()
Gets the quaternion representation of the rotation.
Represents a 3D vector (X, Y, Z) and provides methods for vector arithmetic.
Vector3D CrossProduct(const Vector3D &vector) const
Computes the cross product of this vector with another Vector3D.
float Z
The Z-component of the 3D vector.
float X
The X-component of the 3D vector.
float Y
The Y-component of the 3D vector.