Projection

Represents projection transformation. It is similar to a 4x4 matrix.

struct Projection {}

Constructors

this
this(Vector4 x, Vector4 y, Vector4 z, Vector4 w)
Undocumented in source.
this
this(real_t[16] mat)
Undocumented in source.
this
this(Transform3D p_transform)
Undocumented in source.

Members

Aliases

PLANE_BOTTOM
alias PLANE_BOTTOM = Planes.bottom
Undocumented in source.
PLANE_FAR
alias PLANE_FAR = Planes.far
Undocumented in source.
PLANE_LEFT
alias PLANE_LEFT = Planes.left
Undocumented in source.
PLANE_NEAR
alias PLANE_NEAR = Planes.near
Undocumented in source.
PLANE_RIGHT
alias PLANE_RIGHT = Planes.right
Undocumented in source.
PLANE_TOP
alias PLANE_TOP = Planes.top
Undocumented in source.

Enums

Planes
enum Planes
Undocumented in source.

Functions

addJitterOffset
void addJitterOffset(Vector2 p_offset)
Undocumented in source. Be warned that the author may not have intended to support it.
adjustPerspectiveZNear
void adjustPerspectiveZNear(real_t p_new_znear)
Undocumented in source. Be warned that the author may not have intended to support it.
determinant
float determinant()
Undocumented in source. Be warned that the author may not have intended to support it.
flipY
void flipY()
Undocumented in source. Be warned that the author may not have intended to support it.
flippedY
Projection flippedY()
Undocumented in source. Be warned that the author may not have intended to support it.
getAspect
real_t getAspect()
Undocumented in source. Be warned that the author may not have intended to support it.
getEndpoints
bool getEndpoints(Transform3D p_transform, Vector3* p_8points)
Undocumented in source. Be warned that the author may not have intended to support it.
getFarPlaneHalfExtents
Vector2 getFarPlaneHalfExtents()
Undocumented in source. Be warned that the author may not have intended to support it.
getFov
real_t getFov()
Undocumented in source. Be warned that the author may not have intended to support it.
getLODMultiplier
float getLODMultiplier()
Undocumented in source. Be warned that the author may not have intended to support it.
getProjectionPlane
Plane getProjectionPlane(Planes p_plane)
Undocumented in source. Be warned that the author may not have intended to support it.
getProjectionPlanes
Array getProjectionPlanes(Transform3D p_transform)
Undocumented in source. Be warned that the author may not have intended to support it.
getViewportHalfExtents
Vector2 getViewportHalfExtents()
Undocumented in source. Be warned that the author may not have intended to support it.
getZFar
real_t getZFar()
Undocumented in source. Be warned that the author may not have intended to support it.
getZNear
real_t getZNear()
Undocumented in source. Be warned that the author may not have intended to support it.
get_pixels_per_meter
int get_pixels_per_meter(int p_for_pixel_width)
Undocumented in source. Be warned that the author may not have intended to support it.
inverse
Projection inverse()
Undocumented in source. Be warned that the author may not have intended to support it.
invert
void invert()
Undocumented in source. Be warned that the author may not have intended to support it.
isOrthogonal
bool isOrthogonal()
Undocumented in source. Be warned that the author may not have intended to support it.
jitter_offseted
Projection jitter_offseted(Vector2 p_offset)
Undocumented in source. Be warned that the author may not have intended to support it.
makeScale
void makeScale(Vector3 p_scale)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
Projection opBinary(Projection p_matrix)
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
Transform3D opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(Projection p_cam)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndex
const(Vector4) opIndex(int axis)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndex
Vector4 opIndex(int axis)
Undocumented in source. Be warned that the author may not have intended to support it.
perspective_znear_adjusted
Projection perspective_znear_adjusted(real_t p_new_znear)
Undocumented in source. Be warned that the author may not have intended to support it.
scaleTranslateToFit
void scaleTranslateToFit(AABB p_aabb)
Undocumented in source. Be warned that the author may not have intended to support it.
setDepthCorrection
void setDepthCorrection(bool p_flip_y)
Undocumented in source. Be warned that the author may not have intended to support it.
setForHMD
void setForHMD(int p_eye, real_t p_aspect, real_t p_intraocular_dist, real_t p_display_width, real_t p_display_to_lens, real_t p_oversample, real_t p_z_near, real_t p_z_far)
Undocumented in source. Be warned that the author may not have intended to support it.
setFrustum
void setFrustum(real_t p_left, real_t p_right, real_t p_bottom, real_t p_top, real_t p_near, real_t p_far)
Undocumented in source. Be warned that the author may not have intended to support it.
setFrustum
void setFrustum(real_t p_size, real_t p_aspect, Vector2 p_offset, real_t p_near, real_t p_far, bool p_flip_fov)
Undocumented in source. Be warned that the author may not have intended to support it.
setIdentity
void setIdentity()
Undocumented in source. Be warned that the author may not have intended to support it.
setLightAtlasRect
void setLightAtlasRect(Rect2 p_rect)
Undocumented in source. Be warned that the author may not have intended to support it.
setLightBias
void setLightBias()
Undocumented in source. Be warned that the author may not have intended to support it.
setOrthogonal
void setOrthogonal(real_t p_left, real_t p_right, real_t p_bottom, real_t p_top, real_t p_znear, real_t p_zfar)
Undocumented in source. Be warned that the author may not have intended to support it.
setOrthogonal
void setOrthogonal(real_t p_size, real_t p_aspect, real_t p_znear, real_t p_zfar, bool p_flip_fov)
Undocumented in source. Be warned that the author may not have intended to support it.
setPerspective
void setPerspective(real_t p_fovy_degrees, real_t p_aspect, real_t p_z_near, real_t p_z_far, bool p_flip_fov)
Undocumented in source. Be warned that the author may not have intended to support it.
setPerspective
void setPerspective(real_t p_fovy_degrees, real_t p_aspect, real_t p_z_near, real_t p_z_far, bool p_flip_fov, int p_eye, real_t p_intraocular_dist, real_t p_convergence_dist)
Undocumented in source. Be warned that the author may not have intended to support it.
setZero
void setZero()
Undocumented in source. Be warned that the author may not have intended to support it.
xform
Vector3 xform(Vector3 p_vec3)
Undocumented in source. Be warned that the author may not have intended to support it.
xform
Vector4 xform(Vector4 p_vec4)
Undocumented in source. Be warned that the author may not have intended to support it.
xform4
Plane xform4(Plane p_vec4)
Undocumented in source. Be warned that the author may not have intended to support it.
xform_inv
Vector4 xform_inv(Vector4 p_vec4)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

