Developer Documentation
PrimitivesGeneratorPlugin Class Reference
Inheritance diagram for PrimitivesGeneratorPlugin:
PythonInterface BackupInterface RPCInterface LoadSaveInterface MenuInterface LoggingInterface BaseInterface

Public Slots

QString version ()
 

Signals

void updateView ()
 
void updatedObject (int _id, const UpdateType &_type)
 
void setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions)
 
void log (Logtype _type, QString _message)
 
void log (QString _message)
 
void getMenubarMenu (QString _name, QMenu *&_menu, bool _create)
 
void addEmptyObject (DataType _type, int &_id)
 
void createBackup (int _objectid, QString _name, UpdateType _type=UPDATE_ALL)
 
- Signals inherited from BaseInterface
virtual void updateView ()
 Update current view in Main Application. More...
 
virtual void setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions)
 Set a description for a public slot. More...
 
virtual void setRenderer (unsigned int _viewer, QString _rendererName)
 Set a renderer for the given viewer. More...
 
- Signals inherited from LoggingInterface
virtual void log (Logtype _type, QString _message)=0
 
virtual void log (QString _message)=0
 
- Signals inherited from MenuInterface
virtual void getMenubarMenu (QString _name, QMenu *&_menu, bool _create)
 Get a existing top level menu pointer or create a new one. More...
 
- Signals inherited from LoadSaveInterface
virtual void save (int _id, QString _filename)
 Save object to a file. More...
 
virtual void load (QString _filename, DataType _type, int &_id)
 Load object from file with a specific DataType. More...
 
- Signals inherited from RPCInterface
virtual void pluginExists (QString _pluginName, bool &_exists)
 
- Signals inherited from BackupInterface
virtual void createBackup (int _objectid, QString _name, UpdateType _type=UPDATE_ALL)
 Tell Backup Plugin to create a backup. More...
 
virtual void aboutToRestore (int _objectid)
 Backup Plugin tells other Plugins that a restore will happen. More...
 
virtual void generateBackup (int _id, QString _name, UpdateType _type)
 This signal is emitted by a BackupPlugin and tells a TypePlugin to generate a backup. More...
 
- Signals inherited from PythonInterface
virtual void executePythonScript (QString _script)
 

Public Member Functions

QString name ()
 Return a name for the plugin. More...
 
QString description ()
 Return a description of what the plugin is doing. More...
 
int addTriangulatedCylinder (const Vector &_position=Vector(0.0, 0.0, 0.0), const Vector &_axis=Vector(0.0, 0.0, 1.0), const double _radius=1.0, const double _height=5.0, const bool _top=true, const bool _bottom=true)
 
int addSphere (const Vector &_position=Vector(0.0, 0.0, 0.0), const double _radius=1.0)
 
int addSubdivisionSphere (const Vector &_position=Vector(0.0, 0.0, 0.0), const double _radius=1.0)
 
int addTetrahedron (const Vector &_position=Vector(0.0, 0.0, 0.0), const double _length=2.0)
 
int addPyramid (const Vector &_position=Vector(0.0, 0.0, 0.0), const double _length=2.0)
 
int addCube (const Vector &_position=Vector(0.0, 0.0, 0.0), const double _length=2.0)
 
int addTriangulatedPlaneFlat (const Vector &_position=Vector(0.0, 0.0, 0.0), const double _sizeX=2.0, const double _sizeY=2.0, const int _segmentsX=10, const int _segmentsY=10)
 
int addTriangulatedPlaneBumpy (const Vector &_position=Vector(0.0, 0.0, 0.0), const double _sizeX=10.0, const double _sizeY=10.0, const int _segmentsX=200, const int _segmentsY=200)
 
int addTriangulatedPlanesNonManifold (const Vector &_position=Vector(0.0, 0.0, 0.0), const double _sizeX=2.0, const double _sizeY=2.0, const double _sizeZ=1.0, const int _segmentsX=50, const int _segmentsY=50, const int _segmentsZ=50)
 
int addTriangulatedCube (const Vector &_position=Vector(0.0, 0.0, 0.0), const double _length=2.0)
 
int addIcosahedron (const Vector &_position=Vector(0.0, 0.0, 0.0), const double _length=2.0)
 
int addOctahedron (const Vector &_position=Vector(0.0, 0.0, 0.0), const double _length=2.0)
 
int addDodecahedron (const Vector &_position=Vector(0.0, 0.0, 0.0), const double _length=2.0)
 

Private Slots

void initializePlugin ()
 BaseInterface. More...
 
