7 #ifndef CAFU_MAP_BRUSH_HPP_INCLUDED
8 #define CAFU_MAP_BRUSH_HPP_INCLUDED
10 #include "MapPrimitive.hpp"
11 #include "MapFace.hpp"
12 #include "Templates/Array.hpp"
59 void Save_cmap(std::ostream& OutFile,
unsigned long BrushNr,
const MapDocumentT& MapDoc)
const;
60 wxString GetDescription()
const;
68 void TrafoMirror(
unsigned int NormalAxis,
float Dist,
bool LockTexCoords)
override;
107 void CompleteFaceVertices();
This class provides auxiliary means for rendering a 3D view.
Definition: Renderer3D.hpp:30
This class implements the rendering into a 2D view.
Definition: Renderer2D.hpp:22
bool IsValid() const
Returns whether this brush is valid. TODO: ctors should throw exceptions instead! ...
Definition: MapBrush.hpp:90
This class represents a CaWE "map" document.
Definition: MapDocument.hpp:45
const ArrayT< MapFaceT > & GetFaces() const
Returns the faces of this brush.
Definition: MapBrush.hpp:86
void TrafoMove(const Vector3fT &Delta, bool LockTexCoords) override
Translates this element by the given vector (in world-space).
Definition: MapBrush.cpp:544
BoundingBox3fT GetBB() const
Returns the spatial bounding-box of this map element.
Definition: MapBrush.cpp:304
void TrafoMirror(unsigned int NormalAxis, float Dist, bool LockTexCoords) override
Mirrors this element along the given mirror plane (in world-space).
Definition: MapBrush.cpp:724
bool Subtract(const MapBrushT *B, ArrayT< MapBrushT * > &Result) const
Subtracts from this brush A the given volume B, Result = A \ B.
Definition: MapBrush.cpp:476
bool TracePixel(const wxPoint &Pixel, int Radius, const ViewWindow2DT &ViewWin) const
This method determines if this map element is intersected/affected by the specified disc in ViewWin...
Definition: MapBrush.cpp:372
void TrafoScale(const Vector3fT &RefPoint, const Vector3fT &Scale, bool LockTexCoords) override
Scales this element about the given reference point (in world-space).
Definition: MapBrush.cpp:649
bool IsTranslucent() const
Returns whether this map element is (entirely or partially) translucent.
Definition: MapBrush.cpp:294
unsigned long Size() const
Get size of array.
Definition: Array.hpp:138
static MapBrushT * Create_D3_map(TextParserT &TP, const Vector3fT &Origin, unsigned long EntityNr, unsigned long PrimitiveNr, EditorMatManT &MatMan)
EntityNr and PrimitiveNr are provided by the caller, just for better error reporting.
Definition: Load_D3_map.cpp:175
static MapBrushT * CreateCylinder(const BoundingBox3fT &Box, const unsigned long NrOfSides, EditorMaterialI *Material)
Named constructor for creating a cylinder brush.
Definition: MapBrush.cpp:181
This class adds no functionality of its own, but only exists for proper type separation.
Definition: MapPrimitive.hpp:21
This class manages the editor materials for a game configuration.
Definition: EditorMaterialManager.hpp:20
void RestoreTrafoState(const TrafoMementoT *TM) override
Restores the transform-related state of this element from the given memento.
Definition: MapBrush.cpp:528
static MapBrushT * CreatePyramid(const BoundingBox3fT &Box, const unsigned long NrOfSides, EditorMaterialI *Material)
Named constructor for creating a pyramid brush.
Definition: MapBrush.cpp:198
An instance of this class encapsulates the transform-related state of a MapElementT.
Definition: MapElement.hpp:39
Definition: MapBrush.hpp:15
bool TraceRay(const Vector3fT &RayOrigin, const Vector3fT &RayDir, float &Fraction, unsigned long &FaceNr) const
Traces a ray against this map element, and returns whether it was hit.
Definition: MapBrush.cpp:316
static MapBrushT * Create_cmap(TextParserT &TP, MapDocumentT &MapDoc, unsigned long EntityNr, unsigned long BrushNr, bool IgnoreGroups)
EntityNr and BrushNr are provided by the caller, just for better error reporting. ...
Definition: LoadSave_cmap.cpp:243
Definition: EditorMaterial.hpp:21
void Split(const Plane3T< float > &Plane, MapBrushT **Front=NULL, MapBrushT **Back=NULL) const
This method splits the brush along the given plane and returns the front piece, the back piece...
Definition: MapBrush.cpp:419
static MapBrushT * CreateSphere(const BoundingBox3fT &Box, const unsigned long NrOfSides, EditorMaterialI *Material)
Named constructor for creating a sphere brush.
Definition: MapBrush.cpp:210
void TrafoRotate(const Vector3fT &RefPoint, const cf::math::AnglesfT &Angles, bool LockTexCoords) override
Rotates this element about the given reference point (in world-space).
Definition: MapBrush.cpp:579
Definition: ChildFrameViewWin2D.hpp:24
static MapBrushT * Create_HL1_map(TextParserT &TP, unsigned long EntityNr, unsigned long BrushNr, EditorMatManT &MatMan)
EntityNr and BrushNr are provided by the caller, just for better error reporting. ...
Definition: Load_HL1_map.cpp:93
TrafoMementoT * GetTrafoState() const override
Returns a memento that encapsulates the transform-related state of this element.
Definition: MapBrush.cpp:522
MapBrushT * Clone() const override
The virtual copy constructor.
Definition: MapBrush.cpp:247
static MapBrushT * CreateWedge(const BoundingBox3fT &Box, EditorMaterialI *Material)
Named constructor for creating a wedge brush.
Definition: MapBrush.cpp:165
Definition: Renderer.hpp:16
Definition: TypeSys.hpp:52
This class keeps type information (about an entity class that occurs in the game).
Definition: TypeSys.hpp:79
void Transform(const Matrix4x4fT &Matrix, bool LockTexCoords) override
Why does this method not replace all the other Trafo*() methods? This method is the most generic...
Definition: MapBrush.cpp:759
This is a class for parsing text.
Definition: TextParser.hpp:21
static MapBrushT * CreateBlock(const BoundingBox3fT &Box, EditorMaterialI *Material)
Named constructor for creating a block brush.
Definition: MapBrush.cpp:154