3es  0.7
tes Namespace Reference

Namespaces

 planegeom
 Plane geometry functions.
 
 trigeom
 Geometry functions based around triangles.
 
 vhash
 Contains functions for hashing vector3/vector4 style vertices for vertex hash maps.
 

Classes

class  Arrow
 Defines an arrow shape to display. More...
 
class  Bounds
 A simple bounding box structure. More...
 
class  Box
 Defines a rectangular prism shape. More...
 
class  Capsule
 Defines a capsule shape to display. More...
 
struct  CategoryNameMessage
 Category name message. More...
 
class  CollatedPacket
 A utility class which generates a MtCollatedPacket message by appending multiple other messages. More...
 
struct  CollatedPacketMessage
 A packet collation message header. More...
 
class  Colour
 A 32-bit integer colour class. More...
 
class  Cone
 Defines a cone shape to display. More...
 
class  Connection
 Defines the interfaces for a client connection. More...
 
class  ConnectionMonitor
 A utility class for monitoring new connections for a Server. More...
 
struct  ControlMessage
 A system control message. More...
 
struct  CreateMessage
 Defines an object creation message. More...
 
class  Cylinder
 Defines a cylinder shape to display. More...
 
struct  DataMessage
 Defines an object data message. More...
 
struct  DestroyMessage
 Message to destroy an exiting object by id and type. More...
 
struct  Material
 Not ready for use. More...
 
class  Matrix3
 A row major 3x3 rotation matrix. More...
 
class  Matrix4
 A row major 4x4 transformation matrix. More...
 
struct  MeshComponentMessage
 Message structure for adding vertices, colours, indices, or UVs. More...
 
struct  MeshCreateMessage
 MeshResource creation message. More...
 
struct  MeshDestroyMessage
 MeshResource destruction message. More...
 
struct  MeshFinaliseMessage
 Message to finalise a mesh, ready for use. More...
 
class  MeshPlaceholder
 A placeholder for a mesh resource, carrying only a mesh ID. More...
 
struct  MeshRedefineMessage
 MeshResource redefinition message. More...
 
class  MeshResource
 Represents a mesh part or object. More...
 
class  MeshSet
 Represents a mesh shape. More...
 
class  MeshShape
 A Shape which uses vertices and indices to render. More...
 
struct  ObjectAttributes
 Contains core object attributes. More...
 
class  PacketBuffer
 This class accepts responsibility for collating incoming byte streams. More...
 
struct  PacketHeader
 The header for an incoming 3ES data packet. More...
 
class  PacketReader
 A utility class for dealing with reading packets. More...
 
class  PacketStream
 A utility class used for managing read/write operations to a PacketHeader payload. More...
 
class  PacketWriter
 A utility class for writing payload data to a PacketHeader. More...
 
class  Plane
 Defines a rectangular planar section to display. More...
 
class  PointCloud
 A MeshResource which defines a point cloud by its contained vertices. More...
 
class  PointCloudShape
 A Shape which renders a set of points as in a point cloud. More...
 
class  Quaternion
 A 4D rotational quaternion class. More...
 
struct  QuaternionArg
 A helper structure used to convert from float or double pointers to Quaternionf arguments. More...
 
class  Resource
 The Resource base class defines an interface for any resource used by Shape objects such as MeshSet. More...
 
class  ResourcePacker
 
class  Server
 Defines the interface for managing a 3es server. More...
 
struct  ServerInfoMessage
 Information about the server. More...
 
struct  ServerSettings
 
class  Shape
 A base class for encapsulating a shape which is to be represented remotely. More...
 
class  SimpleMesh
 An encapsulated definition of a mesh. It manages all its own vertices, indices, etc. More...
 
class  Sphere
 Defines a sphere to display. More...
 
struct  SphereVertexHash
 
class  SpinLock
 A spin lock implementation. More...
 
class  Star
 Defines a star to display. More...
 
class  TcpListenSocket
 Represents a TCP server socket, listening for connections. More...
 
struct  TcpListenSocketDetail
 
class  TcpSocket
 A TCP/IP communication socket implementation. More...
 
struct  TcpSocketDetail
 
class  Text2D
 A shape which renders screen space text, optionally positioned in 3D. More...
 
class  Text3D
 A shape 3D world position and perspective adjusted text, optionally screen facing. More...
 
class  Timer
 A high precision timer implementation. More...
 
struct  Timing
 A timing information structure. More...
 
struct  TransferProgress
 A structure tracking progress of a data transfer. More...
 
struct  UpdateMessage
 A update message is identical in header to a CreateMessage. More...
 
struct  V3Arg
 A helper structure used to convert from float or double pointers to Vector3f arguments. More...
 
class  Vector3
 Represents a vector in R3. More...
 
class  Vector3Hash
 Hash structure for use with standard library maps. More...
 
class  Vector4
 Represents a vector in R4. More...
 

Typedefs

typedef Bounds< float > Boundsf
 
typedef Bounds< double > Boundsd
 
typedef Matrix3< float > Matrix3f
 Defines a single precision 4x4 matrix.
 
typedef Matrix3< double > Matrix3d
 Defines a double precision 4x4 matrix.
 
typedef Matrix4< float > Matrix4f
 Defines a single precision 4x4 matrix.
 
typedef Matrix4< double > Matrix4d
 Defines a double precision 4x4 matrix.
 
typedef Quaternion< float > Quaternionf
 Defines a single precision quaternion.
 
typedef Quaternion< double > Quaterniond
 Defines a double precision quaternion.
 
typedef std::unordered_map< Vector3f, unsigned, SphereVertexHashSphereVertexMap
 
typedef Vector3< float > Vector3f
 Defines a single precision vector.
 
typedef Vector3< double > Vector3d
 Defines a double precision vector.
 
typedef Vector4< float > Vector4f
 Defines a single precision vector.
 
typedef Vector4< double > Vector4d
 Defines a double precision vector.
 

Enumerations

enum  CoordinateFrame {
  XYZ, XZYNeg, YXZNeg, YZX,
  ZXY, ZYXNeg, XYZNeg, XZY,
  YXZ, YZXNeg, ZXYNeg, ZYX,
  CFCount, CFLeft = XYZNeg
}
 Enumerates various coordinate frames. More...
 
enum  Feature { TFeatureCompression, TFeatureEnd, TFeatureLimit = 64, TFeatureInvalid = TFeatureLimit }
 Defines the set of feature flags. More...
 
enum  MeshBuildFlags { MbfCalculateNormals = (1<<0) }
 The set of valid flags used in finalise messages. More...
 
enum  MeshMessageType {
  MmtInvalid, MmtDestroy, MmtCreate, MmtVertex,
  MmtIndex, MmtVertexColour, MmtNormal, MmtUv,
  MmtSetMaterial, MmtRedefine, MmtFinalise
}
 Defines the messageIDs for mesh message routing. More...
 
