rs_matrix.rsh
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2011 The Android Open Source Project
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *      http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00023 #ifndef __RS_MATRIX_RSH__
00024 #define __RS_MATRIX_RSH__
00025 
00036 _RS_RUNTIME void __attribute__((overloadable))
00037 rsMatrixSet(rs_matrix4x4 *m, uint32_t row, uint32_t col, float v);
00041 _RS_RUNTIME void __attribute__((overloadable))
00042 rsMatrixSet(rs_matrix3x3 *m, uint32_t row, uint32_t col, float v);
00046 _RS_RUNTIME void __attribute__((overloadable))
00047 rsMatrixSet(rs_matrix2x2 *m, uint32_t row, uint32_t col, float v);
00048 
00058 _RS_RUNTIME float __attribute__((overloadable))
00059 rsMatrixGet(const rs_matrix4x4 *m, uint32_t row, uint32_t col);
00063 _RS_RUNTIME float __attribute__((overloadable))
00064 rsMatrixGet(const rs_matrix3x3 *m, uint32_t row, uint32_t col);
00068 _RS_RUNTIME float __attribute__((overloadable))
00069 rsMatrixGet(const rs_matrix2x2 *m, uint32_t row, uint32_t col);
00070 
00076 extern void __attribute__((overloadable)) rsMatrixLoadIdentity(rs_matrix4x4 *m);
00080 extern void __attribute__((overloadable)) rsMatrixLoadIdentity(rs_matrix3x3 *m);
00084 extern void __attribute__((overloadable)) rsMatrixLoadIdentity(rs_matrix2x2 *m);
00085 
00091 extern void __attribute__((overloadable)) rsMatrixLoad(rs_matrix4x4 *m, const float *v);
00095 extern void __attribute__((overloadable)) rsMatrixLoad(rs_matrix3x3 *m, const float *v);
00099 extern void __attribute__((overloadable)) rsMatrixLoad(rs_matrix2x2 *m, const float *v);
00103 extern void __attribute__((overloadable)) rsMatrixLoad(rs_matrix4x4 *m, const rs_matrix4x4 *v);
00107 extern void __attribute__((overloadable)) rsMatrixLoad(rs_matrix4x4 *m, const rs_matrix3x3 *v);
00108 
00114 extern void __attribute__((overloadable)) rsMatrixLoad(rs_matrix4x4 *m, const rs_matrix2x2 *v);
00118 extern void __attribute__((overloadable)) rsMatrixLoad(rs_matrix3x3 *m, const rs_matrix3x3 *v);
00122 extern void __attribute__((overloadable)) rsMatrixLoad(rs_matrix2x2 *m, const rs_matrix2x2 *v);
00123 
00133 extern void __attribute__((overloadable))
00134 rsMatrixLoadRotate(rs_matrix4x4 *m, float rot, float x, float y, float z);
00135 
00144 extern void __attribute__((overloadable))
00145 rsMatrixLoadScale(rs_matrix4x4 *m, float x, float y, float z);
00146 
00155 extern void __attribute__((overloadable))
00156 rsMatrixLoadTranslate(rs_matrix4x4 *m, float x, float y, float z);
00157 
00165 extern void __attribute__((overloadable))
00166 rsMatrixLoadMultiply(rs_matrix4x4 *m, const rs_matrix4x4 *lhs, const rs_matrix4x4 *rhs);
00170 extern void __attribute__((overloadable))
00171 rsMatrixLoadMultiply(rs_matrix3x3 *m, const rs_matrix3x3 *lhs, const rs_matrix3x3 *rhs);
00175 extern void __attribute__((overloadable))
00176 rsMatrixLoadMultiply(rs_matrix2x2 *m, const rs_matrix2x2 *lhs, const rs_matrix2x2 *rhs);
00177 
00184 extern void __attribute__((overloadable))
00185 rsMatrixMultiply(rs_matrix4x4 *m, const rs_matrix4x4 *rhs);
00189 extern void __attribute__((overloadable))
00190 rsMatrixMultiply(rs_matrix3x3 *m, const rs_matrix3x3 *rhs);
00194 extern void __attribute__((overloadable))
00195 rsMatrixMultiply(rs_matrix2x2 *m, const rs_matrix2x2 *rhs);
00196 
00206 extern void __attribute__((overloadable))
00207 rsMatrixRotate(rs_matrix4x4 *m, float rot, float x, float y, float z);
00208 
00217 extern void __attribute__((overloadable))
00218 rsMatrixScale(rs_matrix4x4 *m, float x, float y, float z);
00219 
00228 extern void __attribute__((overloadable))
00229 rsMatrixTranslate(rs_matrix4x4 *m, float x, float y, float z);
00230 
00242 extern void __attribute__((overloadable))
00243 rsMatrixLoadOrtho(rs_matrix4x4 *m, float left, float right, float bottom, float top, float near, float far);
00244 
00256 extern void __attribute__((overloadable))
00257 rsMatrixLoadFrustum(rs_matrix4x4 *m, float left, float right, float bottom, float top, float near, float far);
00258 
00268 extern void __attribute__((overloadable))
00269 rsMatrixLoadPerspective(rs_matrix4x4* m, float fovy, float aspect, float near, float far);
00270 
00271 #if !defined(RS_VERSION) || (RS_VERSION < 14)
00272 
00276 _RS_RUNTIME float4 __attribute__((overloadable))
00277 rsMatrixMultiply(rs_matrix4x4 *m, float4 in);
00278 
00282 _RS_RUNTIME float4 __attribute__((overloadable))
00283 rsMatrixMultiply(rs_matrix4x4 *m, float3 in);
00284 
00288 _RS_RUNTIME float4 __attribute__((overloadable))
00289 rsMatrixMultiply(rs_matrix4x4 *m, float2 in);
00290 
00294 _RS_RUNTIME float3 __attribute__((overloadable))
00295 rsMatrixMultiply(rs_matrix3x3 *m, float3 in);
00296 
00300 _RS_RUNTIME float3 __attribute__((overloadable))
00301 rsMatrixMultiply(rs_matrix3x3 *m, float2 in);
00302 
00306 _RS_RUNTIME float2 __attribute__((overloadable))
00307 rsMatrixMultiply(rs_matrix2x2 *m, float2 in);
00308 #else
00309 
00313 _RS_RUNTIME float4 __attribute__((overloadable))
00314 rsMatrixMultiply(const rs_matrix4x4 *m, float4 in);
00315 
00319 _RS_RUNTIME float4 __attribute__((overloadable))
00320 rsMatrixMultiply(const rs_matrix4x4 *m, float3 in);
00321 
00325 _RS_RUNTIME float4 __attribute__((overloadable))
00326 rsMatrixMultiply(const rs_matrix4x4 *m, float2 in);
00327 
00331 _RS_RUNTIME float3 __attribute__((overloadable))
00332 rsMatrixMultiply(const rs_matrix3x3 *m, float3 in);
00333 
00337 _RS_RUNTIME float3 __attribute__((overloadable))
00338 rsMatrixMultiply(const rs_matrix3x3 *m, float2 in);
00339 
00343 _RS_RUNTIME float2 __attribute__((overloadable))
00344 rsMatrixMultiply(const rs_matrix2x2 *m, float2 in);
00345 #endif
00346 
00347 
00353 extern bool __attribute__((overloadable)) rsMatrixInverse(rs_matrix4x4 *m);
00354 
00360 extern bool __attribute__((overloadable)) rsMatrixInverseTranspose(rs_matrix4x4 *m);
00361 
00367 extern void __attribute__((overloadable)) rsMatrixTranspose(rs_matrix4x4 *m);
00371 extern void __attribute__((overloadable)) rsMatrixTranspose(rs_matrix3x3 *m);
00375 extern void __attribute__((overloadable)) rsMatrixTranspose(rs_matrix2x2 *m);
00376 
00377 
00378 #endif
No examples for this method.
Frequently called with: [Clear]
Portions of this page are reproduced from work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. The original page is available here.