Planeshift
Classes | Public Member Functions | Static Public Attributes

EEditApp Class Reference

#include <eeditapp.h>

List of all members.

Classes

struct  EffectPath

Public Member Functions

bool CancelEffect ()
 Cancels rendering of the current effect.
void CreateParticleSystem (const csString &name)
 Create a particle system mesh.
 EEditApp (iObjectRegistry *obj_reg, EEditReporter *_reporter)
 Constructor.
void ExecuteCommand (const char *cmd)
 Executes a named command.
void Exit ()
 Exits the application.
bool GetCamFlag (int flag)
 Gets the value of the given camera flag.
bool GetConfigBool (const char *key, bool defaultValue) const
float GetConfigFloat (const char *key, float defaultValue) const
csRef< iConfigManager > GetConfigManager () const
const char * GetConfigString (const char *key, const char *defaultValue) const
unsigned int GetCurrEffectID ()
 Gets the ID of the current effect.
csString GetCurrEffectName ()
 Gets the name current effect.
csString GetCurrParticleSystemName ()
 Gets the name current particle system.
psEffectManagerGetEffectManager ()
 Grabs the effect manager.
csRef< iEngine > GetEngine () const
csRef< iEventQueue > GetEventQueue () const
csRef< iGraphics2D > GetGraphics2D () const
csRef< iGraphics3D > GetGraphics3D () const
EEditInputboxManagerGetInputboxManager ()
 Grabs the inputbox manager.
csRef< iLoader > GetLoader () const
csVector2 GetMousePointer ()
 Gets the location of the mouse pointer.
iObjectRegistry * GetObjectRegistry () const
PawsManagerGetPaws ()
 Get Paws.
EEditReporterGetReporter () const
csRef< iTextureManager > GetTextureManager () const
EEditToolboxManagerGetToolboxManager ()
 Grabs the toolbox manager.
csRef< iVFS > GetVFS () const
csRef< iVirtualClock > GetVirtualClock () const
bool HandleEvent (iEvent &event)
 handles an event from the event handler
void HideToolbox (size_t toolbox)
 Ensures that the given toolbox is hidden.
bool Init ()
 Initializes some CS specific stuff, fills most of this classes global variables, and inits eedit specifics.
bool IsToolboxVisible (size_t toolbox)
 Checks if the toolbox is visible.
csPtr< iMeshWrapper > LoadCustomMesh (const csString &meshFile, const csString &name, csVector3 pos)
 Loads a mesh based on the name or filepath given.
bool LoadMap (const char *mapFile)
 Loads the given map file.
bool LoadPositionMesh (const csString &meshFile)
 Loads the position mesh indicator.
bool LoadTargetMesh (const csString &meshFile)
 Loads the target mesh indicator.
bool LoadWidget (const char *file)
 Loads a single paws widget.
bool LoadWidgets ()
 Loads all the paws widgets (windows).
void RefreshEffectList ()
 Refreshes the list of effects.
bool ReloadCurrentEffect ()
 Loads the current effect.
bool RenderCurrentEffect ()
 Renders the current effect.
bool RenderEffect (const csString &effectName)
 Reloads and renders the given effect.
void SetCamFlag (int flag, bool val)
 Sets the given camera flag.
void SetConfigBool (const char *key, bool value)
void SetConfigFloat (const char *key, float value)
void SetConfigString (const char *key, const char *value)
bool SetCurrEffect (const csString &name)
 Sets the current effect.
bool SetDefaultActorPositions ()
 Sets the positions of the origin and target actors to defaults based on the map's camera.
void SetPositionAnim (size_t index)
 Sets the animation of the position mesh.
void SetPositionData (const csVector3 &pos, float rot)
 Sets the position and rotation of the effect position anchor.
void SetTargetAnim (size_t index)
 Sets the animation of the target mesh.
void SetTargetData (const csVector3 &pos, float rot)
 Sets the position and rotation of the effect target anchor.
void SevereError (const char *msg)
 Reports a severe error in the application.
void ShowToolbox (size_t toolbox)
 Ensures that the given toolbox is visible.
bool TogglePauseEffect ()
 Toggles the pause/resume state of the effect.
bool ToggleToolbox (size_t toolbox)
 Toggles the visibility of the given toolbox.
bool UpdateEffect ()
 Effect has been changed, so lets rerender it.
 ~EEditApp ()
 Destructor.

