Jameo Core Library
Loading...
Searching...
No Matches
Classes | Enumerations | Functions | Variables
jm Namespace Reference

Classes

class  Array
 The array class serves as a template for handling arrays as easily as variables. At the same time, array size control takes place. More...
 
class  Array< T * >
 
class  AutoreleasePool
 This class provides the memory pool component to release objects at regular intervals that the programmer has designated for delayed release by Object::autorelease(). More...
 
class  Base64
 Implementation of the BASE64 algorithm. More...
 
struct  BufferElement
 This struct stores the drawing information. More...
 
class  ByteArray
 Represents a byte array and provide convenient methods for accessing the data. The Byte array is always \0 terminated. More...
 
class  Char
 This datatype presents a 16 bit unicode character. More...
 
struct  CharArray
 This data type represents a Unicode character array. It is deliberately used in distinction to the character string and serves as a supporting class when encoding and decoding character strings. More...
 
class  Charset
 The class Charset is a factory class to make a string out of arbitrarily coded C-strings and vice versa. More...
 
class  CharsetDecoder
 The class Charset is a mapping function to make a string out of arbitrarily coded C-strings, or vice versa. More...
 
struct  Color
 A class as a colour representation is so fundamental for us that it is used as a basic data type. The storage is as universal as possible. The special thing about this data type is that it stores the values "differently" depending on the mode. The data type is extremely space-saving. It only requires 6 bytes. More...
 
class  Comparable
 This class is intended to be used for comparisons. More...
 
class  CRC
 DWG files use many CRC (cyclic redundancy check) checksum algorithms to verify the integrity of the file. This method provides the appropriate methods to calculate and check the checksums. More...
 
class  Date
 Date represents a date or time. More...
 
class  DateFormatter
 Returns the date in a formatted string. The following placeholders are available: y : year : 2015; 15 M : month : July; Jul; 07; 7 w: calendar week : 42 W: week of the month: 1 D: day of the year: 142 d: day of the month: 24 F: weekday of the month: 2 E: weekday: Tuesday; Tu, T a: AM/PM marker: AM; H: hour (0-23) K: hour (0-11) h: hour (1-12) k: hour (1-24) m: minute of the hour s: second of the minute S: millisecond z: time zone. More...
 
class  Deflater
 Compression class for DEFLATE-compressed data. The basis is RFC 1950 and RFC 1951. As of 2017-01-14, the own implementation was exchanged in favour of zlib. More...
 
class  Diff
 Diff makes the diff function generally available. More...
 
class  DiffBacktrace
 DiffBacktrace is used to indicate the "path of change". More...
 
class  DiffDiag
 This class represents a diagonal in the diff algorithm. More...
 
class  DiffDistance
 This class calculates the Levenshtein distance between individual entities. More...
 
class  DiffInfo
 This class provides command line information about what changes have taken place and writes them to the console. More...
 
class  Document
 This class represents the "model" in the MVC context. This class is also the ideal parent class for all document-based applications, because basic functionalities that every user expects are already predefined here. In addition, development time is saved. These include: More...
 
class  EditableObject
 Objects of this class have additional functions for comfortable user interaction. For example the undo- management is more easy usable, also the connection to the user interface can be done more automatic. More...
 
class  Exception
 This class represents an exception that can be "thrown" in case of unexpected errors. More...
 
class  Extents
 A class to calculate the bounding box of points. More...
 
class  File
 This field stores the directory separator character based on the operating system. More...
 
class  FloatArray
 
class  Hashtable
 A hash table is an instrument used to sort data. A string serves as the access key, whose hash value ensures fast access. This class provides all the necessary methods to be able to work comfortably with a hash table. More...
 
class  I18nBundle
 This class provides a central resource to translate an application into the local language for the user. More...
 
class  Inflater
 Decompression class for DEFLATE-compressed data. Basis are RFC 1950 and RFC 1951. More...
 
class  Integer
 This class collect static methods to manipulate integer values. More...
 
class  Iterator
 The abstract class Iterator is used to provide an interface with which one can conveniently iterate through a list or array. It depends on the implementation which data is obtained. More...
 
class  LinkedList
 This class provides a linked list including undo management. More...
 
class  LinkedListIterator
 
class  LListElement
 
class  MacRomanDecoder
 Decoder for Macintosh Roman Codierung (CP 10000) encoding. More...
 
struct  Matrix
 An m x n-dimensional matrix. More...
 
class  MemoryStream
 The MemoryStream class represents a byte stream access to a byte array. More...
 
class  Mutex
 Mutex class. More...
 
class  Nurbs
 NURBS (nonuniform rational basis splines) are a generalized form of B-Splines. They allow for modeling many curves, including projected forms. DXF splines, for example, are based on NURBS. This class provides functions and methods to work with NURBS. More...
 
class  Object
 Most objects are derived from this class. This makes it possible to simplify the API, as object pointers can passed and not just void*. More...
 
class  PaintingBackend
 This class provides the parent class for the graphic output. This class draws. More...
 
class  Point
 Defines a point. This point is used for 2D-Coordinates. More...
 
class  Preferences
 The Preferences class abstracts the reading and writing of properties in a preferences file. The file should have the extension .properties. More...
 
struct  Property
 This interface defines the possibility to edit properties of an object via a uniform interface. This is particularly useful for saving time when objects are to be edited in the GUI. More...
 
class  RawDecoder
 Decoder converts the bytes 1 to 1. Only the LSB is taken into account. Values > 255 are therefore truncated. More...
 
struct  Rect
 Defines a rectangle. More...
 
class  Resource
 This class represents a resource, which comes with the app. More...
 
class  SAXAttributes
 This class represents the attributes used in the SAX parser. More...
 
class  SAXParser
 This class represents an XML/HTML parser based on the SAX (Simple API for XML) principle. The advantage lies in the serial processing of tags. This abstract base class must be derived by the parsers and implement some methods. More...
 
struct  Size
 Defines a size. More...
 
class  Stack
 This class provides a stack container that processes data elements based on the "Last in - First out" principle. More...
 
class  Stream
 The Stream class is an abstraction class for manipulating data streams through a unified interface. The stream itself can be a file, a byte array, a network interface, or anything else. More...
 
class  String
 String implements our generic string because std::string is inadequate and inconvenient. The internal character encoding is Unicode (UTF-8). More...
 
class  StringList
 This is a list of strings. It provides useful methods for manipulating string lists. More...
 
class  StringTokenizer
 The StringTokenizer class is used to tokenize a string based on specified delimiters. It splits the string into individual pieces. More...
 
class  System
 Basic system information. More...
 
class  Test
 This base class represents a test object. It is used to implement unit tests for any code. Typically a set of tests is collected in one derived test class. More...
 
class  TestVector
 A TestVector is a collection of several tests and will execute them all and return the number of errors on execution. More...
 
class  Thread
 Thread implementation. More...
 
class  UndoChange
 This element of a linked list stores the changes made to the file in an Undo Step. More...
 
class  UndoChangeBool
 This class encapsulates the step when a bool value is modified. More...
 
class  UndoChangeBuffer
 This class encapsulates the step when a Property value is modified. More...
 
class  UndoChangeColour
 This class encapsulates the step when a Color value is modified. More...
 
class  UndoChangeDate
 This class encapsulates the step when a Date value is modified. More...
 
class  UndoChangeDouble
 This class encapsulates the step when a double value is modified. More...
 
class  UndoChangeFloat
 This class encapsulates the step when a float value is modified. More...
 
class  UndoChangeInt16
 This class encapsulates the step when a int16 value is modified. More...
 
class  UndoChangeInt32
 This class encapsulates the step when a int32 value is modified. More...
 
class  UndoChangeInt64
 This class encapsulates the step when a int64 value is modified. More...
 
class  UndoChangeInt8
 This class encapsulates the step when a int8 value is modified. More...
 
class  UndoChangeInteger
 This class encapsulates the step when a int64 value is modified. More...
 
class  UndoChangeObjectRef
 This class encapsulates the step when a Property value is modified. More...
 
class  UndoChangeSizeType
 This class encapsulates the step when a uint64 value is modified. More...
 
class  UndoChangeString
 This class encapsulates the step when a double value is modified. More...
 
class  UndoChangeUInt16
 This class encapsulates the step when a uint16 value is modified. More...
 
class  UndoChangeUInt32
 This class encapsulates the step when a uint32 value is modified. More...
 
class  UndoChangeUInt64
 This class encapsulates the step when a uint64 value is modified. More...
 
class  UndoChangeUInt8
 This class encapsulates the step when a uint8 value is modified. More...
 
class  UndoChangeVertex2
 This class encapsulates the step when a Vertex2 value is modified. More...
 
class  UndoChangeVertex3
 This class encapsulates the step when a Vertex3 value is modified. More...
 
class  UndoManager
 This class represents the manager for undo operations. More...
 
class  UndoObjectRelease
 This class encapsulates the step when a Property value is modified. More...
 
class  UndoRegenerationMarker
 This class encapsulates the step when a Property value is modified. More...
 
class  UndoStep
 This object stores an editing step made to the file. The undo list is a doubly linked list. More...
 
class  URI
 Repräsentation einer URI (Uniform Resource Identifier). Eine URI hat folgenden Aufbau: More...
 
class  UTF16Decoder
 Decoder for UTF16 encoding. More...
 
class  UTF8Decoder
 Decoder for UTF8 encoding. More...
 
struct  Variant
 
struct  Vector
 An n-dimensional vector. More...
 
class  Vertex2
 A two dimensional vector. Owns special functions for 2d space. More...
 
class  Vertex3
 A three dimensional vector. Owns special functions for 3D space. More...
 
class  Windows1252Decoder
 Decoder for Windows CP 1252 encoding. More...
 
