Neo  0.5.0
Developer Documentation
MeshTools.h
Go to the documentation of this file.
1 //========================================================================
2 // Copyright (c) 2003-2011 Anael Seghezzi <www.maratis3d.com>
3 //
4 // This software is provided 'as-is', without any express or implied
5 // warranty. In no event will the authors be held liable for any damages
6 // arising from the use of this software.
7 //
8 // Permission is granted to anyone to use this software for any purpose,
9 // including commercial applications, and to alter it and redistribute it
10 // freely, subject to the following restrictions:
11 //
12 // 1. The origin of this software must not be misrepresented; you must not
13 // claim that you wrote the original software. If you use this software
14 // in a product, an acknowledgment in the product documentation would
15 // be appreciated but is not required.
16 //
17 // 2. Altered source versions must be plainly marked as such, and must not
18 // be misrepresented as being the original software.
19 //
20 // 3. This notice may not be removed or altered from any source
21 // distribution.
22 //
23 //========================================================================
24 
25 
26 #ifndef __MESH_TOOLS_H
27 #define __MESH_TOOLS_H
28 
29 namespace Neo
30 {
31 
32 NEO_ENGINE_EXPORT bool animateFloat(Key * keys, unsigned int keysNumber, float t, float * value);
33 NEO_ENGINE_EXPORT bool animateVector2(Key * keys, unsigned int keysNumber, float t, Vector2 * vector2);
34 NEO_ENGINE_EXPORT bool animateVector3(Key * keys, unsigned int keysNumber, float t, Vector3 * vector3);
35 NEO_ENGINE_EXPORT bool animateQuaternion(Key * keys, unsigned int keysNumber, float t, Quaternion * quaternion);
36 
37 NEO_ENGINE_EXPORT void animateArmature(
38  Armature * armature,
39  ArmatureAnim * armatureAnim,
40  float t
41  );
42 
43 NEO_ENGINE_EXPORT void animateTextures(
44  Mesh * mesh,
45  TexturesAnim * texturesAnim,
46  float t
47  );
48 
49 NEO_ENGINE_EXPORT void animateMaterials(
50  Mesh * mesh,
51  MaterialsAnim * materialsAnim,
52  float t
53  );
54 
55 NEO_ENGINE_EXPORT void computeSkinning(
56  Armature * armature,
57  SkinData * skinData,
58  const Vector3 * baseVertices,
59  const Vector3 * baseNormals,
60  const Vector3 * baseTangents,
61  Vector3 * vertices,
62  Vector3 * normals,
63  Vector3 * tangents
64  );
65 
66 NEO_ENGINE_EXPORT bool isRaytraced(
67  const Vector3 & origin,
68  const Vector3 & dest,
69  const void * indices,
70  VAR_TYPES indicesType,
71  const Vector3 * vertices,
72  unsigned int size
73  );
74 
75 NEO_ENGINE_EXPORT bool getNearestRaytracedPosition(
76  const Vector3 & origin,
77  const Vector3 & dest,
78  const void * indices,
79  VAR_TYPES indicesType,
80  const Vector3 * vertices,
81  unsigned int size,
82  Vector3 * intersection,
83  bool invertNormal = false
84  );
85 }
86 #endif
NEO_ENGINE_EXPORT void animateTextures(Mesh *mesh, TexturesAnim *texturesAnim, float t)
NEO_ENGINE_EXPORT void computeSkinning(Armature *armature, SkinData *skinData, const Vector3 *baseVertices, const Vector3 *baseNormals, const Vector3 *baseTangents, Vector3 *vertices, Vector3 *normals, Vector3 *tangents)
NEO_ENGINE_EXPORT bool animateFloat(Key *keys, unsigned int keysNumber, float t, float *value)
NEO_ENGINE_EXPORT bool animateVector3(Key *keys, unsigned int keysNumber, float t, Vector3 *vector3)
NEO_ENGINE_EXPORT bool isRaytraced(const Vector3 &origin, const Vector3 &dest, const void *indices, VAR_TYPES indicesType, const Vector3 *vertices, unsigned int size)
NEO_ENGINE_EXPORT bool animateVector2(Key *keys, unsigned int keysNumber, float t, Vector2 *vector2)
NEO_ENGINE_EXPORT void animateArmature(Armature *armature, ArmatureAnim *armatureAnim, float t)
NEO_ENGINE_EXPORT bool animateQuaternion(Key *keys, unsigned int keysNumber, float t, Quaternion *quaternion)
NEO_ENGINE_EXPORT void animateMaterials(Mesh *mesh, MaterialsAnim *materialsAnim, float t)
Definition: Color.h:29
VAR_TYPES
Definition: RenderingContext.h:140
NEO_ENGINE_EXPORT bool getNearestRaytracedPosition(const Vector3 &origin, const Vector3 &dest, const void *indices, VAR_TYPES indicesType, const Vector3 *vertices, unsigned int size, Vector3 *intersection, bool invertNormal=false)