void pluginsInitialized ()
 
void noguiSupported ()
 Tell system that this plugin runs without ui. More...
 
- Private Slots inherited from BaseInterface
virtual void exit ()
 
virtual QString version ()
 Return a version string for your plugin. More...
 

Private Member Functions

int addTriMesh ()
 
int addPolyMesh ()
 
void constructOctahedron (const Vector &_position, const double _length)
 
void add_face (int _vh1, int _vh2, int _vh3)
 
void add_face (int _vh1, int _vh2, int _vh3, int _vh4)
 
void add_face (int _vh1, int _vh2, int _vh3, int _vh4, int _vh5)
 
ACG::Vec3d positionOnCylinder (const int _sliceNumber, const int _stackNumber, const Vector _position, const Vector _axis, const double _radius, const double _height)
 
ACG::Vec3d positionOnSphere (int _sliceNumber, int _stackNumber, const double _radius, const Vector &_position)
 
ACG::Vec2f texCoordOnSphere (int _sliceNumber, int _stackNumber)
 
- Private Member Functions inherited from BaseInterface
virtual void noguiSupported ()
 
virtual ~BaseInterface ()
 Destructor. More...
 
virtual void blockScenegraphUpdates (bool _block)
 Tell the core to prevent scenegraph updates. More...
 
virtual void updatedObject (int _objectId)
 An object has been changed or added by this plugin. More...
 
virtual void updatedObject (int _identifier, const UpdateType &_type)
 An object has been changed or added by this plugin. More...
 
virtual void nodeVisibilityChanged (int _identifier)
 A scenegraph node has been shown or hidden. More...
 
virtual void getCurrentRenderer (unsigned int _viewer, QString &_rendererName)
 Get the current renderer for the given viewer. More...
 
- Private Member Functions inherited from LoggingInterface
virtual ~LoggingInterface ()
 Destructor. More...
 
- Private Member Functions inherited from MenuInterface
virtual ~MenuInterface ()
 Destructor. More...
 
virtual void addMenubarAction (QAction *_action, QString _name)
 Adds an action to the menubar. More...
 
virtual void addMenubarActions (std::vector< QAction * > &_actions, QString _name)
 Add multiple actions to the menu bar. More...
 
- Private Member Functions inherited from LoadSaveInterface
virtual ~LoadSaveInterface ()
 Destructor. More...
 
virtual void addEmptyObject (DataType _type, int &_id)
 
virtual void copyObject (int _oldId, int &_newId)
 
virtual void emptyObjectAdded (int _id)
 DEPRECATED HERE (Moved to Type Interface)! Emit this signal if an empty object has been created. More...
 
virtual void deleteObject (int _id)
 Delete an object
This signal can be called from any thread.
. More...
 
virtual void deleteAllObjects ()
 Delete all Objects. More...
 
virtual void getAllFileFilters (QStringList &_filters)
 Get all file filters that are registered. More...
 
- Private Member Functions inherited from RPCInterface
virtual ~RPCInterface ()
 Destructor. More...
 
virtual void functionExists (QString _pluginName, QString _functionName, bool &_exists)
 
- Private Member Functions inherited from BackupInterface
virtual void createBackup (IdList _objectids, QString _name, std::vector< UpdateType > _types)
 Tell Backup Plugin to create a group backup. More...
 
virtual void undo (int _objectid)
 Tell Backup Plugin to undo the last action of an object. More...
 
virtual void redo (int _objectid)
 Tell Backup Plugin to redo the last action on an object. More...
 
virtual void undo ()
 Tell Backup Plugin to undo the last action. More...
 
virtual void redo ()
 Tell Backup Plugin to redo the last action. More...
 
virtual ~BackupInterface ()
 Destructor. More...
 
virtual void restored (int _objectid)
 Backup Plugin tells other Plugins that a restore has happened. More...
 
- Private Member Functions inherited from PythonInterface
virtual void openPythonScriptInEditor (QString _script)
 
virtual ~PythonInterface ()
 Destructor. More...
 

Private Attributes

std::vector< TriMesh::VertexHandlevhandles_
 
std::vector< PolyMesh::VertexHandlevphandles_
 
TriMeshtriMesh_
 
PolyMeshpolyMesh_
 
int slices_
 
int stacks_
 
QMenu * primitivesMenu_
 

Detailed Description

Definition at line 63 of file PrimitivesGenerator.hh.

Constructor & Destructor Documentation

◆ PrimitivesGeneratorPlugin()

