D3dx9 library functions

Source: Internet
Author: User
Tags natural logarithm

In the past few days, I have referred to the d3dx9 library function compiled by Mr. da Po () on csdn. I have done some mechanical work. Even Chinese New Year's training and typing. The following is a simple function version of my d3dx9 library, which will be archived for backup in addition to msdn:

D3dxcolor * d3dxcoloradd // combination of two colors
D3dxcolor * winapi d3dxcoloradjustcontrast (// adjust the color contrast
D3dxcolor * pout,
Const d3dxcolor * PC,
Float C
);
D3dxcolor * winapi d3dxcoloradjustsaturation (// adjust the color saturation
D3dxcolor * pout,
Const d3dxcolor * PC,
Float s
);
D3dxcolor * d3dxcolorlerp // two colors linear interpolation to create a color
D3dxcolor * d3dxcolormodulate // mix two colors
D3dxcolor * d3dxcolorscale // scales up or down the color value proportionally.
D3dxcolor * d3dxcolornegative // create a cold color value for the color.
D3dxcolor * d3dxcolorsubtract // subtract two colors
Hresult winapi d3dxcreatematrixstack // create an id3dxmarixstack instance
Float * winapi d3dxfresnelterm // calculate the freell Coefficient
Float * winapi d3dxfloat16to32array // convert the 16-bit float array to 32-bit
D3dxfloat16 * winapi d3dxfloat32to16array // convert the 32-bit float array to 16-bit
D3dxmatrix * winapi d3dxmatrixaffinetrandformation (// create a radiation Transformation Matrix
D3dxmatrix * pout,
Float scaling,
Const d3dxquaternion * protation,
Const d3dxvector3 * ptranslation
);
D3dxmatrix * d3dxmatrixaffinrtransformation2d // create a radiation transformation matrix on the plane
Hresult winapi d3dxmatrixdecompose // break down a 3D transformation matrix into a scaling factor, rotating component, and moving vector
Float winapi d3dxmatrixdeterminant // calculates the matrix determine value
D3dxmatrix * d3dxmatrixidentity // create the Unit Matrix
D3dxmatrix * d3dxmatrixinverse // calculate the inverse matrix
Bool d3dxmatrixisidentity // determines the unit matrix.
D3dxmatrix * winapi d3dxmatrixlookatlh // create a left-hand system observation matrix
D3dxmatrix * winapi d3dxmatrixlookatrh // create a right-hand observation matrix
D3dxmatrix * winapi d3dxmatrixmultiply // multiply two matrices
D3dxmatrix * winapi d3dxmatrixmultiplytranspose // transpose of Matrix Product
D3dxmatrix * winapi d3dxmatrixortholh // create a left-hand orthogonal projection matrix
D3dxmatrix * winapi d3dxmatrixorthorh // create a right-hand orthogonal projection matrix
D3dxmatrix * winapi d3dxmatrixorthooffcenterlh // create a customized left-hand orthogonal projection matrix
D3dxmatrix * winapi d3dxmatrixorthooffcenterrh // create a user-defined right-hand orthogonal projection matrix
D3dxmatrix * winapi d3dxmatrixperspectiveforlh // create the left-hand projection Coordinate System
D3dxmatrix * winapi d3dxmatrixperspectiveforrh // create the right-hand projection Coordinate System
D3dxmatrix * winapi d3dxmatrixrotationaxis // create a rotation matrix around any axis
D3dxmatrix * winapi d3dxmatrixrotationquaternion // create a rotation matrix
D3dxmatrix * winapi d3dxmatrixrotationx // rotate the matrix around the X axis
D3dxmatrix * winapi d3dxmatrixrotationy // rotate the matrix around the Y axis
D3dxmatrix * winapi d3dxmatrixrotationz // rotate the matrix around the Z axis
D3dxmatrix * winapi d3dxmatrixrotationyawpitchroll // rotate the matrix around the XYZ Angle
D3dxmatrix * winapi d3dxmatrixscaling // scale along XYZ Matrix
D3dxmatrix * winapi d3dxmatrixshadow // create a plane shadow Matrix
D3dxmatrix * winapi d3dxmatrixtransformation // create a transformation matrix
D3dxmatrix * winapi d3dxmatrixtransformation2d // create a plane Transformation Matrix
D3dxmatrix * winapi d3dxmatrixtranspose // transpose a Matrix
Float d3dxplanedot // point multiplication of the plane equation and 4d Vector
Float d3dxplanedotcoord // point multiplication between a plane and a 3D vector, W = 1
Float d3dxplanedotnormal // point multiplication of the plane and 3D vector, W = 0
D3dxplane * winapi d3dxplanefrompointnormal // method to create a plane
D3dxplane * winapi d3dxplanefrompoints // create a plane at three points
D3dxvector3 * winapi d3dxplaneintersectline // locate the point of intersection in a straight line plane
D3dxplane * winapi d3dxplanenormalize // normalize the plane equation coefficient for unit normal
D3dxplane * d3dxplanescale // scale the plane
D3dxplane * winapi d3dxplanetransform // matrix transpose plane
D3dxplane * winapi d3dxplanetransformarray // use a transform matrix to transform a Plane Array
D3dxquaternion * winapi d3dxquaternionbarycentric // the center of gravity of the three quadrants
D3dxquaternion * d3dxquaternionconjugate // evaluate the bounded Element
Float d3dxquaterniondot // quartzian point Multiplication
D3dxquaternion * winapi d3dxquaternionexp // Quaternary Index
D3dxquaternion * winapi d3dxquaternioninverse // undergo a bounded transformation and normalize the Quaternary element.
D3dxquaternion * d3dxquaternionidentity // unit: Quaternary
Bool d3dxquaternionisidentity // you can specify the unit of the sensor.
Float d3dxquaternionlength // returns the length of the Quaternary element.
Float d3dxquaternionlengthsq // returns the square of the length of the Quaternary element.
D3dxquaternion * winapi d3dxquaternionln // calculate the natural logarithm
D3dxquaternion * winapi d3dxquaternionmultiply // multiply the two semicolons
D3dxquaternion * winapi d3dxquaternionnormalize // a four-dimensional array
D3dxquaternion * winapi d3dxquaternionrotationaxis // rotate the Quaternary element around the axis
D3dxquaternion * winapi d3dxquaternionrotationmatrix // create a quaternary Matrix
D3dxquaternion * winapi d3dxquaternionrotationyawpitchroll // created by rotating around XYZ
D3dxquaternion * winapi d3dxquaternionslerp // two quaternary spherical Interpolation
D3dxquaternion * winapi d3dxquaternionsquad // you can insert a four-dimensional element into the spherical quadrilateral.
Void winapi d3dxquaternionsquadsetup // create a control point for spherical quadrilateral Interpolation
Void winapi d3dxquaterniontoaxisangle // The vector rotates around its own rotation angle to calculate the Quaternary element.
Float * winapi d3dxshadd // sum of Spherical Harmonic Function Vectors
D3dxvector2 * d3dxvec2add // 2D Vector Addition
D3dxvector * winapi d3dxvec2barycentric // center of gravity of the Three flat Vectors
D3dxvector2 * winapi d3dxvec2catmullrom // Catmull-Rom interpolation calculation, 2D
Float d3dxvec2ccw // Z component of 2D vector cross Multiplication
Float d3dxvec2dot // 2D vector dot Multiplication
D3dxvector2 * winapi d3dxvec2hermite // Hermite Spline Interpolation
Float d3dxvec2length // 2D vector Length
Float d3dxvec2lengthsq // 2D vector length square
D3dxvector2 * d3dxvec2lerp // 2D vector long linear interpolation
D3dxvector2 * d3dxvec2maximize // consists of the largest component in two 2D vectors.
D3dxvector2 * d3dxvec2minimize // consists of the minimum components in two 2D vectors.
D3dxvector2 * winapi d3dxvec2normalize // normalized 2D Vector
D3dxvector2 * d3dxvec2scale // scales 2D vectors.
D3dxvector2 * d3dxsubtract // 2D vector Subtraction
D3dxvector2 * winapi d3dxvec2transform // matrix to transform 2D Vectors
D3dxvector2 * winapi d3dxvec2transformarray // use a matrix to transform the Array