enum  DrawType { DtPoints, DtLines, DtTriangles, DtVoxels }
 Defines the primitives for a mesh. More...
 
enum  MessageTypeIDs {
  MtNull, MtServerInfo, MtControl, MtCollatedPacket,
  MtMesh, MtCamera, MtCategory, MtMaterial,
  ShapeHandlersIDStart = 64, UserIDStart = 2048
}
 List of routing IDs of common, built in message handlers. More...
 
enum  ShapeHandlerIDs {
  SIdSphere = ShapeHandlersIDStart, SIdBox, SIdCone, SIdCylinder,
  SIdCapsule, SIdPlane, SIdStar, SIdArrow,
  SIdMeshShape, SIdMeshSet, SIdPointCloud, SIdText3D,
  SIdText2D, SIdBuiltInLast = SIdText2D
}
 Default/built in renderers (routing IDs).
 
enum  ControlId {
  CIdNull, CIdFrame, CIdCoordinateFrame, CIdFrameCount,
  CIdForceFrameFlush, CIdReset, CIdSnapshot
}
 Message IDs for a ControlMessage. More...
 
enum  CategoryMessageId { CMIdName }
 Message IDs for MtCategory routing. More...
 
enum  ObjectMessageId {
  OIdNull, OIdCreate, OIdUpdate, OIdDestroy,
  OIdData
}
 Object/shape management message ID. Used with ShapeHandlerIDs routing IDs.
 
enum  {
  OFNone = 0, OFWire = (1 << 0), OFTransparent = (1 << 1), OFTwoSided = (1 << 2),
  OFUpdateMode = (1 << 3), OFPosition = (1 << 4), OFRotation = (1 << 5), OFScale = (1 << 6),
  OFColour = (1 << 7), OFColor = OFColour, OFUser = (1 << 12)
}
 Flags controlling the creation and appearance of an object. More...
 
enum  PointsAttributeFlag { PAFNone = 0, PAFNormals = (1 << 0), PAFColours = (1 << 1) }
 Additional attributes for point data sources. More...
 
enum  Text2DFlag { Text2DFWorldSpace = OFUser }
 ObjectFlag extensions for Text2D rendering. More...
 
enum  Text3DFlag { Text3DFScreenFacing = OFUser }
 ObjectFlag extensions for Text2D rendering. More...
 
enum  MeshShapeFlag { MeshShapeCalculateNormals = OFUser }
 ObjectFlag extensions for MeshShape. More...
 
enum  UpdateFlag { UFNone = 0, UFInterpolate = (1 << 0) }
 Flags controlling the creation and appearance of an object. More...
 
enum  CollatedPacketFlag { CPFCompress = (1<<0) }
 Flags for CollatedPacketMessage.
 
enum  ControlFlag { CFFramePersist = (1 << 0) }
 Flags for various ControlId messages. More...
 
enum  PacketFlag { PF_NoCrc = (1<<0) }
 Flag values for PacketHeader objects. More...
 
enum  ServerFlag { SF_Collate = (1<<1), SF_Compress = (1<<2) }
 Server option flags. More...
 

Functions

template<typename T , typename ST >
T * moveByStride (T *ptr, ST stride)
 A utility function for moving a pointer by a given byte stride. More...
 
template<typename T , typename ST >
const T * moveByStride (const T *ptr, ST stride)
 
template<typename T >
Vector4< T > toVector (const Colour &c)
 Convert a Colour to Vector4. More...
 
Vector4f _3es_coreAPI toVectorf (const Colour &c)
 
Vector4d _3es_coreAPI toVectord (const Colour &c)
 
template<typename T >
Colour toColour (const Vector4< T > &v)
 Convert a Vector4 to a Colour. More...
 
template Colour _3es_coreAPI toColour (const Vector4< float > &v)
 
template Colour _3es_coreAPI toColour (const Vector4< double > &v)
 
template<typename T >
ceilPowerOf2 (T v)
 Calculate the next power of 2 equal to or greater than v. More...
 
template<>
unsigned ceilPowerOf2 (unsigned v)
 
template<>
int ceilPowerOf2 (int v)
 
uint8_t _3es_coreAPI crc8 (const uint8_t *message, size_t byteCount)
 Calculate an 8-bit CRC value. More...
 
uint16_t _3es_coreAPI crc16 (const uint8_t *message, size_t byteCount)
 Calculate an 16-bit CRC value. More...
 
uint32_t _3es_coreAPI crc32 (const uint8_t *message, size_t byteCount)
 Calculate an 32-bit CRC value. More...
 
void _3es_coreAPI endianSwap (uint8_t *data, size_t size)
 Perform an Endian swap on the given data buffer. More...
 
void endianSwap1 (uint8_t *data)
 A 1-byte value Endian swap: noop. More...
 
void endianSwap2 (uint8_t *data)
 Perform a 2-byte value Endian swap on data. More...
 
void endianSwap4 (uint8_t *data)
 Perform a 4-byte value Endian swap on data. More...
 
void endianSwap8 (uint8_t *data)
 Perform an 8-byte value Endian swap on data. More...
 
void endianSwap16 (uint8_t *data)
 Perform a 16-byte value Endian swap on data. More...
 
void endianSwap (uint8_t &data)
 Single byte "Endian swap" for completeness: noop. More...
 
void endianSwap (int8_t &data)
 Single byte "Endian swap" for completeness: noop. More...
 
void endianSwap (uint16_t &data)
 Two byte integer Endian swap. More...
 
void endianSwap (int16_t &data)
 Two byte integer Endian swap. More...
 
void endianSwap (uint32_t &data)
 Four byte integer Endian swap. More...
 
void endianSwap (int32_t &data)
 Four byte integer Endian swap. More...
 
void endianSwap (uint64_t &data)
 Eight byte integer Endian swap. More...
 
void endianSwap (int64_t &data)
 Eight byte integer Endian swap. More...
 
void endianSwap (float &data)
 Four byte floating point Endian swap. More...
 
void endianSwap (double &data)
 Eight byte floating point Endian swap. More...
 
template<class T >
endianSwapValue (const T &data)
 Return a copy of data with reversed byte order. More...
 
void networkEndianSwap (uint8_t *data, size_t size)
 Perform an endianSwap() on data to switch to/from network byte order (Big Endian). More...
 
void networkEndianSwap (uint8_t &data)
 For completeness: noop. More...
 
void networkEndianSwap (int8_t &data)
 For completeness: noop. More...
 
void networkEndianSwap (uint16_t &data)
 Two byte switch of data to/from network byte order. More...
 
void networkEndianSwap (int16_t &data)
 Two byte switch of data to/from network byte order. More...
 