Static Public Attributes

static const char * APP_NAME
static const char * CONFIG_FILENAME
static const char * KEY_DEFS_FILENAME
static const char * TEMP_EFFECTS_LIST
static const char * WINDOW_CAPTION

Detailed Description

Definition at line 81 of file eeditapp.h.


Constructor & Destructor Documentation

EEditApp::EEditApp ( iObjectRegistry *  obj_reg,
EEditReporter _reporter 
)

Constructor.

EEditApp::~EEditApp ( )

Destructor.


Member Function Documentation

bool EEditApp::CancelEffect ( )

Cancels rendering of the current effect.

Returns:
true if the effect is no longer being rendered
void EEditApp::CreateParticleSystem ( const csString &  name)

Create a particle system mesh.

void EEditApp::ExecuteCommand ( const char *  cmd)

Executes a named command.

Parameters:
cmdThe name of the command to execute.
void EEditApp::Exit ( )

Exits the application.

bool EEditApp::GetCamFlag ( int  flag)

Gets the value of the given camera flag.

Parameters:
flagthe editApp::CAM_FLAG to get
Returns:
the value of the specific camera flag
bool EEditApp::GetConfigBool ( const char *  key,
bool  defaultValue 
) const
float EEditApp::GetConfigFloat ( const char *  key,
float  defaultValue 
) const
csRef<iConfigManager> EEditApp::GetConfigManager ( ) const
const char* EEditApp::GetConfigString ( const char *  key,
const char *  defaultValue 
) const
unsigned int EEditApp::GetCurrEffectID ( ) [inline]

Gets the ID of the current effect.

Returns:
the ID of the current effect.

Definition at line 345 of file eeditapp.h.

csString EEditApp::GetCurrEffectName ( )

Gets the name current effect.

Returns:
the name of the current effect
csString EEditApp::GetCurrParticleSystemName ( )

Gets the name current particle system.

Returns:
the name of the particle system
psEffectManager* EEditApp::GetEffectManager ( )

Grabs the effect manager.

Returns:
the effect manager, 0 if it doesn't exist.
csRef<iEngine> EEditApp::GetEngine ( ) const
csRef<iEventQueue> EEditApp::GetEventQueue ( ) const
csRef<iGraphics2D> EEditApp::GetGraphics2D ( ) const
csRef<iGraphics3D> EEditApp::GetGraphics3D ( ) const
EEditInputboxManager* EEditApp::GetInputboxManager ( )

Grabs the inputbox manager.

Returns:
the inputbox manager, 0 if it doesn't exist.
csRef<iLoader> EEditApp::GetLoader ( ) const
csVector2 EEditApp::GetMousePointer ( )

Gets the location of the mouse pointer.

Returns:
the mouse position.
iObjectRegistry* EEditApp::GetObjectRegistry ( ) const
PawsManager* EEditApp::GetPaws ( ) [inline]

Get Paws.

Definition at line 134 of file eeditapp.h.

EEditReporter* EEditApp::GetReporter ( ) const
csRef<iTextureManager> EEditApp::GetTextureManager ( ) const
EEditToolboxManager* EEditApp::GetToolboxManager ( )

Grabs the toolbox manager.

Returns:
the toolbox manager, 0 if it doesn't exist
csRef<iVFS> EEditApp::GetVFS ( ) const
csRef<iVirtualClock> EEditApp::GetVirtualClock ( ) const
bool EEditApp::HandleEvent ( iEvent &  event)

handles an event from the event handler

Parameters:
eventthe event to handle
void EEditApp::HideToolbox ( size_t  toolbox)

Ensures that the given toolbox is hidden.

Parameters:
toolboxThe ID of the toolbox to hide.
bool EEditApp::Init ( )

Initializes some CS specific stuff, fills most of this classes global variables, and inits eedit specifics.

Returns:
true on success, false otherwise
bool EEditApp::IsToolboxVisible ( size_t  toolbox)

Checks if the toolbox is visible.

Parameters:
toolboxThe ID of the toolbox to hide.
Returns:
True if the toolbox is visible.
csPtr<iMeshWrapper> EEditApp::LoadCustomMesh ( const csString &  meshFile,
const csString &  name,
csVector3  pos 
)

Loads a mesh based on the name or filepath given.