class  XMLWriter
 This class provides methods to write XML data. More...
 
class  ZipEntry
 Entry for a ZIP file. More...
 
class  ZipFile
 This class represents a ZIP file for reading ZIP data. More...
 
class  ZipOutputFile
 This class represents a ZIP file for writing ZIP data. More...
 

Enumerations

enum class  ColorMode { kGrey = 0 , kRgb = 1 , kCmyk = 2 }
 Enumeration of available colour modes for Color. More...
 
enum class  DiffOperation {
  DiffOperation::kDiffAdd , DiffOperation::kDiffDelete , DiffOperation::kDiffModified , DiffOperation::kDiffEqual ,
  DiffOperation::kDiffStart
}
 Enumeration for the operations available in the diff algorithm. More...
 
enum class  MatrixNorm { kNorm1 , kNormInf }
 List of available matrix norms. More...
 
enum class  BufferMode { kBmMoveTo , kBmLineTo , kBmBlindTo }
 Internal enumeration to provide a more detailed description of BufferElement. More...
 
enum class  PropertyChangeMode { kItself = 0 , kOthers = 1 , kCount = 2 }
 Status, to what extent changing the property has an influence on the status of other values of all properties. More...
 
enum class  PropertyType {
  kString , kInteger , kDouble , kDwgColour ,
  kDwgLayer , kDwgLineType , kBoolean , kValue
}
 
enum class  FileMode { kRead , kWrite , kReadWrite }
 Mode for opening streams and files. More...
 
enum class  LogLevel { kDebug , kInformation , kWarning , kError }
 
enum class  Status {
  eNo = 0 , eOK = 1 , eYes = 1 , eError ,
  eNotAllowed , eNotImplemented , eNullPointer , eIndexOutOfBounds ,
  eNotFound , eTimeout , eNoDirectory , eNullHandle ,
  eDuplicatHandle , eOwnerMismatch , eDuplicateKey , eInvalidKey ,
  eInvalidInput , eOnLockedLayer , eUndefinedBlock , eUndefinedLineType ,
  eUndefinedLayer , eWrongObjectType , eNoElementsForTransformationProvided , eTargetNodeForCopyOperationNotFound ,
  eTargetBeamForCopyOperationNotFound , eInvalidVectorInput , eInvalidAngleInput , eInvalidFactorInput
}
 This enumeration list all errors posted by this library. More...
 

Functions

void initCharsets ()
 Initialises the charsets.
 
void quitCharsets ()
 Deletes the charset objects.
 
DllExport Color blend (Color background, Color foreground, uint8 alpha)
 
DllExport Color interpolate (Color colour1, Color colour2, float percent)
 
DllExport bool operator== (Color const &c1, Color const &c2)
 
DllExport bool operator!= (Color const &c1, Color const &c2)
 
DllExport Color operator- (Color const &c1, Color const &c2)
 
DllExport Color operator+ (Color const &c1, Color const &c2)
 
DllExport String ExecPath ()
 This method returns the path of the executing application. It consists of the directory name and the application name.
 
DllExport String ExecDir ()
 This method returns the directory where the application is being executed.
 
DllExport String ExecName ()
 This method returns the name of the current application.
 
DllExport File ResourceDir (const String &bundleId)
 This method returns the directory where the current application should search for resources.
 
DllExport File PropertyDir ()
 This method returns the directory where the current application stores its settings.
 
DllExport File UserDir ()
 This method returns the user directory.
 
DllExport File TempDir ()
 
DllExport File currentDir ()
 This method returns the current directory.
 
DllExport Vertex3 intersectionPointLineAndPlane (const Vertex3 &planePosition, const Vertex3 &normal, const Vertex3 &linePosition, const Vertex3 &direction, bool extend)
 This method calculates the intersection point of a line and a plane using the normal form.
 
DllExport void intersectionPointsOfCircles (const Vertex2 &center1, double radius1, const Vertex2 &center2, double radius2, Vertex2 &intersection1, Vertex2 &intersection2)
 This method calculates the intersection point of 2 circles.
 
DllExport Vertex3 closestPointOnPlane (const Vertex3 &point, const Vertex3 &position, const Vertex3 &normal)
 This method calculates the point on the plane that has the minimum distance to the given point.
 
DllExport Vertex2 closestPointOnLine (const Vertex2 &point, const Vertex2 &position, const Vertex2 &direction)
 
DllExport Vertex3 closestPointOnLine (const Vertex3 &point, const Vertex3 &position, const Vertex3 &direction)
 This method calculates the point on the line that has the minimum distance to the given point. The connecting line between the point and the result is perpendicular to the line.
 
DllExport Vertex3 closestPointOnLine (const Vertex3 &position1, const Vertex3 &direction1, const Vertex3 &position2, const Vertex3 &direction2)
 This method calculates the point on the second line that has the minimum distance to the first line. The connecting line between the point and the result is perpendicular to the line.
 
DllExport Vertex3 closestPointOnLine (const Vertex3 &point, const Vertex3 &lineStart, const Vertex3 &lineEnd, bool extend)
 This method calculates the point on the line that has the minimum distance to the given point.
 
DllExport Vertex3 closestPointOnCircle (const Vertex3 &point, const Vertex3 &center, double radius, const Vertex3 &normal)
 This method calculates the minimum distance from the given point to the circle.
 
DllExport double distancePointToPlane (const Vertex3 &point, const Vertex3 &position, const Vertex3 &normal)
 This method calculates the point on the line that has the minimum distance to the plane.
 
DllExport double distancePointToPoint (const Vertex3 &point1, const Vertex3 &point2)
 This method calculates the minimum distance between the two points in 3D space.
 
DllExport double distancePointToPoint (const Vertex2 &point1, const Vertex2 &point2)
 This method calculates the minimum distance between two points in 3D space.
 
DllExport double distancePointToLine (const Vertex3 &point, const Vertex3 &position, const Vertex3 &direction)
 This method calculates the minimum distance between the given point and the line.
 
DllExport double distancePointToLine (const Vertex3 &point, const Vertex3 &lineStart, const Vertex3 &lineEnd, bool extend)
 This method calculates the minimum distance between a point and a line segment.
 
DllExport double distancePointToCircle (const Vertex3 &point, const Vertex3 &center, double radius, const Vertex3 &normal)
 This method calculates the minimum distance from the given point to the circle.
 
DllExport double distanceLineToLine (const Vertex3 &position1, const Vertex3 &direction1, const Vertex3 &position2, const Vertex3 &direction2)
 This method calculates the minimum distance between two lines in 3D space.
 
DllExport bool isPointOnPlane (const Vertex3 &point, const Vertex3 &position, const Vertex3 &normal, double maxDistance=0.0)
 This method checks if the given point lies on the plane, taking into account the specified tolerance.
 
DllExport bool isPointOnLine (const Vertex3 &point, const Vertex3 &position, const Vertex3 &direction)
 This method checks whether a given point lies on the line, taking into account a specified tolerance.
 
DllExport bool isPointOnLine (const Vertex3 &point, const Vertex3 &lineStart, const Vertex3 &lineEnd, bool extend)
 This method checks whether a given point lies on the line segment, taking into account a specified tolerance.
 
DllExport bool isPointOnCircle (const Vertex3 &point, const Vertex3 &center, double radius, const Vertex3 &normal)
 This method checks if a given point lies on a circle, taking into account a specified tolerance.
 
DllExport bool isSamePoint (const Vertex3 &point1, const Vertex3 &point2)
 This method checks if both points are identical, taking into account a specified tolerance.
 
DllExport Vertex2 intersectionPoint (const Vertex2 &position1, const Vertex2 &direction1, const Vertex2 &position2, const Vertex2 &direction2)
 This method calculates the two-dimensional intersection point of two lines defined by their starting points and direction vectors.
 
DllExport Vertex3 intersectionPoint (const Vertex3 &position1, const Vertex3 &direction1, const Vertex3 &position2, const Vertex3 &direction2)
 This method calculates the three-dimensional intersection point of two lines defined by their starting points and direction vectors.
 
DllExport bool crosses (const Vertex2 &start1, const Vertex2 &end1, const Vertex2 &start2, const Vertex2 &end2)
 This method checks if two lines intersect/cross between their endpoints. It is a planar problem.
 
DllExport Vertex2 extensionPointOnLine (const Vertex2 &rayorigin, const Vertex2 &direction, const Vertex2 &start, const Vertex2 &end)
 This method checks if a ray (line) intersects with a line between or on its endpoints. The direction of the ray is crucial.
 
DllExport Vertex2 extensionPointOnArc (const Vertex2 &rayorigin, const Vertex2 &direction, const Vertex2 &center, double radius, double start, double end)
 This method checks if a ray (line) intersects with a circular arc. The direction of the ray is crucial.
 
DllExport Vertex2 extensionPointOnEllipse (const Vertex2 &rayorigin, const Vertex2 &direction, const Vertex2 &center, const Vertex2 &mainAxis, double minorAxisRatio, double start, double end)
 This method checks if a ray (line) intersects with an elliptical arc. The direction of the ray is crucial.
 
DllExport Vertex3 angleBisector (const Vertex3 &direction1, const Vertex3 &direction2)
 This method calculates the angle bisector between the two direction vectors around a common central point. The length of the resulting vector is not normalized.
 
DllExport Vertex2 angleBisector (const Vertex2 &direction1, const Vertex2 &direction2)
 This method calculates the angle bisector between the two direction vectors around a common central point. The length of the resulting vector is not normalized.
 
DllExport jm::Status circleParameterBy3Points (Vertex2 &center, double &radius, const Vertex2 &p1, const Vertex2 &p2, const Vertex2 &p3)
 Calculates the circle parameters centre point and radius given by the 3 points.
 