void networkEndianSwap (uint32_t &data)
 Four byte switch of data to/from network byte order. More...
 
void networkEndianSwap (int32_t &data)
 Four byte switch of data to/from network byte order. More...
 
void networkEndianSwap (uint64_t &data)
 Eight byte switch of data to/from network byte order. More...
 
void networkEndianSwap (int64_t &data)
 Eight byte switch of data to/from network byte order. More...
 
void networkEndianSwap (float &data)
 Four byte switch of data to/from network byte order. More...
 
void networkEndianSwap (double &data)
 Eight byte switch of data to/from network byte order. More...
 
template<class T >
networkEndianSwapValue (const T &data)
 Return a copy of data with byte order switched if host byte order is not network byte order. More...
 
uint64_t _3es_coreAPI featureFlag (Feature feature)
 Convert a Feature to a feature flag. More...
 
Feature _3es_coreAPI featureForFlag (uint64_t flag)
 Convert a feature flag back to a feature. More...
 
bool _3es_coreAPI checkFeature (Feature feature)
 Check if a particular Feature is available. More...
 
bool _3es_coreAPI checkFeatureFlag (uint64_t featureFlag)
 Check for a feature by its flag. More...
 
bool _3es_coreAPI checkFeatures (uint64_t featureFlags)
 Check if a set of features are available. More...
 
template<typename T >
degToRad (const T &angle=T(1))
 Conversion from degrees to radians. More...
 
template<typename T >
radToDeg (const T &angle=T(1))
 Conversion from radians to degrees. More...
 
unsigned nextLog2 (unsigned v)
 Round up to the next power of 2. More...
 
template<typename T >
Matrix3< T > operator* (const Matrix3< T > &a, const Matrix3< T > &b)
 Performs the matrix multiplication AB. More...
 
template<typename T >
Vector3< T > operator* (const Matrix3< T > &a, const Vector3< T > &v)
 Performs the matrix multiplication Av. More...
 
template<typename T >
Matrix4< T > operator* (const Matrix4< T > &a, const Matrix4< T > &b)
 Performs the matrix multiplication AB. More...
 
template<typename T >
Vector3< T > operator* (const Matrix4< T > &a, const Vector3< T > &v)
 Performs the matrix multiplication Av. More...
 
template<typename T >
Vector4< T > operator* (const Matrix4< T > &a, const Vector4< T > &v)
 Performs the matrix multiplication Av. More...
 
void _3es_coreAPI initDefaultServerInfo (ServerInfoMessage *info)
 Initialise info to the defaults. More...
 
template<typename T >
Quaternion< T > operator* (const Quaternion< T > &a, const Quaternion< T > &b)
 Multiplies one quaternion by another. More...
 
template<typename T >
Vector3< T > operator* (const Quaternion< T > &a, const Vector3< T > &v)
 Transforms a vector by a quaternion, rotating it. More...
 
template<typename T >
Matrix3< T > operator* (const Matrix3< T > &a, const Quaternion< T > &q)
 Multiplies a rotation matrix by a quaternion. More...
 
template Matrix3< float > _3es_coreAPI operator* (const Matrix3< float > &a, const Quaternion< float > &q)
 
template Matrix3< double > _3es_coreAPI operator* (const Matrix3< double > &a, const Quaternion< double > &q)
 
template<typename T >
Matrix3< T > operator* (const Quaternion< T > &q, const Matrix3< T > &b)
 Multiplies a quaternion by a rotation matrix resulting in a rotation matrix. More...
 
template Matrix3< float > _3es_coreAPI operator* (const Quaternion< float > &q, const Matrix3< float > &b)
 
template Matrix3< double > _3es_coreAPI operator* (const Quaternion< double > &q, const Matrix3< double > &b)
 
template<typename T >
Matrix4< T > operator* (const Matrix4< T > &a, const Quaternion< T > &q)
 Multiplies a transformation matrix by a quaternion. More...
 
template Matrix4< float > _3es_coreAPI operator* (const Matrix4< float > &a, const Quaternion< float > &q)
 
template Matrix4< double > _3es_coreAPI operator* (const Matrix4< double > &a, const Quaternion< double > &q)
 
template<typename T >
Matrix4< T > quaternionTranslationToTransform (const Quaternion< T > &quaternion, const Vector3< T > &translation)
 Builds a 4x4 transformation matrix from a quaternion rotation and vector translation. More...
 
template Matrix4< float > _3es_coreAPI quaternionTranslationToTransform (const Quaternion< float > &quaternion, const Vector3< float > &translation)
 
template Matrix4< double > _3es_coreAPI quaternionTranslationToTransform (const Quaternion< double > &quaternion, const Vector3< double > &translation)
 
template<typename T >
Matrix4< T > prsTransform (const Vector3< T > &translation, const Quaternion< T > &quaternion, const Vector3< T > &scale)
 
template Matrix4< float > _3es_coreAPI prsTransform (const Vector3< float > &translation, const Quaternion< float > &quaternion, const Vector3< float > &scale)
 
template Matrix4< double > _3es_coreAPI prsTransform (const Vector3< double > &translation, const Quaternion< double > &quaternion, const Vector3< double > &scale)
 
template<typename T >
void transformToQuaternionTranslation (const Matrix4< T > &m, Quaternion< T > &q, Vector3< T > &translation, Vector3< T > *scale=nullptr)
 Decomposes a transformation matrix into a quaternion rotation and a vector translation. More...
 
template void _3es_coreAPI transformToQuaternionTranslation (const Matrix4< float > &m, Quaternion< float > &q, Vector3< float > &translation, Vector3< float > *scale)
 
template void _3es_coreAPI transformToQuaternionTranslation (const Matrix4< double > &m, Quaternion< double > &q, Vector3< double > &translation, Vector3< double > *scale)
 
template<typename T >
void transformToQuaternionTranslation (const Matrix4< T > &m, Quaternion< T > &q, Vector3< T > &translation, Vector3< T > &scale)
 
template void _3es_coreAPI transformToQuaternionTranslation (const Matrix4< float > &m, Quaternion< float > &q, Vector3< float > &translation, Vector3< float > &scale)
 
template void _3es_coreAPI transformToQuaternionTranslation (const Matrix4< double > &m, Quaternion< double > &q, Vector3< double > &translation, Vector3< double > &scale)
 
template<typename T >
Quaternion< T > transformToQuaternionTranslation (const Matrix4< T > &m, Vector3< T > &translation)
 Decomposes a transformation matrix into a quaternion rotation and a vector translation. More...
 
template Quaternion< float > _3es_coreAPI transformToQuaternionTranslation (const Matrix4< float > &m, Vector3< float > &translation)
 
