1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- /*
- * 3D Engine
- * vector.h:
- * Based on pikuma.com 3D software renderer in C
- * Copyright (c) 2021 986-Studio. All rights reserved.
- *
- * Created by Manoël Trapier on 02/03/2021.
- */
- #ifndef THREEDENGINE_SOURCE_INCLUDE_VECTOR_H
- #define THREEDENGINE_SOURCE_INCLUDE_VECTOR_H
- /***********************************************************************************************************************
- * Data types
- **********************************************************************************************************************/
- typedef struct vec2_t
- {
- double x, y;
- } vec2_t;
- typedef struct vec3_t
- {
- double x, y, z;
- } vec3_t;
- typedef struct vec4_t
- {
- double x, y, z, w;
- } vec4_t;
- /***********************************************************************************************************************
- * Prototypes
- **********************************************************************************************************************/
- /* ---------------------------------------------- 2D Vectors operations --------------------------------------------- */
- /* ---------------------------------------------- 3D Vectors operations --------------------------------------------- */
- vec3_t vec3RotateX(vec3_t original, double angle);
- vec3_t vec3RotateY(vec3_t original, double angle);
- vec3_t vec3RotateZ(vec3_t original, double angle);
- #endif /* THREEDENGINE_SOURCE_VECTOR_H */
|