Skip to end of metadata
Go to start of metadata
You are here: Common > Math > Math Definitions
Math Definitions

Definitions of functions, types and variables.

BoxSides Variable
C++
uint32 BoxSides[];
File

Cry_Camera.h

g_PI Variable
C++
const f64 g_PI = 3.14159265358979323846264338327950288419716939937510;
File

Cry_Math.h

Description

pi

g_PI2 Variable
C++
const f64 g_PI2 = 3.14159265358979323846264338327950288419716939937510*2.0;
File

Cry_Math.h

Description

2*pi

gf_PI Variable
C++
const f32 gf_PI = f32(3.14159265358979323846264338327950288419716939937510);
File

Cry_Math.h

Description

Definitions

gf_PI2 Variable
C++
const f32 gf_PI2 = f32(3.14159265358979323846264338327950288419716939937510*2.0);
File

Cry_Math.h

inc_mod3 Variable
C++
int32 inc_mod3[] = {1,2,0}, dec_mod3[]={2,0,1};
File

Cry_Math.h

sqrt2 Variable
C++
const f64 sqrt2 = 1.4142135623730950488016887242097;
File

Cry_Math.h

sqrt3 Variable
C++
const f64 sqrt3 = 1.7320508075688772935274463415059;
File

Cry_Math.h

AABB_AABB2D Function
C++
bool AABB_AABB2D(const AABB&, const AABB&);
File

Cry_GeoOverlap.h

cry_frand Function
C++
float cry_frand();
File

Cry_Math.h

Description

Generates random floating number in the closed interval [0,1]. Random float between 0 and 1 inclusive.

cry_rand Function
C++
unsigned int cry_rand();
File

Cry_Math.h

Description

Random function to be used instead of rand()

cry_rand32 Function
C++
unsigned int cry_rand32();
File

Cry_Math.h

Description

Generates random integer in full 32-bit range.

Lineseg_AABB2D Function
C++
inline bool Lineseg_AABB2D(const Lineseg&, const AABB&);
File

Cry_GeoOverlap.h

Lineseg_Triangle Function
C++
bool Lineseg_Triangle(const Lineseg & lineseg, const Vec3 & v0, const Vec3 & v1, const Vec3 & v2);
File

Cry_GeoDistance.h

Point_Lineseg2DSq Function
C++
template <typename F> F Point_Lineseg2DSq(Vec3_tpl<F> p, Lineseg lineseg, F & fT);
File

Cry_GeoOverlap.h

Description

Returns squared distance from a point to a line segment and also the "t value" (from 0 to 1) of the closest point on the line segment, ignoring the z coordinates

Point_TriangleSq Function
C++
template <typename F> F Point_TriangleSq(const Vec3_tpl<F>& p, const Triangle_tpl<F> & t);
File

Cry_GeoOverlap.h

Returns

The squared distance.

Description

Distance: Point_Triangle. Calculate the closest distance of a point to a triangle in 3d-space.

Example

float result = Distance::Point_Triangle( pos, triangle );

ColorB Type
C++
typedef Color_tpl<uint8> ColorB;
File

Cry_Color.h

Description

0, 255

ColorF Type
C++
typedef Color_tpl<float> ColorF;
File

Cry_Color.h

Description

0.0, 1.0

index_t Type
C++
typedef int index_t;
File

primitives.h

In This Topic

  • No labels