template Quaternion< double > _3es_coreAPI transformToQuaternionTranslation (const Matrix4< double > &m, Vector3< double > &translation)
 
template<typename T >
Quaternion< T > rotationToQuaternion (const Matrix3< T > &m)
 Extracts just the rotation part of a transformation matrix into a quaternion. More...
 
template Quaternion< float > _3es_coreAPI rotationToQuaternion (const Matrix3< float > &m)
 
template Quaternion< double > _3es_coreAPI rotationToQuaternion (const Matrix3< double > &m)
 
template<typename T >
Quaternion< T > transformToQuaternion (const Matrix4< T > &m)
 Extracts just the rotation part of a transformation matrix into a quaternion. More...
 
template Quaternion< float > _3es_coreAPI transformToQuaternion (const Matrix4< float > &m)
 
template Quaternion< double > _3es_coreAPI transformToQuaternion (const Matrix4< double > &m)
 
template<typename T >
Matrix3< T > quaternionToRotation (const Quaternion< T > &q)
 Builds a rotation matrix from a quaternion rotation. More...
 
template Matrix3< float > _3es_coreAPI quaternionToRotation (const Quaternion< float > &m)
 
template Matrix3< double > _3es_coreAPI quaternionToRotation (const Quaternion< double > &m)
 
template<typename T >
Matrix4< T > quaternionToTransform (const Quaternion< T > &q)
 Builds a rotation transformation matrix from a quaternion rotation. More...
 
template Matrix4< float > _3es_coreAPI quaternionToTransform (const Quaternion< float > &m)
 
template Matrix4< double > _3es_coreAPI quaternionToTransform (const Quaternion< double > &m)
 
template<class MESSAGE , unsigned BufferSize = 256>
int sendMessage (Connection &connection, uint16_t routingId, uint16_t messageId, const MESSAGE &message)
 A helper function for sending an arbitrary message structure via a Connection or Server object. More...
 
void _3es_coreAPI sphereInitialise (std::vector< Vector3f > &vertices, std::vector< unsigned > &indices, SphereVertexMap *vertexMap=nullptr)
 Initialise a unity sphere as an icosahedron. More...
 
void _3es_coreAPI subdivideUnitSphere (std::vector< Vector3f > &vertices, std::vector< unsigned > &indices, SphereVertexMap &vertexMap)
 Subdivide a unit sphere. More...
 
void _3es_coreAPI sphereSubdivision (std::vector< Vector3f > &vertices, std::vector< unsigned > &indices, float radius=1.0f, const Vector3f &origin=Vector3f(0.0f), int depth=2)
 Tessellate a sphere using a subdivision technique starting from an icosahedron.
 
char _3es_coreAPI * timeValueString (char *buffer, size_t bufferLen, Timer &t)
 Converts a Timer to a time string indicating the elapsed time. More...
 
std::string _3es_coreAPI timeValueString (Timer &t)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
char _3es_coreAPI * timeValueString (char *buffer, size_t bufferLen, unsigned int s, unsigned int ms=0u, unsigned int us=0u)
 Converts a time value int a time string indicating the time elapsed. More...
 
std::string _3es_coreAPI timeValueString (unsigned int s, unsigned int ms=0, unsigned int us=0u)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
const char _3es_coreAPI * timeValueString (char *buffer, size_t bufferLen, double seconds)
 
std::string _3es_coreAPI timeValueString (double seconds)
 
const char _3es_coreAPI * timeValueString (char *buffer, size_t bufferLen, long double seconds)
 
std::string _3es_coreAPI timeValueString (long double seconds)
 
template<class T >
Vector3< T > operator+ (const Vector3< T > &a, const Vector3< T > &b)
 Adds two vectors.
 
template<class T >
Vector3< T > operator+ (const Vector3< T > &a, const T &b)
 Adds two vectors.
 
template<class T >
Vector3< T > operator+ (const T &a, const Vector3< T > &b)
 Adds two vectors.
 
template<class T >
Vector3< T > operator- (const Vector3< T > &a, const Vector3< T > &b)
 Sutracts b from a.
 
template<class T >
Vector3< T > operator- (const Vector3< T > &a, const T &b)
 Adds two vectors.
 
template<class T >
Vector3< T > operator* (const Vector3< T > &a, const T &b)
 Multiplies a vector by a scalar.
 
template<class T >
Vector3< T > operator* (const T &a, const Vector3< T > &b)
 Multiplies a vector by a scalar.
 
template<class T >
Vector3< T > operator/ (const Vector3< T > &a, const T &b)
 Divides a vector by a scalar.
 
template<class T >
Vector4< T > operator+ (const Vector4< T > &a, const Vector4< T > &b)
 Adds two vectors.
 
template<class T >
Vector4< T > operator+ (const Vector4< T > &a, const T &b)
 Adds two vectors.
 
template<class T >
Vector4< T > operator+ (const T &a, const Vector4< T > &b)
 Adds two vectors.
 
template<class T >
Vector4< T > operator- (const Vector4< T > &a, const Vector4< T > &b)
 Sutracts b from a.
 
template<class T >
Vector4< T > operator- (const Vector4< T > &a, const T &b)
 Adds two vectors.
 
template<class T >
Vector4< T > operator* (const Vector4< T > &a, const T &b)
 Multiplies a vector by a scalar.
 
template<class T >
Vector4< T > operator* (const T &a, const Vector4< T > &b)
 Multiplies a vector by a scalar.
 
template<class T >
Vector4< T > operator/ (const Vector4< T > &a, const T &b)
 Divides a vector by a scalar.
 

Variables

template class _3es_coreAPI Bounds< float >
 Single precision bounds.
 
template class _3es_coreAPI Bounds< double >
 Double precision bounds.
 
template class _3es_coreAPI Matrix3< float >
 
template class _3es_coreAPI Matrix3< double >
 
template class _3es_coreAPI Matrix4< float >
 
template class _3es_coreAPI Matrix4< double >
 
const uint32_t _3es_coreAPI PacketMarker
 Marker value identifying a packet header in local Endian.
 
const uint16_t _3es_coreAPI PacketVersionMajor
 Expected packet major version local Endian.
 
const uint16_t _3es_coreAPI PacketVersionMinor
 Expected packet minor version local Endian.
 
template class _3es_coreAPI PacketStream< PacketHeader >
 
template class _3es_coreAPI PacketStream< const PacketHeader >
 
template class _3es_coreAPI Quaternion< float >
 
template class _3es_coreAPI Quaternion< double >
 
template class _3es_coreAPI Vector3< float >
 
template class _3es_coreAPI Vector3< double >
 
template class _3es_coreAPI Vector4< float >
 
template class _3es_coreAPI Vector4< double >
 

Detailed Description

The core 3rd Eye Scene API.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Flags controlling the creation and appearance of an object.