DllExport jm::Status circleParameterBy2TangentsRadius (Vertex2 &center, double radius, const Vertex2 &p1, const Vertex2 &dir1, const Vertex2 &p2, const Vertex2 &dir2)
 Calculates the circle center point by the given 2 tangents and radius of the circle.
 
DllExport double degToRad (double deg)
 This function converts the angle from degrees into radians.
 
DllExport double radToDeg (double rad)
 This function converts the angle from radians into degrees.
 
DllExport int16 sign (double d)
 This function returns the sign of a number.
 
DllExport int64 round (double d)
 This function rounds a number commercially to the integral number.
 
DllExport float roundFrac (float f, int32 digits)
 This function rounds a number to the desired number of decimal places.
 
DllExport double roundFrac (double f, int64 digits)
 This function rounds a number to the desired number of decimal places.
 
DllExport bool isEqual (double v1, double v2)
 This method checks whether the two values are identical, taking resabs into account, are identical. Therefore |v2-v1| < RESABS applies. So if RESABS is the different, then the value is already is no longer the same. IT MUST BE LESS THAN EPSILON.
 
DllExport bool isNotEqual (double v1, double v2)
 This method checks whether the first value is not equal to the second, taking resabs into account.
 
DllExport bool isLess (double v1, double v2)
 This method checks whether the first value is lower than the second, taking resabs into account.
 
DllExport bool isLessEqual (double v1, double v2)
 This method checks whether the first value is lower or equal to the second, taking resabs into account.
 
DllExport bool isGreater (double v1, double v2)
 This method checks whether the first value is greater than the second, taking resabs into account.
 
DllExport bool isGreaterEqual (double v1, double v2)
 This method checks whether the first value is greater than or equal to the second, taking resabs into account.
 
DllExport bool isNaN (double d)
 This method checks whether the number is "Not a Number".
 
DllExport void swap (double &v1, double &v2)
 This method swaps the two variables in place.
 
DllExport void swap (int32 &v1, int32 &v2)
 This method swaps the two variables in place.
 
DllExport void swap (uint32 &v1, uint32 &v2)
 This method swaps the two variables in place.
 
DllExport void swap (uint16 &v1, uint16 &v2)
 This method swaps the two variables in place.
 
DllExport void swap (uint8 &v1, uint8 &v2)
 This method swaps the two variables in place.
 
DllExport double random ()
 Returna a random number between 0.0 and 1.0.
 
DllExport int32 random (int32 lower, int32 upper)
 Returns a random integer number.
 
DllExport bool probability (double percent)
 randomly determines whether the specified probability is fulfilled.
 
DllExport float interpolate (float begin, float end, float percent)
 This method interpolates the numerical value between begin and end.
 
DllExport double interpolate (double begin, double end, double percent)
 This method interpolates the numerical value between begin and end.
 
DllExport double interpolate (double vbegin, double vend, double begin, double end, double position)
 This method interpolates the numerical value between vbegin and vend.
 
DllExport bool powerOf2 (int x)
 This method checks whether the number passed is a power of 2.
 
DllExport uint32 ceilPowerOf2 (uint32 x)
 This method specifies the smallest power of 2 over the given value. If the value itself is a power of 2, then the value is returned.
 
DllExport double doubleMaschineEpsilon ()
 This function calculates the relative machine accuracy for double values. Should be 1.11022e-16 for 64 bit. Some literature sources also give 2.22045e-16 as accuracy.
 
DllExport float floatMaschineEpsilon ()
 This function calculates the relative machine accuracy for float values. Should be at 32 bit should be 5.96046e-08. Some literature sources also give 1.19209e-07 as accuracy.
 
DllExport int64 divFloor (int64 x, int64 y)
 Divide one integer by another and round towards minus infinity.
 
DllExport int64 modFloor (int64 x, int64 y)
 Calculates the residual value after dividing one integer by another and rounds the quotient towards minus infinity.
 
DllExport Matrix operator* (const Matrix &A, const Matrix &B)
 Implementation of the operator M * M (matrix multiplication).
 
DllExport Matrix operator* (const double &d, const Matrix &b)
 Implementation of the operator d * M (scalar multiplication).
 
DllExport Matrix operator* (const Matrix &A, const double &d)
 Implementation of the operator M * d (scalar multiplication).
 
DllExport Vector operator* (const Matrix &A, const Vector &b)
 Implementation of the operator M * v (matrix multiplication with a vector). The matrix must be square.
 
DllExport Vertex3 operator* (const Matrix &A, const Vertex3 &b)
 Implementation of the operator M * v (matrix multiplication with a vector). The matrix must be 3x3.
 
DllExport Matrix operator/ (const Matrix &b, const double &d)
 Implementation of the operator M / d (scalar division).
 
DllExport Matrix operator+ (const Matrix &A, const Matrix &B)
 Implementation of the operator M + M (matrix addition).
 
DllExport Matrix operator- (const Matrix &A, const Matrix &B)
 Implementation of the operator M - M (matrix subtraction).
 
jm::ByteArray osResourceRead (const jm::String &path)
 
DllExport size_t serializeBEInt16 (uint8 *buffer, size_t offset, int16 value)
 This method serializes a number using the Big-Endian method.
 
DllExport size_t serializeBEInt24 (uint8 *buffer, size_t offset, int32 value)
 This method serializes a number using the Big-Endian method.
 
DllExport size_t serializeBEInt32 (uint8 *buffer, size_t offset, int32 value)
 This method serializes a number using the Big-Endian method.
 
DllExport size_t serializeBEInt64 (uint8 *buffer, size_t offset, int64 value)
 This method serializes a number using the Big-Endian method.
 
DllExport size_t serializeLEInt16 (uint8 *buffer, size_t offset, int16 value)
 This method serializes a number using the Little-Endian method.
 
DllExport size_t serializeLEUInt16 (uint8 *buffer, size_t offset, uint16 value)
 This method serializes a number using the Little-Endian method.
 
DllExport size_t serializeBEUInt16 (uint8 *buffer, size_t offset, uint16 value)
 
DllExport size_t serializeLEInt24 (uint8 *buffer, size_t offset, int32 value)
 This method serializes a number using the Little-Endian method.
 
DllExport size_t serializeLEInt32 (uint8 *buffer, size_t offset, int32 value)
 This method serializes a number using the Little-Endian method.
 
DllExport size_t serializeLEInt32 (jm::ByteArray &buffer, size_t offset, int32 value)
 
DllExport size_t serializeLEInt64 (uint8 *buffer, size_t offset, int64 value)
 This method serializes a number using the Little-Endian method.
 
DllExport size_t serializeLEDouble (uint8 *buffer, size_t offset, double value)
 This method serializes a number using the Little-Endian method.
 
DllExport size_t serializeLEDouble (jm::ByteArray &buffer, size_t offset, double value)
 
DllExport size_t serializeLEFloat (uint8 *buffer, size_t offset, float value)
 This method serializes a number using the Little-Endian method.
 
DllExport uint16 deserializeBEUInt16 (const uint8 *buffer, size_t offset)
 This method deserializes a number using the Big-Endian method.
 
DllExport int16 deserializeBEInt16 (const uint8 *buffer, size_t offset)
 This method deserializes a number using the Big-Endian method.
 
DllExport int16 deserializeBEInt16 (const jm::ByteArray &buffer, size_t offset)
 
DllExport int32 deserializeBEInt24 (const uint8 *buffer, size_t offset)
 
DllExport int32 deserializeLEInt24 (const uint8 *buffer, size_t offset)
 
DllExport uint32 deserializeBEUInt32 (const uint8 *buffer, size_t offset)
 This method deserializes a number using the Big-Endian method.
 
DllExport uint32 deserializeBEUInt32 (const jm::ByteArray &buffer, size_t offset)
 
DllExport int32 deserializeBEInt32 (const jm::ByteArray &buffer, size_t offset)
 
DllExport int64 deserializeBEInt64 (const uint8 *buffer, size_t offset)
 This method deserializes a number using the Big-Endian method.
 
DllExport int64 deserializeBEInt64 (const jm::ByteArray &buffer, size_t offset)
 
DllExport uint16 deserializeLEUInt16 (const uint8 *buffer, size_t offset)
 This method deserializes a number using the Little-Endian method.
 
DllExport uint16 deserializeLEUInt16 (const jm::ByteArray &buffer, size_t offset)
 
DllExport int16 deserializeLEInt16 (const uint8 *buffer, size_t offset)
 This method deserializes a number using the Little-Endian method.
 
DllExport int16 deserializeLEInt16 (const jm::ByteArray &buffer, size_t offset)
 
DllExport uint32 deserializeLEUInt32 (const uint8 *buffer, size_t offset)
 This method deserializes a number using the Little-Endian method.
 
DllExport uint32 deserializeLEUInt32 (const jm::ByteArray &buffer, size_t offset)
 
DllExport int32 deserializeLEInt32 (const uint8 *buffer, size_t offset)
 This method deserializes a number using the Little-Endian method.
 
DllExport int32 deserializeLEInt32 (const jm::ByteArray &buffer, size_t offset)
 
DllExport int64 deserializeLEInt64 (const uint8 *buffer, size_t offset)
 This method deserializes a number using the Little-Endian method.
 
DllExport int64 deserializeLEInt64 (const jm::ByteArray &buffer, size_t offset)
 
DllExport double deserializeLEDouble (const uint8 *buffer, size_t offset)
 This method deserializes a number using the Little-Endian method.
 
DllExport double deserializeLEDouble (const jm::ByteArray &buffer, size_t offset)
 
DllExport float deserializeLEFloat (const uint8 *buffer, size_t offset)
 This method deserializes a number using the Little-Endian method.
 
