#[doc = " @brief Get 4x4 matrix equivalent to Quaternion"]
#[doc = " @brief Get 4x4 matrix equivalent to Quaternion\n @param[out] m Output matrix\n @param[in] q Input Quaternion"]
#[doc = " @param[out] m Output matrix"]
#[doc = " @param[in] q Input Quaternion"]
pubfnMtx_FromQuat(m: *mutC3D_Mtx,q: C3D_FQuat);
pubfnMtx_FromQuat(m: *mutC3D_Mtx,q: C3D_FQuat);
}
}
extern"C"{
extern"C"{
#[doc = " @brief 3D translation"]
#[doc = " @brief 3D translation\n @param[in,out] mtx Matrix to translate\n @param[in] x X component to translate\n @param[in] y Y component to translate\n @param[in] z Z component to translate\n @param[in] bRightSide Whether to transform from the right side"]
#[doc = " @param[in,out] mtx Matrix to translate"]
#[doc = " @param[in] x X component to translate"]
#[doc = " @param[in] y Y component to translate"]
#[doc = " @param[in] z Z component to translate"]
#[doc = " @param[in] bRightSide Whether to transform from the right side"]
#[doc = " @brief 3D Scale\n @param[in,out] mtx Matrix to scale\n @param[in] x X component to scale\n @param[in] y Y component to scale\n @param[in] z Z component to scale"]
#[doc = " @brief 3D Rotation\n @param[in,out] mtx Matrix to rotate\n @param[in] axis Axis about which to rotate\n @param[in] angle Radians to rotate\n @param[in] bRightSide Whether to transform from the right side"]
#[doc = " @param[in,out] mtx Matrix to rotate"]
#[doc = " @param[in] axis Axis about which to rotate"]
#[doc = " @param[in] angle Radians to rotate"]
#[doc = " @param[in] bRightSide Whether to transform from the right side"]
#[doc = " @brief 3D Rotation about the X axis\n @param[in,out] mtx Matrix to rotate\n @param[in] angle Radians to rotate\n @param[in] bRightSide Whether to transform from the right side"]
#[doc = " @param[in,out] mtx Matrix to rotate"]
#[doc = " @param[in] angle Radians to rotate"]
#[doc = " @param[in] bRightSide Whether to transform from the right side"]
#[doc = " @brief 3D Rotation about the Y axis\n @param[in,out] mtx Matrix to rotate\n @param[in] angle Radians to rotate\n @param[in] bRightSide Whether to transform from the right side"]
#[doc = " @param[in,out] mtx Matrix to rotate"]
#[doc = " @param[in] angle Radians to rotate"]
#[doc = " @param[in] bRightSide Whether to transform from the right side"]
#[doc = " @brief 3D Rotation about the Z axis\n @param[in,out] mtx Matrix to rotate\n @param[in] angle Radians to rotate\n @param[in] bRightSide Whether to transform from the right side"]
#[doc = " @param[in,out] mtx Matrix to rotate"]
#[doc = " @param[in] angle Radians to rotate"]
#[doc = " @param[in] bRightSide Whether to transform from the right side"]
#[doc = " @brief Orthogonal projection\n @param[out] mtx Output matrix\n @param[in] left Left clip plane (X=left)\n @param[in] right Right clip plane (X=right)\n @param[in] bottom Bottom clip plane (Y=bottom)\n @param[in] top Top clip plane (Y=top)\n @param[in] near Near clip plane (Z=near)\n @param[in] far Far clip plane (Z=far)\n @param[in] isLeftHanded Whether to build a LH projection\n @sa Mtx_OrthoTilt"]
#[doc = " @param[out] mtx Output matrix"]
#[doc = " @param[in] left Left clip plane (X=left)"]
#[doc = " @param[in] right Right clip plane (X=right)"]
#[doc = " @param[in] near Near clip plane (Z=near)"]
#[doc = " @param[in] far Far clip plane (Z=far)"]
#[doc = " @param[in] isLeftHanded Whether to build a LH projection"]
#[doc = " @sa Mtx_PerspTilt"]
#[doc = " @sa Mtx_PerspStereo"]
#[doc = " @sa Mtx_PerspStereoTilt"]
pubfnMtx_Persp(
pubfnMtx_Persp(
mtx: *mutC3D_Mtx,
mtx: *mutC3D_Mtx,
fovy: f32,
fovy: f32,
@ -277,24 +215,7 @@ extern "C" {
);
);
}
}
extern"C"{
extern"C"{
#[doc = " @brief Stereo perspective projection"]
#[doc = " @brief Stereo perspective projection\n @note Typically you will use iod to mean the distance between the eyes. Plug\n in -iod for the left eye and iod for the right eye.\n @note The focal length is defined by screen. If objects are further than this,\n they will appear to be inside the screen. If objects are closer than this,\n they will appear to pop out of the screen. Objects at this distance appear\n to be at the screen.\n @param[out] mtx Output matrix\n @param[in] fovy Vertical field of view in radians\n @param[in] aspect Aspect ration of projection plane (width/height)\n @param[in] near Near clip plane (Z=near)\n @param[in] far Far clip plane (Z=far)\n @param[in] iod Interocular distance\n @param[in] screen Focal length\n @param[in] isLeftHanded Whether to build a LH projection\n @sa Mtx_Persp\n @sa Mtx_PerspTilt\n @sa Mtx_PerspStereoTilt"]
#[doc = " @note Typically you will use iod to mean the distance between the eyes. Plug"]
#[doc = " in -iod for the left eye and iod for the right eye."]
#[doc = " @note The focal length is defined by screen. If objects are further than this,"]
#[doc = " they will appear to be inside the screen. If objects are closer than this,"]
#[doc = " they will appear to pop out of the screen. Objects at this distance appear"]
#[doc = " to be at the screen."]
#[doc = " @param[out] mtx Output matrix"]
#[doc = " @param[in] fovy Vertical field of view in radians"]
#[doc = " @param[in] near Near clip plane (Z=near)"]
#[doc = " @param[in] far Far clip plane (Z=far)"]
#[doc = " @param[in] iod Interocular distance"]
#[doc = " @param[in] screen Focal length"]
#[doc = " @param[in] isLeftHanded Whether to build a LH projection"]
#[doc = " @sa Mtx_Persp"]
#[doc = " @sa Mtx_PerspTilt"]
#[doc = " @sa Mtx_PerspStereoTilt"]
pubfnMtx_PerspStereo(
pubfnMtx_PerspStereo(
mtx: *mutC3D_Mtx,
mtx: *mutC3D_Mtx,
fovy: f32,
fovy: f32,
@ -307,16 +228,7 @@ extern "C" {
);
);
}
}
extern"C"{
extern"C"{
#[doc = " @brief Orthogonal projection, tilted to account for the 3DS screen rotation"]
#[doc = " @brief Orthogonal projection, tilted to account for the 3DS screen rotation\n @param[out] mtx Output matrix\n @param[in] left Left clip plane (X=left)\n @param[in] right Right clip plane (X=right)\n @param[in] bottom Bottom clip plane (Y=bottom)\n @param[in] top Top clip plane (Y=top)\n @param[in] near Near clip plane (Z=near)\n @param[in] far Far clip plane (Z=far)\n @param[in] isLeftHanded Whether to build a LH projection\n @sa Mtx_Ortho"]
#[doc = " @param[out] mtx Output matrix"]
#[doc = " @param[in] left Left clip plane (X=left)"]
#[doc = " @param[in] right Right clip plane (X=right)"]
#[doc = " @param[in] near Near clip plane (Z=near)"]
#[doc = " @param[in] far Far clip plane (Z=far)"]
#[doc = " @param[in] isLeftHanded Whether to build a LH projection"]
#[doc = " @sa Mtx_Ortho"]
pubfnMtx_OrthoTilt(
pubfnMtx_OrthoTilt(
mtx: *mutC3D_Mtx,
mtx: *mutC3D_Mtx,
left: f32,
left: f32,
@ -329,16 +241,7 @@ extern "C" {
);
);
}
}
extern"C"{
extern"C"{
#[doc = " @brief Perspective projection, tilted to account for the 3DS screen rotation"]
#[doc = " @brief Perspective projection, tilted to account for the 3DS screen rotation\n @param[out] mtx Output matrix\n @param[in] fovy Vertical field of view in radians\n @param[in] aspect Aspect ration of projection plane (width/height)\n @param[in] near Near clip plane (Z=near)\n @param[in] far Far clip plane (Z=far)\n @param[in] isLeftHanded Whether to build a LH projection\n @sa Mtx_Persp\n @sa Mtx_PerspStereo\n @sa Mtx_PerspStereoTilt"]
#[doc = " @param[out] mtx Output matrix"]
#[doc = " @param[in] fovy Vertical field of view in radians"]
#[doc = " @param[in] near Near clip plane (Z=near)"]
#[doc = " @param[in] far Far clip plane (Z=far)"]
#[doc = " @param[in] isLeftHanded Whether to build a LH projection"]
#[doc = " @sa Mtx_Persp"]
#[doc = " @sa Mtx_PerspStereo"]
#[doc = " @sa Mtx_PerspStereoTilt"]
pubfnMtx_PerspTilt(
pubfnMtx_PerspTilt(
mtx: *mutC3D_Mtx,
mtx: *mutC3D_Mtx,
fovy: f32,
fovy: f32,
@ -349,19 +252,7 @@ extern "C" {
);
);
}
}
extern"C"{
extern"C"{
#[doc = " @brief Stereo perspective projection, tilted to account for the 3DS screen rotation"]
#[doc = " @brief Stereo perspective projection, tilted to account for the 3DS screen rotation\n @note See the notes for @ref Mtx_PerspStereo\n @param[out] mtx Output matrix\n @param[in] fovy Vertical field of view in radians\n @param[in] aspect Aspect ration of projection plane (width/height)\n @param[in] near Near clip plane (Z=near)\n @param[in] far Far clip plane (Z=far)\n @param[in] iod Interocular distance\n @param[in] screen Focal length\n @param[in] isLeftHanded Whether to build a LH projection\n @sa Mtx_Persp\n @sa Mtx_PerspTilt\n @sa Mtx_PerspStereo"]
#[doc = " @note See the notes for @ref Mtx_PerspStereo"]
#[doc = " @param[out] mtx Output matrix"]
#[doc = " @param[in] fovy Vertical field of view in radians"]
#[doc = " @param[in] near Near clip plane (Z=near)"]
#[doc = " @param[in] far Far clip plane (Z=far)"]
#[doc = " @param[in] iod Interocular distance"]
#[doc = " @param[in] screen Focal length"]
#[doc = " @param[in] isLeftHanded Whether to build a LH projection"]
#[doc = " @sa Mtx_Persp"]
#[doc = " @sa Mtx_PerspTilt"]
#[doc = " @sa Mtx_PerspStereo"]
pubfnMtx_PerspStereoTilt(
pubfnMtx_PerspStereoTilt(
mtx: *mutC3D_Mtx,
mtx: *mutC3D_Mtx,
fovy: f32,
fovy: f32,
@ -374,13 +265,7 @@ extern "C" {
);
);
}
}
extern"C"{
extern"C"{
#[doc = " @brief Look-At matrix, based on DirectX implementation"]
#[doc = " @brief Look-At matrix, based on DirectX implementation\n @note See https://msdn.microsoft.com/en-us/library/windows/desktop/bb205342\n @param[out] out Output matrix.\n @param[in] cameraPosition Position of the intended camera in 3D space.\n @param[in] cameraTarget Position of the intended target the camera is supposed to face in 3D space.\n @param[in] cameraUpVector The vector that points straight up depending on the camera's \"Up\" direction.\n @param[in] isLeftHanded Whether to build a LH projection"]
#[doc = " @note See https://msdn.microsoft.com/en-us/library/windows/desktop/bb205342"]
#[doc = " @param[out] out Output matrix."]
#[doc = " @param[in] cameraPosition Position of the intended camera in 3D space."]
#[doc = " @param[in] cameraTarget Position of the intended target the camera is supposed to face in 3D space."]
#[doc = " @param[in] cameraUpVector The vector that points straight up depending on the camera's \"Up\" direction."]
#[doc = " @param[in] isLeftHanded Whether to build a LH projection"]
#[doc = " @brief Raise Quaternion to a power\n @note If p is 0, this returns the identity Quaternion.\n If p is 1, this returns q.\n @param[in] q Base Quaternion\n @param[in] p Power\n @return q<sup>p</sup>"]
#[doc = " @note If p is 0, this returns the identity Quaternion."]
#[doc = " If p is 1, this returns q."]
#[doc = " @param[in] q Base Quaternion"]
#[doc = " @param[in] p Power"]
#[doc = " @return q<sup>p</sup>"]
pubfnQuat_Pow(q: C3D_FQuat,p: f32)-> C3D_FQuat;
pubfnQuat_Pow(q: C3D_FQuat,p: f32)-> C3D_FQuat;
}
}
extern"C"{
extern"C"{
#[doc = " @brief Cross product of Quaternion and FVec3"]
#[doc = " @brief Cross product of Quaternion and FVec3\n @param[in] q Base Quaternion\n @param[in] v Vector to cross\n @return q×v"]
#[doc = " @brief 3D Rotation\n @param[in] q Quaternion to rotate\n @param[in] axis Axis about which to rotate\n @param[in] r Radians to rotate\n @param[in] bRightSide Whether to transform from the right side\n @return Rotated Quaternion"]
#[doc = " @param[in] q Quaternion to rotate"]
#[doc = " @param[in] axis Axis about which to rotate"]
#[doc = " @param[in] r Radians to rotate"]
#[doc = " @param[in] bRightSide Whether to transform from the right side"]
#[doc = " @brief 3D Rotation about the X axis\n @param[in] q Quaternion to rotate\n @param[in] r Radians to rotate\n @param[in] bRightSide Whether to transform from the right side\n @return Rotated Quaternion"]
#[doc = " @param[in] q Quaternion to rotate"]
#[doc = " @param[in] r Radians to rotate"]
#[doc = " @param[in] bRightSide Whether to transform from the right side"]
#[doc = " @brief 3D Rotation about the Y axis\n @param[in] q Quaternion to rotate\n @param[in] r Radians to rotate\n @param[in] bRightSide Whether to transform from the right side\n @return Rotated Quaternion"]
#[doc = " @param[in] q Quaternion to rotate"]
#[doc = " @param[in] r Radians to rotate"]
#[doc = " @param[in] bRightSide Whether to transform from the right side"]
#[doc = " @brief 3D Rotation about the Z axis\n @param[in] q Quaternion to rotate\n @param[in] r Radians to rotate\n @param[in] bRightSide Whether to transform from the right side\n @return Rotated Quaternion"]
#[doc = " @param[in] q Quaternion to rotate"]
#[doc = " @param[in] r Radians to rotate"]
#[doc = " @param[in] bRightSide Whether to transform from the right side"]
#[doc = " @brief Get Quaternion equivalent to 4x4 matrix"]
#[doc = " @brief Get Quaternion equivalent to 4x4 matrix\n @note If the matrix is orthogonal or special orthogonal, where determinant(matrix) = +1.0f, then the matrix can be converted.\n @param[in] m Input Matrix\n @return Generated Quaternion"]
#[doc = " @note If the matrix is orthogonal or special orthogonal, where determinant(matrix) = +1.0f, then the matrix can be converted."]
#[doc = " @param[in] m Input Matrix"]
#[doc = " @return Generated Quaternion"]
pubfnQuat_FromMtx(m: *constC3D_Mtx)-> C3D_FQuat;
pubfnQuat_FromMtx(m: *constC3D_Mtx)-> C3D_FQuat;
}
}
extern"C"{
extern"C"{
#[doc = " @brief Converting Pitch, Yaw, and Roll to Quaternion equivalent"]
#[doc = " @brief Converting Pitch, Yaw, and Roll to Quaternion equivalent\n @param[in] pitch The pitch angle in radians.\n @param[in] yaw The yaw angle in radians.\n @param[in] roll The roll angle in radians.\n @param[in] bRightSide Whether to transform from the right side\n @return C3D_FQuat The Quaternion equivalent with the pitch, yaw, and roll (in that order) orientations applied."]
#[doc = " @param[in] pitch The pitch angle in radians."]
#[doc = " @param[in] yaw The yaw angle in radians."]
#[doc = " @param[in] roll The roll angle in radians."]
#[doc = " @param[in] bRightSide Whether to transform from the right side"]
#[doc = " @return C3D_FQuat The Quaternion equivalent with the pitch, yaw, and roll (in that order) orientations applied."]
#[doc = " @param[in] target C3D_FVec Target position to orient towards."]
#[doc = " @param[in] forwardVector C3D_FVec The Up vector."]
#[doc = " @param[in] upVector C3D_FVec The Up vector."]
#[doc = " @return Quaternion rotation."]
pubfnQuat_LookAt(
pubfnQuat_LookAt(
source: C3D_FVec,
source: C3D_FVec,
target: C3D_FVec,
target: C3D_FVec,
@ -476,10 +320,7 @@ extern "C" {
)-> C3D_FQuat;
)-> C3D_FQuat;
}
}
extern"C"{
extern"C"{
#[doc = " @brief Quaternion, created from a given axis and angle in radians."]
#[doc = " @brief Quaternion, created from a given axis and angle in radians.\n @param[in] axis C3D_FVec The axis to rotate around at.\n @param[in] angle float The angle to rotate. Unit: Radians\n @return Quaternion rotation based on the axis and angle. Axis doesn't have to be orthogonal."]
#[doc = " @param[in] axis C3D_FVec The axis to rotate around at."]
#[doc = " @param[in] angle float The angle to rotate. Unit: Radians"]
#[doc = " @return Quaternion rotation based on the axis and angle. Axis doesn't have to be orthogonal."]
#[doc = " @brief Import Tex3DS texture\n @param[in] input Input data\n @param[in] insize Size of the input data\n @param[out] tex citro3d texture\n @param[out] texcube citro3d texcube\n @param[in] vram Whether to store textures in VRAM\n @returns Tex3DS texture"]
#[doc = " @param[in] input Input data"]
#[doc = " @param[in] insize Size of the input data"]
#[doc = " @param[out] tex citro3d texture"]
#[doc = " @param[out] texcube citro3d texcube"]
#[doc = " @param[in] vram Whether to store textures in VRAM"]
#[doc = " @returns Tex3DS texture"]
pubfnTex3DS_TextureImport(
pubfnTex3DS_TextureImport(
input: *const::libc::c_void,
input: *const::libc::c_void,
insize: usize,
insize: usize,
@ -1865,18 +1699,7 @@ extern "C" {
)-> Tex3DS_Texture;
)-> Tex3DS_Texture;
}
}
extern"C"{
extern"C"{
#[doc = " @brief Import Tex3DS texture"]
#[doc = " @brief Import Tex3DS texture\n\n @description\n For example, use this if you want to import from a large file without\n pulling the entire file into memory.\n\n @param[out] tex citro3d texture\n @param[out] texcube citro3d texcube\n @param[in] vram Whether to store textures in VRAM\n @param[in] callback Data callback\n @param[in] userdata User data passed to callback\n @returns Tex3DS texture"]
#[doc = ""]
#[doc = " @description"]
#[doc = " For example, use this if you want to import from a large file without"]
#[doc = " pulling the entire file into memory."]
#[doc = ""]
#[doc = " @param[out] tex citro3d texture"]
#[doc = " @param[out] texcube citro3d texcube"]
#[doc = " @param[in] vram Whether to store textures in VRAM"]
#[doc = " @param[in] callback Data callback"]
#[doc = " @param[in] userdata User data passed to callback"]
#[doc = " @returns Tex3DS texture"]
pubfnTex3DS_TextureImportCallback(
pubfnTex3DS_TextureImportCallback(
tex: *mutC3D_Tex,
tex: *mutC3D_Tex,
texcube: *mutC3D_TexCube,
texcube: *mutC3D_TexCube,
@ -1886,17 +1709,7 @@ extern "C" {
)-> Tex3DS_Texture;
)-> Tex3DS_Texture;
}
}
extern"C"{
extern"C"{
#[doc = " @brief Import Tex3DS texture"]
#[doc = " @brief Import Tex3DS texture\n\n Starts reading at the current file descriptor's offset. The file\n descriptor's position is left at the end of the decoded data. On error, the\n file descriptor's position is indeterminate.\n\n @param[in] fd Open file descriptor\n @param[out] tex citro3d texture\n @param[out] texcube citro3d texcube\n @param[in] vram Whether to store textures in VRAM\n @returns Tex3DS texture"]
#[doc = ""]
#[doc = " Starts reading at the current file descriptor's offset. The file"]
#[doc = " descriptor's position is left at the end of the decoded data. On error, the"]
#[doc = " file descriptor's position is indeterminate."]
#[doc = ""]
#[doc = " @param[in] fd Open file descriptor"]
#[doc = " @param[out] tex citro3d texture"]
#[doc = " @param[out] texcube citro3d texcube"]
#[doc = " @param[in] vram Whether to store textures in VRAM"]
#[doc = " @returns Tex3DS texture"]
pubfnTex3DS_TextureImportFD(
pubfnTex3DS_TextureImportFD(
fd: ::libc::c_int,
fd: ::libc::c_int,
tex: *mutC3D_Tex,
tex: *mutC3D_Tex,
@ -1905,17 +1718,7 @@ extern "C" {
)-> Tex3DS_Texture;
)-> Tex3DS_Texture;
}
}
extern"C"{
extern"C"{
#[doc = " @brief Import Tex3DS texture"]
#[doc = " @brief Import Tex3DS texture\n\n Starts reading at the current file stream's offset. The file stream's\n position is left at the end of the decoded data. On error, the file\n stream's position is indeterminate.\n\n @param[in] fp Open file stream\n @param[out] tex citro3d texture\n @param[out] texcube citro3d texcube\n @param[in] vram Whether to store textures in VRAM\n @returns Tex3DS texture"]
#[doc = ""]
#[doc = " Starts reading at the current file stream's offset. The file stream's"]
#[doc = " position is left at the end of the decoded data. On error, the file"]
#[doc = " stream's position is indeterminate."]
#[doc = ""]
#[doc = " @param[in] fp Open file stream"]
#[doc = " @param[out] tex citro3d texture"]
#[doc = " @param[out] texcube citro3d texcube"]
#[doc = " @param[in] vram Whether to store textures in VRAM"]
#[doc = " @returns Tex3DS texture"]
pubfnTex3DS_TextureImportStdio(
pubfnTex3DS_TextureImportStdio(
fp: *mutFILE,
fp: *mutFILE,
tex: *mutC3D_Tex,
tex: *mutC3D_Tex,
@ -1924,20 +1727,14 @@ extern "C" {
)-> Tex3DS_Texture;
)-> Tex3DS_Texture;
}
}
extern"C"{
extern"C"{
#[doc = " @brief Get number of subtextures"]
#[doc = " @brief Get number of subtextures\n @param[in] texture Tex3DS texture\n @returns Number of subtextures"]