KiCad PCB EDA Suite
Loading...
Searching...
No Matches
oce.cpp File Reference
#include <wx/filename.h>
#include "plugins/3d/3d_plugin.h"
#include "plugins/3dapi/ifsg_all.h"
#include <string>
#include <vector>

Go to the source code of this file.

Classes

struct  FILE_DATA
 

Macros

#define PLUGIN_OCE_MAJOR   1
 
#define PLUGIN_OCE_MINOR   4
 
#define PLUGIN_OCE_PATCH   2
 
#define PLUGIN_OCE_REVNO   0
 

Functions

SCENEGRAPHLoadModel (char const *filename)
 
const char * GetKicadPluginName (void)
 Function GetKicadPluginName returns the name of the plugin instance; for example IDFv3. More...
 
void GetPluginVersion (unsigned char *Major, unsigned char *Minor, unsigned char *Patch, unsigned char *Revision)
 Function GetPluginVersion retrieves the version of the instantiated plugin for informational purposes. More...
 
int GetNExtensions (void)
 Function GetNExtensions. More...
 
char const * GetModelExtension (int aIndex)
 Function GetModelExtension. More...
 
int GetNFilters (void)
 Function GetNFilters. More...
 
char const * GetFileFilter (int aIndex)
 Function GetFileFilter. More...
 
bool CanRender (void)
 Function CanRender. More...
 
SCENEGRAPHLoad (char const *aFileName)
 reads a model file and creates a generic display structure More...
 

Variables

static struct FILE_DATA file_data
 

Macro Definition Documentation

◆ PLUGIN_OCE_MAJOR

#define PLUGIN_OCE_MAJOR   1

Definition at line 38 of file oce.cpp.

◆ PLUGIN_OCE_MINOR

#define PLUGIN_OCE_MINOR   4

Definition at line 39 of file oce.cpp.

◆ PLUGIN_OCE_PATCH

#define PLUGIN_OCE_PATCH   2

Definition at line 40 of file oce.cpp.

◆ PLUGIN_OCE_REVNO

#define PLUGIN_OCE_REVNO   0

Definition at line 41 of file oce.cpp.

Function Documentation

◆ CanRender()

bool CanRender ( void  )

Function CanRender.

Returns
true if the plugin can render a model, that is the Load() function is implemented

Definition at line 129 of file oce.cpp.

◆ GetFileFilter()

char const * GetFileFilter ( int  aIndex)

Function GetFileFilter.

Returns
the file filter string for the given index

Definition at line 120 of file oce.cpp.

References file_data, and FILE_DATA::filters.

◆ GetKicadPluginName()

const char * GetKicadPluginName ( void  )

Function GetKicadPluginName returns the name of the plugin instance; for example IDFv3.

This string may be used to check for name conflicts or to display informational messages about loaded plugins. This method must be implemented in specific instantiations of a plugin class.

Returns
is the NULL-terminated UTF-8 string representing the plugin name

Definition at line 44 of file oce.cpp.

◆ GetModelExtension()

char const * GetModelExtension ( int  aIndex)

Function GetModelExtension.

Parameters
aIndexis the extension to return; valid values are 0 to GetNExtensions() - 1.
Returns
the requested extension or a null string if aIndex was invalid.

Definition at line 105 of file oce.cpp.

References FILE_DATA::extensions, and file_data.

◆ GetNExtensions()

int GetNExtensions ( void  )

Function GetNExtensions.

Returns
the number of extensions supported by the plugin

Definition at line 99 of file oce.cpp.

References FILE_DATA::extensions, and file_data.

◆ GetNFilters()

int GetNFilters ( void  )

Function GetNFilters.

Returns
the number of file filters

Definition at line 114 of file oce.cpp.

References file_data, and FILE_DATA::filters.

◆ GetPluginVersion()

void GetPluginVersion ( unsigned char *  Major,
unsigned char *  Minor,
unsigned char *  Patch,
unsigned char *  Revision 
)

Function GetPluginVersion retrieves the version of the instantiated plugin for informational purposes.

Do not confuse this with GetClassVersion which is used to determine API compatibility.

Parameters
Majorwill hold the Plugin Major version
Minorwill hold the Plugin Minor version
Patchwill hold the Plugin Patch level
Revisionwill hold the Plugin Revision

Definition at line 50 of file oce.cpp.

References PLUGIN_OCE_MAJOR, PLUGIN_OCE_MINOR, PLUGIN_OCE_PATCH, and PLUGIN_OCE_REVNO.

◆ Load()

SCENEGRAPH * Load ( char const *  aFileName)

reads a model file and creates a generic display structure

Parameters
aFileNameis the full path of the model file
Returns
a SCENEGRAPH pointer to the display structure if the model was successfully loaded and NULL if there is no rendering support for the model or there were problems reading the model

Definition at line 136 of file oce.cpp.

References LoadModel().

◆ LoadModel()

Variable Documentation

◆ file_data

struct FILE_DATA file_data
static