KrisLibrary  1.0.0
Conversions.h
Go to the documentation of this file.
1 #ifndef GEOMETRY_CONVERSIONS_H
2 #define GEOMETRY_CONVERSIONS_H
3 
4 #include "AnyGeometry.h"
5 
6 namespace GLDraw {
7  class GeometryAppearance;
8 };
9 
16 namespace Geometry {
17 
23 void MeshToPointCloud(const Meshing::TriMesh& mesh,Meshing::PointCloud3D& pc,Real maxDispersion=Inf,bool wantNormals=false);
24 
30 void PointCloudToMesh(const Meshing::PointCloud3D& pc,Meshing::TriMesh& mesh,Real depthDiscontinuity=Inf);
31 
35 void PointCloudToMesh(const Meshing::PointCloud3D& pc,Meshing::TriMesh& mesh,GLDraw::GeometryAppearance& appearance,Real depthDiscontinuity=Inf);
36 
41 void PrimitiveToMesh(const GeometricPrimitive3D& primitive,Meshing::TriMesh& mesh,int numDivs);
42 
47 void PrimitiveToImplicitSurface(const GeometricPrimitive3D& primitive,Meshing::VolumeGrid& grid,Real resolution,Real expansion=0);
48 
55 void MeshToImplicitSurface_FMM(const CollisionMesh& mesh,Meshing::VolumeGrid& grid,Real resolution);
56 
66 void MeshToImplicitSurface_SpaceCarving(const CollisionMesh& mesh,Meshing::VolumeGrid& grid,Real resolution,int numViews=20);
67 
75 
76 
77 } //namespace Geometry
78 
79 #endif
void MeshToPointCloud(const Meshing::TriMesh &mesh, Meshing::PointCloud3D &pc, Real maxDispersion, bool wantNormals)
Places points on the vertices of a mesh. If any triangle has vertices farther away than maxDispersion...
Definition: Conversions.cpp:48
void PrimitiveToImplicitSurface(const GeometricPrimitive3D &primitive, Meshing::VolumeGrid &grid, Real resolution, Real expansion)
Creates an implicit surface for a geometric primitive. The grid has resolution no more than resolutio...
Definition: Conversions.cpp:171
A class for coloring, texturing, and drawing meshes in OpenGL.
Definition: GeometryAppearance.h:42
A 3D point cloud class.
Definition: PointCloud.h:47
void PointCloudToMesh(const Meshing::PointCloud3D &pc, Meshing::TriMesh &mesh, GLDraw::GeometryAppearance &appearance, Real depthDiscontinuity)
Same as normal PointCloudToMesh, but colors and UV coordinates are extracted.
Definition: Conversions.cpp:63
void ImplicitSurfaceToMesh(const Meshing::VolumeGrid &grid, Meshing::TriMesh &mesh)
Creates a mesh from an implicit surface via Marching Cubes. This assumes the values of the grid are d...
Definition: Conversions.cpp:452
void MeshToImplicitSurface_SpaceCarving(const CollisionMesh &mesh, Meshing::VolumeGrid &grid, Real resolution, int numViews)
Creates an implicit surface for a mesh using a space-carving technique. The grid has resolution no le...
Definition: Conversions.cpp:356
void PrimitiveToMesh(const GeometricPrimitive3D &primitive, Meshing::TriMesh &mesh, int numDivs)
Creates a mesh for a geometric primitive. If the primitive has curved surfaces, they are split into n...
Definition: Conversions.cpp:144
Contains all definitions in the GLDraw package.
Definition: AnyGeometry.h:13
A basic triangle mesh.
Definition: TriMesh.h:41
A 3D array over an axis-aligned 3D volume, containing Real values.
Definition: AnyGeometry.h:10
Contains all definitions in the Geometry package.
Definition: AnyGeometry.h:11
void MeshToImplicitSurface_FMM(const CollisionMesh &mesh, Meshing::VolumeGrid &grid, Real resolution)
Creates an implicit surface for a mesh using a Fast Marching Method.
Definition: Conversions.cpp:345