// Ryzom - MMORPG Framework
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see .
#ifndef PRIMITIVE_PLUGIN_H
#define PRIMITIVE_PLUGIN_H
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include // MFC core and standard components
#include // MFC extensions
#include // MFC Automation classes
#include // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
#include
#undef min
#undef max
#include
#include
#include "../world_editor/plugin_interface.h"
class CPrimitivePlugin : public IPluginCallback, public IPrimitiveDisplayer
{
public:
virtual bool isActive();
virtual bool activatePlugin();
virtual bool closePlugin();
virtual std::string& getName();
CPrimitivePlugin();
virtual void positionMoved(const NLMISC::CVector &position) {}
virtual void lostPositionControl() {}
virtual void onIdle() {}
virtual void drawPrimitive(const NLLIGO::IPrimitive *primitive, const TRenderContext &renderContext);
private:
struct TCreatureInfo
{
bool HaveRadius;
float Radius;
bool HaveBox;
float Width;
float Length;
void readGeorges (const NLMISC::CSmartPtr &form, const NLMISC::CSheetId &sheetId);
void serial (NLMISC::IStream &s);
static uint getVersion ();
void removed() {}
};
std::map _CreatureInfos;
// @{
// \name Overload for IPluginCallback
virtual void init(IPluginAccess *pluginAccess);
/// The current region has changed.
virtual void primitiveChanged(const NLLIGO::IPrimitive *root);
// @}
bool _PluginActive;
bool m_Initialized;
// The plugin access
IPluginAccess *_PluginAccess;
};
extern "C"
{
/// Export the C factory method for dynamic linking..
__declspec( dllexport ) void *createPlugin();
}
#endif