createDepthCorrection
Projection createDepthCorrection(bool p_flip_y)
Undocumented in source. Be warned that the author may not have intended to support it.
createFitAABB
Projection createFitAABB(AABB p_aabb)
Undocumented in source. Be warned that the author may not have intended to support it.
createForHMD
Projection createForHMD(int p_eye, real_t p_aspect, real_t p_intraocular_dist, real_t p_display_width, real_t p_display_to_lens, real_t p_oversample, real_t p_z_near, real_t p_z_far)
Undocumented in source. Be warned that the author may not have intended to support it.
createFrustum
Projection createFrustum(real_t p_left, real_t p_right, real_t p_bottom, real_t p_top, real_t p_near, real_t p_far)
Undocumented in source. Be warned that the author may not have intended to support it.
createFrustumAspect
Projection createFrustumAspect(real_t p_size, real_t p_aspect, Vector2 p_offset, real_t p_near, real_t p_far, bool p_flip_fov)
Undocumented in source. Be warned that the author may not have intended to support it.
createLightAtlasRect
Projection createLightAtlasRect(Rect2 p_rect)
Undocumented in source. Be warned that the author may not have intended to support it.
createOrthogonal
Projection createOrthogonal(real_t p_left, real_t p_right, real_t p_bottom, real_t p_top, real_t p_znear, real_t p_zfar)
Undocumented in source. Be warned that the author may not have intended to support it.
createOrthogonalAspect
Projection createOrthogonalAspect(real_t p_size, real_t p_aspect, real_t p_znear, real_t p_zfar, bool p_flip_fov)
Undocumented in source. Be warned that the author may not have intended to support it.
createPerspective
Projection createPerspective(real_t p_fovy_degrees, real_t p_aspect, real_t p_z_near, real_t p_z_far, bool p_flip_fov)
Undocumented in source. Be warned that the author may not have intended to support it.
createPerspectiveHMD
Projection createPerspectiveHMD(real_t p_fovy_degrees, real_t p_aspect, real_t p_z_near, real_t p_z_far, bool p_flip_fov, int p_eye, real_t p_intraocular_dist, real_t p_convergence_dist)
Undocumented in source. Be warned that the author may not have intended to support it.
getFovY
real_t getFovY(real_t p_fovx, real_t p_aspect)
Undocumented in source. Be warned that the author may not have intended to support it.

Unions

__anonymous
union __anonymous
Undocumented in source.

Meta