D3dxvector2 * winapi d3dxvec2transformcoord // matrix transformation 2D vector W = 1
D3dxvector2 * winapi d3dxvec2transformcoordarray // Matrix Transform A set of vectors (X, Y)
D3dxvector2 * winapi d3dxvec2transformnormal // matrix transformation 2D vector General Component
D3dxvector2 * winapi d3dxvec2transformnormalarray // matrix transformation vector (X, Y, 0, 0)

D3dxvector3 * d3dxvec3add // 3D vector addition
D3dxvector3 * winapi d3dxvec3barycentric // coordinates of the center of gravity of the three 3D Vectors
D3dxvector3 * winapi d3dxvec3catmullrom // 3D vector catmullrom Interpolation
D3dxvector3 * d3dxvec3cross // 3D vector crossover
Float d3dxvec3dot // 3D vector dot Multiplication
D3dxvector3 * winapi d3dxvec3hermite // 3D vector Hermite Spline Interpolation
Float d3dxvec3length // 3D vector Length
Float d3dxvec3lengthsq // 3D vector length square
D3dxvector3 * d3dxvec3maximize // consists of the largest component in two 3D vectors.
D3dxvector3 * d3dxvec3minimize // consists of the minimum components of two 3D vectors.
D3dxvector3 * d3dxvec3lerp // 3D vector linear interpolation
D3dxvector3 * winapi d3dxvec3normalize // normalize 3D Vectors
D3dxvector3 * winapi d3dxvec3project // The object vector is projected from the space to the screen.
D3dxvector3 * d3dxvec3scale // scale the 3D vector
D3dxvector3 * d3dxvec3subtract // 3D vector Subtraction
D3dxvector4 * winapi d3dxvec3transform // The Matrix transforms the vector, W = 1
D3dxvector4 * winapi d3dxvec3transformarray // The Matrix transforms the Vector Array.
D3dxvector3 * winapi d3dxvec3transformcoord // projection result of matrix transformation 3D vector merging W to 1
D3dxvector3 * winapi d3dxvec3transformcoordarray // returns the result of converting a 3D Vector Array with W 1
D3dxvector3 * winapi d3dxvec3transformnormal // Matrix Transform vector standard formula, W = 0
D3dxvector3 * winapi d3dxvec3transformnormalarray // standard matrix conversion Vector Array, W = 0


D3dxvector4 * d3dxvec4add // Add two 4D Vectors
D3dxvector3 * winapi d3dxvec3unproject // The vector is projected from the screen to the object.
D3dxvector3 * winapi d3dxvec3unprojectarray // Vector Array projected from screen to object
D3dxvector4 * winapi d3dxvec4catmullrom // 4D vector catmullrom Interpolation
D3dxvector4 * winapi d3dxvec4barycentric // the center of gravity of the triangle composed of 4D Vectors
D3dxvector4 * winapi d3dxvec4cross // 4D vector crossover
D3dxvector4 * winapi d3dxvec4dot // 4D vector dot Multiplication

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.