rayjs/bindings/raylib_math_api.json

1 line
20 KiB
JSON

[{"name":"Clamp","returnType":"float","params":[{"name":"value","type":"float"},{"name":"min","type":"float"},{"name":"max","type":"float"}],"description":"Clamp float value"},{"name":"Lerp","returnType":"float","params":[{"name":"start","type":"float"},{"name":"end","type":"float"},{"name":"amount","type":"float"}],"description":"Calculate linear interpolation between two floats"},{"name":"Normalize","returnType":"float","params":[{"name":"value","type":"float"},{"name":"start","type":"float"},{"name":"end","type":"float"}],"description":"Normalize input value within input range"},{"name":"Remap","returnType":"float","params":[{"name":"value","type":"float"},{"name":"inputStart","type":"float"},{"name":"inputEnd","type":"float"},{"name":"outputStart","type":"float"},{"name":"outputEnd","type":"float"}],"description":"Remap input value within input range to output range"},{"name":"Wrap","returnType":"float","params":[{"name":"value","type":"float"},{"name":"min","type":"float"},{"name":"max","type":"float"}],"description":"Wrap input value from min to max"},{"name":"FloatEquals","returnType":"int","params":[{"name":"x","type":"float"},{"name":"y","type":"float"}],"description":"Check whether two given floats are almost equal"},{"name":"Vector2Zero","returnType":"Vector2","params":[],"description":"Vector with components value 0.0f"},{"name":"Vector2One","returnType":"Vector2","params":[],"description":"Vector with components value 1.0f"},{"name":"Vector2Add","returnType":"Vector2","params":[{"name":"v1","type":"Vector2"},{"name":"v2","type":"Vector2"}],"description":"Add two vectors (v1 + v2)"},{"name":"Vector2AddValue","returnType":"Vector2","params":[{"name":"v","type":"Vector2"},{"name":"add","type":"float"}],"description":"Add vector and float value"},{"name":"Vector2Subtract","returnType":"Vector2","params":[{"name":"v1","type":"Vector2"},{"name":"v2","type":"Vector2"}],"description":"Subtract two vectors (v1 - v2)"},{"name":"Vector2SubtractValue","returnType":"Vector2","params":[{"name":"v","type":"Vector2"},{"name":"sub","type":"float"}],"description":"Subtract vector by float value"},{"name":"Vector2Length","returnType":"float","params":[{"name":"v","type":"Vector2"}],"description":"Calculate vector length"},{"name":"Vector2LengthSqr","returnType":"float","params":[{"name":"v","type":"Vector2"}],"description":"Calculate vector square length"},{"name":"Vector2DotProduct","returnType":"float","params":[{"name":"v1","type":"Vector2"},{"name":"v2","type":"Vector2"}],"description":"Calculate two vectors dot product"},{"name":"Vector2Distance","returnType":"float","params":[{"name":"v1","type":"Vector2"},{"name":"v2","type":"Vector2"}],"description":"Calculate distance between two vectors"},{"name":"Vector2DistanceSqr","returnType":"float","params":[{"name":"v1","type":"Vector2"},{"name":"v2","type":"Vector2"}],"description":"Calculate square distance between two vectors"},{"name":"Vector2Angle","returnType":"float","params":[{"name":"v1","type":"Vector2"},{"name":"v2","type":"Vector2"}],"description":"Calculate angle between two vectors\nNOTE: Angle is calculated from origin point (0, 0)"},{"name":"Vector2LineAngle","returnType":"float","params":[{"name":"start","type":"Vector2"},{"name":"end","type":"Vector2"}],"description":"Calculate angle defined by a two vectors line\nNOTE: Parameters need to be normalized\nCurrent implementation should be aligned with glm::angle"},{"name":"Vector2Scale","returnType":"Vector2","params":[{"name":"v","type":"Vector2"},{"name":"scale","type":"float"}],"description":"Scale vector (multiply by value)"},{"name":"Vector2Multiply","returnType":"Vector2","params":[{"name":"v1","type":"Vector2"},{"name":"v2","type":"Vector2"}],"description":"Multiply vector by vector"},{"name":"Vector2Negate","returnType":"Vector2","params":[{"name":"v","type":"Vector2"}],"description":"Negate vector"},{"name":"Vector2Divide","returnType":"Vector2","params":[{"name":"v1","type":"Vector2"},{"name":"v2","type":"Vector2"}],"description":"Divide vector by vector"},{"name":"Vector2Normalize","returnType":"Vector2","params":[{"name":"v","type":"Vector2"}],"description":"Normalize provided vector"},{"name":"Vector2Transform","returnType":"Vector2","params":[{"name":"v","type":"Vector2"},{"name":"mat","type":"Matrix"}],"description":"Transforms a Vector2 by a given Matrix"},{"name":"Vector2Lerp","returnType":"Vector2","params":[{"name":"v1","type":"Vector2"},{"name":"v2","type":"Vector2"},{"name":"amount","type":"float"}],"description":"Calculate linear interpolation between two vectors"},{"name":"Vector2Reflect","returnType":"Vector2","params":[{"name":"v","type":"Vector2"},{"name":"normal","type":"Vector2"}],"description":"Calculate reflected vector to normal"},{"name":"Vector2Rotate","returnType":"Vector2","params":[{"name":"v","type":"Vector2"},{"name":"angle","type":"float"}],"description":"Rotate vector by angle"},{"name":"Vector2MoveTowards","returnType":"Vector2","params":[{"name":"v","type":"Vector2"},{"name":"target","type":"Vector2"},{"name":"maxDistance","type":"float"}],"description":"Move Vector towards target"},{"name":"Vector2Invert","returnType":"Vector2","params":[{"name":"v","type":"Vector2"}],"description":"Invert the given vector"},{"name":"Vector2Clamp","returnType":"Vector2","params":[{"name":"v","type":"Vector2"},{"name":"min","type":"Vector2"},{"name":"max","type":"Vector2"}],"description":"Clamp the components of the vector between\nmin and max values specified by the given vectors"},{"name":"Vector2ClampValue","returnType":"Vector2","params":[{"name":"v","type":"Vector2"},{"name":"min","type":"float"},{"name":"max","type":"float"}],"description":"Clamp the magnitude of the vector between two min and max values"},{"name":"Vector2Equals","returnType":"int","params":[{"name":"p","type":"Vector2"},{"name":"q","type":"Vector2"}],"description":"Check whether two given vectors are almost equal"},{"name":"Vector3Zero","returnType":"Vector3","params":[],"description":"Vector with components value 0.0f"},{"name":"Vector3One","returnType":"Vector3","params":[],"description":"Vector with components value 1.0f"},{"name":"Vector3Add","returnType":"Vector3","params":[{"name":"v1","type":"Vector3"},{"name":"v2","type":"Vector3"}],"description":"Add two vectors"},{"name":"Vector3AddValue","returnType":"Vector3","params":[{"name":"v","type":"Vector3"},{"name":"add","type":"float"}],"description":"Add vector and float value"},{"name":"Vector3Subtract","returnType":"Vector3","params":[{"name":"v1","type":"Vector3"},{"name":"v2","type":"Vector3"}],"description":"Subtract two vectors"},{"name":"Vector3SubtractValue","returnType":"Vector3","params":[{"name":"v","type":"Vector3"},{"name":"sub","type":"float"}],"description":"Subtract vector by float value"},{"name":"Vector3Scale","returnType":"Vector3","params":[{"name":"v","type":"Vector3"},{"name":"scalar","type":"float"}],"description":"Multiply vector by scalar"},{"name":"Vector3Multiply","returnType":"Vector3","params":[{"name":"v1","type":"Vector3"},{"name":"v2","type":"Vector3"}],"description":"Multiply vector by vector"},{"name":"Vector3CrossProduct","returnType":"Vector3","params":[{"name":"v1","type":"Vector3"},{"name":"v2","type":"Vector3"}],"description":"Calculate two vectors cross product"},{"name":"Vector3Perpendicular","returnType":"Vector3","params":[{"name":"v","type":"Vector3"}],"description":"Calculate one vector perpendicular vector"},{"name":"Vector3Length","returnType":"float","params":[{"name":"v","type":"const Vector3"}],"description":"Calculate vector length"},{"name":"Vector3LengthSqr","returnType":"float","params":[{"name":"v","type":"const Vector3"}],"description":"Calculate vector square length"},{"name":"Vector3DotProduct","returnType":"float","params":[{"name":"v1","type":"Vector3"},{"name":"v2","type":"Vector3"}],"description":"Calculate two vectors dot product"},{"name":"Vector3Distance","returnType":"float","params":[{"name":"v1","type":"Vector3"},{"name":"v2","type":"Vector3"}],"description":"Calculate distance between two vectors"},{"name":"Vector3DistanceSqr","returnType":"float","params":[{"name":"v1","type":"Vector3"},{"name":"v2","type":"Vector3"}],"description":"Calculate square distance between two vectors"},{"name":"Vector3Angle","returnType":"float","params":[{"name":"v1","type":"Vector3"},{"name":"v2","type":"Vector3"}],"description":"Calculate angle between two vectors"},{"name":"Vector3Negate","returnType":"Vector3","params":[{"name":"v","type":"Vector3"}],"description":"Negate provided vector (invert direction)"},{"name":"Vector3Divide","returnType":"Vector3","params":[{"name":"v1","type":"Vector3"},{"name":"v2","type":"Vector3"}],"description":"Divide vector by vector"},{"name":"Vector3Normalize","returnType":"Vector3","params":[{"name":"v","type":"Vector3"}],"description":"Normalize provided vector"},{"name":"Vector3OrthoNormalize","returnType":"void","params":[{"name":"v1","type":"Vector3 *"},{"name":"v2","type":"Vector3 *"}],"description":"Orthonormalize provided vectors\nMakes vectors normalized and orthogonal to each other\nGram-Schmidt function implementation"},{"name":"Vector3Transform","returnType":"Vector3","params":[{"name":"v","type":"Vector3"},{"name":"mat","type":"Matrix"}],"description":"Transforms a Vector3 by a given Matrix"},{"name":"Vector3RotateByQuaternion","returnType":"Vector3","params":[{"name":"v","type":"Vector3"},{"name":"q","type":"Quaternion"}],"description":"Transform a vector by quaternion rotation"},{"name":"Vector3RotateByAxisAngle","returnType":"Vector3","params":[{"name":"v","type":"Vector3"},{"name":"axis","type":"Vector3"},{"name":"angle","type":"float"}],"description":"Rotates a vector around an axis"},{"name":"Vector3Lerp","returnType":"Vector3","params":[{"name":"v1","type":"Vector3"},{"name":"v2","type":"Vector3"},{"name":"amount","type":"float"}],"description":"Calculate linear interpolation between two vectors"},{"name":"Vector3Reflect","returnType":"Vector3","params":[{"name":"v","type":"Vector3"},{"name":"normal","type":"Vector3"}],"description":"Calculate reflected vector to normal"},{"name":"Vector3Min","returnType":"Vector3","params":[{"name":"v1","type":"Vector3"},{"name":"v2","type":"Vector3"}],"description":"Get min value for each pair of components"},{"name":"Vector3Max","returnType":"Vector3","params":[{"name":"v1","type":"Vector3"},{"name":"v2","type":"Vector3"}],"description":"Get max value for each pair of components"},{"name":"Vector3Barycenter","returnType":"Vector3","params":[{"name":"p","type":"Vector3"},{"name":"a","type":"Vector3"},{"name":"b","type":"Vector3"},{"name":"c","type":"Vector3"}],"description":"Compute barycenter coordinates (u, v, w) for point p with respect to triangle (a, b, c)\nNOTE: Assumes P is on the plane of the triangle"},{"name":"Vector3Unproject","returnType":"Vector3","params":[{"name":"source","type":"Vector3"},{"name":"projection","type":"Matrix"},{"name":"view","type":"Matrix"}],"description":"Projects a Vector3 from screen space into object space\nNOTE: We are avoiding calling other raymath functions despite available"},{"name":"Vector3ToFloatV","returnType":"float3","params":[{"name":"v","type":"Vector3"}],"description":"Get Vector3 as float array"},{"name":"Vector3Invert","returnType":"Vector3","params":[{"name":"v","type":"Vector3"}],"description":"Invert the given vector"},{"name":"Vector3Clamp","returnType":"Vector3","params":[{"name":"v","type":"Vector3"},{"name":"min","type":"Vector3"},{"name":"max","type":"Vector3"}],"description":"Clamp the components of the vector between\nmin and max values specified by the given vectors"},{"name":"Vector3ClampValue","returnType":"Vector3","params":[{"name":"v","type":"Vector3"},{"name":"min","type":"float"},{"name":"max","type":"float"}],"description":"Clamp the magnitude of the vector between two values"},{"name":"Vector3Equals","returnType":"int","params":[{"name":"p","type":"Vector3"},{"name":"q","type":"Vector3"}],"description":"Check whether two given vectors are almost equal"},{"name":"Vector3Refract","returnType":"Vector3","params":[{"name":"v","type":"Vector3"},{"name":"n","type":"Vector3"},{"name":"r","type":"float"}],"description":"Compute the direction of a refracted ray where v specifies the\nnormalized direction of the incoming ray, n specifies the\nnormalized normal vector of the interface of two optical media,\nand r specifies the ratio of the refractive index of the medium\nfrom where the ray comes to the refractive index of the medium\non the other side of the surface"},{"name":"MatrixDeterminant","returnType":"float","params":[{"name":"mat","type":"Matrix"}],"description":"Compute matrix determinant"},{"name":"MatrixTrace","returnType":"float","params":[{"name":"mat","type":"Matrix"}],"description":"Get the trace of the matrix (sum of the values along the diagonal)"},{"name":"MatrixTranspose","returnType":"Matrix","params":[{"name":"mat","type":"Matrix"}],"description":"Transposes provided matrix"},{"name":"MatrixInvert","returnType":"Matrix","params":[{"name":"mat","type":"Matrix"}],"description":"Invert provided matrix"},{"name":"MatrixIdentity","returnType":"Matrix","params":[],"description":"Get identity matrix"},{"name":"MatrixAdd","returnType":"Matrix","params":[{"name":"left","type":"Matrix"},{"name":"right","type":"Matrix"}],"description":"Add two matrices"},{"name":"MatrixSubtract","returnType":"Matrix","params":[{"name":"left","type":"Matrix"},{"name":"right","type":"Matrix"}],"description":"Subtract two matrices (left - right)"},{"name":"MatrixMultiply","returnType":"Matrix","params":[{"name":"left","type":"Matrix"},{"name":"right","type":"Matrix"}],"description":"Get two matrix multiplication\nNOTE: When multiplying matrices... the order matters!"},{"name":"MatrixTranslate","returnType":"Matrix","params":[{"name":"x","type":"float"},{"name":"y","type":"float"},{"name":"z","type":"float"}],"description":"Get translation matrix"},{"name":"MatrixRotate","returnType":"Matrix","params":[{"name":"axis","type":"Vector3"},{"name":"angle","type":"float"}],"description":"Create rotation matrix from axis and angle\nNOTE: Angle should be provided in radians"},{"name":"MatrixRotateX","returnType":"Matrix","params":[{"name":"angle","type":"float"}],"description":"Get x-rotation matrix\nNOTE: Angle must be provided in radians"},{"name":"MatrixRotateY","returnType":"Matrix","params":[{"name":"angle","type":"float"}],"description":"Get y-rotation matrix\nNOTE: Angle must be provided in radians"},{"name":"MatrixRotateZ","returnType":"Matrix","params":[{"name":"angle","type":"float"}],"description":"Get z-rotation matrix\nNOTE: Angle must be provided in radians"},{"name":"MatrixRotateXYZ","returnType":"Matrix","params":[{"name":"angle","type":"Vector3"}],"description":"Get xyz-rotation matrix\nNOTE: Angle must be provided in radians"},{"name":"MatrixRotateZYX","returnType":"Matrix","params":[{"name":"angle","type":"Vector3"}],"description":"Get zyx-rotation matrix\nNOTE: Angle must be provided in radians"},{"name":"MatrixScale","returnType":"Matrix","params":[{"name":"x","type":"float"},{"name":"y","type":"float"},{"name":"z","type":"float"}],"description":"Get scaling matrix"},{"name":"MatrixFrustum","returnType":"Matrix","params":[{"name":"left","type":"double"},{"name":"right","type":"double"},{"name":"bottom","type":"double"},{"name":"top","type":"double"},{"name":"near","type":"double"},{"name":"far","type":"double"}],"description":"Get perspective projection matrix"},{"name":"MatrixPerspective","returnType":"Matrix","params":[{"name":"fovy","type":"double"},{"name":"aspect","type":"double"},{"name":"near","type":"double"},{"name":"far","type":"double"}],"description":"Get perspective projection matrix\nNOTE: Fovy angle must be provided in radians"},{"name":"MatrixOrtho","returnType":"Matrix","params":[{"name":"left","type":"double"},{"name":"right","type":"double"},{"name":"bottom","type":"double"},{"name":"top","type":"double"},{"name":"near","type":"double"},{"name":"far","type":"double"}],"description":"Get orthographic projection matrix"},{"name":"MatrixLookAt","returnType":"Matrix","params":[{"name":"eye","type":"Vector3"},{"name":"target","type":"Vector3"},{"name":"up","type":"Vector3"}],"description":"Get camera look-at matrix (view matrix)"},{"name":"MatrixToFloatV","returnType":"float16","params":[{"name":"mat","type":"Matrix"}],"description":"Get float array of matrix data"},{"name":"QuaternionAdd","returnType":"Quaternion","params":[{"name":"q1","type":"Quaternion"},{"name":"q2","type":"Quaternion"}],"description":"Add two quaternions"},{"name":"QuaternionAddValue","returnType":"Quaternion","params":[{"name":"q","type":"Quaternion"},{"name":"add","type":"float"}],"description":"Add quaternion and float value"},{"name":"QuaternionSubtract","returnType":"Quaternion","params":[{"name":"q1","type":"Quaternion"},{"name":"q2","type":"Quaternion"}],"description":"Subtract two quaternions"},{"name":"QuaternionSubtractValue","returnType":"Quaternion","params":[{"name":"q","type":"Quaternion"},{"name":"sub","type":"float"}],"description":"Subtract quaternion and float value"},{"name":"QuaternionIdentity","returnType":"Quaternion","params":[],"description":"Get identity quaternion"},{"name":"QuaternionLength","returnType":"float","params":[{"name":"q","type":"Quaternion"}],"description":"Computes the length of a quaternion"},{"name":"QuaternionNormalize","returnType":"Quaternion","params":[{"name":"q","type":"Quaternion"}],"description":"Normalize provided quaternion"},{"name":"QuaternionInvert","returnType":"Quaternion","params":[{"name":"q","type":"Quaternion"}],"description":"Invert provided quaternion"},{"name":"QuaternionMultiply","returnType":"Quaternion","params":[{"name":"q1","type":"Quaternion"},{"name":"q2","type":"Quaternion"}],"description":"Calculate two quaternion multiplication"},{"name":"QuaternionScale","returnType":"Quaternion","params":[{"name":"q","type":"Quaternion"},{"name":"mul","type":"float"}],"description":"Scale quaternion by float value"},{"name":"QuaternionDivide","returnType":"Quaternion","params":[{"name":"q1","type":"Quaternion"},{"name":"q2","type":"Quaternion"}],"description":"Divide two quaternions"},{"name":"QuaternionLerp","returnType":"Quaternion","params":[{"name":"q1","type":"Quaternion"},{"name":"q2","type":"Quaternion"},{"name":"amount","type":"float"}],"description":"Calculate linear interpolation between two quaternions"},{"name":"QuaternionNlerp","returnType":"Quaternion","params":[{"name":"q1","type":"Quaternion"},{"name":"q2","type":"Quaternion"},{"name":"amount","type":"float"}],"description":"Calculate slerp-optimized interpolation between two quaternions"},{"name":"QuaternionSlerp","returnType":"Quaternion","params":[{"name":"q1","type":"Quaternion"},{"name":"q2","type":"Quaternion"},{"name":"amount","type":"float"}],"description":"Calculates spherical linear interpolation between two quaternions"},{"name":"QuaternionFromVector3ToVector3","returnType":"Quaternion","params":[{"name":"from","type":"Vector3"},{"name":"to","type":"Vector3"}],"description":"Calculate quaternion based on the rotation from one vector to another"},{"name":"QuaternionFromMatrix","returnType":"Quaternion","params":[{"name":"mat","type":"Matrix"}],"description":"Get a quaternion for a given rotation matrix"},{"name":"QuaternionToMatrix","returnType":"Matrix","params":[{"name":"q","type":"Quaternion"}],"description":"Get a matrix for a given quaternion"},{"name":"QuaternionFromAxisAngle","returnType":"Quaternion","params":[{"name":"axis","type":"Vector3"},{"name":"angle","type":"float"}],"description":"Get rotation quaternion for an angle and axis\nNOTE: Angle must be provided in radians"},{"name":"QuaternionToAxisAngle","returnType":"void","params":[{"name":"q","type":"Quaternion"},{"name":"outAxis","type":"Vector3 *"},{"name":"outAngle","type":"float *"}],"description":"Get the rotation angle and axis for a given quaternion"},{"name":"QuaternionFromEuler","returnType":"Quaternion","params":[{"name":"pitch","type":"float"},{"name":"yaw","type":"float"},{"name":"roll","type":"float"}],"description":"Get the quaternion equivalent to Euler angles\nNOTE: Rotation order is ZYX"},{"name":"QuaternionToEuler","returnType":"Vector3","params":[{"name":"q","type":"Quaternion"}],"description":"Get the Euler angles equivalent to quaternion (roll, pitch, yaw)\nNOTE: Angles are returned in a Vector3 struct in radians"},{"name":"QuaternionTransform","returnType":"Quaternion","params":[{"name":"q","type":"Quaternion"},{"name":"mat","type":"Matrix"}],"description":"Transform a quaternion given a transformation matrix"},{"name":"QuaternionEquals","returnType":"int","params":[{"name":"p","type":"Quaternion"},{"name":"q","type":"Quaternion"}],"description":"Check whether two given quaternions are almost equal"}]