Parameters:
meshFileblank, 'axis', or the path to the mesh.
nameName to use
posPosition to use
Returns:
the mesh if successful
bool EEditApp::LoadMap ( const char *  mapFile)

Loads the given map file.

Parameters:
mapFilePath to the map to load.
Returns:
True on success.
bool EEditApp::LoadPositionMesh ( const csString &  meshFile)

Loads the position mesh indicator.

Parameters:
meshFileempty string for nullmesh, "axis" for axis arrows, meshfilename for everything else.
Returns:
true on success.
bool EEditApp::LoadTargetMesh ( const csString &  meshFile)

Loads the target mesh indicator.

Parameters:
meshFileempty string for nullmesh, "axis" for axis arrows, meshfilename for everything else.
Returns:
true on success.
bool EEditApp::LoadWidget ( const char *  file)

Loads a single paws widget.

Parameters:
filethe filename of the window to load
Returns:
true if succeeded, false otherwise
bool EEditApp::LoadWidgets ( )

Loads all the paws widgets (windows).

Returns:
true if all succeeded to load, false if any had an error
void EEditApp::RefreshEffectList ( )

Refreshes the list of effects.

bool EEditApp::ReloadCurrentEffect ( )

Loads the current effect.

Returns:
true on success, false otherwise.
bool EEditApp::RenderCurrentEffect ( )

Renders the current effect.

Returns:
true on success, false otherwise.
bool EEditApp::RenderEffect ( const csString &  effectName)

Reloads and renders the given effect.

Parameters:
effectNamethe name of the effect to render
Returns:
true on success, false on failure
void EEditApp::SetCamFlag ( int  flag,
bool  val 
)

Sets the given camera flag.

Parameters:
flagthe editApp::CAM_FLAG to set
valthe new value of the camera flag
void EEditApp::SetConfigBool ( const char *  key,
bool  value 
)
void EEditApp::SetConfigFloat ( const char *  key,
float  value 
)
void EEditApp::SetConfigString ( const char *  key,
const char *  value 
)
bool EEditApp::SetCurrEffect ( const csString &  name)

Sets the current effect.

Parameters:
namethe name of the effect
Returns:
true on success, false otherwise
bool EEditApp::SetDefaultActorPositions ( )

Sets the positions of the origin and target actors to defaults based on the map's camera.

Returns:
True on success.
void EEditApp::SetPositionAnim ( size_t  index)

Sets the animation of the position mesh.

Parameters:
indexthe index of the animation to set.
void EEditApp::SetPositionData ( const csVector3 &  pos,
float  rot 
)

Sets the position and rotation of the effect position anchor.

Parameters:
posthe new pos of the effect's position anchor.
rotthe new y rotation of the effect's position anchor.
void EEditApp::SetTargetAnim ( size_t  index)

Sets the animation of the target mesh.

Parameters:
indexthe index of the animation to set.
void EEditApp::SetTargetData ( const csVector3 &  pos,
float  rot 
)

Sets the position and rotation of the effect target anchor.

Parameters:
posthe new pos of the effect's target anchor.
rotthe new y rotation of the effect's target anchor.
void EEditApp::SevereError ( const char *  msg)

Reports a severe error in the application.

Parameters:
msgthe error message
void EEditApp::ShowToolbox ( size_t  toolbox)

Ensures that the given toolbox is visible.

Parameters:
toolboxThe ID of the toolbox to show.
bool EEditApp::TogglePauseEffect ( )

Toggles the pause/resume state of the effect.

Returns:
true if the effect is now paused, false if it isn't
bool EEditApp::ToggleToolbox ( size_t  toolbox)

Toggles the visibility of the given toolbox.

Parameters:
toolboxthe ID of the toolbox to toggle
Returns:
true if the toolbox is visible, false if it's invisible or not found
bool EEditApp::UpdateEffect ( )

Effect has been changed, so lets rerender it.


Member Data Documentation

const char* EEditApp::APP_NAME [static]

Definition at line 86 of file eeditapp.h.

const char* EEditApp::CONFIG_FILENAME [static]

Definition at line 85 of file eeditapp.h.

const char* EEditApp::KEY_DEFS_FILENAME [static]

Definition at line 88 of file eeditapp.h.

const char* EEditApp::TEMP_EFFECTS_LIST [static]

Definition at line 89 of file eeditapp.h.

const char* EEditApp::WINDOW_CAPTION [static]

Definition at line 87 of file eeditapp.h.


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