jade-engine  0.0
JadeEngine::LineStripParams Struct Reference

#include <LineStrip.h>

Public Attributes

ObjectLayer layer
 
std::vector< Vector2D_i32initialPoints
 
SDL_Color color
 
int32_t z
 

Detailed Description

Parameters required to create a LineStrip game object.

See also
Game::Create

Template to copy:

LineStripParams lineStripParams;
lineStripParams.layer = kObjectLayer_UI;
lineStripParams.initialPoints = {kZeroVector2D_i32, {1.0f, 0.0f}};
lineStripParams.z = 0;
lineStripParams.color = kLighterDarkGreyColor;

Member Data Documentation

◆ color

SDL_Color JadeEngine::LineStripParams::color

Color that all the lines in LineStrip will be rendered with.

◆ initialPoints

std::vector<Vector2D_i32> JadeEngine::LineStripParams::initialPoints

Points defining the LineStrip. The LineScript will consist of initialPoints.size()-1 lines.

The points are relative to the LineStrip's transform center position (LineStrip::transform->GetCenterPosition()). This means the whole strip can be moved around by changing the transform.

Each point is a both a start and an end of a line segment apart from the very first and very last points which are only start and end points respectively. Assuming three different points are passed: A, B, C in that order than the LineStrip will look like A-B-C. In order to create a closed loop, a copy of the very first point should the very last point.

See also
LineStrip::SetPoints

◆ layer

ObjectLayer JadeEngine::LineStripParams::layer

Layer that will the LineStrip belong to.

See also
ObjectLayer

◆ z

int32_t JadeEngine::LineStripParams::z

Z coordinate of the Sprite.

The game objects with higher Z coordinate will be drawn over the ones with lower one.


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