OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
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

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

Definition at line 53 of file StdMeshMath.cpp.

References x, y, and z.

Referenced by operator*().

54 {
55  StdMeshVector v;
56  v.x = lhs.y*rhs.z - lhs.z*rhs.y;
57  v.y = lhs.z*rhs.x - lhs.x*rhs.z;
58  v.z = lhs.x*rhs.y - lhs.y*rhs.x;
59  return v;
60 }

Here is the caller graph for this function:

void StdMeshVector::Normalize ( )

Definition at line 62 of file StdMeshMath.cpp.

References x, y, and z.

63 {
64  const float len = sqrt(x*x + y*y + z*z);
65  x /= len; y /= len; z /= len;
66 }
StdMeshVector StdMeshVector::Translate ( float  dx,
float  dy,
float  dz 
)
static

Definition at line 44 of file StdMeshMath.cpp.

References x, y, and z.

Referenced by CStdGL::PerformMesh().

45 {
46  StdMeshVector v;
47  v.x = dx;
48  v.y = dy;
49  v.z = dz;
50  return v;
51 }

Here is the caller graph for this function:

StdMeshVector StdMeshVector::UnitScale ( )
static

Definition at line 35 of file StdMeshMath.cpp.

References x, y, and z.

Referenced by StdMeshSkeletonLoader::LoadSkeletonXml(), Ogre::Skeleton::ChunkBone::ReadImpl(), and Ogre::Skeleton::ChunkAnimationTrackKF::ReadImpl().

36 {
37  StdMeshVector v;
38  v.x = 1.0f;
39  v.y = 1.0f;
40  v.z = 1.0f;
41  return v;
42 }

Here is the caller graph for this function:

StdMeshVector StdMeshVector::Zero ( )
static

Definition at line 26 of file StdMeshMath.cpp.

References x, y, and z.

27 {
28  StdMeshVector v;
29  v.x = 0.0f;
30  v.y = 0.0f;
31  v.z = 0.0f;
32  return v;
33 }

Member Data Documentation


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