A.I.M.S


aims::SurfaceGenerator Class Reference

Factory class for various common shapes of meshes. More...

#include <aims/mesh/surfacegen.h>

Classes

struct  Generator
 
struct  Generator_wireframe
 

Public Types

typedef AimsSurfaceTriangle *(* GenFunction )(const carto::GenericObject &)
 
typedef AimsTimeSurface
< 2, Void > *(* 
GenFunction_wireframe )(const carto::GenericObject &)
 

Static Public Member Functions

static AimsSurfaceTrianglegenerate (const carto::GenericObject &params)
 generic factory function (calls lower-level functions) More...
 
static AimsSurfaceTrianglegenerate (carto::Object params)
 generic factory function (calls lower-level functions) More...
 
static AimsTimeSurface< 2, Void > * generate_wireframe (const carto::GenericObject &params)
 
static AimsTimeSurface< 2, Void > * generate_wireframe (carto::Object params)
 generic factory function (calls lower-level functions) More...
 
static carto::Object description ()
 description of known shapes and parameters (vector of dicts) More...
 
static carto::Object description_wireframe ()
 
static void printDescription (std::ostream &s=std::cout)
 outputs the description() dictionary in a more huma-readable way More...
 
static void printDescription_wireframe (std::ostream &s=std::cout)
 
static AimsSurfaceTrianglecube (const carto::GenericObject &params)
 
static AimsSurfaceTrianglecube (const Point3df &center, float radius, bool smoothnormal=false)
 
static AimsSurfaceTrianglecylinder (const carto::GenericObject &params)
 
static AimsSurfaceTrianglecylinder (const Point3df &p1, const Point3df &p2, float radius, float radius2, unsigned nfacets, bool closed, bool smooth=false)
 
static AimsSurfaceTrianglecone (const carto::GenericObject &params)
 
static AimsSurfaceTrianglecone (const Point3df &arrow, const Point3df &base, float radius, unsigned nfacets, bool closed, bool smooth=false)
 
static AimsSurfaceTrianglearrow (const carto::GenericObject &params)
 
static AimsSurfaceTrianglearrow (const Point3df &arrow, const Point3df &base, float radius, float arrowradius, unsigned nfacets, float arrowlengthfract)
 
static AimsSurfaceTriangleicosahedron (const carto::GenericObject &params)
 Sphere generation functions by Manik Bhattacharjee (CNRS UPR640 - LENA) More...
 
static AimsSurfaceTriangleicosahedron (const Point3df &center, float radius)
 
static AimsSurfaceTrianglesphere (const carto::GenericObject &params)
 
static AimsSurfaceTrianglesphere (const Point3df &p1, float radius, unsigned nfacets, bool uniquevertices=false)
 
static AimsSurfaceTriangleellipse (const carto::GenericObject &params)
 
static AimsSurfaceTriangleellipse (const Point3df &p1, float radius1, float radius2, unsigned nfacets, bool uniquevertices=false)
 
static AimsSurfaceTriangleicosphere (const carto::GenericObject &params)
 
static AimsSurfaceTriangleicosphere (const Point3df &center, float radius, unsigned nfacets)
 
static AimsTimeSurface< 2, Void > * parallelepiped_wireframe (const carto::GenericObject &params)
 
static AimsTimeSurface< 2, Void > * parallelepiped_wireframe (const Point3df &boundingbox_min, const Point3df &boundingbox_max)
 
static AimsTimeSurface< 2, Void > * circle_wireframe (const carto::GenericObject &params)
 
static AimsTimeSurface< 2, Void > * circle_wireframe (const Point3df &center, float radius, unsigned nseg=20, const Point3df &normal=Point3df(0, 0, 1), const Point3df &startdir=Point3df(1, 0, 0), float startangle=0, float stopangle=M_PI *2)
 Circle, or part of circle. More...
 
static AimsTimeSurface< 2, Void > * grid (const carto::GenericObject &params)
 
static AimsTimeSurface< 2, Void > * grid (const Point3df &boundingbox_min, const Point3df &boundingbox_max, const Point3df &grid_sampling)
 Grid wireframe. More...
 

Detailed Description

Factory class for various common shapes of meshes.

Definition at line 45 of file surfacegen.h.

Member Typedef Documentation

typedef AimsSurfaceTriangle*(* aims::SurfaceGenerator::GenFunction)(const carto::GenericObject &)

Definition at line 49 of file surfacegen.h.

typedef AimsTimeSurface<2,Void>*(* aims::SurfaceGenerator::GenFunction_wireframe)(const carto::GenericObject &)

Definition at line 51 of file surfacegen.h.

Member Function Documentation