DllExport double ConvertToDouble (String str)
 Method converts a String into a double.
 
DllExport String URLDecode (const String &str)
 
DllExport String URLEncode (const String &str)
 
jm::String osSystemLanguage ()
 
DllExport Vertex3 wcsToOcs (const Vertex3 &wcs, const Vertex3 &extrusion)
 This method converts World Coordinate System (WCS) coordinates to Object Coordinate System (OCS) coordinates.
 
DllExport Vertex3 ocsToWcs (const Vertex3 &ocs, const Vertex3 &extrusion)
 This method converts Object Coordinate System (OCS) coordinates to World Coordinate System (WCS) coordinates.
 
DllExport Matrix ocsMatrix (const Vertex3 &extrusion)
 This method calculates the OCS transformation matrix using the "Arbitrary Axis Algorithm" from the DXF reference.
 
DllExport Matrix wcsMatrix (const Vertex3 &extrusion)
 This method calculates the WCS transformation matrix using the "Arbitrary Axis Algorithm" from the DXF reference.
 
DllExport const Vector operator+ (const Vector &v1, const Vector &v2)
 Implementation of the operator +.
 
DllExport const Vector operator- (const Vector &v1, const Vector &v2)
 Implementation of the operator -.
 
DllExport const Vector operator* (const double &d, const Vector &v)
 Implementation of the operator *.
 
DllExport const Vertex2 operator+ (const Vertex2 &v1, const Vertex2 &v2)
 Implementation of the operator +.
 
DllExport const Vertex2 operator- (const Vertex2 &v1, const Vertex2 &v2)
 Implementation of the operator -.
 
DllExport Vertex2 operator* (double d, const Vertex2 &v)
 Implementation of the operator *.
 
DllExport Vertex2 operator* (const Vertex2 &v1, double d)
 Implementation of the operator *.
 
DllExport bool operator== (const Vertex2 &v1, const Vertex2 &v2)
 Implementation of the operator ==.
 
DllExport bool operator!= (Vertex2 const &v1, Vertex2 const &v2)
 Implementation of the operator -=.
 
DllExport Vertex2 solveLinearSystem (Vertex2 a, Vertex2 b, Vertex2 r)
 This method solves a linear system of equations with two unknowns: r.x = x * a.x + y * b.x r.y = x * a.y + y * b.y The system is solved for x and y. Matrix notation: a b r | a.x b.x | * | x | = | r.x | | a.y b.y | | y | | r.y |.
 
DllExport bool isLinearIndependent (const Vertex3 &v1, const Vertex3 &v2, const Vertex3 &v3)
 This method checks whether the three vectors are linearly independent. The vectors are linearly independent if the determinant of a 3x3 matrix in which the 3 vectors are the columns, is not equal to 0.
 
DllExport bool operator== (const Vertex3 &v1, const Vertex3 &v2)
 Implementation of the operator ==.
 
DllExport bool operator!= (const Vertex3 &v1, const Vertex3 &v2)
 Implementation of the operator !=.
 
DllExport Vertex3 operator* (double d, const Vertex3 &v)
 Implementation of the operator *.
 
DllExport Vertex3 operator* (const Vertex3 &v1, double d)
 Implementation of the operator *.
 

Variables

double const RESABS = 1E-6
 This value defines when two points or values are considered identical. This serves to catch numerical inaccuracies and the resulting errors. The predefined value can be changed, but this may change the calculations considerably. 1E-6 is highly recommended as the highest value.
 
size_t gErrorCount
 global error count during single test run.
 
size_t gTestCount
 global test count during single test run.
 
size_t gTotalErrorCount
 global error count over all done tests.
 
size_t gTotalTestCount
 global test count overall done tests.
 

Enumeration Type Documentation

◆ BufferMode

enum class jm::BufferMode
strong

Internal enumeration to provide a more detailed description of BufferElement.

Enumerator
kBmMoveTo 
kBmLineTo 
kBmBlindTo 

◆ ColorMode

enum class jm::ColorMode
strong

Enumeration of available colour modes for Color.

Note
Compile with -fshort-enums
Enumerator
kGrey 

Grey Scale

kRgb 

RGB Color Space

kCmyk 

CMYK Color Space

◆ FileMode

enum class jm::FileMode
strong

Mode for opening streams and files.

Enumerator
kRead 

Open for reading only. Corresponds to rb

kWrite 

Open for writing only. Corresponds to wb

kReadWrite 

Open for reading and writing. Corresponds to rb+

◆ LogLevel

enum class jm::LogLevel
strong
Enumerator
kDebug 
kInformation 
kWarning 
kError 

◆ MatrixNorm

enum class jm::MatrixNorm
strong

List of available matrix norms.

Enumerator
kNorm1 

Column Sum Norm.

kNormInf 

Row Sum Norm.

◆ PropertyChangeMode

enum class jm::PropertyChangeMode
strong

Status, to what extent changing the property has an influence on the status of other values of all properties.

Enumerator
kItself 

Property only changes own value.

kOthers 

Property can have influence on other values. E.g. if you change a point of a line, the property "length" will also changed.

kCount 

Property can change the number of properties.

◆ PropertyType

enum class jm::PropertyType
strong
Enumerator
kString 
kInteger 
kDouble 
kDwgColour 
kDwgLayer 
kDwgLineType 
kBoolean 
kValue 

◆ Status

enum class jm::Status
strong

This enumeration list all errors posted by this library.

Note
Do no use numbers of this enum for storing persistent data. Numbers are changing.
Enumerator
eNo 

Same meansing as a bool false

eOK 

All ok. Operation finished as excepted.

eYes 

Same meaning as a bool "true" (same as eOK)

eError 

Operation not done. Unspecified error occurred.

eNotAllowed 
eNotImplemented 

< Operation not allowed. Operation not done. Not implemented.

eNullPointer 

Operation not done. Null pointer found.

eIndexOutOfBounds 

Operation not done. Array overflow underflow and similar

eNotFound 

Operation not done. The entry you are looking for was not found.

eTimeout 

Operation not done. A timepout occurred.

eNoDirectory 
eNullHandle 

Operation not done. Null handle found.

eDuplicatHandle 

Operation not done. Duplicate handle found.

eOwnerMismatch 

Operation not done. Owner of object points to invalid owner.

eDuplicateKey 

Operation not done. Duplicate key found. E.g. because you try to name a new DwgLayer with a name, a layer already exists.

eInvalidKey 

Operation not done. Key has invalid value. E.g. because you try to use a group code in a DwgXRecord for a specific datatype, but the code is mapped to another data type, or you try to name a colour although the colour name is not defined in a colour book.

eInvalidInput 

Operation not done. Input is invalid.

eOnLockedLayer 

Operation not done. The entity is on a locked layer.

eUndefinedBlock 

Operation not done. The requested block is undefined.

eUndefinedLineType 

Operation not done. The requested DwgLineType is undefined.

eUndefinedLayer 

Operation not done. The requested DwgLayer is undefined.

eWrongObjectType 

Operation not done. The provided object has not the expected object type.

eNoElementsForTransformationProvided 
eTargetNodeForCopyOperationNotFound 
eTargetBeamForCopyOperationNotFound 
eInvalidVectorInput 
eInvalidAngleInput 
eInvalidFactorInput 

Function Documentation

◆ angleBisector() [1/2]

DllExport Vertex2 jm::angleBisector ( const Vertex2 direction1,
const Vertex2 direction2 
)

This method calculates the angle bisector between the two direction vectors around a common central point. The length of the resulting vector is not normalized.

Parameters
direction1The first direction vector.
direction2The second direction vector.
Returns
The angle bisector vector.

◆ angleBisector() [2/2]

DllExport Vertex3 jm::angleBisector ( const Vertex3 direction1,
const Vertex3 direction2 
)

This method calculates the angle bisector between the two direction vectors around a common central point. The length of the resulting vector is not normalized.

Parameters
direction1The first direction vector.
direction2The second direction vector.
Returns
The angle bisector vector.

◆ blend()

DllExport Color jm::blend ( Color  background,
Color  foreground,
uint8  alpha 
)

◆ ceilPowerOf2()

DllExport uint32 jm::ceilPowerOf2 ( uint32  x)

This method specifies the smallest power of 2 over the given value. If the value itself is a power of 2, then the value is returned.

◆ circleParameterBy2TangentsRadius()

DllExport jm::Status jm::circleParameterBy2TangentsRadius ( Vertex2 center,
double  radius,
const Vertex2 p1,
const Vertex2 dir1,
const Vertex2 p2,
const Vertex2 dir2 
)

Calculates the circle center point by the given 2 tangents and radius of the circle.

The enclosing quadrant of p1 and p2 contains center. If center is on p1 or p2 the direction vector decides

Parameters
centerThe calculated center point
radiusThe radius of the circle
p1Point on the first tangent
dir1Direction of the first tangent
p2Point on the second tangent
dir2Direction of the second tangent

◆ circleParameterBy3Points()

DllExport jm::Status jm::circleParameterBy3Points ( Vertex2 center,
double &  radius,
const Vertex2 p1,
const Vertex2 p2,
const Vertex2 p3 
)

Calculates the circle parameters centre point and radius given by the 3 points.

Parameters
centerThe calculated center point
radiusThe calculated radius
p1First point on the circle
p2Second point on the circle
p3Third point on the circle

◆ closestPointOnCircle()

DllExport Vertex3 jm::closestPointOnCircle ( const Vertex3 point,
const Vertex3 center,
double  radius,
const Vertex3 normal 
)

This method calculates the minimum distance from the given point to the circle.

Parameters
pointThe 3D point from which the distance is to be determined.
centerThe center point of the circle.
radiusThe radius of the circle.
normalThe normal vector of the circle's plane. It is perpendicular to the plane.
Returns
The shortest distance between the point and the circle.

