Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
CCmpObstructionManager.cpp File Reference
#include "precompiled.h"
#include "ICmpObstructionManager.h"
#include "graphics/Color.h"
#include "graphics/Overlay.h"
#include "lib/debug.h"
#include "maths/Fixed.h"
#include "maths/FixedVector2D.h"
#include "maths/MathUtil.h"
#include "ps/Profile.h"
#include "renderer/Scene.h"
#include "simulation2/MessageTypes.h"
#include "simulation2/components/ICmpObstruction.h"
#include "simulation2/components/ICmpPathfinder.h"
#include "simulation2/components/ICmpPosition.h"
#include "simulation2/components/ICmpRangeManager.h"
#include "simulation2/helpers/Geometry.h"
#include "simulation2/helpers/Grid.h"
#include "simulation2/helpers/Pathfinding.h"
#include "simulation2/helpers/Position.h"
#include "simulation2/helpers/Rasterize.h"
#include "simulation2/helpers/Render.h"
#include "simulation2/helpers/Spatial.h"
#include "simulation2/serialization/SerializeTemplates.h"
#include "simulation2/serialization/SerializedTypes.h"
#include "simulation2/system/Component.h"
#include "simulation2/system/Entity.h"
#include "simulation2/system/Message.h"
#include <algorithm>
#include <cmath>
#include <cstddef>
#include <map>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>
Include dependency graph for CCmpObstructionManager.cpp:

Classes

struct  anonymous_namespace{CCmpObstructionManager.cpp}::UnitShape
 Internal representation of axis-aligned circular shapes for moving units. More...
 
struct  anonymous_namespace{CCmpObstructionManager.cpp}::StaticShape
 Internal representation of arbitrary-rotation static square shapes for buildings. More...
 
struct  SerializeHelper< UnitShape >
 Serialization helper template for UnitShape. More...
 
struct  SerializeHelper< StaticShape >
 Serialization helper template for StaticShape. More...
 
class  CCmpObstructionManager
 

Namespaces

namespace  anonymous_namespace{CCmpObstructionManager.cpp}
 

Macros

#define TAG_IS_VALID(tag)   ((tag).valid())
 
#define TAG_IS_UNIT(tag)   (((tag).n & 1) == 0)
 
#define TAG_IS_STATIC(tag)   (((tag).n & 1) == 1)
 
#define UNIT_INDEX_TO_TAG(idx)   tag_t(((idx) << 1) | 0)
 
#define STATIC_INDEX_TO_TAG(idx)   tag_t(((idx) << 1) | 1)
 
#define TAG_TO_INDEX(tag)   ((tag).n >> 1)
 

Variables

constexpr entity_pos_t anonymous_namespace{CCmpObstructionManager.cpp}::OBSTRUCTION_SUBDIVISION_SIZE = entity_pos_t::FromInt(32)
 Size of each obstruction subdivision square. More...
 

Macro Definition Documentation

◆ STATIC_INDEX_TO_TAG

#define STATIC_INDEX_TO_TAG (   idx)    tag_t(((idx) << 1) | 1)

◆ TAG_IS_STATIC

#define TAG_IS_STATIC (   tag)    (((tag).n & 1) == 1)

◆ TAG_IS_UNIT

#define TAG_IS_UNIT (   tag)    (((tag).n & 1) == 0)

◆ TAG_IS_VALID

#define TAG_IS_VALID (   tag)    ((tag).valid())

◆ TAG_TO_INDEX

#define TAG_TO_INDEX (   tag)    ((tag).n >> 1)

◆ UNIT_INDEX_TO_TAG

#define UNIT_INDEX_TO_TAG (   idx)    tag_t(((idx) << 1) | 0)