PrimitivesGeneratorPlugin::PrimitivesGeneratorPlugin ( )

Definition at line 64 of file PrimitivesGenerator.cc.

◆ ~PrimitivesGeneratorPlugin()

PrimitivesGeneratorPlugin::~PrimitivesGeneratorPlugin ( )

Definition at line 74 of file PrimitivesGenerator.cc.

Member Function Documentation

◆ add_face() [1/3]

void PrimitivesGeneratorPlugin::add_face ( int  _vh1,
int  _vh2,
int  _vh3 
)
inlineprivate

Definition at line 1118 of file PrimitivesGenerator.cc.

◆ add_face() [2/3]

void PrimitivesGeneratorPlugin::add_face ( int  _vh1,
int  _vh2,
int  _vh3,
int  _vh4 
)
inlineprivate

Definition at line 1126 of file PrimitivesGenerator.cc.

◆ add_face() [3/3]

void PrimitivesGeneratorPlugin::add_face ( int  _vh1,
int  _vh2,
int  _vh3,
int  _vh4,
int  _vh5 
)
inlineprivate

Definition at line 1136 of file PrimitivesGenerator.cc.

◆ addCube()

int PrimitivesGeneratorPlugin::addCube ( const Vector _position = Vector(0.0,0.0,0.0),
const double  _length = 2.0 
)

Definition at line 577 of file PrimitivesGenerator.cc.

◆ addDodecahedron()

int PrimitivesGeneratorPlugin::addDodecahedron ( const Vector _position = Vector(0.0,0.0,0.0),
const double  _length = 2.0 
)

Definition at line 1291 of file PrimitivesGenerator.cc.

◆ addIcosahedron()

int PrimitivesGeneratorPlugin::addIcosahedron ( const Vector _position = Vector(0.0,0.0,0.0),
const double  _length = 2.0 
)

Definition at line 1148 of file PrimitivesGenerator.cc.

◆ addOctahedron()

int PrimitivesGeneratorPlugin::addOctahedron ( const Vector _position = Vector(0.0,0.0,0.0),
const double  _length = 2.0 
)

Definition at line 1265 of file PrimitivesGenerator.cc.

◆ addPolyMesh()

int PrimitivesGeneratorPlugin::addPolyMesh ( )
private

Definition at line 276 of file PrimitivesGenerator.cc.

◆ addPyramid()

int PrimitivesGeneratorPlugin::addPyramid ( const Vector _position = Vector(0.0,0.0,0.0),
const double  _length = 2.0 
)

Definition at line 1069 of file PrimitivesGenerator.cc.

◆ addSphere()

int PrimitivesGeneratorPlugin::addSphere ( const Vector _position = Vector(0.0,0.0,0.0),
const double  _radius = 1.0 
)

Definition at line 911 of file PrimitivesGenerator.cc.

◆ addSubdivisionSphere()

int PrimitivesGeneratorPlugin::addSubdivisionSphere ( const Vector _position = Vector(0.0,0.0,0.0),
const double  _radius = 1.0 
)

Definition at line 1016 of file PrimitivesGenerator.cc.

◆ addTetrahedron()

int PrimitivesGeneratorPlugin::addTetrahedron ( const Vector _position = Vector(0.0,0.0,0.0),
const double  _length = 2.0 
)

Definition at line 308 of file PrimitivesGenerator.cc.

◆ addTriangulatedCube()

int PrimitivesGeneratorPlugin::addTriangulatedCube ( const Vector _position = Vector(0.0,0.0,0.0),
const double  _length = 2.0 
)

Definition at line 519 of file PrimitivesGenerator.cc.

◆ addTriangulatedCylinder()

int PrimitivesGeneratorPlugin::addTriangulatedCylinder ( const Vector _position = Vector(0.0,0.0,0.0),
const Vector _axis = Vector(0.0,0.0,1.0),
const double  _radius = 1.0,
const double  _height = 5.0,
const bool  _top = true,
const bool  _bottom = true 
)

Definition at line 761 of file PrimitivesGenerator.cc.

◆ addTriangulatedPlaneBumpy()

int PrimitivesGeneratorPlugin::addTriangulatedPlaneBumpy ( const Vector _position = Vector(0.0,0.0,0.0),
const double  _sizeX = 10.0,
const double  _sizeY = 10.0,
const int  _segmentsX = 200,
const int  _segmentsY = 200 
)

Definition at line 400 of file PrimitivesGenerator.cc.

◆ addTriangulatedPlaneFlat()

