KiCad PCB EDA Suite
|
Describe the runtime-loadable interface to support loading and parsing of 3D models. More...
#include "plugins/kicad_plugin.h"
Go to the source code of this file.
Macros | |
#define | KICAD_PLUGIN_CLASS "PLUGIN_3D" |
#define | MAJOR 1 |
#define | MINOR 0 |
#define | REVISION 0 |
#define | PATCH 0 |
Functions | |
KICAD_PLUGIN_EXPORT char const * | GetKicadPluginClass (void) |
Return the name of the implemented plugin class, for example 3DPLUGIN. | |
KICAD_PLUGIN_EXPORT void | GetClassVersion (unsigned char *Major, unsigned char *Minor, unsigned char *Patch, unsigned char *Revision) |
Retrieve the version of the Plugin Class. | |
KICAD_PLUGIN_EXPORT bool | CheckClassVersion (unsigned char Major, unsigned char Minor, unsigned char Patch, unsigned char Revision) |
Return true if the class version reported by the Plugin Loader is compatible with the specific implementation of a plugin. | |
KICAD_PLUGIN_EXPORT int | GetNExtensions (void) |
KICAD_PLUGIN_EXPORT char const * | GetModelExtension (int aIndex) |
KICAD_PLUGIN_EXPORT int | GetNFilters (void) |
KICAD_PLUGIN_EXPORT char const * | GetFileFilter (int aIndex) |
KICAD_PLUGIN_EXPORT bool | CanRender (void) |
KICAD_PLUGIN_EXPORT SCENEGRAPH * | Load (char const *aFileName) |
Read a model file and creates a generic display structure. | |
Describe the runtime-loadable interface to support loading and parsing of 3D models.
Definition in file 3d_plugin.h.
#define KICAD_PLUGIN_CLASS "PLUGIN_3D" |
Definition at line 37 of file 3d_plugin.h.
#define MAJOR 1 |
Definition at line 38 of file 3d_plugin.h.
#define MINOR 0 |
Definition at line 39 of file 3d_plugin.h.
#define PATCH 0 |
Definition at line 41 of file 3d_plugin.h.
#define REVISION 0 |
Definition at line 40 of file 3d_plugin.h.
KICAD_PLUGIN_EXPORT bool CanRender | ( | void | ) |
Definition at line 295 of file s3d_plugin_idf.cpp.
KICAD_PLUGIN_EXPORT bool CheckClassVersion | ( | unsigned char | Major, |
unsigned char | Minor, | ||
unsigned char | Patch, | ||
unsigned char | Revision | ||
) |
Return true if the class version reported by the Plugin Loader is compatible with the specific implementation of a plugin.
This function must be defined by each specific plugin and it is the plugin developer's responsibility to ensure that the Plugin is in fact compatible with the Plugin Loader. The Plugin Loader shall reject any Plugin with a different Major number regardless of the return value of this function.
Definition at line 70 of file 3d_plugin.h.
References MAJOR.
KICAD_PLUGIN_EXPORT void GetClassVersion | ( | unsigned char * | Major, |
unsigned char * | Minor, | ||
unsigned char * | Patch, | ||
unsigned char * | Revision | ||
) |
Retrieve the version of the Plugin Class.
This value is used to ensure API compatibility of a plugin as per typical practice. This must be implemented in a source module which is compiled as part of every implementation of a specific plugin class.
Major | will hold the Plugin Class Major version. |
Minor | will hold the Plugin Class Minor version. |
Revision | will hold the Plugin Class Revision. |
Patch | will hold the Plugin Class Patch level. |
Definition at line 52 of file 3d_plugin.h.
KICAD_PLUGIN_EXPORT char const * GetFileFilter | ( | int | aIndex | ) |
Definition at line 286 of file s3d_plugin_idf.cpp.
References file_data, FILE_DATA::filters, and NFILS.
KICAD_PLUGIN_EXPORT char const * GetKicadPluginClass | ( | void | ) |
Return the name of the implemented plugin class, for example 3DPLUGIN.
This should be implemented in a source module which is compiled as part of every implementation of a specific plugin class.
Definition at line 46 of file 3d_plugin.h.
References KICAD_PLUGIN_CLASS.
KICAD_PLUGIN_EXPORT char const * GetModelExtension | ( | int | aIndex | ) |
aIndex | is the extension to return; valid values are 0 to GetNExtensions() - 1. |
Definition at line 271 of file s3d_plugin_idf.cpp.
References FILE_DATA::extensions, file_data, and NEXTS.
KICAD_PLUGIN_EXPORT int GetNExtensions | ( | void | ) |
Definition at line 265 of file s3d_plugin_idf.cpp.
References FILE_DATA::extensions, file_data, and NEXTS.
KICAD_PLUGIN_EXPORT int GetNFilters | ( | void | ) |
Definition at line 280 of file s3d_plugin_idf.cpp.
References file_data, FILE_DATA::filters, and NFILS.
KICAD_PLUGIN_EXPORT SCENEGRAPH * Load | ( | char const * | aFileName | ) |
Read a model file and creates a generic display structure.
aFileName | is the full path of the model file. |
Definition at line 302 of file s3d_plugin_idf.cpp.
References loadIDFBoard(), loadIDFOutline(), LoadModel(), LoadVRML(), LoadX3D(), and S3D::WriteVRML().
Referenced by CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::PIN::Parse().