OpenClonk
StdMeshVector Struct Reference

#include <StdMeshMath.h>

Public Member Functions

void Normalize ()
 

Static Public Member Functions

static StdMeshVector Zero ()
 
static StdMeshVector UnitScale ()
 
static StdMeshVector Translate (float dx, float dy, float dz)
 
static StdMeshVector Cross (const StdMeshVector &lhs, const StdMeshVector &rhs)
 

Public Attributes

float x
 
float y
 
float z
 

Detailed Description

Definition at line 22 of file StdMeshMath.h.

Member Function Documentation

◆ Cross()

StdMeshVector StdMeshVector::Cross ( const StdMeshVector lhs,
const StdMeshVector rhs 
)
static

Definition at line 47 of file StdMeshMath.cpp.

48 {
49  StdMeshVector v;
50  v.x = lhs.y*rhs.z - lhs.z*rhs.y;
51  v.y = lhs.z*rhs.x - lhs.x*rhs.z;
52  v.z = lhs.x*rhs.y - lhs.y*rhs.x;
53  return v;
54 }

References x, y, and z.

Referenced by StdMeshMatrix::LookAt(), and operator*().

Here is the caller graph for this function:

◆ Normalize()

void StdMeshVector::Normalize ( )

Definition at line 56 of file StdMeshMath.cpp.

57 {
58  const float len = sqrt(x*x + y*y + z*z);
59  x /= len; y /= len; z /= len;
60 }

References x, y, and z.

Referenced by StdMeshMatrix::LookAt().

Here is the caller graph for this function:

◆ Translate()

StdMeshVector StdMeshVector::Translate ( float  dx,
float  dy,
float  dz 
)
static

Definition at line 38 of file StdMeshMath.cpp.

39 {
40  StdMeshVector v;
41  v.x = dx;
42  v.y = dy;
43  v.z = dz;
44  return v;
45 }

References x, y, and z.

Referenced by StdMeshMatrix::Decompose(), CStdGL::PerformMesh(), StdMeshTransformation::Rotate(), StdMeshTransformation::Scale(), and StdMeshTransformation::Translate().

Here is the caller graph for this function:

◆ UnitScale()

StdMeshVector StdMeshVector::UnitScale ( )
static

Definition at line 29 of file StdMeshMath.cpp.

30 {
31  StdMeshVector v;
32  v.x = 1.0f;
33  v.y = 1.0f;
34  v.z = 1.0f;
35  return v;
36 }

References x, y, and z.

Referenced by StdMeshTransformation::Identity(), StdMeshSkeletonLoader::LoadSkeletonXml(), Ogre::Skeleton::ChunkBone::ReadImpl(), Ogre::Skeleton::ChunkAnimationTrackKF::ReadImpl(), StdMeshTransformation::Rotate(), and StdMeshTransformation::Translate().

Here is the caller graph for this function:

◆ Zero()

StdMeshVector StdMeshVector::Zero ( )
static

Definition at line 20 of file StdMeshMath.cpp.

21 {
22  StdMeshVector v;
23  v.x = 0.0f;
24  v.y = 0.0f;
25  v.z = 0.0f;
26  return v;
27 }

References x, y, and z.

Referenced by StdMeshTransformation::Identity(), StdMeshTransformation::Rotate(), StdMeshTransformation::Scale(), and StdMeshTransformation::Zero().

Here is the caller graph for this function:

Member Data Documentation

◆ x

◆ y

◆ z


The documentation for this struct was generated from the following files: