7 #ifndef CAFU_MAPEDITOR_COMPONENT_MAP_ENTITY_HPP_INCLUDED
8 #define CAFU_MAPEDITOR_COMPONENT_MAP_ENTITY_HPP_INCLUDED
10 #include "EntProperty.hpp"
11 #include "GameSys/CompBase.hpp"
12 #include "GameSys/Entity.hpp"
13 #include "Math3D/Angles.hpp"
14 #include "Math3D/BoundingBox.hpp"
21 class wxProgressDialog;
58 const char*
GetName()
const {
return "MapEntity"; }
62 void Load_cmap (
TextParserT& TP,
MapDocumentT& MapDoc, wxProgressDialog* ProgressDialog,
unsigned long EntityNr,
unsigned int& cmapVersion,
bool IgnoreGroups);
63 void Load_HL1_map(
TextParserT& TP,
MapDocumentT& MapDoc, wxProgressDialog* ProgressDialog,
unsigned long EntityNr);
65 void Load_D3_map (
TextParserT& TP,
MapDocumentT& MapDoc, wxProgressDialog* ProgressDialog,
unsigned long EntityNr);
66 void Save_cmap(
const MapDocumentT& MapDoc, std::ostream& OutFile,
unsigned long EntityNr,
const BoundingBox3fT* Intersecting)
const;
79 std::string
GetProperty(
const wxString& Key,
const char* Default=
"")
const;
80 std::string
GetAndRemove(
const wxString& Key,
const char* Default=
"");
113 return dynamic_pointer_cast<CompMapEntityT>(Entity->
GetApp());
This class represents a CaWE "map" document.
Definition: MapDocument.hpp:45
const char * GetName() const
Returns the name of this component.
Definition: CompMapEntity.hpp:58
CompMapEntityT(MapDocumentT &MapDoc)
The constructor.
Definition: CompMapEntity.cpp:16
EntPropertyT * FindProperty(const wxString &Key, int *Index=NULL, bool Create=false)
Find the property.
Definition: CompMapEntity.cpp:67
This class adds no functionality of its own, but only exists for proper type separation.
Definition: MapPrimitive.hpp:21
void RemoveProperty(const wxString &Key)
Remove this property.
Definition: CompMapEntity.cpp:112
BoundingBox3fT GetElemsBB() const
Returns the "overall" bounding-box of this entity.
Definition: CompMapEntity.cpp:218
ArrayT< MapElementT * > GetAllMapElements() const
Returns all map elements (the representation and the primitives) of this entity and of all of its chi...
Definition: CompMapEntity.cpp:197
IntrusivePtrT< ComponentBaseT > GetApp()
Returns the application component of this entity.
Definition: Entity.hpp:128
std::string GetAndRemove(const wxString &Key, const char *Default="")
Returns the value of this property, using the default if not found, and removes it.
Definition: CompMapEntity.cpp:133
std::string GetProperty(const wxString &Key, const char *Default="") const
Returns the value of this property, using the default if not found.
Definition: CompMapEntity.cpp:123
void CopyPrimitives(const CompMapEntityT &MapEnt, bool Recursive=false)
Creates a copy of each primitive in MapEnt and adds it to this instance.
Definition: CompMapEntity.cpp:147
~CompMapEntityT()
The destructor.
Definition: CompMapEntity.cpp:39
Definition: EntProperty.hpp:18
void Load_HL2_vmf(TextParserT &TP, MapDocumentT &MapDoc, wxProgressDialog *ProgressDialog, unsigned long EntityNr)
This method reads a "world" or "entity" chunk.
Definition: Load_HL2_vmf.cpp:175
CompMapEntityT * Clone() const
The virtual copy constructor.
Definition: CompMapEntity.cpp:50
This class provides a graphical representation of an entity in the Map Editor.
Definition: MapEntRepres.hpp:20
This component houses the Map Editor specific parts of its entity.
Definition: CompMapEntity.hpp:30
This is the base class for all elements ("objects") that can exist in a map.
Definition: MapElement.hpp:57
This is the base class for the components that an entity is composed/aggregated of.
Definition: CompBase.hpp:54
This is a class for parsing text.
Definition: TextParser.hpp:21