GameApi 28
Library used by GameApi Builder tool
Loading...
Searching...
No Matches
VectorTools.cc File Reference
#include "VectorTools.hh"
#include "Graph.hh"
#include <cmath>
#include <iostream>
#include <ostream>
#include <algorithm>
#include <vector>
Include dependency graph for VectorTools.cc:

Classes

struct  Mat2

Functions

std::ostream & operator<< (std::ostream &o, const Point &p)
std::istream & operator>> (std::istream &i, Point &p)
std::ostream & operator<< (std::ostream &o, const Point2d &p)
std::istream & operator>> (std::istream &i, Point2d &p)
std::ostream & operator<< (std::ostream &o, const Vector &v)
std::istream & operator>> (std::istream &i, Vector &v)
std::ostream & operator<< (std::ostream &o, const Matrix &m)
float Dist (const Point &a, const Point &b)
Point operator+ (const Point &p, const Vector &v)
Point operator- (const Point &p, const Vector &v)
Point operator* (const Point &p, const Matrix &m)
Vector operator* (const Vector &v, const Matrix &m)
Matrix operator+ (const Matrix &m1, const Matrix &m2)
void mul2 (const float A[4], const float B[4], float C[4])
void add2 (const float A[4], const float B[4], float C[4])
void sub2 (const float A[4], const float B[4], float C[4])
void getBlock2 (const float M[16], int r, int c, float B[4])
void setBlock2 (float M[16], int r, int c, const float B[4])
void mat4_strassen (const float A[16], const float B[16], float C[16])
void mat4_mul (const float A[16], const float B[16], float C[16])
Matrix operator* (const Matrix &m1, const Matrix &m2)
std::ostream & operator<< (std::ostream &o, const Mat2 &m)
float cs (float x, float m)
Quarternion operator+ (const Quarternion &a, const Quarternion &b)
Quarternion operator* (const Quarternion &a, float x)
Point UnitCube (Point p, Point pos, Vector u_x, Vector u_y, Vector u_z)
Point UnitToCube (Point p, Point pos, Vector u_x, Vector u_y, Vector u_z)
Point UnitToFlex (Point p, Point bTL, Point bTR, Point bBL, Point bBR, Point fTL, Point fTR, Point fBL, Point fBR)
Point Projection (Point2d p1, Point2d p2, Point corner, Vector u_x, Vector u_y, Vector u_z)
float det2 (float *arr)
float det3 (float *arr)
float det4 (float *arr)
FlexibleCube box (Point p1, float sx, float sy, float sz)
float det_2 (float x1, float x2, float x3, float x4)
bool LineLineIntersection_Parallel (Point2d l1_p1, Point2d l1_p2, Point2d l2_p1, Point2d l2_p2)
Point2d LineLineIntersection (Point2d l1_p1, Point2d l1_p2, Point2d l2_p1, Point2d l2_p2)
bool IsWithInBoundingBox (Point2d p, Point2d top_left, Point2d bottom_right)
Line PlanePlaneIntersection (const Plane &p1, const Plane &p2)

Function Documentation

◆ add2()

void add2 ( const float A[4],
const float B[4],
float C[4] )
inline
Here is the caller graph for this function:

◆ box()

FlexibleCube box ( Point p1,
float sx,
float sy,
float sz )
Here is the caller graph for this function:

◆ cs()

float cs ( float x,
float m )
Here is the caller graph for this function:

◆ det2()

float det2 ( float * arr)

◆ det3()

float det3 ( float * arr)
Here is the caller graph for this function:

◆ det4()

float det4 ( float * arr)
Here is the caller graph for this function:

◆ det_2()

float det_2 ( float x1,
float x2,
float x3,
float x4 )

◆ Dist()

float Dist ( const Point & a,
const Point & b )
Here is the caller graph for this function:

◆ getBlock2()

void getBlock2 ( const float M[16],
int r,
int c,
float B[4] )
inline
Here is the caller graph for this function:

◆ IsWithInBoundingBox()

bool IsWithInBoundingBox ( Point2d p,
Point2d top_left,
Point2d bottom_right )

◆ LineLineIntersection()

Point2d LineLineIntersection ( Point2d l1_p1,
Point2d l1_p2,
Point2d l2_p1,
Point2d l2_p2 )

◆ LineLineIntersection_Parallel()

bool LineLineIntersection_Parallel ( Point2d l1_p1,
Point2d l1_p2,
Point2d l2_p1,
Point2d l2_p2 )

◆ mat4_mul()

void mat4_mul ( const float A[16],
const float B[16],
float C[16] )
inline
Here is the caller graph for this function:

◆ mat4_strassen()

void mat4_strassen ( const float A[16],
const float B[16],
float C[16] )

◆ mul2()

void mul2 ( const float A[4],
const float B[4],
float C[4] )
inline
Here is the caller graph for this function:

◆ operator*() [1/4]

Matrix operator* ( const Matrix & m1,
const Matrix & m2 )

◆ operator*() [2/4]

Point operator* ( const Point & p,
const Matrix & m )

◆ operator*() [3/4]

Quarternion operator* ( const Quarternion & a,
float x )

◆ operator*() [4/4]

Vector operator* ( const Vector & v,
const Matrix & m )

◆ operator+() [1/3]

Matrix operator+ ( const Matrix & m1,
const Matrix & m2 )

◆ operator+() [2/3]

Point operator+ ( const Point & p,
const Vector & v )

◆ operator+() [3/3]

Quarternion operator+ ( const Quarternion & a,
const Quarternion & b )

◆ operator-()

Point operator- ( const Point & p,
const Vector & v )

◆ operator<<() [1/5]

std::ostream & operator<< ( std::ostream & o,
const Mat2 & m )

◆ operator<<() [2/5]

std::ostream & operator<< ( std::ostream & o,
const Matrix & m )

◆ operator<<() [3/5]

std::ostream & operator<< ( std::ostream & o,
const Point & p )

◆ operator<<() [4/5]

std::ostream & operator<< ( std::ostream & o,
const Point2d & p )

◆ operator<<() [5/5]

std::ostream & operator<< ( std::ostream & o,
const Vector & v )

◆ operator>>() [1/3]

std::istream & operator>> ( std::istream & i,
Point & p )

◆ operator>>() [2/3]

std::istream & operator>> ( std::istream & i,
Point2d & p )

◆ operator>>() [3/3]

std::istream & operator>> ( std::istream & i,
Vector & v )

◆ PlanePlaneIntersection()

Line PlanePlaneIntersection ( const Plane & p1,
const Plane & p2 )
Here is the caller graph for this function:

◆ Projection()

Point Projection ( Point2d p1,
Point2d p2,
Point corner,
Vector u_x,
Vector u_y,
Vector u_z )

◆ setBlock2()

void setBlock2 ( float M[16],
int r,
int c,
const float B[4] )
inline
Here is the caller graph for this function:

◆ sub2()

void sub2 ( const float A[4],
const float B[4],
float C[4] )
inline
Here is the caller graph for this function:

◆ UnitCube()

Point UnitCube ( Point p,
Point pos,
Vector u_x,
Vector u_y,
Vector u_z )

◆ UnitToCube()

Point UnitToCube ( Point p,
Point pos,
Vector u_x,
Vector u_y,
Vector u_z )

◆ UnitToFlex()

Point UnitToFlex ( Point p,
Point bTL,
Point bTR,
Point bBL,
Point bBR,
Point fTL,
Point fTR,
Point fBL,
Point fBR )