ffd.h
1 #pragma once
2 
3 #include "StampMesh.h"
4 #include "FastQuadrics.h"
5 
6 namespace VoxelFarm
7 {
8 
9  namespace FFD
10  {
13  {
14  public:
17  double xSize,
19  double ySize,
21  double zSize,
23  int xParts,
25  int yParts,
27  int zParts
28  );
29  ~CLatticeMesh();
30  public:
31  CFastQuadrics* mesh;
33  double voxelSizeX;
35  double voxelSizeY;
37  double voxelSizeZ;
45  double offsetX;
47  double offsetY;
49  double offsetZ;
51  int xParts;
53  int yParts;
55  int zParts;
57  double xSize;
59  double ySize;
61  double zSize;
62  };
63 
66  {
67  public:
68  CSoftBodyMesh(CLatticeMesh* lattice);
69  ~CSoftBodyMesh();
73  int sizeX,
75  int sizeY,
77  int sizeZ,
79  Algebra::Vector* controlPoints
80  );
81 
83  virtual int getSolidCount();
84  virtual MaterialId getSolidMaterial(int solid);
85  virtual int getFaceCount(int solid);
86  virtual void getFace(int solid, int index, Algebra::Vector& v0, Algebra::Vector& v1, Algebra::Vector& v2);
87  public:
88  CLatticeMesh* lattice;
89  CFastQuadrics* mesh;
90  };
91 
92  }
93 
94 }
void changeControlPoints(int sizeX, int sizeY, int sizeZ, Algebra::Vector *controlPoints)
it deforms the mesh based in a list of control points
It deforms a mesh using some control points.
Definition: ffd.h:65
Creates a mesh from a box divided in N parts.
Definition: ffd.h:12
int kernelSizeY
volumen size Y
Definition: ffd.h:41
Contains all classes and functions for the VoxelFarm engine.
A 3D Vector.
Definition: Vector.h:34
double ySize
y box size in world coordinates
Definition: ffd.h:59
virtual int getFaceCount(int solid)
Returns the number of faces in a solid.
int xParts
divisions in the x
Definition: ffd.h:51
virtual MaterialId getSolidMaterial(int solid)
Returns the material of a solid.
It allows to access to the faces and materials of a list of solids.
Definition: StampMesh.h:31
CLatticeMesh(double xSize, double ySize, double zSize, int xParts, int yParts, int zParts)
double zSize
z box size in world coordinates
Definition: ffd.h:61
int kernelSizeX
volumen size X
Definition: ffd.h:39
virtual void getFace(int solid, int index, Algebra::Vector &v0, Algebra::Vector &v1, Algebra::Vector &v2)
Get the vertices of a face of a solid.
double xSize
x box size in world coordinates
Definition: ffd.h:57
double offsetZ
offset inside the volumen Z
Definition: ffd.h:49
double voxelSizeY
size of each part by the Ys
Definition: ffd.h:35
double voxelSizeZ
size of each part by the Zs
Definition: ffd.h:37
int kernelSizeZ
volumen size Z
Definition: ffd.h:43
int yParts
divisions in the y
Definition: ffd.h:53
int zParts
divisions in the z
Definition: ffd.h:55
double offsetX
offset inside the volumen X
Definition: ffd.h:45
An efficient mesh representation that features Quadratic Error function simplification using a Multip...
Definition: FastQuadrics.h:44
virtual int getSolidCount()
Implementation of IMeshStampSource.
double offsetY
offset inside the volumen Y
Definition: ffd.h:47
double voxelSizeX
size of each part by the Xs
Definition: ffd.h:33