|
Shinya Kitaoka |
810553 |
#pragma once
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef MESHUTILS_H
|
|
Toshihiro Shimizu |
890ddd |
#define MESHUTILS_H
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#undef DVAPI
|
|
Toshihiro Shimizu |
890ddd |
#undef DVVAR
|
|
Toshihiro Shimizu |
890ddd |
#ifdef TNZEXT_EXPORTS
|
|
Toshihiro Shimizu |
890ddd |
#define DVAPI DV_EXPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#define DVVAR DV_EXPORT_VAR
|
|
Toshihiro Shimizu |
890ddd |
#else
|
|
Toshihiro Shimizu |
890ddd |
#define DVAPI DV_IMPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#define DVVAR DV_IMPORT_VAR
|
|
Toshihiro Shimizu |
890ddd |
#endif
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class TMeshImageP;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
struct DrawableTextureData;
|
|
Toshihiro Shimizu |
890ddd |
struct PlasticDeformerDataGroup;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//********************************************************************************************
|
|
Toshihiro Shimizu |
890ddd |
// Mesh Image Utility functions
|
|
Toshihiro Shimizu |
890ddd |
//********************************************************************************************
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/*!
|
|
Toshihiro Shimizu |
890ddd |
\brief Transforms a mesh image by the specified affine transform.
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
DVAPI void transform(
|
|
Shinya Kitaoka |
120a6e |
const TMeshImageP &image,
|
|
Shinya Kitaoka |
120a6e |
const TAffine &aff
|
|
Shinya Kitaoka |
120a6e |
);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/*!
|
|
Toshihiro Shimizu |
890ddd |
\brief Draws the edges of the input meshImage on current OpenGL context.
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
\remark This function accepts input data associated to a deformation of
|
|
Toshihiro Shimizu |
890ddd |
the mesh image to be drawn. See PlasticDeformerStorage for details.
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
DVAPI void tglDrawEdges(
|
|
Shinya Kitaoka |
120a6e |
const TMeshImage &image,
|
|
Shinya Kitaoka |
120a6e |
const PlasticDeformerDataGroup *deformerDatas =
|
|
Shinya Kitaoka |
120a6e |
0
|
|
Shinya Kitaoka |
120a6e |
);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/*!
|
|
Toshihiro Shimizu |
890ddd |
\brief Draws the faces of the input meshImage on current OpenGL context.
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
\remark This function accepts input data associated to a deformation of
|
|
Toshihiro Shimizu |
890ddd |
the mesh image to be drawn. See PlasticDeformerStorage for details.
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
DVAPI void tglDrawFaces(
|
|
Shinya Kitaoka |
120a6e |
const TMeshImage &image,
|
|
Shinya Kitaoka |
120a6e |
const PlasticDeformerDataGroup *deformerDatas =
|
|
Shinya Kitaoka |
120a6e |
0
|
|
Shinya Kitaoka |
120a6e |
);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/*!
|
|
Shinya Kitaoka |
120a6e |
\brief Draws the stacking order information of the input mesh
|
|
Shinya Kitaoka |
120a6e |
image's
|
|
Toshihiro Shimizu |
890ddd |
faces, on current OpenGL context.
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
DVAPI void tglDrawSO(
|
|
Shinya Kitaoka |
120a6e |
const TMeshImage &image,
|
|
Shinya Kitaoka |
120a6e |
double minColor[4],
|
|
Shinya Kitaoka |
38fd86 |
|
|
Shinya Kitaoka |
120a6e |
double maxColor[4],
|
|
Shinya Kitaoka |
38fd86 |
|
|
Shinya Kitaoka |
120a6e |
const PlasticDeformerDataGroup *deformerDatas =
|
|
Shinya Kitaoka |
120a6e |
0,
|
|
Shinya Kitaoka |
120a6e |
bool deformedDomain =
|
|
Shinya Kitaoka |
120a6e |
false
|
|
Shinya Kitaoka |
120a6e |
//! by the specified deformerDatas, or not.
|
|
Shinya Kitaoka |
120a6e |
);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/*!
|
|
Toshihiro Shimizu |
890ddd |
\brief Draws the \a rigidity information of the input mesh image's
|
|
Toshihiro Shimizu |
890ddd |
faces, on current OpenGL context.
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
DVAPI void tglDrawRigidity(
|
|
Shinya Kitaoka |
120a6e |
const TMeshImage
|
|
Shinya Kitaoka |
120a6e |
&image,
|
|
Shinya Kitaoka |
120a6e |
double minColor[4],
|
|
Shinya Kitaoka |
38fd86 |
|
|
Shinya Kitaoka |
120a6e |
double maxColor[4],
|
|
Shinya Kitaoka |
38fd86 |
|
|
Shinya Kitaoka |
120a6e |
const PlasticDeformerDataGroup *deformerDatas =
|
|
Shinya Kitaoka |
120a6e |
0,
|
|
Shinya Kitaoka |
120a6e |
bool deformedDomain =
|
|
Shinya Kitaoka |
120a6e |
false
|
|
Shinya Kitaoka |
120a6e |
//! by the specified deformerDatas, or not.
|
|
Shinya Kitaoka |
120a6e |
);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/*!
|
|
Toshihiro Shimizu |
890ddd |
\brief Draws a texturized mesh image on current OpenGL context.
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
\remark The input textures are assumed to be \a nonpremultiplied,
|
|
Toshihiro Shimizu |
890ddd |
while the drawn image will be \a premultiplied.
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
DVAPI void tglDraw(
|
|
Shinya Kitaoka |
120a6e |
const TMeshImage &image,
|
|
Shinya Kitaoka |
120a6e |
const DrawableTextureData
|
|
Shinya Kitaoka |
120a6e |
&texData, //!< Textures data to use for texturing.
|
|
Shinya Kitaoka |
120a6e |
const TAffine
|
|
Shinya Kitaoka |
120a6e |
&meshToTexAffine, //!< Transform from mesh to texture coordinates.
|
|
Shinya Kitaoka |
120a6e |
const PlasticDeformerDataGroup
|
|
Shinya Kitaoka |
120a6e |
&deformerDatas
|
|
Shinya Kitaoka |
120a6e |
);
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
#endif
|