JugiMap Framework
VectorLayer Class Reference

The VectorLayer class defines the vector layer from JugiMap Editor. More...

#include <jmLayers.h>

Inherits Layer.

Public Member Functions

 VectorLayer ()
 Constructor. More...
 
virtual void InitLayerParameters () override
 Initialize layer properties from the parameters set in the editor. More...
 
virtual void UpdateEngineObjects () override
 Update all engine objects related to this layer and its content. More...
 
virtual void UpdateBoundingBox () override
 Update the map bounding box of this layer. More...
 
std::vector< VectorShape * > & GetVectorShapes ()
 Returns a reference to the vector of stored shapes in this vector layer. More...
 
void AddVectorShape (VectorShape *_vs)
 Adds a new vector shape to this vector layer. More...
 
- Public Member Functions inherited from Layer
 Layer ()
 Constructor. More...
 
virtual void InitEngineObjects ()
 Initialize all engine objects related to this layer and its content. More...
 
virtual void DrawEngineObjects ()
 Draw all engine objects related to this layer and its content. More...
 
MapGetMap ()
 Returns a Map object where this layer is stored. More...
 
ComposedSpriteGetParentComposedSprite ()
 Returns a ComposedSprite where this layer is stored or nullptr if it is stored in a map. More...
 
bool IsMapLayer ()
 Returns true if this layer is stored in a Map; if it's stored in a ComposedSprite returns false. More...
 
LayerKind GetKind ()
 Returns the kind of this layer. More...
 
std::string GetName ()
 Returns the name of this layer. More...
 
std::vector< jugimap::Parameter > & GetParameters ()
 Returns a reference to the vector of stored paramters in this layer. More...
 
int GetZOrder ()
 Returns the zOrder of this layer. More...
 
Rectf GetBoundingBox ()
 Returns the map bounding box of this layer. More...
 
LayerType GetLayerType ()
 Returns the LayerType factor of this layer. More...
 
StretchingVariant GetStretchingVariant ()
 Returns the AlignX factor of this layer. More...
 
Vec2i GetAlignPosition ()
 Returns the allign position factor of this layer. More...
 
Vec2f GetAlignOffset ()
 Returns the allign offset factor of this layer. More...
 
Vec2f GetLayersPlaneSize ()
 Returns the layers plane size of this layer. More...
 
Vec2f GetParallaxFactor ()
 Returns the ParallaxLayerMode factor of this layer. More...
 
Vec2f GetParallaxOffset ()
 Returns the parallax offset of this layer. More...
 
void _SetName (const std::string &_name)
 Returns the ScreenLayerMode factor of this layer. More...
 
void _SetKind (LayerKind _kind)
 Sets the kind of this layer to the given *_kind*. More...
 
void _SetLayerType (LayerType _layerType)
 Sets the layer mode of this layer to the given *_layerType*. More...
 
void _SetParallaxFactor (Vec2f _parallaxFactor)
 Sets the parallax factor of this layer to the given *_parallaxFactor*. More...
 
void _SetAlignPosition (Vec2i _alignPosition)
 Sets the align position of this layer to the given *_alignPosition*. More...
 
void _SetAlignOffset (Vec2f _alignOffset)
 Sets the align offset of this layer to the given *_alignOffset*. More...
 
void _SetAttachToLayer (std::string _attachToLayer)
 Sets the 'attachToLayer' of this layer to the given *_attachToLayer*. More...
 
void _SetStretchingVariant (StretchingVariant _stretchingVariant)
 Sets the stretching variant of this layer to the given *_stretchingVariant*. More...
 
void _SetZOrder (int _zOrder)
 Sets the z-order factor of this layer to the given *_zOrder*. More...
 

Protected Member Functions

virtual ~VectorLayer () override
 Destructor. More...
 
- Protected Member Functions inherited from Layer
virtual ~Layer ()
 Destructor. More...
 

Detailed Description

The VectorLayer class defines the vector layer from JugiMap Editor.

A vector layer stores VectorShape objects and is their owner.

Constructor & Destructor Documentation

◆ VectorLayer()

Constructor.

◆ ~VectorLayer()

~VectorLayer ( )
overrideprotectedvirtual

Destructor.

Member Function Documentation

◆ InitLayerParameters()

void InitLayerParameters ( )
overridevirtual

Initialize layer properties from the parameters set in the editor.

This function should usually not be used manually as it gets called in the Map::InitMapParameters function.

Reimplemented from Layer.

◆ UpdateEngineObjects()

void UpdateEngineObjects ( )
overridevirtual

Update all engine objects related to this layer and its content.

This function should usually not be used manually as it gets called in the Map::UpdateEngineMap function.

Reimplemented from Layer.

◆ UpdateBoundingBox()

void UpdateBoundingBox ( )
overridevirtual

Update the map bounding box of this layer.

Reimplemented from Layer.

◆ GetVectorShapes()

std::vector<VectorShape*>& GetVectorShapes ( )
inline

Returns a reference to the vector of stored shapes in this vector layer.

◆ AddVectorShape()

void AddVectorShape ( VectorShape _vs)
inline

Adds a new vector shape to this vector layer.

Important: This vector layer will take over the ownership of the added vector shape.


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