ActiveLib
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions
active::geometry Namespace Reference

Classes

struct  AlongLengthOf
 
class  Arc
 Class to represent an arc. More...
 
class  Box
 
struct  ComparePosition
 
class  Faceter
 A class to divide an arc into facets. More...
 
class  Leveller
 Class to reorientate geometric objects to a horizontal plane. More...
 
class  Line
 Class to represent a line. More...
 
class  LinEquation
 Class to represent a linear equation. More...
 
class  Matrix3x3
 A 3x3 matrix class. More...
 
class  Matrix4x4
 A 4x4 matrix class. More...
 
class  Plane
 Class to represent a plane. More...
 
class  Point
 
class  PolyEdge
 
class  Polygon
 
class  PolyPoint
 
class  PolyVector
 A vector of polygons. More...
 
class  Rotater
 Base class for rotation classes. More...
 
class  Vector3
 A 1x3 vector class. More...
 
class  Vector4
 A 1x4 vector class. More...
 
class  XInfo
 
class  XList
 
class  XPoint
 
class  XRotater
 Class to perform rotations in the x axis. More...
 
class  YRotater
 Class to perform rotations in the y axis. More...
 
class  ZRotater
 Class to perform rotations in the z axis. More...
 

Typedefs

using vertex_index = int32_t
 Index of a vertex, e.g. within a polygon.
 
using vertOption = std::optional<vertex_index>
 Optional vertex index (for an undefined or missing vertex index)
 
using part_index = int32_t
 Index of a part, e.g. a hole within a polygon.
 
using partOption = std::optional<part_index>
 Optional part index (for an undefined or missing part index)
 
using vertex_id = uint32_t
 

Enumerations

enum  OrdinalX { leftX = 0 , centreX , rightX }
 Ordinals in the X axis.
 
enum  OrdinalY { frontY = 0 , halfY , backY }
 Ordinals in the Y axis.
 
enum  OrdinalZ { bottomZ = 0 , middleZ , topZ }
 Ordinals in the Z axis.
 
enum class  Anchor2D {
  leftFront = (frontY * 3) + leftX , centreFront = (frontY * 3) + centreX , rightFront = (frontY * 3) + rightX , leftHalf = (halfY * 3) + leftX ,
  centreHalf = (halfY * 3) + centreX , rightHalf = (halfY * 3) + rightX , leftBack = (backY * 3) + leftX , centreBack = (backY * 3) + centreX ,
  rightBack = (backY * 3) + rightX
}
 Anchor positions in 2D.
 
enum class  Position {
  undefined = 0x00 , after = 0x01 , origin = 0x02 , along = 0x04 ,
  end = 0x08 , before = 0x10 , radial = 0x20 , outside = 0x01 ,
  inside = 0x10 , left = 0x01 , right = 0x10 , front = 0x10 ,
  back = 0x01 , within = along | end | origin , vertex = end | origin , former = along | origin ,
  latter = along | end , all = before | origin | along | end | after | radial
}
 Relative spatial position. More...
 
enum class  Rotation { clockwise , anticlockwise }
 Arc direction of travel. More...
 

Functions

std::optional< Anchor2DtoAnchor2D (const utility::String &text)
 
utility::String fromAnchor2D (Anchor2D anchor)
 
Position operator| (Position left, Position right)
 
Position operator& (Position left, Position right)
 

Detailed Description

Copyright 2024 Ralph Wessel and Hugh Wessel Distributed under the MIT License (See accompanying file LICENSE.txt or copy at https://opensource.org/license/mit/)

Enumeration Type Documentation

◆ Position

enum class active::geometry::Position
strong

Relative spatial position.

Enumerator
undefined 

Not calculated or invalid.

after 

After the end of an edge.

origin 

On the origin of an edge.

along 

Along the span of an edge.

end 

On the end of an edge.

before 

Before the origin of an edge.

radial 

On the extended circle of an arc, outside the arc itself.

outside 

Outside a closed shape.

inside 

Inside a closed shape.

left 

Left of a straight line.

right 

Right of a straight line.

front 

In front of a plane.

back 

At the back of a plane.

within 

Within the span of an edge, including ends.

vertex 

On a vertex.

former 

Within the edge span, excluding the end vertex.

latter 

Within the edge span, excluding the origin vertex.

all 

Any defined relative position.

◆ Rotation

enum class active::geometry::Rotation
strong

Arc direction of travel.

Enumerator
clockwise 

Clockwise direction.

anticlockwise 

Anti-clockwise direction.

Function Documentation

◆ fromAnchor2D()

String active::geometry::fromAnchor2D ( Anchor2D anchor)

Get the text for a Anchor2D value

Parameters
anchorThe incoming anchor
Returns
The anchor name as text
Here is the call graph for this function:

◆ toAnchor2D()

std::optional< Anchor2D > active::geometry::toAnchor2D ( const utility::String & text)

Get an Anchor2D enumerator from text

Parameters
textThe incoming text
Returns
The equivalent anchor