KrisLibrary  1.0.0
Namespaces | Functions
Conversions.h File Reference

3D geometry conversion routines. More...

#include "AnyGeometry.h"

Go to the source code of this file.

Namespaces

 GLDraw
 Contains all definitions in the GLDraw package.
 
 Geometry
 Contains all definitions in the Geometry package.
 

Functions

void Geometry::MeshToPointCloud (const Meshing::TriMesh &mesh, Meshing::PointCloud3D &pc, Real maxDispersion=Inf, bool wantNormals=false)
 Places points on the vertices of a mesh. If any triangle has vertices farther away than maxDispersion, the triangle is subdivided until all triangles are covered by balls of radius maxDispersion.
 
void Geometry::PointCloudToMesh (const Meshing::PointCloud3D &pc, Meshing::TriMesh &mesh, Real depthDiscontinuity=Inf)
 If a point cloud is structured, this creates a uniform mesh out of it. If depthDiscontinuity is provided, the mesh is split at the points where the relative depth of adjacent points is greater than depthDiscontinuity * average depth. (A decent value is 0.02 for typical depth sensors.)
 
void Geometry::PointCloudToMesh (const Meshing::PointCloud3D &pc, Meshing::TriMesh &mesh, GLDraw::GeometryAppearance &appearance, Real depthDiscontinuity=Inf)
 Same as normal PointCloudToMesh, but colors and UV coordinates are extracted.
 
void Geometry::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 numDivs strips.
 
void Geometry::PrimitiveToImplicitSurface (const GeometricPrimitive3D &primitive, Meshing::VolumeGrid &grid, Real resolution, Real expansion=0)
 Creates an implicit surface for a geometric primitive. The grid has resolution no more than resolution on each axis.
 
void Geometry::MeshToImplicitSurface_FMM (const CollisionMesh &mesh, Meshing::VolumeGrid &grid, Real resolution)
 Creates an implicit surface for a mesh using a Fast Marching Method. More...
 
void Geometry::MeshToImplicitSurface_SpaceCarving (const CollisionMesh &mesh, Meshing::VolumeGrid &grid, Real resolution, int numViews=20)
 Creates an implicit surface for a mesh using a space-carving technique. The grid has resolution no less than resolution on each axis. numViews views (6 orthographic, numViews-6 random) are taken of the mesh to create the space carving. More...
 
void Geometry::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 defined at the cell centers, unlike the methods in MarchingCubes.h which assume the array defines values at the cell corners... this performs the necessary correction.
 

Detailed Description

3D geometry conversion routines.