Choreonoid  1.8
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
cnoid::MeshGenerator Class Reference

#include <MeshGenerator.h>

Classes

struct  ElevationGrid
 
struct  Extrusion
 

Public Types

enum  MeshOption { NoOption = 0, TextureCoordinate = 1 }
 
typedef std::vector< Vector2, Eigen::aligned_allocator< Vector2 > > Vector2Array
 
typedef std::vector< Vector3, Eigen::aligned_allocator< Vector3 > > Vector3Array
 
typedef std::vector< AngleAxis, Eigen::aligned_allocator< AngleAxis > > AngleAxisArray
 

Public Member Functions

 MeshGenerator ()
 
 MeshGenerator (const MeshGenerator &org)
 
 ~MeshGenerator ()
 
void setDivisionNumber (int n)
 
int divisionNumber () const
 
void setExtraDivisionNumber (int n, int mode=SgMesh::ExtraDivisionPreferred)
 
int extraDivisionNumber () const
 
int extraDivisionMode () const
 
void setNormalGenerationEnabled (bool on)
 
void enableNormalGeneration (bool on)
 
bool isNormalGenerationEnabled () const
 
void setBoundingBoxUpdateEnabled (bool on)
 
bool isBoundingBoxUpdateEnabled () const
 
bool updateMeshWithPrimitiveInformation (SgMesh *mesh, int options=NoOption)
 
SgMeshgenerateBox (const Vector3 &size, int options=NoOption)
 
SgMeshgenerateSphere (double radius, int options=NoOption)
 
SgMeshgenerateCylinder (double radius, double height, int options=NoOption)
 
SgMeshgenerateCone (double radius, double height, int options=NoOption)
 
SgMeshgenerateCapsule (double radius, double height)
 
SgMeshgenerateDisc (double radius, double innerRadius)
 
SgMeshgenerateArrow (double cylinderRadius, double cylinderHeight, double coneRadius, double coneHeight)
 
SgMeshgenerateTorus (double radius, double crossSectionRadius)
 
SgMeshgenerateTorus (double radius, double crossSectionRadius, double beginAngle, double endAngle)
 
SgMeshgenerateExtrusion (const Extrusion &extrusion, int meshOptions=NoOption)
 
SgLineSetgenerateExtrusionLineSet (const Extrusion &extrusion, SgMesh *mesh)
 
SgMeshgenerateElevationGrid (const ElevationGrid &elevationGrid, int meshOptions=NoOption)
 
void generateTextureCoordinateForIndexedFaceSet (SgMeshBase *mesh)
 

Static Public Member Functions

static int defaultDivisionNumber ()
 

Member Typedef Documentation

◆ AngleAxisArray

typedef std::vector<AngleAxis, Eigen::aligned_allocator<AngleAxis> > cnoid::MeshGenerator::AngleAxisArray

◆ Vector2Array

typedef std::vector<Vector2, Eigen::aligned_allocator<Vector2> > cnoid::MeshGenerator::Vector2Array

◆ Vector3Array

typedef std::vector<Vector3, Eigen::aligned_allocator<Vector3> > cnoid::MeshGenerator::Vector3Array

Member Enumeration Documentation

◆ MeshOption

Enumerator
NoOption 
TextureCoordinate 

Constructor & Destructor Documentation

◆ MeshGenerator() [1/2]

MeshGenerator::MeshGenerator ( )

◆ MeshGenerator() [2/2]

cnoid::MeshGenerator::MeshGenerator ( const MeshGenerator org)

◆ ~MeshGenerator()

MeshGenerator::~MeshGenerator ( )

Member Function Documentation

◆ defaultDivisionNumber()

int MeshGenerator::defaultDivisionNumber ( )
static

◆ divisionNumber()

int cnoid::MeshGenerator::divisionNumber ( ) const
inline

◆ enableNormalGeneration()

void MeshGenerator::enableNormalGeneration ( bool  on)

◆ extraDivisionMode()

int cnoid::MeshGenerator::extraDivisionMode ( ) const
inline

◆ extraDivisionNumber()

int cnoid::MeshGenerator::extraDivisionNumber ( ) const
inline

◆ generateArrow()

SgMesh * MeshGenerator::generateArrow ( double  cylinderRadius,
double  cylinderHeight,
double  coneRadius,
double  coneHeight 
)

◆ generateBox()

SgMesh * MeshGenerator::generateBox ( const Vector3 size,
int  options = NoOption 
)

◆ generateCapsule()

SgMesh * MeshGenerator::generateCapsule ( double  radius,
double  height 
)

◆ generateCone()

SgMesh * MeshGenerator::generateCone ( double  radius,
double  height,
int  options = NoOption 
)

◆ generateCylinder()

SgMesh * MeshGenerator::generateCylinder ( double  radius,
double  height,
int  options = NoOption 
)

◆ generateDisc()

SgMesh * MeshGenerator::generateDisc ( double  radius,
double  innerRadius 
)

◆ generateElevationGrid()

SgMesh * MeshGenerator::generateElevationGrid ( const ElevationGrid elevationGrid,
int  meshOptions = NoOption 
)

◆ generateExtrusion()

SgMesh * MeshGenerator::generateExtrusion ( const Extrusion extrusion,
int  meshOptions = NoOption 
)

◆ generateExtrusionLineSet()

SgLineSet * MeshGenerator::generateExtrusionLineSet ( const Extrusion extrusion,
SgMesh mesh 
)

◆ generateSphere()

SgMesh * MeshGenerator::generateSphere ( double  radius,
int  options = NoOption 
)

◆ generateTextureCoordinateForIndexedFaceSet()

void MeshGenerator::generateTextureCoordinateForIndexedFaceSet ( SgMeshBase mesh)

◆ generateTorus() [1/2]

SgMesh * MeshGenerator::generateTorus ( double  radius,
double  crossSectionRadius 
)

◆ generateTorus() [2/2]

SgMesh * MeshGenerator::generateTorus ( double  radius,
double  crossSectionRadius,
double  beginAngle,
double  endAngle 
)

◆ isBoundingBoxUpdateEnabled()

bool MeshGenerator::isBoundingBoxUpdateEnabled ( ) const

◆ isNormalGenerationEnabled()

bool MeshGenerator::isNormalGenerationEnabled ( ) const

◆ setBoundingBoxUpdateEnabled()

void MeshGenerator::setBoundingBoxUpdateEnabled ( bool  on)

◆ setDivisionNumber()

void MeshGenerator::setDivisionNumber ( int  n)

◆ setExtraDivisionNumber()

void cnoid::MeshGenerator::setExtraDivisionNumber ( int  n,
int  mode = SgMesh::ExtraDivisionPreferred 
)
inline
Parameters
modeA combination of SgMesh::ExtraDivisionMode symbols

◆ setNormalGenerationEnabled()

void MeshGenerator::setNormalGenerationEnabled ( bool  on)

◆ updateMeshWithPrimitiveInformation()

bool MeshGenerator::updateMeshWithPrimitiveInformation ( SgMesh mesh,
int  options = NoOption 
)

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