Unravel Engine C++ Reference
Loading...
Searching...
No Matches
generator::grid_shape_t Class Reference

#include <grid_shape.hpp>

Public Types

using edges_t = impl_t::edges_t
 
using vertices_t = impl_t::vertices_t
 

Public Member Functions

 grid_shape_t (const gml::dvec2 &size={1.0, 1.0}, const gml::ivec2 &segments={4, 4}, const gml::ivec2 &subSegments={2, 2}) noexcept
 
edges_t edges () const noexcept
 
vertices_t vertices () const noexcept
 

Detailed Description

A 2d regular grid.

Definition at line 16 of file grid_shape.hpp.

Member Typedef Documentation

◆ edges_t

using generator::grid_shape_t::edges_t = impl_t::edges_t

Definition at line 24 of file grid_shape.hpp.

◆ vertices_t

using generator::grid_shape_t::vertices_t = impl_t::vertices_t

Definition at line 26 of file grid_shape.hpp.

Constructor & Destructor Documentation

◆ grid_shape_t()

grid_shape_t::grid_shape_t ( const gml::dvec2 & size = {1.0, 1.0},
const gml::ivec2 & segments = {4, 4},
const gml::ivec2 & subSegments = {2, 2} )
explicitnoexcept
Parameters
sizeA half of the side length of the grid.
segmentsThe Number of cells in the grid. If <1 an empty shape results.
subSegmentsThe number of segment along each cell edge. If <1 an empty shape results.

Definition at line 5 of file grid_shape.cpp.

Member Function Documentation

◆ edges()

grid_shape_t::edges_t grid_shape_t::edges ( ) const
noexcept

Definition at line 22 of file grid_shape.cpp.

◆ vertices()

grid_shape_t::vertices_t grid_shape_t::vertices ( ) const
noexcept

Definition at line 27 of file grid_shape.cpp.


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