Enumerator
OFNone 

No flags. Default appearance.

OFWire 

Show the object as a wireframe mesh.

OFTransparent 

The object supports transparency. Use the colour alpha channel.

OFTwoSided 

Use a two sided shader.

OFUpdateMode 

Update attributes using only explicitly specified flags from the following.

OFPosition 

Update position data.

OFRotation 

Update rotation data.

OFScale 

Update scale data.

OFColour 

Update colour data.

OFColor 

Spelling alias for colour.

OFUser 

Use flags start here.

◆ CategoryMessageId

Message IDs for MtCategory routing.

Enumerator
CMIdName 

Category name definition.

◆ ControlFlag

Flags for various ControlId messages.

Enumerator
CFFramePersist 

Flag for CIdFrame indicating transient objects should be maintained and not flushed for this frame.

◆ ControlId

Message IDs for a ControlMessage.

Enumerator
CIdFrame 

Defines a new frame. value32 is the delta time in microseconds.

CIdCoordinateFrame 

Specifies the a change in coordinate frame view.

CIdFrameCount 

Set the total number of frames to expect (value32). More for serialised streams.

CIdForceFrameFlush 

Forces a frame update (render) without advancing the time.

CIdReset 

Clear the scene. This drops all existing data.

CIdSnapshot 

Request a frame snapshot during playback. value32 is the frame number to snap.

◆ CoordinateFrame

Enumerates various coordinate frames.

Each frame specifies the global axes in the order right, forward, up. The up axis may be negated, that is a positive value is down, in which case the 'Neg' suffix is added.

Right handed coordinate frames come first with left handed frames being those greater than or equal to CFLeft.

Examples:

Label Right Forward Up Notes
XYZ X Y Z A common extension of 2D Catesian coordinates.
XZY X Z Y The default in Unity 3D.
XZYNegX Z -Y A common camera space system.

◆ Feature

Defines the set of feature flags.

See checkFeature().

Enumerator
TFeatureCompression 

Is compression is available.

TFeatureEnd 

Notes the number of valid feature values.

While TFeatureLimit shows the maximum possible features we can track, This is the maximum we can actually express and ever need iterate for.

◆ MeshShapeFlag

ObjectFlag extensions for MeshShape.

Enumerator
MeshShapeCalculateNormals 

Calculate normals and rendering with lighting.

◆ MessageTypeIDs

List of routing IDs of common, built in message handlers.

These map to the MessageHandler::routingId() member.

Limited to 2^16 - 1.

Enumerator
MtMaterial 

Extension. NYI.

ShapeHandlersIDStart 

First ID for renderers.

UserIDStart 

First user ID.

◆ PacketFlag

Flag values for PacketHeader objects.

Enumerator
PF_NoCrc 

Marks a PacketHeader as missing its 16-bit CRC.

◆ PointsAttributeFlag

Additional attributes for point data sources.

Enumerator
PAFNone 

No additional data (points only)

PAFNormals 

Per point normals.

PAFColours 

Per point colours.

◆ ServerFlag

Server option flags.

Enumerator
SF_Collate 

Set to collate outgoing messages into larger packets.

SF_Compress 

Set to compress collated outgoing packets using GZip compression.

Has no effect if SF_Collate is not set or if the library is not built against ZLib.

◆ Text2DFlag

ObjectFlag extensions for Text2D rendering.

Enumerator
Text2DFWorldSpace 

Position is given in world space and mapped to screen space.

Otherwise in screen space with (0, 0, z) at the top left corner and (1, 1, z) at the bottom right.

◆ Text3DFlag

ObjectFlag extensions for Text2D rendering.

Enumerator
Text3DFScreenFacing 

Text is oriented to face the screen.

◆ UpdateFlag

Flags controlling the creation and appearance of an object.

Enumerator
UFNone 

No flags.

Default appearance.

UFInterpolate 

Transition to the new position, colour, etc., is interpolated over the render frames.

This is only used if the render frame rate of this application is higher than that of the incoming data.

Function Documentation

◆ ceilPowerOf2() [1/3]

template<typename T >
T tes::ceilPowerOf2 ( v)
inline

Calculate the next power of 2 equal to or greater than v.

Parameters
Thebase, integer value.

◆ ceilPowerOf2() [2/3]

template<>
unsigned tes::ceilPowerOf2 ( unsigned  v)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ ceilPowerOf2() [3/3]

template<>
int tes::ceilPowerOf2 ( int  v)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ checkFeature()

bool _3es_coreAPI tes::checkFeature ( Feature  feature)

Check if a particular Feature is available.

Parameters
featureThe feature to check for.
Returns
True if the feature is available or enabled.

◆ checkFeatureFlag()

bool _3es_coreAPI tes::checkFeatureFlag ( uint64_t  featureFlag)

Check for a feature by its flag.

Similar to checkFeature(), except that it uses the feature flag. For this method, only 1 bit can be set or the result is always false.

Parameters
featureFlagThe feature flag to check for.
Returns
True if the feature is available.

◆ checkFeatures()

bool _3es_coreAPI tes::checkFeatures ( uint64_t  featureFlags)

Check if a set of features are available.

Use featureFlag() to convert from Feature to a feature flag.

Only valid feature flags are checked. Always true if featureFlags is zero.

Parameters
featureFlagsSet of features to check for.
Returns
True if all features in featureFlags are available.

◆ crc16()

uint16_t _3es_coreAPI tes::crc16 ( const uint8_t *  message,
size_t  byteCount 
)

Calculate an 16-bit CRC value.

Parameters
messageThe buffer to operate on.
byteCountThe number of bytes in message.
Returns
An 16-bit CRC for message.

◆ crc32()

uint32_t _3es_coreAPI tes::crc32 ( const uint8_t *  message,
size_t  byteCount 
)

Calculate an 32-bit CRC value.

Parameters
messageThe buffer to operate on.
byteCountThe number of bytes in message.
Returns
An 32-bit CRC for message.

◆ crc8()

uint8_t _3es_coreAPI tes::crc8 ( const uint8_t *  message,
size_t  byteCount 
)

Calculate an 8-bit CRC value.

Parameters
messageThe buffer to operate on.
byteCountThe number of bytes in message.
Returns
An 8-bit CRC for message.

◆ degToRad()

template<typename T >
T tes::degToRad ( const T &  angle = T(1))
inline

Conversion from degrees to radians.

Parameters
angleThe angle to convert (degrees).
Returns
The equivalent angle in radians.

◆ endianSwap() [1/11]

void _3es_coreAPI tes::endianSwap ( uint8_t *  data,
size_t  size 
)

Perform an Endian swap on the given data buffer.

This reverses the order of bytes in data.