◆ closestPointOnLine() [1/4]

DllExport Vertex2 jm::closestPointOnLine ( const Vertex2 point,
const Vertex2 position,
const Vertex2 direction 
)

◆ closestPointOnLine() [2/4]

DllExport Vertex3 jm::closestPointOnLine ( const Vertex3 point,
const Vertex3 lineStart,
const Vertex3 lineEnd,
bool  extend 
)

This method calculates the point on the line that has the minimum distance to the given point.

Parameters
pointThe 3D point from which the distance is to be determined.
lineStartThe starting point of the line.
lineEndThe end point of the line.
extendIf set to "true", the intersection point can be determined even if it lies beyond the line segment. If set to "false", NAN is returned if the point is outside the line segment.
Returns
The point on the line with the minimum distance to the given point.

◆ closestPointOnLine() [3/4]

DllExport Vertex3 jm::closestPointOnLine ( const Vertex3 point,
const Vertex3 position,
const Vertex3 direction 
)

This method calculates the point on the line that has the minimum distance to the given point. The connecting line between the point and the result is perpendicular to the line.

Parameters
pointThe 3D point from which the distance is to be determined.
positionThe position vector or any point on the line.
directionThe direction vector of the line.
Returns
The point on the line with the minimum distance to the given point.

◆ closestPointOnLine() [4/4]

DllExport Vertex3 jm::closestPointOnLine ( const Vertex3 position1,
const Vertex3 direction1,
const Vertex3 position2,
const Vertex3 direction2 
)

This method calculates the point on the second line that has the minimum distance to the first line. The connecting line between the point and the result is perpendicular to the line.

Parameters
position1The position vector or any point on the first line.
direction1The direction vector of the first line.
position2The position vector or any point on the second line.
direction2The direction vector of the second line.
Returns
The point on the second line with the shortest distance between the lines.

◆ closestPointOnPlane()

DllExport Vertex3 jm::closestPointOnPlane ( const Vertex3 point,
const Vertex3 position,
const Vertex3 normal 
)

This method calculates the point on the plane that has the minimum distance to the given point.

Parameters
pointThe 3D point from which the distance is to be determined.
positionAny point on the plane.
normalThe normal vector, perpendicular to the plane.
Returns
The point on the plane with the minimum distance (perpendicular distance) to the given point.

◆ ConvertToDouble()

DllExport double jm::ConvertToDouble ( String  str)
extern

Method converts a String into a double.

This method is similar to Double::ValueFrom(), but as a decimal divider a point or a comma is accepted.

Parameters
strThe string in form: "1.23".
Returns
The expected double number.

◆ crosses()

DllExport bool jm::crosses ( const Vertex2 start1,
const Vertex2 end1,
const Vertex2 start2,
const Vertex2 end2 
)

This method checks if two lines intersect/cross between their endpoints. It is a planar problem.

Parameters
start1The start point of the first line.
end1The end point of the first line.
start2The start point of the second line.
end2The end point of the second line.
Returns
"true" if the lines intersect between their endpoints, otherwise "false".

◆ currentDir()

DllExport File jm::currentDir ( )
extern

This method returns the current directory.

◆ degToRad()

DllExport double jm::degToRad ( double  deg)

This function converts the angle from degrees into radians.

Parameters
degGiven angle in degrees (e.g. 30 for 30°).
Returns
Returns the angle in radians.

◆ deserializeBEInt16() [1/2]

DllExport int16 jm::deserializeBEInt16 ( const jm::ByteArray buffer,
size_t  offset 
)

◆ deserializeBEInt16() [2/2]

DllExport int16 jm::deserializeBEInt16 ( const uint8 *  buffer,
size_t  offset 
)

This method deserializes a number using the Big-Endian method.

Parameters
bufferThe byte buffer where the number is located.
offsetThe zero-based index of the position where the first byte is located.
Returns
Returns the deserialized number as int16.

◆ deserializeBEInt24()

DllExport int32 jm::deserializeBEInt24 ( const uint8 *  buffer,
size_t  offset 
)

◆ deserializeBEInt32()

DllExport int32 jm::deserializeBEInt32 ( const jm::ByteArray buffer,
size_t  offset 
)

◆ deserializeBEInt64() [1/2]

DllExport int64 jm::deserializeBEInt64 ( const jm::ByteArray buffer,
size_t  offset 
)

◆ deserializeBEInt64() [2/2]

DllExport int64 jm::deserializeBEInt64 ( const uint8 *  buffer,
size_t  offset 
)

This method deserializes a number using the Big-Endian method.

Parameters
bufferThe byte buffer where the number is located.
offsetThe zero-based index of the position where the first byte is located.
Returns
Returns the deserialized number as int64.

◆ deserializeBEUInt16()

DllExport uint16 jm::deserializeBEUInt16 ( const uint8 *  buffer,
size_t  offset 
)

This method deserializes a number using the Big-Endian method.

Parameters
bufferThe byte buffer where the number is located.
offsetThe zero-based index of the position where the first byte is located.
Returns
Returns the deserialized number as uint16.

◆ deserializeBEUInt32() [1/2]

DllExport uint32 jm::deserializeBEUInt32 ( const jm::ByteArray buffer,
size_t  offset 
)

◆ deserializeBEUInt32() [2/2]

DllExport uint32 jm::deserializeBEUInt32 ( const uint8 *  buffer,
size_t  offset 
)

This method deserializes a number using the Big-Endian method.

Parameters
bufferThe byte buffer where the number is located.
offsetThe zero-based index of the position where the first byte is located.
Returns
Returns the deserialized number as uint32.

◆ deserializeLEDouble() [1/2]

DllExport double jm::deserializeLEDouble ( const jm::ByteArray buffer,
size_t  offset 
)

◆ deserializeLEDouble() [2/2]

DllExport double jm::deserializeLEDouble ( const uint8 *  buffer,
size_t  offset 
)

This method deserializes a number using the Little-Endian method.

Parameters
bufferThe byte buffer where the number is located.
offsetThe zero-based index of the position where the first byte is located.
Returns
Returns the deserialized number as double.

◆ deserializeLEFloat()

DllExport float jm::deserializeLEFloat ( const uint8 *  buffer,
size_t  offset 
)

This method deserializes a number using the Little-Endian method.

Parameters
bufferThe byte buffer where the number is located.
offsetThe zero-based index of the position where the first byte is located.
Returns
Returns the deserialized number as float.

◆ deserializeLEInt16() [1/2]

DllExport int16 jm::deserializeLEInt16 ( const jm::ByteArray buffer,
size_t  offset 
)

◆ deserializeLEInt16() [2/2]

DllExport int16 jm::deserializeLEInt16 ( const uint8 *  buffer,
size_t  offset 
)

This method deserializes a number using the Little-Endian method.

Parameters
bufferThe byte buffer where the number is located.
offsetThe zero-based index of the position where the first byte is located.
Returns
Returns the deserialized number as int16.

◆ deserializeLEInt24()

DllExport int32 jm::deserializeLEInt24 ( const uint8 *  buffer,
size_t  offset 
)

◆ deserializeLEInt32() [1/2]

DllExport int32 jm::deserializeLEInt32 ( const jm::ByteArray buffer,
size_t  offset 
)

◆ deserializeLEInt32() [2/2]

DllExport int32 jm::deserializeLEInt32 ( const uint8 *  buffer,
size_t  offset 
)

This method deserializes a number using the Little-Endian method.

Parameters
bufferThe byte buffer where the number is located.
offsetThe zero-based index of the position where the first byte is located.
Returns
Returns the deserialized number as int32.

◆ deserializeLEInt64() [1/2]

DllExport int64 jm::deserializeLEInt64 ( const jm::ByteArray buffer,
size_t  offset 
)

◆ deserializeLEInt64() [2/2]

DllExport int64 jm::deserializeLEInt64 ( const uint8 *  buffer,
size_t  offset 
)

This method deserializes a number using the Little-Endian method.

Parameters
bufferThe byte buffer where the number is located.
offsetThe zero-based index of the position where the first byte is located.
Returns
Returns the deserialized number as int64.

◆ deserializeLEUInt16() [1/2]

DllExport uint16 jm::deserializeLEUInt16 ( const jm::ByteArray buffer,
size_t  offset 
)

◆ deserializeLEUInt16() [2/2]

DllExport uint16 jm::deserializeLEUInt16 ( const uint8 *  buffer,
size_t  offset 
)

This method deserializes a number using the Little-Endian method.

Parameters
bufferThe byte buffer where the number is located.
offsetThe zero-based index of the position where the first byte is located.
Returns
Returns the deserialized number as uint16.

◆ deserializeLEUInt32() [1/2]

DllExport uint32 jm::deserializeLEUInt32 ( const jm::ByteArray buffer,
size_t  offset 
)

◆ deserializeLEUInt32() [2/2]

DllExport uint32 jm::deserializeLEUInt32 ( const uint8 *  buffer,
size_t  offset 
)

This method deserializes a number using the Little-Endian method.

Parameters
bufferThe byte buffer where the number is located.
offsetThe zero-based index of the position where the first byte is located.
Returns
Returns the deserialized number as uint32.

◆ distanceLineToLine()

DllExport double jm::distanceLineToLine ( const Vertex3 position1,
const Vertex3 direction1,
const Vertex3 position2,
const Vertex3 direction2 
)

This method calculates the minimum distance between two lines in 3D space.

Parameters
position1The position vector or any point on the first line.
direction1The direction vector of the first line.
position2The position vector or any point on the second line.
direction2The direction vector of the second line.
Returns
The shortest distance between the two lines.

◆ distancePointToCircle()

