PLaSK library
Loading...
Searching...
No Matches
plask::Primitive< 2 > Struct Reference

Specialization of Primitive, which define types of primitives and constants in space with 2 dimensions. More...

#include <plask/geometry/primitives.hpp>

Collaboration diagram for plask::Primitive< 2 >:
[legend]

Public Types

enum  Direction { DIRECTION_TRAN = 0 , DIRECTION_VERT = 1 }
 
typedef Box2D Box
 Rectangle type in 2d space.
 
typedef Vec< 2, doubleDVec
 Real (double) vector type in 2d space.
 

Static Public Member Functions

static void ensureIsValidDirection (unsigned direction)
 
static bool vecFuzzyCompare (const DVec &a, const DVec &b)
 Compare if a < with reasonable tollerance.
 

Static Public Attributes

static const int dim = 2
 Number of dimensions (2).
 
static const DVec ZERO_VEC = Vec<2>(0.0, 0.0)
 Zeroed 2d vector.
 
static const DVec NAN_VEC = Vec<2>(std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN())
 NaNed 2d vector.
 
static const Box INF_BOX = Box2D(- std::numeric_limits<double>::infinity(), - std::numeric_limits<double>::infinity(), std::numeric_limits<double>::infinity(), std::numeric_limits<double>::infinity())
 infinit box
 

Detailed Description

Specialization of Primitive, which define types of primitives and constants in space with 2 dimensions.

Definition at line 773 of file primitives.hpp.

Member Typedef Documentation

◆ Box

Rectangle type in 2d space.

Definition at line 775 of file primitives.hpp.

◆ DVec

Real (double) vector type in 2d space.

Definition at line 778 of file primitives.hpp.

Member Enumeration Documentation

◆ Direction

enum plask::Primitive< 2 >::Direction
Enumerator
DIRECTION_TRAN 
DIRECTION_VERT 

Definition at line 792 of file primitives.hpp.

Member Function Documentation

◆ ensureIsValidDirection()

static void plask::Primitive< 2 >::ensureIsValidDirection ( unsigned  direction)
inlinestatic

Definition at line 794 of file primitives.hpp.

◆ vecFuzzyCompare()

static bool plask::Primitive< 2 >::vecFuzzyCompare ( const DVec a,
const DVec b 
)
inlinestatic

Compare if a < with reasonable tollerance.

Definition at line 799 of file primitives.hpp.

Member Data Documentation

◆ dim

const int plask::Primitive< 2 >::dim = 2
static

Number of dimensions (2).

Definition at line 781 of file primitives.hpp.

◆ INF_BOX

const Primitive< 2 >::Box plask::Primitive< 2 >::INF_BOX = Box2D(- std::numeric_limits<double>::infinity(), - std::numeric_limits<double>::infinity(), std::numeric_limits<double>::infinity(), std::numeric_limits<double>::infinity())
static

infinit box

Definition at line 790 of file primitives.hpp.

◆ NAN_VEC

const Primitive< 2 >::DVec plask::Primitive< 2 >::NAN_VEC = Vec<2>(std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN())
static

NaNed 2d vector.

Definition at line 787 of file primitives.hpp.

◆ ZERO_VEC

const Primitive< 2 >::DVec plask::Primitive< 2 >::ZERO_VEC = Vec<2>(0.0, 0.0)
static

Zeroed 2d vector.

Definition at line 784 of file primitives.hpp.


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