static AimsSurfaceTriangle* aims::SurfaceGenerator::arrow ( const carto::GenericObject params)
static
static AimsSurfaceTriangle* aims::SurfaceGenerator::arrow ( const Point3df arrow,
const Point3df base,
float  radius,
float  arrowradius,
unsigned  nfacets,
float  arrowlengthfract 
)
static
static AimsTimeSurface<2,Void>* aims::SurfaceGenerator::circle_wireframe ( const carto::GenericObject params)
static
static AimsTimeSurface<2,Void>* aims::SurfaceGenerator::circle_wireframe ( const Point3df center,
float  radius,
unsigned  nseg = 20,
const Point3df normal = Point3df(0, 0, 1),
const Point3df startdir = Point3df(1, 0, 0),
float  startangle = 0,
float  stopangle = M_PI *2 
)
static

Circle, or part of circle.

center, radius are classical. nseg is the number of segments in the circle polygon normal is a normal vector to the circle plane. startdir is a vector in the circle plane determining the beginning of angles (circle ray). startangle, stopangle are meant to make parts of circle

static AimsSurfaceTriangle* aims::SurfaceGenerator::cone ( const carto::GenericObject params)
static
static AimsSurfaceTriangle* aims::SurfaceGenerator::cone ( const Point3df arrow,
const Point3df base,
float  radius,
unsigned  nfacets,
bool  closed,
bool  smooth = false 
)
static
static AimsSurfaceTriangle* aims::SurfaceGenerator::cube ( const carto::GenericObject params)
static
static AimsSurfaceTriangle* aims::SurfaceGenerator::cube ( const Point3df center,
float  radius,
bool  smoothnormal = false 
)
static
static AimsSurfaceTriangle* aims::SurfaceGenerator::cylinder ( const carto::GenericObject params)
static
static AimsSurfaceTriangle* aims::SurfaceGenerator::cylinder ( const Point3df p1,
const Point3df p2,
float  radius,
float  radius2,
unsigned  nfacets,
bool  closed,
bool  smooth = false 
)
static
static carto::Object aims::SurfaceGenerator::description ( )
static

description of known shapes and parameters (vector of dicts)

static carto::Object aims::SurfaceGenerator::description_wireframe ( )
static
static AimsSurfaceTriangle* aims::SurfaceGenerator::ellipse ( const carto::GenericObject params)
static
static AimsSurfaceTriangle* aims::SurfaceGenerator::ellipse ( const Point3df p1,
float  radius1,
float  radius2,
unsigned  nfacets,
bool  uniquevertices = false 
)
static
static AimsSurfaceTriangle* aims::SurfaceGenerator::generate ( const carto::GenericObject params)
static

generic factory function (calls lower-level functions)

static AimsSurfaceTriangle* aims::SurfaceGenerator::generate ( carto::Object  params)
static

generic factory function (calls lower-level functions)

static AimsTimeSurface<2,Void>* aims::SurfaceGenerator::generate_wireframe ( const carto::GenericObject params)
static
static AimsTimeSurface<2,Void>* aims::SurfaceGenerator::generate_wireframe ( carto::Object  params)
static

generic factory function (calls lower-level functions)

static AimsTimeSurface<2,Void>* aims::SurfaceGenerator::grid ( const carto::GenericObject params)
static
static AimsTimeSurface<2,Void>* aims::SurfaceGenerator::grid ( const Point3df boundingbox_min,
const Point3df boundingbox_max,
const Point3df grid_sampling 
)
static

Grid wireframe.

Similar to parallelepiped_wireframe, with a regular grid sampling.

static AimsSurfaceTriangle* aims::SurfaceGenerator::icosahedron ( const carto::GenericObject params)
static

Sphere generation functions by Manik Bhattacharjee (CNRS UPR640 - LENA)

Example of config file:

attributes = {
'type' : 'sphere',
'point1' : [ 11, 11, -10 ],
'radius' : 45,
'nfacets' : 100,
}
static AimsSurfaceTriangle* aims::SurfaceGenerator::icosahedron ( const Point3df center,
float  radius 
)
static
static AimsSurfaceTriangle* aims::SurfaceGenerator::icosphere ( const carto::GenericObject params)
static
static AimsSurfaceTriangle* aims::SurfaceGenerator::icosphere ( const Point3df center,
float  radius,
unsigned  nfacets 
)
static
static AimsTimeSurface<2,Void>* aims::SurfaceGenerator::parallelepiped_wireframe ( const carto::GenericObject params)
static
static AimsTimeSurface<2,Void>* aims::SurfaceGenerator::parallelepiped_wireframe ( const Point3df boundingbox_min,
const Point3df boundingbox_max 
)
static
static void aims::SurfaceGenerator::printDescription ( std::ostream &  s = std::cout)
static

outputs the description() dictionary in a more huma-readable way

static void aims::SurfaceGenerator::printDescription_wireframe ( std::ostream &  s = std::cout)
static
static AimsSurfaceTriangle* aims::SurfaceGenerator::sphere ( const carto::GenericObject params)
static
static AimsSurfaceTriangle* aims::SurfaceGenerator::sphere ( const Point3df p1,
float  radius,
unsigned  nfacets,
bool  uniquevertices = false 
)
static

The documentation for this class was generated from the following file: