My Project: dynamics.mod/NewtonDynamics/source/core/dgPolyhedraMassProperties.cpp File Reference

My Project

Macros
dgPolyhedraMassProperties.cpp File Reference
`#include "dgStdafx.h"`
`#include "dgVector.h"`
`#include "dgPolyhedraMassProperties.h"`

## Macros

#define | CDSubexpressions(w0, w1, w2, f1, f2)
#define | InertiaSubexpression(w0, w1, w2, f1, f2, f3)
#define | Subexpressions(w0, w1, w2, f1, f2, f3, g0, g1, g2)

## Macro Definition Documentation

## § CDSubexpressions

#define CDSubexpressions | ( |  | w0,
|  |  | w1,
|  |  | w2,
|  |  | f1,
|  |  | f2
| ) |  |

Value:
{ \
dgFloat32 temp0 = w0 + w1; \
f1 = temp0 + w2; \
f2 = w0 * w0 + w1 * temp0 + w2 * f1; \
}

## § InertiaSubexpression

#define InertiaSubexpression | ( |  | w0,
|  |  | w1,
|  |  | w2,
|  |  | f1,
|  |  | f2,
|  |  | f3
| ) |  |

Value:
{ \
dgFloat32 temp0 = w0 + w1; \
dgFloat32 temp1 = w0 * w0; \
dgFloat32 temp2 = temp1 + w1 * temp0; \
f1 = temp0 + w2; \
f2 = temp2 + w2 * f1; \
f3 = w0 * temp1 + w1 * temp2 + w2 * f2; \
}

## § Subexpressions

#define Subexpressions | ( |  | w0,
|  |  | w1,
|  |  | w2,
|  |  | f1,
|  |  | f2,
|  |  | f3,
|  |  | g0,
|  |  | g1,
|  |  | g2
| ) |  |

Value:
{ \
dgFloat32 temp0 = w0 + w1; \
dgFloat32 temp1 = w0 * w0; \
dgFloat32 temp2 = temp1 + w1 * temp0; \
f1 = temp0 + w2; \
f2 = temp2 + w2 * f1; \
f3 = w0 * temp1 + w1 * temp2 + w2 * f2; \
g0 = f2 + w0 * (f1 + w0); \
g1 = f2 + w1 * (f1 + w1); \
g2 = f2 + w2 * (f1 + w2); \
}