DllExport double jm::distancePointToCircle ( const Vertex3 point,
const Vertex3 center,
double  radius,
const Vertex3 normal 
)

This method calculates the minimum distance from the given point to the circle.

Parameters
pointThe 3D point from which the distance is to be determined.
centerThe center point of the circle.
radiusThe radius of the circle.
normalThe normal vector of the circle's plane. It is perpendicular to the plane.
Returns
The shortest distance between the line and the circle.

◆ distancePointToLine() [1/2]

DllExport double jm::distancePointToLine ( const Vertex3 point,
const Vertex3 lineStart,
const Vertex3 lineEnd,
bool  extend 
)

This method calculates the minimum distance between a point and a line segment.

Parameters
pointThe 3D point from which the distance is to be determined.
lineStartThe starting point of the line segment.
lineEndThe end point of the line segment.
extendIf set to "true", the intersection point can be determined even if it lies beyond the line segment. If set to "false", one of the end points of the line segment is returned as the "intersection point" if the point is outside the line segment.
Returns
The shortest distance between the line segment and the point.

◆ distancePointToLine() [2/2]

DllExport double jm::distancePointToLine ( const Vertex3 point,
const Vertex3 position,
const Vertex3 direction 
)

This method calculates the minimum distance between the given point and the line.

Parameters
pointThe 3D point from which the distance is to be determined.
positionThe position vector or any point on the line.
directionThe direction vector of the line.
Returns
The shortest distance between the line and the point.

◆ distancePointToPlane()

DllExport double jm::distancePointToPlane ( const Vertex3 point,
const Vertex3 position,
const Vertex3 normal 
)

This method calculates the point on the line that has the minimum distance to the plane.

Parameters
pointThe 3D point from which the distance is to be determined.
positionAny point on the plane.
normalThe normal vector of the plane.
Returns
The point on the line with the minimum distance to the plane.

◆ distancePointToPoint() [1/2]

DllExport double jm::distancePointToPoint ( const Vertex2 point1,
const Vertex2 point2 
)

This method calculates the minimum distance between two points in 3D space.

Parameters
point1The first point.
point2The second point.
Returns
The distance between the first and second point.

◆ distancePointToPoint() [2/2]

DllExport double jm::distancePointToPoint ( const Vertex3 point1,
const Vertex3 point2 
)

This method calculates the minimum distance between the two points in 3D space.

Parameters
point1The first point.
point2The second point.
Returns
The distance between the first and second point.

◆ divFloor()

DllExport int64 jm::divFloor ( int64  x,
int64  y 
)

Divide one integer by another and round towards minus infinity.

Parameters
xDividend
yDivisor
Returns
The quotient, rounded towards minus infinity.

◆ doubleMaschineEpsilon()

DllExport double jm::doubleMaschineEpsilon ( )

This function calculates the relative machine accuracy for double values. Should be 1.11022e-16 for 64 bit. Some literature sources also give 2.22045e-16 as accuracy.

◆ ExecDir()

DllExport String jm::ExecDir ( )
extern

This method returns the directory where the application is being executed.

Returns
The directory where the application is being executed.

◆ ExecName()

DllExport String jm::ExecName ( )
extern

This method returns the name of the current application.

◆ ExecPath()

DllExport String jm::ExecPath ( )
extern

This method returns the path of the executing application. It consists of the directory name and the application name.

Returns
The path of the executing application.

◆ extensionPointOnArc()

DllExport Vertex2 jm::extensionPointOnArc ( const Vertex2 rayorigin,
const Vertex2 direction,
const Vertex2 center,
double  radius,
double  start,
double  end 
)

This method checks if a ray (line) intersects with a circular arc. The direction of the ray is crucial.

This method is used for tasks such as extending lines, trimming lines, drawing hatches, etc. Hence, it is an essential method for CAD work. If the ray intersects with the circular arc between or on the endpoints, the intersection point is returned. If the ray intersects the circular arc twice, the closest intersection point is returned.

Parameters
rayoriginThe origin point of the ray. This is the point from which we check if the lines intersect. (Position vector of the line)
directionThe direction vector in which the ray points.
centerThe center point of the circular arc.
startThe start angle of the circular arc in radians.
endThe end angle of the circular arc in radians.
Returns
The defined vector if the intersection point exists. If the intersection point does not exist, the vector has NaN entries.

◆ extensionPointOnEllipse()

DllExport Vertex2 jm::extensionPointOnEllipse ( const Vertex2 rayorigin,
const Vertex2 direction,
const Vertex2 center,
const Vertex2 mainAxis,
double  minorAxisRatio,
double  start,
double  end 
)

This method checks if a ray (line) intersects with an elliptical arc. The direction of the ray is crucial.

This method is used for tasks such as extending lines, trimming lines, drawing hatches, etc. Hence, it is an essential method for CAD work. If the ray intersects with the elliptical arc between or on the endpoints, the intersection point is returned. If the ray intersects the elliptical arc twice, the closest intersection point is returned.

Parameters
rayoriginThe origin point of the ray. This is the point from which we check if the lines intersect. (Position vector of the line)
directionThe direction vector in which the ray points.
centerThe center point of the ellipse.
mainAxisThe direction and length of the major axis (from the center).
minorAxisRatioThe ratio of the minor axis to the major axis.
startThe start angle of the elliptical arc in radians.
endThe end angle of the elliptical arc in radians.
Returns
The defined vector if the intersection point exists. If the intersection point does not exist, the vector has NaN entries.

◆ extensionPointOnLine()

DllExport Vertex2 jm::extensionPointOnLine ( const Vertex2 rayorigin,
const Vertex2 direction,
const Vertex2 start,
const Vertex2 end 
)

This method checks if a ray (line) intersects with a line between or on its endpoints. The direction of the ray is crucial.

This method is used for tasks such as extending lines, trimming lines, drawing hatches, etc. Hence, it is an essential method for CAD work. If the ray intersects with the line between or on the endpoints, the intersection point is returned.

Parameters
rayoriginThe origin point of the ray. This is the point from which we check if the lines intersect. (Position vector of the line)
directionThe direction vector in which the ray points.
startThe start point of the line to be compared.
endThe end point of the line to be compared.
Returns
The defined vector if the intersection point exists. If the intersection point does not exist, the vector has NaN entries.

◆ floatMaschineEpsilon()

DllExport float jm::floatMaschineEpsilon ( )

This function calculates the relative machine accuracy for float values. Should be at 32 bit should be 5.96046e-08. Some literature sources also give 1.19209e-07 as accuracy.

◆ interpolate() [1/4]

DllExport Color jm::interpolate ( Color  colour1,
Color  colour2,
float  percent 
)

◆ interpolate() [2/4]

DllExport double jm::interpolate ( double  begin,
double  end,
double  percent 
)

This method interpolates the numerical value between begin and end.

Parameters
beginStart value for interpolation.
endEnd value for the interpolation.
percentShift value between 0 and 1

◆ interpolate() [3/4]

DllExport double jm::interpolate ( double  vbegin,
double  vend,
double  begin,
double  end,
double  position 
)

This method interpolates the numerical value between vbegin and vend.

Parameters
vbeginStart value for interpolation.
vendEnd value for the interpolation.
beginlower value than position. Begin of range to calculate the percentage for interpolation.
endbigger value than position. End of range to calculate the percentage for interpolation.
positionValue between begin and end to calculate the percentage for interpolation

◆ interpolate() [4/4]

DllExport float jm::interpolate ( float  begin,
float  end,
float  percent 
)

This method interpolates the numerical value between begin and end.

Parameters
beginStart value for interpolation.
endEnd value for the interpolation.
percentShift value between 0 and 1

◆ intersectionPoint() [1/2]

DllExport Vertex2 jm::intersectionPoint ( const Vertex2 position1,
const Vertex2 direction1,
const Vertex2 position2,
const Vertex2 direction2 
)

This method calculates the two-dimensional intersection point of two lines defined by their starting points and direction vectors.

Parameters
position1The starting point of the first line.
direction1The direction vector of the first line.
position2The starting point of the second line.
direction2The direction vector of the second line.
Returns
The intersection point of the two lines. If the lines are parallel or collinear, the point has NaN values.

◆ intersectionPoint() [2/2]

DllExport Vertex3 jm::intersectionPoint ( const Vertex3 position1,
const Vertex3 direction1,
const Vertex3 position2,
const Vertex3 direction2 
)

This method calculates the three-dimensional intersection point of two lines defined by their starting points and direction vectors.

Parameters
position1The starting point of the first line.
direction1The direction vector of the first line.
position2The starting point of the second line.
direction2The direction vector of the second line.
Returns
The intersection point of the two lines. If the lines are parallel or skew, the point has NaN values.

◆ intersectionPointLineAndPlane()

DllExport Vertex3 jm::intersectionPointLineAndPlane ( const Vertex3 planePosition,
const Vertex3 normal,
const Vertex3 linePosition,
const Vertex3 direction,
bool  extend 
)

This method calculates the intersection point of a line and a plane using the normal form.

Parameters
planePositionThe position vector of the plane.
normalThe normal vector of the plane.
linePositionThe position vector of the line.
directionThe direction vector of the line.
extendThe line equation can define a line segment if we assume that linePosition is the starting point of the line and (linePosition+direction) is the end point of the line. If extend = true, then the intersection point is calculated on the mathematical line. If false, the intersection point is chosen only on the line segment. That means if the point is outside, one of the end points is returned as the "intersection point". This "feature" is especially useful when you want to find the shortest distance to line segments. If there is no intersection point, an invalid vector is returned.

◆ intersectionPointsOfCircles()

DllExport void jm::intersectionPointsOfCircles ( const Vertex2 center1,
double  radius1,
const Vertex2 center2,
double  radius2,
Vertex2 intersection1,
Vertex2 intersection2 
)

