{{ message }}

Instantly share code, notes, and snippets.

🇷🇺

# Maxim Timakov max-dark

🇷🇺
Last active Jul 11, 2021
Simatic MC7 code
View mc7.md
Last active Apr 5, 2021
Simple Quaternions
View raw_quat.cpp
 #include #include using std::cout; typedef struct quat_t { double w, x, y, z; } quat, quaternion; typedef struct euler_t {
Created Jun 6, 2013
View Quaternion Cpp
 #include "Quaternion.h" #include // http://content.gpwiki.org/index.php/OpenGL:Tutorials:Using_Quaternions_to_represent_rotation // http://www.flipcode.com/documents/matrfaq.html // http://db-in.com/blog/2011/04/cameras-on-opengl-es-2-x/ // http://wiki.beyondunreal.com/Legacy:Quaternion // http://clb.demon.fi/MathGeoLib/docs/float3x3.cpp_code.html#612 // http://clb.demon.fi/MathGeoLib/docs/Quat_summary.php // http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm
Created Jun 6, 2013
View Vector Cpp
 #include "Vector.h" #include const Vector Vector::zero(0.0f, 0.0f, 0.0f); const Vector Vector::one(1.0f, 1.0f, 1.0f); const Vector Vector::forward(0.0f, 0.0f, 1.0f); const Vector Vector::up(0.0f, 1.0f, 0.0f); const Vector Vector::right(1.0f, 0.0f, 0.0f); Vector::Vector(float X, float Y, float Z) : x(X), y(Y), z(Z), w(0.0f) {}
Created Jun 6, 2013
View Matrix Cpp
 #include "Matrix.h" #include #include #define MATRIXELEMENT(mat, row, col) mat[row * 4 + col] const Matrix Matrix::zero; const Matrix Matrix::identity(1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f ); Matrix::Matrix() {
Created Apr 17, 2012
Wrapping C++ classes with Lua
View Makefile
 LUAHOME = \$(HOME)/Work/lunum/lua-5.2.0 CFLAGS = -Wall default : luawrap luawrap : luawrap.cpp \$(CXX) \$(CFLAGS) -o \$@ \$^ -L\$(LUAHOME)/lib -I\$(LUAHOME)/include -llua clean :