int PrimitivesGeneratorPlugin::addTriangulatedPlaneFlat ( const Vector _position = Vector(0.0,0.0,0.0),
const double  _sizeX = 2.0,
const double  _sizeY = 2.0,
const int  _segmentsX = 10,
const int  _segmentsY = 10 
)

Definition at line 354 of file PrimitivesGenerator.cc.

◆ addTriangulatedPlanesNonManifold()

int PrimitivesGeneratorPlugin::addTriangulatedPlanesNonManifold ( const Vector _position = Vector(0.0,0.0,0.0),
const double  _sizeX = 2.0,
const double  _sizeY = 2.0,
const double  _sizeZ = 1.0,
const int  _segmentsX = 50,
const int  _segmentsY = 50,
const int  _segmentsZ = 50 
)

Definition at line 452 of file PrimitivesGenerator.cc.

◆ addTriMesh()

int PrimitivesGeneratorPlugin::addTriMesh ( )
private

Definition at line 262 of file PrimitivesGenerator.cc.

◆ constructOctahedron()

void PrimitivesGeneratorPlugin::constructOctahedron ( const Vector _position,
const double  _length 
)
private

Definition at line 1231 of file PrimitivesGenerator.cc.

◆ description()

QString PrimitivesGeneratorPlugin::description ( )
inlinevirtual

Return a description of what the plugin is doing.

This function has to return a basic description of the plugin

Implements BaseInterface.

Definition at line 102 of file PrimitivesGenerator.hh.

◆ initializePlugin

void PrimitivesGeneratorPlugin::initializePlugin ( )
privateslot

BaseInterface.

Definition at line 83 of file PrimitivesGenerator.cc.

◆ name()

QString PrimitivesGeneratorPlugin::name ( )
inlinevirtual

Return a name for the plugin.

This Function has to return the name of the plugin.

Implements BaseInterface.

Definition at line 101 of file PrimitivesGenerator.hh.

◆ noguiSupported

void PrimitivesGeneratorPlugin::noguiSupported ( )
inlineprivateslot

Tell system that this plugin runs without ui.

Definition at line 111 of file PrimitivesGenerator.hh.

◆ pluginsInitialized

void PrimitivesGeneratorPlugin::pluginsInitialized ( )
privateslot

Definition at line 169 of file PrimitivesGenerator.cc.

◆ positionOnCylinder()

ACG::Vec3d PrimitivesGeneratorPlugin::positionOnCylinder ( const int  _sliceNumber,
const int  _stackNumber,
const Vector  _position,
const Vector  _axis,
const double  _radius,
const double  _height 
)
inlineprivate

Definition at line 728 of file PrimitivesGenerator.cc.

◆ positionOnSphere()

ACG::Vec3d PrimitivesGeneratorPlugin::positionOnSphere ( int  _sliceNumber,
int  _stackNumber,
const double  _radius,
const Vector _position 
)
inlineprivate

Definition at line 880 of file PrimitivesGenerator.cc.

◆ texCoordOnSphere()

ACG::Vec2f PrimitivesGeneratorPlugin::texCoordOnSphere ( int  _sliceNumber,
int  _stackNumber 
)
inlineprivate

Definition at line 897 of file PrimitivesGenerator.cc.

◆ version

QString PrimitivesGeneratorPlugin::version ( )
inlineslot

Definition at line 115 of file PrimitivesGenerator.hh.

Member Data Documentation

◆ polyMesh_

PolyMesh* PrimitivesGeneratorPlugin::polyMesh_
private

Definition at line 215 of file PrimitivesGenerator.hh.

◆ primitivesMenu_

QMenu* PrimitivesGeneratorPlugin::primitivesMenu_
private

Definition at line 220 of file PrimitivesGenerator.hh.

◆ slices_

int PrimitivesGeneratorPlugin::slices_
private

Definition at line 217 of file PrimitivesGenerator.hh.

◆ stacks_

int PrimitivesGeneratorPlugin::stacks_
private

Definition at line 218 of file PrimitivesGenerator.hh.

◆ triMesh_

TriMesh* PrimitivesGeneratorPlugin::triMesh_
private

Definition at line 214 of file PrimitivesGenerator.hh.

◆ vhandles_

std::vector<TriMesh::VertexHandle> PrimitivesGeneratorPlugin::vhandles_
private

Definition at line 211 of file PrimitivesGenerator.hh.

◆ vphandles_

std::vector<PolyMesh::VertexHandle> PrimitivesGeneratorPlugin::vphandles_
private

Definition at line 212 of file PrimitivesGenerator.hh.


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