This method calculates the intersection point of 2 circles.

Parameters
center1The center point of the first circle.
radius1The radius of the first circle.
center2The center point of the second circle.
radius2The radius of the second circle.
intersection1The 1st intersection points of the two circles. If the circles do not intersect, the points have NaN values.
intersection2The 1st intersection points of the two circles. If the circles do not intersect, the points have NaN values.

◆ isEqual()

DllExport bool jm::isEqual ( double  v1,
double  v2 
)

This method checks whether the two values are identical, taking resabs into account, are identical. Therefore |v2-v1| < RESABS applies. So if RESABS is the different, then the value is already is no longer the same. IT MUST BE LESS THAN EPSILON.

Returns
The result of v1==v2

◆ isGreater()

DllExport bool jm::isGreater ( double  v1,
double  v2 
)

This method checks whether the first value is greater than the second, taking resabs into account.

Returns
The result of v1>v2

◆ isGreaterEqual()

DllExport bool jm::isGreaterEqual ( double  v1,
double  v2 
)

This method checks whether the first value is greater than or equal to the second, taking resabs into account.

Returns
The result of v1<v2

◆ isLess()

DllExport bool jm::isLess ( double  v1,
double  v2 
)

This method checks whether the first value is lower than the second, taking resabs into account.

Returns
The result of v1<v2

◆ isLessEqual()

DllExport bool jm::isLessEqual ( double  v1,
double  v2 
)

This method checks whether the first value is lower or equal to the second, taking resabs into account.

Returns
The result of v1<=v2

◆ isLinearIndependent()

DllExport bool jm::isLinearIndependent ( const Vertex3 v1,
const Vertex3 v2,
const Vertex3 v3 
)

This method checks whether the three vectors are linearly independent. The vectors are linearly independent if the determinant of a 3x3 matrix in which the 3 vectors are the columns, is not equal to 0.

Returns
true if the vectors are linearly independent.

◆ isNaN()

DllExport bool jm::isNaN ( double  d)

This method checks whether the number is "Not a Number".

Parameters
dThe value to be checked.
Returns
The result of d!=d

◆ isNotEqual()

DllExport bool jm::isNotEqual ( double  v1,
double  v2 
)

This method checks whether the first value is not equal to the second, taking resabs into account.

Returns
The result of v1!=v2

◆ isPointOnCircle()

DllExport bool jm::isPointOnCircle ( const Vertex3 point,
const Vertex3 center,
double  radius,
const Vertex3 normal 
)

This method checks if a given point lies on a circle, taking into account a specified tolerance.

Parameters
pointThe 3D point for which the distance is to be determined.
centerThe center point of the circle.
radiusThe radius of the circle.
normalThe normal vector, perpendicular to the plane of the circle.
Returns
"true" if the point lies on the circle, within the specified tolerance, otherwise "false".

◆ isPointOnLine() [1/2]

DllExport bool jm::isPointOnLine ( const Vertex3 point,
const Vertex3 lineStart,
const Vertex3 lineEnd,
bool  extend 
)

This method checks whether a given point lies on the line segment, taking into account a specified tolerance.

Parameters
pointThe 3D point for which the distance is to be determined.
lineStartThe starting point of the line segment.
lineEndThe end point of the line segment.
extendFlag indicating whether the intersection point should be determined even if it lies beyond the line segment ends. If set to "false", NaN will be returned.
Returns
"true" if the point lies on the line segment, within the specified tolerance and considering the extend flag, otherwise "false".

◆ isPointOnLine() [2/2]

DllExport bool jm::isPointOnLine ( const Vertex3 point,
const Vertex3 position,
const Vertex3 direction 
)

This method checks whether a given point lies on the line, taking into account a specified tolerance.

Parameters
pointThe 3D point for which the distance is to be determined.
positionThe position vector or any point on the line.
directionThe direction vector of the line.
Returns
"true" if the point lies on the line, within the specified tolerance, otherwise "false".

◆ isPointOnPlane()

DllExport bool jm::isPointOnPlane ( const Vertex3 point,
const Vertex3 position,
const Vertex3 normal,
double  maxDistance = 0.0 
)

This method checks if the given point lies on the plane, taking into account the specified tolerance.

Parameters
pointThe 3D point for which the distance is to be determined.
positionThe position vector or any point on the plane.
normalThe normal vector, perpendicular to the plane.
maxDistanceThe maximum tolerated distance to the plane.
Returns
"true" if the point lies on the plane, within the specified tolerance, otherwise "false".

◆ isSamePoint()

DllExport bool jm::isSamePoint ( const Vertex3 point1,
const Vertex3 point2 
)

This method checks if both points are identical, taking into account a specified tolerance.

The points are considered identical if the distance between them is smaller than the tolerance.

Parameters
point1The first 3D point.
point2The second 3D point.
Returns
"true" if both points are identical within the specified tolerance, otherwise "false".

◆ modFloor()

DllExport int64 jm::modFloor ( int64  x,
int64  y 
)

Calculates the residual value after dividing one integer by another and rounds the quotient towards minus infinity.

Parameters
xDividend
yDivisor
Returns
Residual value

◆ ocsMatrix()

DllExport Matrix jm::ocsMatrix ( const Vertex3 extrusion)

This method calculates the OCS transformation matrix using the "Arbitrary Axis Algorithm" from the DXF reference.

Parameters
extrusionThe extrusion vector used for the transformation.

◆ ocsToWcs()

DllExport Vertex3 jm::ocsToWcs ( const Vertex3 ocs,
const Vertex3 extrusion 
)

This method converts Object Coordinate System (OCS) coordinates to World Coordinate System (WCS) coordinates.

Parameters
ocsThe input OCS coordinates.
extrusionThe extrusion vector used for the transformation.
Returns
The corresponding WCS coordinates.

◆ operator!=() [1/3]

DllExport bool jm::operator!= ( Color const &  c1,
Color const &  c2 
)

◆ operator!=() [2/3]

DllExport bool jm::operator!= ( const Vertex3 v1,
const Vertex3 v2 
)

Implementation of the operator !=.

◆ operator!=() [3/3]

DllExport bool jm::operator!= ( Vertex2 const &  v1,
Vertex2 const &  v2 
)

Implementation of the operator -=.

◆ operator*() [1/10]

DllExport Matrix jm::operator* ( const double &  d,
const Matrix b 
)

Implementation of the operator d * M (scalar multiplication).

◆ operator*() [2/10]

DllExport const Vector jm::operator* ( const double &  d,
const Vector v 
)

Implementation of the operator *.

◆ operator*() [3/10]

DllExport Matrix jm::operator* ( const Matrix A,
const double &  d 
)

Implementation of the operator M * d (scalar multiplication).

◆ operator*() [4/10]

DllExport Matrix jm::operator* ( const Matrix A,
const Matrix B 
)

Implementation of the operator M * M (matrix multiplication).

◆ operator*() [5/10]

DllExport Vector jm::operator* ( const Matrix A,
const Vector b 
)

Implementation of the operator M * v (matrix multiplication with a vector). The matrix must be square.

◆ operator*() [6/10]

DllExport Vertex3 jm::operator* ( const Matrix A,
const Vertex3 b 
)

Implementation of the operator M * v (matrix multiplication with a vector). The matrix must be 3x3.

◆ operator*() [7/10]

DllExport Vertex2 jm::operator* ( const Vertex2 v1,
double  d 
)

Implementation of the operator *.

◆ operator*() [8/10]

DllExport Vertex3 jm::operator* ( const Vertex3 v1,
double  d 
)

Implementation of the operator *.

◆ operator*() [9/10]

DllExport Vertex2 jm::operator* ( double  d,
const Vertex2 v 
)

Implementation of the operator *.

◆ operator*() [10/10]

DllExport Vertex3 jm::operator* ( double  d,
const Vertex3 v 
)

Implementation of the operator *.

◆ operator+() [1/4]

DllExport Color jm::operator+ ( Color const &  c1,
Color const &  c2 
)

◆ operator+() [2/4]

DllExport Matrix jm::operator+ ( const Matrix A,
const Matrix B 
)

Implementation of the operator M + M (matrix addition).

◆ operator+() [3/4]

DllExport const Vector jm::operator+ ( const Vector v1,
const Vector v2 
)

Implementation of the operator +.

◆ operator+() [4/4]

DllExport const Vertex2 jm::operator+ ( const Vertex2 v1,
const Vertex2 v2 
)

Implementation of the operator +.

◆ operator-() [1/4]

DllExport Color jm::operator- ( Color const &  c1,
Color const &  c2 
)

◆ operator-() [2/4]

DllExport Matrix jm::operator- ( const Matrix A,
const Matrix B 
)

Implementation of the operator M - M (matrix subtraction).

◆ operator-() [3/4]

DllExport const Vector jm::operator- ( const Vector v1,
const Vector v2 
)

Implementation of the operator -.

◆ operator-() [4/4]

DllExport const Vertex2 jm::operator- ( const Vertex2 v1,
const Vertex2 v2 
)

Implementation of the operator -.

◆ operator/()

DllExport Matrix jm::operator/ ( const Matrix b,
const double &  d 
)

Implementation of the operator M / d (scalar division).

◆ operator==() [1/3]

DllExport bool jm::operator== ( Color const &  c1,
Color const &  c2 
)

◆ operator==() [2/3]

DllExport bool jm::operator== ( const Vertex2 v1,
const Vertex2 v2 
)

Implementation of the operator ==.

◆ operator==() [3/3]

DllExport bool jm::operator== ( const Vertex3 v1,
const Vertex3 v2 
)

Implementation of the operator ==.

◆ osResourceRead()

