Voxvision  1
Creating and manipulating voxel octrees
All Data Structures Files Functions Variables Typedefs Macros Pages
Macros | Functions
geom.h File Reference

Basic geometry functions. More...

#include "params.h"

Go to the source code of this file.

Macros

#define vox_dot_add(a, b, res)
 Vector addition. More...
 
#define vox_dot_sub(a, b, res)
 Vector subtraction. More...
 
#define vox_dot_scmul(d, sc, res)
 Vector multiplication by a scalar. More...
 

Functions

VOX_EXPORT float vox_abs_metric (const vox_dot dot1, const vox_dot dot2)
 Calculate fast metric between two dots. More...
 
VOX_EXPORT float vox_sqr_metric (const vox_dot dot1, const vox_dot dot2)
 Calculate metric between two dots. More...
 
VOX_EXPORT float vox_sqr_norm (const vox_dot dot)
 Calculate norm of a vector. More...
 

Detailed Description

Basic geometry functions.

Macro Definition Documentation

◆ vox_dot_add

#define vox_dot_add (   a,
  b,
  res 
)
Value:
do { \
res[0] = a[0] + b[0]; \
res[1] = a[1] + b[1]; \
res[2] = a[2] + b[2]; \
} \
while (0);

Vector addition.

◆ vox_dot_scmul

#define vox_dot_scmul (   d,
  sc,
  res 
)
Value:
do { \
res[0] = sc * d[0]; \
res[1] = sc * d[1]; \
res[2] = sc * d[2]; \
} \
while (0);

Vector multiplication by a scalar.

◆ vox_dot_sub

#define vox_dot_sub (   a,
  b,
  res 
)
Value:
do { \
res[0] = a[0] - b[0]; \
res[1] = a[1] - b[1]; \
res[2] = a[2] - b[2]; \
} \
while (0);

Vector subtraction.

Function Documentation

◆ vox_abs_metric()

VOX_EXPORT float vox_abs_metric ( const vox_dot  dot1,
const vox_dot  dot2 
)

Calculate fast metric between two dots.

This is a fast metric on R^3 calculacted as sum of absolute values of by-coordinate differences between two dots.

◆ vox_sqr_metric()

VOX_EXPORT float vox_sqr_metric ( const vox_dot  dot1,
const vox_dot  dot2 
)

Calculate metric between two dots.

This is a square of standard Euclidian metric on R^3

◆ vox_sqr_norm()

VOX_EXPORT float vox_sqr_norm ( const vox_dot  dot)

Calculate norm of a vector.

This is a square of standard Euclidian norm on R^3