Blender V2.61 - r43446
Classes | Typedefs | Functions

util_transform.h File Reference

#include <string.h>
#include "util_math.h"
#include "util_types.h"

Go to the source code of this file.

Classes

struct  Transform

Typedefs

typedef CCL_NAMESPACE_BEGIN
struct Transform 
Transform

Functions

__device_inline float3 transform (const Transform *t, const float3 a)
__device_inline float3 transform_direction (const Transform *t, const float3 a)
__device_inline void print_transform (const char *label, const Transform &t)
__device_inline Transform transform_transpose (const Transform a)
__device_inline Transform operator* (const Transform a, const Transform b)
__device_inline Transform make_transform (float a, float b, float c, float d, float e, float f, float g, float h, float i, float j, float k, float l, float m, float n, float o, float p)
__device_inline Transform transform_translate (float3 t)
__device_inline Transform transform_translate (float x, float y, float z)
__device_inline Transform transform_scale (float3 s)
__device_inline Transform transform_scale (float x, float y, float z)
__device_inline Transform transform_perspective (float fov, float n, float f)
__device_inline Transform transform_rotate (float angle, float3 axis)
__device_inline Transform transform_euler (float3 euler)
__device_inline Transform transform_orthographic (float znear, float zfar)
__device_inline Transform transform_identity ()
__device_inline bool operator== (const Transform &A, const Transform &B)
__device_inline bool operator!= (const Transform &A, const Transform &B)
__device_inline float3 transform_get_column (const Transform *t, int column)
__device_inline void transform_set_column (Transform *t, int column, float3 value)
Transform transform_inverse (const Transform &a)
__device_inline bool transform_uniform_scale (const Transform &tfm, float &scale)
__device_inline bool transform_negative_scale (const Transform &tfm)
__device_inline Transform transform_clear_scale (const Transform &tfm)

Typedef Documentation

typedef CCL_NAMESPACE_BEGIN struct Transform Transform

Function Documentation

__device_inline Transform make_transform ( float  a,
float  b,
float  c,
float  d,
float  e,
float  f,
float  g,
float  h,
float  i,
float  j,
float  k,
float  l,
float  m,
float  n,
float  o,
float  p 
)
__device_inline bool operator!= ( const Transform A,
const Transform B 
)

Definition at line 202 of file util_transform.h.

References B.

__device_inline Transform operator* ( const Transform  a,
const Transform  b 
)
__device_inline bool operator== ( const Transform A,
const Transform B 
)

Definition at line 197 of file util_transform.h.

__device_inline void print_transform ( const char *  label,
const Transform t 
)

Definition at line 59 of file util_transform.h.

References print_float4(), Transform::w, Transform::x, Transform::y, and Transform::z.

__device_inline float3 transform ( const Transform t,
const float3  a 
)
__device_inline Transform transform_clear_scale ( const Transform tfm)
__device_inline float3 transform_direction ( const Transform t,
const float3  a 
)
__device_inline Transform transform_euler ( float3  euler)
__device_inline float3 transform_get_column ( const Transform t,
int  column 
)
__device_inline Transform transform_identity ( )
Transform transform_inverse ( const Transform a)
__device_inline bool transform_negative_scale ( const Transform tfm)

Definition at line 245 of file util_transform.h.

References cross(), dot(), and transform_get_column().

Referenced by Object::apply_transform().

__device_inline Transform transform_orthographic ( float  znear,
float  zfar 
)

Definition at line 186 of file util_transform.h.

References transform_scale(), and transform_translate().

Referenced by Camera::update().

__device_inline Transform transform_perspective ( float  fov,
float  n,
float  f 
)

Definition at line 136 of file util_transform.h.

References make_transform(), tanf, and transform_scale().

Referenced by Camera::update().

__device_inline Transform transform_rotate ( float  angle,
float3  axis 
)

Definition at line 151 of file util_transform.h.

References cosf, make_transform(), normalize(), sinf, float3::x, float3::y, and float3::z.

Referenced by transform_euler(), and xml_read_transform().

__device_inline Transform transform_scale ( float3  s)
__device_inline Transform transform_scale ( float  x,
float  y,
float  z 
)

Definition at line 131 of file util_transform.h.

References make_float3(), and transform_scale().

__device_inline void transform_set_column ( Transform t,
int  column,
float3  value 
)

Definition at line 212 of file util_transform.h.

References Transform::x, float3::x, float3::y, Transform::y, float3::z, and Transform::z.

Referenced by transform_clear_scale().

__device_inline Transform transform_translate ( float3  t)
__device_inline Transform transform_translate ( float  x,
float  y,
float  z 
)

Definition at line 117 of file util_transform.h.

References make_float3(), and transform_translate().

__device_inline Transform transform_transpose ( const Transform  a)
__device_inline bool transform_uniform_scale ( const Transform tfm,
float &  scale 
)