jm::ByteArray jm::osResourceRead ( const jm::String path)

◆ osSystemLanguage()

jm::String jm::osSystemLanguage ( )

◆ powerOf2()

DllExport bool jm::powerOf2 ( int  x)

This method checks whether the number passed is a power of 2.

Parameters
xThe number to be checked.
Returns
Returns true if the number is a power of 2 (i.e. 1,2,4,8,16 etc.), otherwise false.

◆ probability()

DllExport bool jm::probability ( double  percent)

randomly determines whether the specified probability is fulfilled.

◆ PropertyDir()

DllExport File jm::PropertyDir ( )
extern

This method returns the directory where the current application stores its settings.

Returns
The directory where the application's settings are stored.

◆ radToDeg()

DllExport double jm::radToDeg ( double  rad)

This function converts the angle from radians into degrees.

Parameters
radGiven angle in radians (e.g. PI/2 for 90°).
Returns
Returns the angle in degrees.

◆ random() [1/2]

DllExport double jm::random ( )

Returna a random number between 0.0 and 1.0.

Note
Not safe in sense of cryptography. Just an arbitrary number.

◆ random() [2/2]

DllExport int32 jm::random ( int32  lower,
int32  upper 
)

Returns a random integer number.

Note
Not safe in sense of cryptography. Just an arbitrary number.
Parameters
lowerLower inclusive limit of the value range to be returned.
upperUpper inclusive limit of the value range to be returned.

◆ ResourceDir()

DllExport File jm::ResourceDir ( const String bundleId)
extern

This method returns the directory where the current application should search for resources.

Parameters
bundleIdThe identifier of the application bundle (same as Bundle-Id for macOS).
Returns
The directory where the application should search for resources.

◆ round()

DllExport int64 jm::round ( double  d)

This function rounds a number commercially to the integral number.

Parameters
dNumber to be rounded.
Returns
Integer number.

◆ roundFrac() [1/2]

DllExport double jm::roundFrac ( double  f,
int64  digits 
)

This function rounds a number to the desired number of decimal places.

Note
Please note that the exact value cannot always be determined due to the accuracy of the machine.
Parameters
fNumber to be rounded.
Returns
Rounded number

◆ roundFrac() [2/2]

DllExport float jm::roundFrac ( float  f,
int32  digits 
)

This function rounds a number to the desired number of decimal places.

Note
Please note that the exact value cannot always be determined due to the accuracy of the machine.
Parameters
fNumber to be rounded.
Returns
Rounded number

◆ serializeBEInt16()

DllExport size_t jm::serializeBEInt16 ( uint8 *  buffer,
size_t  offset,
int16  value 
)

This method serializes a number using the Big-Endian method.

Parameters
bufferThe byte buffer where the number will be written.
offsetThe zero-based index of the position where the first byte is located.
valueThe number to be converted.
Returns
Returns the number of bytes written.

◆ serializeBEInt24()

DllExport size_t jm::serializeBEInt24 ( uint8 *  buffer,
size_t  offset,
int32  value 
)

This method serializes a number using the Big-Endian method.

Parameters
bufferThe byte buffer where the number will be written.
offsetThe zero-based index of the position where the first byte is located.
valueThe number to be converted.
Returns
Returns the number of bytes written.

◆ serializeBEInt32()

DllExport size_t jm::serializeBEInt32 ( uint8 *  buffer,
size_t  offset,
int32  value 
)

This method serializes a number using the Big-Endian method.

Parameters
bufferThe byte buffer where the number will be written.
offsetThe zero-based index of the position where the first byte is located.
valueThe number to be converted.
Returns
Returns the number of bytes written.

◆ serializeBEInt64()

DllExport size_t jm::serializeBEInt64 ( uint8 *  buffer,
size_t  offset,
int64  value 
)

This method serializes a number using the Big-Endian method.

Parameters
bufferThe byte buffer where the number will be written.
offsetThe zero-based index of the position where the first byte is located.
valueThe number to be converted.
Returns
Returns the number of bytes written.

◆ serializeBEUInt16()

DllExport size_t jm::serializeBEUInt16 ( uint8 *  buffer,
size_t  offset,
uint16  value 
)

◆ serializeLEDouble() [1/2]

DllExport size_t jm::serializeLEDouble ( jm::ByteArray buffer,
size_t  offset,
double  value 
)

◆ serializeLEDouble() [2/2]

DllExport size_t jm::serializeLEDouble ( uint8 *  buffer,
size_t  offset,
double  value 
)

This method serializes a number using the Little-Endian method.

Parameters
bufferThe byte buffer where the number will be written.
offsetThe zero-based index of the position where the first byte is located.
valueThe number to be converted.
Returns
Returns the number of bytes written.

◆ serializeLEFloat()

DllExport size_t jm::serializeLEFloat ( uint8 *  buffer,
size_t  offset,
float  value 
)

This method serializes a number using the Little-Endian method.

Parameters
bufferThe byte buffer where the number will be written.
offsetThe zero-based index of the position where the first byte is located.
valueThe number to be converted.
Returns
Returns the number of bytes written.

◆ serializeLEInt16()

DllExport size_t jm::serializeLEInt16 ( uint8 *  buffer,
size_t  offset,
int16  value 
)

This method serializes a number using the Little-Endian method.

Parameters
bufferThe byte buffer where the number will be written.
offsetThe zero-based index of the position where the first byte is located.
valueThe number to be converted.
Returns
Returns the number of bytes written.

◆ serializeLEInt24()

DllExport size_t jm::serializeLEInt24 ( uint8 *  buffer,
size_t  offset,
int32  value 
)

This method serializes a number using the Little-Endian method.

Parameters
bufferThe byte buffer where the number will be written.
offsetThe zero-based index of the position where the first byte is located.
valueThe number to be converted.
Returns
Returns the number of bytes written.

◆ serializeLEInt32() [1/2]

DllExport size_t jm::serializeLEInt32 ( jm::ByteArray buffer,
size_t  offset,
int32  value 
)

◆ serializeLEInt32() [2/2]

DllExport size_t jm::serializeLEInt32 ( uint8 *  buffer,
size_t  offset,
int32  value 
)

This method serializes a number using the Little-Endian method.

Parameters
bufferThe byte buffer where the number will be written.
offsetThe zero-based index of the position where the first byte is located.
valueThe number to be converted.
Returns
Returns the number of bytes written.

◆ serializeLEInt64()

DllExport size_t jm::serializeLEInt64 ( uint8 *  buffer,
size_t  offset,
int64  value 
)

This method serializes a number using the Little-Endian method.

Parameters
bufferThe byte buffer where the number will be written.
offsetThe zero-based index of the position where the first byte is located.
valueThe number to be converted.
Returns
Returns the number of bytes written.

◆ serializeLEUInt16()

DllExport size_t jm::serializeLEUInt16 ( uint8 *  buffer,
size_t  offset,
uint16  value 
)

This method serializes a number using the Little-Endian method.

Parameters
bufferThe byte buffer where the number will be written.
offsetThe zero-based index of the position where the first byte is located.
valueThe number to be converted.
Returns
Returns the number of bytes written.

◆ sign()

DllExport int16 jm::sign ( double  d)

This function returns the sign of a number.

Parameters
dThe number whose sign is to be determined.
Returns
-1, if negative, 0 for 0 and 1 for positive d.

◆ solveLinearSystem()

DllExport Vertex2 jm::solveLinearSystem ( Vertex2  a,
Vertex2  b,
Vertex2  r 
)

This method solves a linear system of equations with two unknowns: r.x = x * a.x + y * b.x r.y = x * a.y + y * b.y The system is solved for x and y. Matrix notation: a b r | a.x b.x | * | x | = | r.x | | a.y b.y | | y | | r.y |.

◆ swap() [1/5]

DllExport void jm::swap ( double &  v1,
double &  v2 
)

This method swaps the two variables in place.

◆ swap() [2/5]

DllExport void jm::swap ( int32 &  v1,
int32 &  v2 
)

This method swaps the two variables in place.

◆ swap() [3/5]

DllExport void jm::swap ( uint16 &  v1,
uint16 &  v2 
)

This method swaps the two variables in place.

◆ swap() [4/5]

DllExport void jm::swap ( uint32 &  v1,
uint32 &  v2 
)

This method swaps the two variables in place.

◆ swap() [5/5]

DllExport void jm::swap ( uint8 &  v1,
uint8 &  v2 
)

This method swaps the two variables in place.

◆ TempDir()

DllExport File jm::TempDir ( )
extern

◆ URLDecode()

DllExport String jm::URLDecode ( const String str)
extern

◆ URLEncode()

DllExport String jm::URLEncode ( const String str)
extern

◆ UserDir()

DllExport File jm::UserDir ( )
extern

This method returns the user directory.

◆ wcsMatrix()

DllExport Matrix jm::wcsMatrix ( const Vertex3 extrusion)

This method calculates the WCS transformation matrix using the "Arbitrary Axis Algorithm" from the DXF reference.

Parameters
extrusionThe extrusion vector used for the transformation.
Returns
The WCS transformation matrix.

◆ wcsToOcs()

DllExport Vertex3 jm::wcsToOcs ( const Vertex3 wcs,
const Vertex3 extrusion 
)

This method converts World Coordinate System (WCS) coordinates to Object Coordinate System (OCS) coordinates.

Parameters
wcsThe input WCS coordinates.
extrusionThe extrusion vector used for the transformation.
Returns
The corresponding OCS coordinates.

Variable Documentation

◆ RESABS

double const jm::RESABS = 1E-6

This value defines when two points or values are considered identical. This serves to catch numerical inaccuracies and the resulting errors. The predefined value can be changed, but this may change the calculations considerably. 1E-6 is highly recommended as the highest value.