Tramway SDK
Public Member Functions | Static Public Member Functions | Protected Attributes | Friends | List of all members
tram::Transition Class Reference

Connects WorldCells together. More...

#include <framework/transition.h>

Public Member Functions

 Transition (name_t name, WorldCell *cell_into)
 
 ~Transition ()=delete
 
void AddPoint (vec3 point)
 Adds a point to the transition volume. More...
 
void GeneratePlanes (bool disp=false)
 Finalizes the transition after adding points to it. More...
 
bool IsInside (vec3 point)
 Checks whether a point is inside the transition volume. More...
 
WorldCellGetCell ()
 

Static Public Member Functions

static TransitionFind (name_t name)
 Finds a transition with the given name. More...
 
static TransitionMake (name_t name, WorldCell *cell_into)
 Creates a new transition. More...
 

Protected Attributes

name_t name
 
WorldCellcell_into
 
std::vector< vec3points
 
std::vector< vec4planes
 

Friends

class WorldCell
 

Detailed Description

Connects WorldCells together.

See also
https://racenis.github.io/tram-sdk/documentation/framework/transition.html

Constructor & Destructor Documentation

◆ Transition()

tram::Transition::Transition ( name_t  name,
WorldCell cell_into 
)

◆ ~Transition()

tram::Transition::~Transition ( )
delete

Member Function Documentation

◆ AddPoint()

void tram::Transition::AddPoint ( vec3  point)

Adds a point to the transition volume.

Note
After adding points make sure to call Transition::GeneratePlanes().

◆ Find()

Transition * tram::Transition::Find ( name_t  name)
static

Finds a transition with the given name.

Pointer to the transition or a nullptr if wasn't found.

◆ GeneratePlanes()

void tram::Transition::GeneratePlanes ( bool  disp = false)

Finalizes the transition after adding points to it.

Parameters
dispDraws the transition planes for a single frame if set to true.

◆ GetCell()

WorldCell * tram::Transition::GetCell ( )
inline

◆ IsInside()

bool tram::Transition::IsInside ( vec3  point)

Checks whether a point is inside the transition volume.

◆ Make()

Transition * tram::Transition::Make ( name_t  name,
WorldCell cell_into 
)
static

Creates a new transition.

Parameters
nameName of the transition. Can be set to "none" if the transition doesn't need a name.
cell_intoPointer to the WorldCell into which the transition will be leading into.

Friends And Related Function Documentation

◆ WorldCell

friend class WorldCell
friend

Member Data Documentation

◆ cell_into

WorldCell* tram::Transition::cell_into
protected

◆ name

name_t tram::Transition::name
protected

◆ planes

std::vector<vec4> tram::Transition::planes
protected

◆ points

std::vector<vec3> tram::Transition::points
protected

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