Parameters
dataThe data buffer to reverse.
sizeThe number of bytes in data.

Referenced by endianSwapValue(), and networkEndianSwap().

◆ endianSwap() [2/11]

void tes::endianSwap ( uint8_t &  data)
inline

Single byte "Endian swap" for completeness: noop.

Parameters
[in,out]dataValue to swap the Endian of.

◆ endianSwap() [3/11]

void tes::endianSwap ( int8_t &  data)
inline

Single byte "Endian swap" for completeness: noop.

Parameters
[in,out]dataValue to swap the Endian of.

◆ endianSwap() [4/11]

void tes::endianSwap ( uint16_t &  data)
inline

Two byte integer Endian swap.

Parameters
[in,out]dataValue to swap the Endian of.

References endianSwap2().

◆ endianSwap() [5/11]

void tes::endianSwap ( int16_t &  data)
inline

Two byte integer Endian swap.

Parameters
[in,out]dataValue to swap the Endian of.

References endianSwap2().

◆ endianSwap() [6/11]

void tes::endianSwap ( uint32_t &  data)
inline

Four byte integer Endian swap.

Parameters
[in,out]dataValue to swap the Endian of.

References endianSwap4().

◆ endianSwap() [7/11]

void tes::endianSwap ( int32_t &  data)
inline

Four byte integer Endian swap.

Parameters
[in,out]dataValue to swap the Endian of.

References endianSwap4().

◆ endianSwap() [8/11]

void tes::endianSwap ( uint64_t &  data)
inline

Eight byte integer Endian swap.

Parameters
[in,out]dataValue to swap the Endian of.

References endianSwap8().

◆ endianSwap() [9/11]

void tes::endianSwap ( int64_t &  data)
inline

Eight byte integer Endian swap.

Parameters
[in,out]dataValue to swap the Endian of.

References endianSwap8().

◆ endianSwap() [10/11]

void tes::endianSwap ( float &  data)
inline

Four byte floating point Endian swap.

Parameters
[in,out]dataValue to swap the Endian of.

References endianSwap4().

◆ endianSwap() [11/11]

void tes::endianSwap ( double &  data)
inline

Eight byte floating point Endian swap.

Parameters
[in,out]dataValue to swap the Endian of.

References endianSwap8().

◆ endianSwap1()

void tes::endianSwap1 ( uint8_t *  data)
inline

A 1-byte value Endian swap: noop.

For completeness.

Parameters
dataThe 1-byte buffer.

◆ endianSwap16()

void tes::endianSwap16 ( uint8_t *  data)
inline

Perform a 16-byte value Endian swap on data.

Switches the byte order.

Parameters
dataThe 16-byte buffer to Endian swap.

◆ endianSwap2()

void tes::endianSwap2 ( uint8_t *  data)
inline

Perform a 2-byte value Endian swap on data.

Switches the byte order.

Parameters
dataThe 2-byte buffer to Endian swap.

Referenced by endianSwap(), and networkEndianSwap().

◆ endianSwap4()

void tes::endianSwap4 ( uint8_t *  data)
inline

Perform a 4-byte value Endian swap on data.

Switches the byte order.

Parameters
dataThe 4-byte buffer to Endian swap.

Referenced by endianSwap(), and networkEndianSwap().

◆ endianSwap8()

void tes::endianSwap8 ( uint8_t *  data)
inline

Perform an 8-byte value Endian swap on data.

Switches the byte order.

Parameters
dataThe 8-byte buffer to Endian swap.

Referenced by endianSwap(), and networkEndianSwap().

◆ endianSwapValue()

template<class T >
T tes::endianSwapValue ( const T &  data)
inline

Return a copy of data with reversed byte order.

Returns
The data value with reversed byte order.

References endianSwap().

◆ featureFlag()

uint64_t _3es_coreAPI tes::featureFlag ( Feature  feature)

Convert a Feature to a feature flag.

This is simply 1 << feature.

Parameters
featureThe feature of interest.
Returns
The flag for feature.

◆ featureForFlag()

Feature _3es_coreAPI tes::featureForFlag ( uint64_t  flag)

Convert a feature flag back to a feature.

Only the first feature flag is noted when multiple bits are set.

Parameters
flagThe feature flag of interest.
Returns
The Feature associated with flag or TFeatureInvalid if no valid feature bits are set.
See also
featureFlag()

◆ initDefaultServerInfo()

void _3es_coreAPI tes::initDefaultServerInfo ( ServerInfoMessage info)

Initialise info to the defaults.

Parameters
infoThe structure to initialise. Must not be null.

Referenced by tes::ServerInfoMessage::write().

◆ moveByStride() [1/2]

template<typename T , typename ST >
T* tes::moveByStride ( T *  ptr,
ST  stride 
)
inline

A utility function for moving a pointer by a given byte stride.

Parameters
ptrThe pointer to move.
strideThe stride in bytes to move the pointer on by.
Returns
The address of ptr + stride (byte move).
Template Parameters
TThe pointer type.
STThe stride type. Must be an integer type.

◆ moveByStride() [2/2]

