7 #ifndef IMAGINE_GRAPHICS_MESH_H 8 #define IMAGINE_GRAPHICS_MESH_H 16 class QOpenGLShaderProgram;
56 #ifndef DOXYGEN_SHOULD_SKIP_THIS 152 #ifndef DOXYGEN_SHOULD_SKIP_THIS 157 bool operator<(
const Mesh& mesh)
const;
158 void drawMesh(
MeshFaceMode faceMode, QOpenGLShaderProgram* prog,
188 const Triangle* triangles=0,
int ntriangles=0,
189 const Quad* quads=0,
int nquads=0,
214 const Triangle* triangles=0,
int ntriangles=0,
215 const Quad *quads=0,
int nquads=0,
231 Mesh(
const std::vector<FloatPoint3>& vertices,
232 const std::vector<Triangle>& triangles=std::vector<Triangle>(),
233 const std::vector<Quad>& quads=std::vector<Quad>(),
236 const std::vector<FloatVector3>& normals=std::vector<FloatVector3>());
290 const std::vector<FloatPoint3>&
vertices()
const;
305 const Triangle *triangles=0,
int ntriangles=0,
306 const Quad *quads=0,
int nquads=0,
322 const Triangle *triangles=0,
int ntriangles=0,
323 const Quad *quads=0,
int nquads=0,
409 double r,
int resolution=32);
421 double r,
int resolution=32);
static Mesh Cube(const DoublePoint3 ¢er, const DoubleVector3 &axis1, const DoubleVector3 &axis2, const DoubleVector3 &axis3)
Parallelepiped.
static Mesh Arrow(const DoublePoint3 &base, const DoubleVector3 &shaft, double r, int resolution=32)
Arrow.
void setValues(MeshData data, const float *val)
Set values.
Vector of fixed size.
Definition: FVector.h:17
friend void hideMesh(const Mesh &M, bool reinitCam)
Hide mesh.
void setGeometry(const FloatPoint3 *vertices, int nvertices, const Triangle *triangles=0, int ntriangles=0, const Quad *quads=0, int nquads=0, const FloatVector3 *normals=0)
Set geometry (float).
static Mesh Cylinder(const DoublePoint3 ¢er, const DoubleVector3 &axis, double r, int res=32)
Cylinder.
static Mesh Cone(const DoublePoint3 &base, const DoubleVector3 &axis, double r, int resolution=32)
Cone.
bool operator!=(const Mesh &mesh) const
Comparison operator.
Definition: Mesh.h:263
static Mesh PointCloud(const DoublePoint3 *points, int n)
PointCloud.
void setRange(float v0, float v1)
Default LUT.
void setOpacity(float opacity)
Set opacity.
void setVertices(const FloatPoint3 *vertices, const FloatVector3 *normals=0)
Set points (float).
void setColor(Color col)
Set color.
static Mesh Sphere(const DoublePoint3 ¢er, double r, int res=24)
Sphere.
MeshShadingMode
Mesh shading mode.
Definition: Mesh.h:33
void setDefaultLookupTable()
Default LUT.
static Mesh Plane(const DoublePoint3 ¢er, const DoubleVector3 &axis1, const DoubleVector3 &axis2)
Parallelogram.
MeshFaceMode
Mesh display mode.
Definition: Mesh.h:40
float getOpacity() const
Get opacity (from 0=transparent to 1=opaque).
Mesh & operator=(const Mesh &)
Assignment operator.
Array of fixed size.
Definition: FArray.h:17
void setColors(MeshData data, const Color *col)
Set colors.
A mesh representing a 3D object.
Definition: Mesh.h:150
void setLookupTable(Color col0, Color col1)
Set LUT.
const std::vector< FloatPoint3 > & vertices() const
Get points.
bool operator==(const Mesh &mesh) const
Comparison operator.
Definition: Mesh.h:259
static Mesh PolyLine(DoublePoint3 *points, int n, bool closed)
PolyLine.
void hideMesh(const Mesh &M, bool reinitCam=true)
Hide mesh.
friend bool readMeshFromObjFile(Mesh &mesh, const std::string &fileName)
Read mesh from Wavefront OBJ file.
MeshData
Type of mesh data that holds values.
Definition: Mesh.h:48
MeshColorMode
Mesh lighting mode.
Definition: Mesh.h:23
Imagine++ namespace.
Definition: Array.h:7
RED GREEN BLUE color.
Definition: Color.h:26
friend void showMesh(const Mesh &M, bool reinitCam)
Show mesh.
void showMesh(const Mesh &M, bool reinitCam=true)
Show mesh.