595ea77f6b
- this implements vec2, vec3, vec4, which are float vectors of size 2, 3 and 4 respectively. the code allows easy instantiation of vectors of a different type via the tvec{2|3|4}<T> template classes. - this also implements mat4 which is a float 4x4 matrix. the tmat44<T> template class allows easy instantiation of a 4x4 matrix of a different value_type. The vector types have some minimal support for the glsl style swizzled access; for instance: vec4 u; vec3 v = u.xyz; only .x, .xy, .xyz and their .stpq / .rgba equivalent are supported. most operators are supported on both vector and matrices: arithmetic, unary, compound assignment and comparison (bit-wise operators NOT supported). - operations available on vectors include: dot, length, distance, normalize and cross - operations available on matrices include: transpose, inverse, trace - and a few utilities to create matrices: ortho, frustum, lookAt Change-Id: I64add89ae90fa78d3f2f59985b63495575378635
34 lines
778 B
Makefile
34 lines
778 B
Makefile
# Build the unit tests.
|
|
LOCAL_PATH := $(call my-dir)
|
|
include $(CLEAR_VARS)
|
|
|
|
# Build the unit tests.
|
|
test_src_files := \
|
|
Region_test.cpp \
|
|
vec_test.cpp \
|
|
mat_test.cpp
|
|
|
|
shared_libraries := \
|
|
libutils \
|
|
libui
|
|
|
|
static_libraries := \
|
|
libgtest \
|
|
libgtest_main
|
|
|
|
$(foreach file,$(test_src_files), \
|
|
$(eval include $(CLEAR_VARS)) \
|
|
$(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \
|
|
$(eval LOCAL_STATIC_LIBRARIES := $(static_libraries)) \
|
|
$(eval LOCAL_SRC_FILES := $(file)) \
|
|
$(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \
|
|
$(eval include $(BUILD_NATIVE_TEST)) \
|
|
)
|
|
|
|
# Build the unit tests.
|
|
LOCAL_PATH:= $(call my-dir)
|
|
include $(CLEAR_VARS)
|
|
|
|
# Build the manual test programs.
|
|
include $(call all-makefiles-under, $(LOCAL_PATH))
|