template<typename T , typename ST >
const T* tes::moveByStride ( const T *  ptr,
ST  stride 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ networkEndianSwap() [1/11]

void tes::networkEndianSwap ( uint8_t *  data,
size_t  size 
)
inline

Perform an endianSwap() on data to switch to/from network byte order (Big Endian).

Does nothing on platforms which are already Big Endian.

Parameters
[in,out]dataBuffer to reorder.
sizeNumber of bytes in data.

References endianSwap().

Referenced by networkEndianSwapValue().

◆ networkEndianSwap() [2/11]

void tes::networkEndianSwap ( uint8_t &  data)
inline

For completeness: noop.

Parameters
[in,out]dataValue to potentially swap the Endian of.

◆ networkEndianSwap() [3/11]

void tes::networkEndianSwap ( int8_t &  data)
inline

For completeness: noop.

Parameters
[in,out]dataValue to potentially swap the Endian of.

◆ networkEndianSwap() [4/11]

void tes::networkEndianSwap ( uint16_t &  data)
inline

Two byte switch of data to/from network byte order.

Parameters
[in,out]dataValue to potentially swap the Endian of.

References endianSwap2().

◆ networkEndianSwap() [5/11]

void tes::networkEndianSwap ( int16_t &  data)
inline

Two byte switch of data to/from network byte order.

Parameters
[in,out]dataValue to potentially swap the Endian of.

References endianSwap2().

◆ networkEndianSwap() [6/11]

void tes::networkEndianSwap ( uint32_t &  data)
inline

Four byte switch of data to/from network byte order.

Parameters
[in,out]dataValue to potentially swap the Endian of.

References endianSwap4().

◆ networkEndianSwap() [7/11]

void tes::networkEndianSwap ( int32_t &  data)
inline

Four byte switch of data to/from network byte order.

Parameters
[in,out]dataValue to potentially swap the Endian of.

References endianSwap4().

◆ networkEndianSwap() [8/11]

void tes::networkEndianSwap ( uint64_t &  data)
inline

Eight byte switch of data to/from network byte order.

Parameters
[in,out]dataValue to potentially swap the Endian of.

References endianSwap8().

◆ networkEndianSwap() [9/11]

void tes::networkEndianSwap ( int64_t &  data)
inline

Eight byte switch of data to/from network byte order.

Parameters
[in,out]dataValue to potentially swap the Endian of.

References endianSwap8().

◆ networkEndianSwap() [10/11]

void tes::networkEndianSwap ( float &  data)
inline

Four byte switch of data to/from network byte order.

Parameters
[in,out]dataValue to potentially swap the Endian of.

References endianSwap4().

◆ networkEndianSwap() [11/11]

void tes::networkEndianSwap ( double &  data)
inline

Eight byte switch of data to/from network byte order.

Parameters
[in,out]dataValue to potentially swap the Endian of.

References endianSwap8().

◆ networkEndianSwapValue()

template<class T >
T tes::networkEndianSwapValue ( const T &  data)
inline

◆ nextLog2()

unsigned tes::nextLog2 ( unsigned  v)
inline

Round up to the next power of 2.

From: https://graphics.stanford.edu/~seander/bithacks.html

Parameters
vThe value to round up.
Returns
The next power of 2 larger than v.

◆ operator*() [1/10]

template<typename T >
Matrix3<T> tes::operator* ( const Matrix3< T > &  a,
const Quaternion< T > &  q 
)

Multiplies a rotation matrix by a quaternion.

The result is M = Aq

Parameters
aThe matrix to multiply.
qThe quaternion.
Returns
The result, Aq.

◆ operator*() [2/10]

template<typename T >
Matrix3<T> tes::operator* ( const Quaternion< T > &  q,
const Matrix3< T > &  b 
)

Multiplies a quaternion by a rotation matrix resulting in a rotation matrix.

The result is M = qB

Parameters
qThe quaternion.
bThe matrix to multiply.
Returns
The result, qB.

◆ operator*() [3/10]

template<typename T >
Matrix4<T> tes::operator* ( const Matrix4< T > &  a,
const Quaternion< T > &  q 
)

Multiplies a transformation matrix by a quaternion.

The result is M = Aq

Parameters
aThe matrix to multiply.
qThe quaternion.
Returns
The result, Aq.

◆ operator*() [4/10]

template<typename T >
Quaternion<T> tes::operator* ( const Quaternion< T > &  a,
const Quaternion< T > &  b 
)

Multiplies one quaternion by another.

This gives the combined rotation of b then a.

Parameters
aA quaternion operand.
bA quaternion operand.
Returns
The rotation of b by a.

◆ operator*() [5/10]

template<typename T >
Vector3<T> tes::operator* ( const Quaternion< T > &  a,
const Vector3< T > &  v 
)

Transforms a vector by a quaternion, rotating it.

Parameters
aThe quaternion rotation.
vThe vector to rotate.
Returns
The rotation of v by a.

◆ operator*() [6/10]

template<typename T >
Matrix3<T> tes::operator* ( const Matrix3< T > &  a,
const Matrix3< T > &  b 
)

Performs the matrix multiplication AB.

Returns
The result of AB.

Referenced by tes::Quaternion< float >::operator=().

◆ operator*() [7/10]

template<typename T >
Vector3<T> tes::operator* ( const Matrix3< T > &  a,
const Vector3< T > &  v 
)

Performs the matrix multiplication Av.

Returns
The result of Av.

◆ operator*() [8/10]

template<typename T >
Matrix4<T> tes::operator* ( const Matrix4< T > &  a,
const Matrix4< T > &  b 
)

Performs the matrix multiplication AB.

Returns
The result of AB.

◆ operator*() [9/10]

template<typename T >
Vector3<T> tes::operator* ( const Matrix4< T > &  a,
const Vector3< T > &  v 
)

Performs the matrix multiplication Av.

Returns
The result of Av.

◆ operator*() [10/10]

template<typename T >
Vector4<T> tes::operator* ( const Matrix4< T > &  a,
const Vector4< T > &  v 
)

Performs the matrix multiplication Av.

Returns
The result of Av.

◆ quaternionToRotation()

template<typename T >
Matrix3<T> tes::quaternionToRotation ( const Quaternion< T > &  q)

Builds a rotation matrix from a quaternion rotation.

Parameters
qThe quaternion rotation.
Returns
The rotation matrix.

Referenced by transformToQuaternionTranslation().

◆ quaternionToTransform()

template<typename T >
Matrix4<T> tes::quaternionToTransform ( const Quaternion< T > &  q)

Builds a rotation transformation matrix from a quaternion rotation.

Parameters
qThe quaternion rotation.
Returns
The transformation rotation matrix.

Referenced by transformToQuaternionTranslation().

◆ quaternionTranslationToTransform()

template<typename T >
Matrix4<T> tes::quaternionTranslationToTransform ( const Quaternion< T > &  quaternion,
const Vector3< T > &  translation 
)

Builds a 4x4 transformation matrix from a quaternion rotation and vector translation.

Parameters
quaternionThe quaternion rotation.
translationThe vector translation.

◆ radToDeg()

template<typename T >
T tes::radToDeg ( const T &  angle = T(1))
inline

Conversion from radians to degrees.

Parameters
angleThe angle to convert (radians).
Returns
The equivalent angle in degrees.

◆ rotationToQuaternion()

template<typename T >
Quaternion<T> tes::rotationToQuaternion ( const Matrix3< T > &  m)

Extracts just the rotation part of a transformation matrix into a quaternion.

Parameters
mThe matrix to decompose.
Returns
The quaternion rotation.

Referenced by transformToQuaternionTranslation().

◆ sendMessage()

template<class MESSAGE , unsigned BufferSize = 256>
int tes::sendMessage ( Connection connection,
uint16_t  routingId,
uint16_t  messageId,
const MESSAGE &  message 
)

A helper function for sending an arbitrary message structure via a Connection or Server object.

The MESSAGE structure must support the following message signature: bool write(PacketWriter &writer) const, returning true on successfully writing data to writer.

Template Parameters
MESSAGEThe message structure containing the data to pack.
BufferSizeSize of the buffer used to pack data from MESSAGE into. Stack allocated.
Parameters
connectionThe Server or Connection to send the message via (Connection::send()).
routingIdThe ID of the message handler which will decode the message.
messageThe message data to pack.
Returns
The number of bytes written to connection, or -1 on failure.

References tes::PacketWriter::finalise(), tes::PacketStream< HEADER >::packetSize(), tes::PacketWriter::reset(), and tes::Connection::send().

◆ sphereInitialise()

void _3es_coreAPI tes::sphereInitialise ( std::vector< Vector3f > &  vertices,
std::vector< unsigned > &  indices,
SphereVertexMap *  vertexMap = nullptr 
)

Initialise a unity sphere as an icosahedron.

Parameters
verticesSphere vertices.
indicesTriangle indices
vertexMapOptional map to populate. Must be provided when using subdivideUnitSphere().

◆ subdivideUnitSphere()

void _3es_coreAPI tes::subdivideUnitSphere ( std::vector< Vector3f > &  vertices,
std::vector< unsigned > &  indices,
SphereVertexMap &  vertexMap 
)

Subdivide a unit sphere.

Intended for iterative subdivision of a sphere generated by sphereInitialise().

Parameters
verticesSphere vertices.
indicesTriangle indices.
vertexMapVertex hash map for preventing duplicate vertices.

◆ timeValueString() [1/8]

char _3es_coreAPI* tes::timeValueString ( char *  buffer,
size_t  bufferLen,
Timer t 
)

Converts a Timer to a time string indicating the elapsed time.

The string is built differently depending on the amount of time elapsed. For values greater than one second, the display string is formatted:

///   [# day[s],] [# hour[s],] [# minute[s],] [#.#s]
/// 

Where '#' is replaced by the appropriate digits. Each element is display only if it is non-zero. Plurals are expressed for values greater than 1.

Times less than one second and greater than one millisecond are displayed:

///   #.#ms
/// 
Otherwise, the string is formatted in microseconds:
///   #.#us
/// 
@param[in,out] buffer The buffer into which to write the time value string.
  The time value string is written here as detailed above.
  Buffer overflows are guarded against.
@param bufferLen The number of bytes available in @p buffer.
@param t Timer to convert to a string.
@return A pointer to @c buffer.  

◆ timeValueString() [2/8]

std::string _3es_coreAPI tes::timeValueString ( Timer t)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note
This may not be safe to call because of the use of std::string. This will be unsafe when using a different core library version. Most notably this occurs under Visual Studio when using a different Visual Studio between libraries including mixing debug and release runtime libraries.

◆ timeValueString() [3/8]

char _3es_coreAPI* tes::timeValueString ( char *  buffer,
size_t  bufferLen,
unsigned int  s,
unsigned int  ms = 0u,
unsigned int  us = 0u 
)

Converts a time value int a time string indicating the time elapsed.

The string is built differently depending on the amount of time elapsed. For values greater than one second, the display string is formatted:

///   [# day[s],] [# hour[s],] [# minute[s],] [#.#s]
/// 

Where '#' is replaced by the appropriate digits. Each element is display only if it is non-zero. Plurals are expressed for values greater than 1.

Times less than one second and greater than one millisecond are displayed:

///   #.#ms
/// 
Otherwise, the string is formatted in microseconds:
///   #.#us
/// 
@param[in,out] buffer The buffer into which to write the time value string.
  The time value string is written here as detailed above.
  Buffer overflows are guarded against.
@param bufferLen The number of bytes available in @p buffer.
@param s The number of seconds elapsed.
@param ms The number of milliseconds elapsed (must be < 1000).
@param us The number of micro seconds elapsed (must be < 1000).
@return A pointer to @c buffer.  

◆ timeValueString() [4/8]

std::string _3es_coreAPI tes::timeValueString ( unsigned int  s,
unsigned int  ms = 0,
unsigned int  us = 0u 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note
This may not be safe to call because of the use of std::string. This will be unsafe when using a different core library version. Most notably this occurs under Visual Studio when using a different Visual Studio between libraries including mixing debug and release runtime libraries.

◆ timeValueString() [5/8]

const char _3es_coreAPI* tes::timeValueString ( char *  buffer,
size_t  bufferLen,
double  seconds 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ timeValueString() [6/8]

std::string _3es_coreAPI tes::timeValueString ( double  seconds)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ timeValueString() [7/8]

const char _3es_coreAPI* tes::timeValueString ( char *  buffer,
size_t  bufferLen,
long double  seconds 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ timeValueString() [8/8]

std::string _3es_coreAPI tes::timeValueString ( long double  seconds)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ toColour()

template<typename T >
Colour tes::toColour ( const Vector4< T > &  v)
inline

Convert a Vector4 to a Colour.

Some precision will be lost.

Colour channels [R, G, B, A] line up with vertex channels [x, y, z, w].

References tes::Colour::setAf(), tes::Colour::setBf(), tes::Colour::setGf(), tes::Colour::setRf(), and tes::Vector4< T >::x.

◆ toVector()

template<typename T >
template Vector4< double > _3es_coreAPI tes::toVector ( const Colour c)
inline

Convert a Colour to Vector4.

Colour channels [R, G, B, A] line up with vertex channels [x, y, z, w].

References tes::Colour::af(), tes::Colour::bf(), tes::Colour::gf(), and tes::Colour::rf().

◆ transformToQuaternion()

template<typename T >
Quaternion<T> tes::transformToQuaternion ( const Matrix4< T > &  m)

Extracts just the rotation part of a transformation matrix into a quaternion.

Parameters
mThe matrix to decompose.
Returns
The quaternion rotation.

Referenced by transformToQuaternionTranslation().

◆ transformToQuaternionTranslation() [1/3]

template<typename T >
void tes::transformToQuaternionTranslation ( const Matrix4< T > &  m,
Quaternion< T > &  q,
Vector3< T > &  translation,
Vector3< T > *  scale = nullptr 
)

Decomposes a transformation matrix into a quaternion rotation and a vector translation.

Parameters
mThe matrix to decompose.
[out]qThe quaternion rotation is written here.
[out]translationThe translation value is written here.
[out]scaleOptional pointer to receive the scale values the transform contains.

Referenced by transformToQuaternionTranslation().

◆ transformToQuaternionTranslation() [2/3]

template<typename T >
void tes::transformToQuaternionTranslation ( const Matrix4< T > &  m,
Quaternion< T > &  q,
Vector3< T > &  translation,
Vector3< T > &  scale 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ transformToQuaternionTranslation() [3/3]

template<typename T >
Quaternion<T> tes::transformToQuaternionTranslation ( const Matrix4< T > &  m,
Vector3< T > &  translation 
)
inline

Decomposes a transformation matrix into a quaternion rotation and a vector translation.

Parameters
mThe matrix to decompose.
[out]translationThe translation value is written here.
Returns
The quaternion extracted from the transformation matrix.

References quaternionToRotation(), quaternionToTransform(), rotationToQuaternion(), transformToQuaternion(), and transformToQuaternionTranslation().