This is the documentation for Enlighten.

namespace Geo

Geo

The base libraries used by the Enlighten SDK.

Helper functions for generating frequently used sample distributions.

Helper functions for storing points and lines for debugging.

This covers all of the code in GeoBase and GeoCore. GeoBase contains low level memory utilities, assertions, preprocessor definitions and debugging functions. GeoCore contains optimized math functionality, data structures and other generic utilities.

Classes

Name Description
Geo::AbstractRayChunk

Buffer that holds a chunk of rays and results.

Geo::AnsiAllocator

Simple implementation of the MemoryAllocator class that forwards all requests to the malloc/free ANSI functions.

Geo::ArrayRange

A range within an array [first, last).

Geo::BasicAllocator

A basic memory allocator.

Geo::BboxEdge

A single edge of a bounding box.

Geo::BboxFace

A single face of a bounding box.

Geo::ClippedRay

A finite ray with near and far clipping planes.

Geo::ConvexHull

A convex hull of a set of points.

Geo::ConvexHullBuilder

Builds ConvexHull objects.

Geo::CovarianceMatrix

A covariance matrix.

Geo::CovarianceMatrixBuilder

Used for building CovarianceMatrix.

Geo::DebugLine

A line between two points.

Geo::EmbreeRtMeshVisitor
Geo::eWindingOrder

Winding order (clockwise/counterclockwise).

Geo::FixedSizeArray

A fixed size array.

Geo::Float8

8-bit floating point.

Geo::Geo2DTransform

A class representing a 2d linear transform between UVs.

Geo::GeoAlignedFreeDestructor

A type for freeing objects using GEO_ALIGNED_FREE. This is for use in GeoAutoPtr.

Geo::GeoAllocationPage

A storage unit for a page based allocation system.

Geo::GeoAllocator

A type of std::allocator, that passes memory requests through to the Geo heap functions This is used as the default allocator argument for the STL-like GeoMap/GeoList containers.

Geo::GeoAllocatorUnchecked

A custom std::allocator, that uses simple malloc/free.

Geo::GeoArray

Basic templated dynamic array class.

Geo::GeoArray_Stl

STL adaptor to make the GeoArray look like a proper STL container.

Geo::GeoAtomic
Geo::GeoAutoArrayPtr

Given the lack of a template typedef, and how common it is to want a GeoAutoPtr with Array dtor, adding a new class to provide this destruction policy by default.

Geo::GeoAutoDeleteArray

Adaptor to allow storing of pointers in a container (calls GEO_DELETE on each pointer upon array destruction)

Geo::GeoAutoDeleteList

Adaptor to allow container to own the pointed-to value data (calls GEO_DELETE() on each pointer upon container destruction)

Geo::GeoAutoDeleteMap

Adaptor to allow container to own the pointed-to value data (calls GEO_DELETE() on each pointer upon container destruction)

Geo::GeoAutoPtr

A value type to take ownership of a raw object allocated on the heap and bind its life-time to the scope of this class.

Geo::GeoAutoReleaseArray

Adaptor to allow storing of IGeoReleasable pointers in a container (calls Release() on each pointer upon array destruction)

Geo::GeoAutoReleaseMap

Adaptor to allow container to own the pointed-to value data (calls Release() on each pointer upon container destruction)

Geo::GeoAutoReleasePtr

Given the lack of a template typedef, and how common it is to want a GeoAutoPtr with Release dtor, adding a new class to provide this destruction policy by default.

Geo::GeoBitArray

A simple bit array wrapper, stored in an array of u32s.

Geo::GeoBitStore

Container for a set of bits.

Geo::GeoBlueNoise

class GeoBlueNoise Adapted from: Bridson, Robert, "Fast Poisson Sampling in Arbitrary Dimensions", ACM SIGGRAPH 2007 sketches

Geo::GeoBlueNoiseDiskPalette

Builds a pallet of blue noise samples, each in a disk of radius 1.

Geo::GeoBlueNoiseRayPalette

class GeoBlueNoiseRayPalette

Geo::GeoBoundingBox

This class represents an axis aligned bounding box.

Geo::GeoBoundingSphere

This class represents a bounding sphere.

Geo::GeoBufferedFileStream

Simple IGeoStream implementation that saves/loads data into/from memory and performs all read/write operations on this copy.

Geo::GeoBufferedInputStream

An implementation of IGeoInputStream that uses another stream to fill an internal buffer.

Geo::GeoCriticalSection

Basic wrapper around a critical section object.

Geo::GeoDebugAllocator

MemoryAllocator implementation which fills allocated memory with a given value.

Geo::GeoDelegateDestructor

A type for deleting objects of type T using specific delete function. This is for use in GeoAutoPtr.

Geo::GeoDeleteArrayDestructor

A type for deleting objects of type T using DeleteArray().

Geo::GeoDeleteDestructor

A type for deleting objects of type T using GEO_DELETE.

Geo::GeoDepthCubeMap

A simple storage class for a floating point cube map.

Geo::GeoEmbreeContext

An IGeoRayTracingContext that implements the Intel Embree raytracer.

Geo::GeoEqualCString

A hash functor for a null-terminated string.

Geo::GeoError

Description of a single error reported via an IGeoProgressProxy.

Geo::GeoEvent

Event that can be manually triggered.

Geo::GeoFileManager

The file manager deals with locating resources given a path and a filename.

Geo::GeoFileStream

Simple IGeoStream implementation that saves/loads data from a file.

Geo::GeoFixedPoolAllocator

A std::allocator that passes memory requests through to a single underlying GeoAllocationPage.

Geo::GeoFixedPoolList

To make usage of this pool class a bit less painful, create template holding classes for typedefs; since template typedefs do not exist, this is the closest you can get.

Geo::GeoFixedPoolMap

To make usage of this pool class a bit less painful, create template holding classes for typedefs; since template typedefs do not exist, this is the closest you can get.

Geo::GeoFixedString

This is a simple string class template that always uses a fixed amount of memory for a single string.

Geo::GeoFloat3SE
Geo::GeoFloatAsBits

Allow safe conversion between a float and its representative bit pattern.

Geo::GeoFp16Texture

A (16 bit) floating point texture for input and output.

Geo::GeoFpControl

Sets the state of the floating point control word, and restores the original value when the object is destroyed.

Geo::GeoFrameTime

This class measures frame rate and also computes a running average of the last n frames.

Geo::GeoFreeDestructor

A type for freeing objects using GEO_FREE. This is for use in GeoAutoPtr.

Geo::GeoGenericTexture

A really simple texture where all elements are T.

Geo::GeoGuid

A 128 bit identifier used to uniquely identify objects in the precompute.

Geo::GeoHalf

Convenience value type for a half float.

Geo::GeoHashConstHandle

A const handle into the hash table.

Geo::GeoHashCString

A hash functor for a null-terminated string.

Geo::GeoHashDefault

A generic hashing functor.

Geo::GeoHashHandle

A non-const handle into the hash table.

Geo::GeoHashMap

The hash table.

Geo::GeoHashString

A functor which hashes a char string.

Geo::GeoImmutableArray

Basic templated dynamic immutable array class.

Geo::GeoInstanceCount
Geo::GeoIntRange

Represents a range of integers, e.g. between 10 and 20.

Geo::GeoIntrusivePtr

A value type to take ownership of a raw object allocated on the heap and handle calling AddRef() and Release().

Geo::GeoKeyValueArray

A fast implementation of a set associative container, this one using a sorted array of key values to lookup a similar array of value pointers.

Geo::GeoLineSegment

Debugging output representation of a line segment.

Geo::GeoList

Our implementation of an STL list, with some modifications.

Geo::GeoMap

Our implementation of an STL map, with some modifications.

Geo::GeoMemoryDefault

Fully featured MemoryAllocator implementation that handles memory tracking, leak detection, stack traces, reporting and more.

Geo::GeoMemoryPool

A memory pool.

Geo::GeoMemoryStream

Simple IGeoStream implementation that saves/loads data to a block of memory.

Geo::GeoNonAABoundingBox

Non axis aligned bounding box. Note the "m_Pos" of this class is the CORNER (origin), not the centre.

Geo::GeoNoopDestructor

A type for not destroying anything.

Geo::GeoPair

A generic pair class. Inherits things like CopyConstructible or Assignable from its argument types.

Geo::GeoParametrisedPlane3

A plane with an origin and two basis vectors in the plane.

Geo::GeoPoint2

Single precision 2 dimensional point class.

Geo::GeoPoint2D

Integer 2 dimensional point class.

Geo::GeoPoint3

Single precision 3 dimensional point class.

Geo::GeoPoint3D

Integer 3 dimensional point class.

Geo::GeoPriorityQueue

GeoPriorityQueue.

Geo::GeoProgress

Helper class to manage an IGeoProgressProxy.

Geo::GeoQueue

Simple FIFO queue.

Geo::GeoQueueEnumInterface

Any class which wishes to use the queue Walk function must inherit from this class to define its callback interface.

Geo::GeoRefArrayPtr

Given the lack of a template typedef, and how common it is to want a GeoRefPtr with Array dtor, adding a new class to provide this destruction policy by default.

Geo::GeoRefCount

Base class for reference counted resources.

Geo::GeoRefPtr

A value type to take ownership of a raw object allocated on the heap and track a reference count between multiple instances of this class.

Geo::GeoRefReleasePtr

Given the lack of a template typedef, and how common it is to want a GeoRefPtr with Release dtor, adding a new class to provide this destruction policy by default.

Geo::GeoReleaseDestructor

A type for deleting objects of type T using Release(). This is for use in GeoAutoPtr.

Geo::GeoRGBXTexture

A simple CPU 8 bit per channel texture.

Geo::GeoRGBXTextureElement

A simple CPU 8 bit per channel texture element.

Geo::GeoScopedCSection

A simple utility for aquiring a lock for the duration of a function.

Geo::GeoSingleton

Inherit from this class to add singleton behaviour to your class.

Geo::GeoString

STL string replacement.

Geo::GeoStringView

STL string_view replacement.

Geo::GeoTimer

A simple task timer Construct a GeoTimer, then as each task begins simply create a local GeoTimer::Task object to automatically start and stop the clock.

Geo::GeoTokenList

A basic replacement for 'strtok'.

Geo::GeoTokenStream

A very simple utility class that wraps some common parsing functionality around a GeoTokenList.

Geo::GeoTriangle

Simple representation of a triangle.

Geo::GeoTriple

A generic triple class. Inherits things like CopyConstructible or Assignable from its argument types.

Geo::GeoUniqueDelegatePtr

Given the lack of a template typedef, and how common it is to want a GeoUniquePtr with Delegate dtor, adding a new class to provide this destruction policy by default.

Geo::GeoUniquePtr

A value type to take ownership of a raw object allocated on the heap and bind its life-time to the scope of this class.

Geo::GeoUniqueReleasePtr

Given the lack of a template typedef, and how common it is to want a GeoUniquePtr with Release dtor, adding a new class to provide this destruction policy by default.

Geo::GeoV128Texture

A really simple texture where all elements are float vectors.

Geo::GeoVariant

Variant class for storing name/value pairs in a map, where the value is a subset of common value types.

Geo::GeoVector3

Single precision 3 dimensional vector class.

Geo::GeoVector4

Single precision 4 dimensional vector class.

Geo::GeoVirtualPageAllocator

Implementation of the MemoryAllocator class (on Windows) that uses VirtualAlloc and VirtualProtect to provide similar memory overwrite detection as the Application Verifier.

Geo::GeoZLibFileStream

IGeoStream implementation that saves/loads data from a zlib compressed file.

Geo::GoodRNG

A Mersenne Twister RNG.

Geo::IdentDataCompare

Comparison class for std::sort.

Geo::IdentVertLinkBuilder

A utility for identifying pairs of "identical" vertices in a vertex buffer.

Geo::IdxLink

A link between two vertices.

Geo::IffReader

An IffReader allows you to use an IGeoStream to read Iff format binary files easily.

Geo::IffTextWriter

Presents an interface compatible with IffWriter, writes a text version of the binary IFF.

Geo::IffWriter

An IffWriter allows you to use an IGeoStream to create Iff format binary files easily.

Geo::IGeoEvent

Cross platform Event class.

Geo::IGeoInputStream

An IGeoInputStream allows you to read memory/files in a consistent manner, and is an extension point for users wishing to control where data is stored.

Geo::IGeoProgressProxy

An interface for informing a client about the current progress of an operation.

Geo::IGeoRayTracingContext

Ray-tracing context.

Geo::IGeoReleasable

A class implementing IGeoReleasable is usually created by the Enlighten libraries and so must have Release() called in order to return the memory.

Geo::IGeoSerialisable

A class implementing IGeoSerialisable adds the ability to save and load instances of the type from an IGeoStream.

Geo::IGeoStream

An IGeoStream allows you to read/write memory/files in a consistent manner, and is an extension point for users wishing to control where data is stored.

Geo::InitRayTracing

Small helper class to ensure init/cleanup are called when object is created/destroyed.

Geo::IRtMesh

An interface used by the raytracers to fill their internal mesh data structures.

Geo::ITerminalCmdHandler

A class that provides this interface can process tty string commands.

Geo::ITerminalDelegate

Handles tty initialisation events.

Geo::ITerminalInputHandler

Class providing this interface is a source of tty commands and may need polling.

Geo::ITerminalOutputHandler

A class that provides this interface can display tty output strings.

Geo::Matrix

Matrix definition.

Geo::Matrix4x4

Single-precision 4x4 matrix class.

Geo::MemoryAllocator

Class used to override memory allocation and freeing.

Geo::NonCopyable

Base class for classes that are meant to be noncopyable.

Geo::Optional

Class allowing a value object (integer, string, etc) to be optional, by storing a current value, default value and a boolean to state which is valid.

Geo::OptionalIndex

An index value that may or may not be present.

Geo::PackedInteger4

Represents four unsigned integer values packed into a single 32-bit register and named XYZW.

Geo::PackedInteger64

Stores unsigned integer values packed into a 64-bit block.

Geo::PackedIntegerArray

Stores unsigned integer values packed into 64-bit blocks.

Geo::PackedKeyValuePair

Represents a key and value that are convertible to unsigned integer.

Geo::PerformanceBlock

Scope control struct which instruments a block of code for performance analysis.

Geo::PointLeaf

A leaf node in a kd-tree of points.

Geo::PointSplit

A splitting node in a kd-tree of points.

Geo::PointSplitBounds

A bounding box for both branches of a PointSplit node.

Geo::PointSplitState

Common construction state for a point kd-tree.

Geo::QuickTaskTimer

A little class to time a task.

Geo::RastFragment

stores a fragment of a triangle i.e. a triangle clipped to a pixel box

Geo::RastTri

records details of the input triangle

Geo::RastVert

stores a rasterization vertex, including barycentric coordinates

Geo::Rayf

A single ray.

Geo::RayResult

The result of a ray intersection test.

Geo::Releasable

Base class for classes that are meant to be releasable.

Geo::RingBuffer

Ring Buffer class.

Geo::RtMesh

A mesh container that can be stored to disk and used later as a ray tracing mesh.

Geo::RtMeshGroup

A ray tracing mesh that is a collection of other meshes.

Geo::ScopedTickCounter

A class that times the interval between construction and destruction, adding this number of ticks to the counter provided.

Geo::ScopedTimer

A class that times the interval between construction and destruction, adding the number of milliseconds to the counter provided.

Geo::ScopeStartStop

Simple scope control of a class with static Start() and Stop() functions.

Geo::SHCoeff

SH Helper class.

Geo::SimpleRNG

The 'super-duper' random number generator with shuffle (an LCG).

Geo::Statistics

Result structure used for comparing input lighting buffers.

Geo::StridedArrayView

A read-only view into an array with optional stride.

Geo::StringExpression

Wraps a string concatenation expression.

Geo::TerminalProvider

Inherit from this class to provide a specific tty command processing type.

Geo::TextureWriter

Class that writes a 2D block of memory to disk as a texture file.

Geo::TreeNode

A generic tree structure, where each node contains an item by value.

Geo::TriGroupSelection

Utility for doing vertex-based chart identification.

Geo::TxtProgressBar

A simple implementation of an IGeoProgressProxy that uses printf to communicate with the user.

Geo::TypeInfo

Provides a type id for the given type.

Geo::VectorD

Double precision vector class.

Geo::WriteRangePolicy

Policy to write pointers as a range with the given element count.

Geo::ZeroedPadding

Defines an N-byte block of padding which is zeroed on construction.

Variables

Name Description
const unsigned char g_Base64Table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" "0123456789+/"

Maps numbers 0-63 onto ascii characters.

char g_ErrorBuffer[16 *1024]

Big static buffer for errors, as we may have run low on memory by the time we need to print stuff.

const char * g_FriendlyRTAPINames[RTAPI_NUM_API] = { "EMBREE" }

Names of the ray-tracing APIs.

bool g_isUnattended = false

Should we avoid showing message boxes etc., as there is no-one to deal with them?

const Geo::v128 g_LuminanceCoefficients = Geo::VConstruct(0.2126f, 0.7152f, 0.0722f, 0.0f)

The coefficients to calculate the luminance from a colour specified in linear sRGB space These values are determined by the CIE 1931 colour space standard and the definition of the sRGB primaries.

const float g_MaxNegFloat = -FLT_MAX

Largest representable negative float.

const float g_MaxNegHalfFloat = -65504.0f

Largest representable negative half-float (=-(2 - 2^-10) * 2^15)

const float g_MaxPosFloat = FLT_MAX

Largest representable positive float.

const float g_MaxPosHalfFloat = 65504.0f

Largest representable positive half-float (=(2 - 2^-10) * 2^15)

const float g_MinFloat = FLT_MIN

Smallest representable positive float.

LPTOP_LEVEL_EXCEPTION_FILTER g_previousFilter = NULL

Stores the previous exception filter in InstallGeoErrorHandler(), so it can be restored in RemoveGeoErrorHandler().

const float g_UnitEpsilon = FLT_EPSILON

Smallest float such that 1.f + g_UnitEpsilon != 1.f.

const v128 g_VecEpsilon = VBroadcast(0.001f)

This has the value of g_VecEpsilonF broadcast into all elements.

const float g_VecEpsilonF = 0.001f

A general epsilon for use with the IsUnitLength function.

const u32 g_VecMaskFalse = 0x00000000

A mask value of 'false' = 0x00000000.

const u32 g_VecMaskTrue = 0xffffffff

A mask value of 'true' = 0xffffffff.

const v128 g_VecNormaliseEpsilon = VBroadcast(1e-35f)

An internal epsilon used inside the vector normalisation functions.

const Geo::v128 g_VFours

Some common useful constants.

const Geo::v128 g_VHalves

Some common useful constants.

const v128 g_VMaskNotSignBit

These are all the masks for the implementation Users should go through the API to access these.

const v128 g_VMaskSignBit

These are all the masks for the implementation Users should go through the API to access these.

const v128 g_VMaskW

These are all the masks for the implementation Users should go through the API to access these.

const v128 g_VMaskX

These are all the masks for the implementation Users should go through the API to access these.

const v128 g_VMaskXW

These are all the masks for the implementation Users should go through the API to access these.

const v128 g_VMaskXY

These are all the masks for the implementation Users should go through the API to access these.

const v128 g_VMaskXYW

These are all the masks for the implementation Users should go through the API to access these.

const v128 g_VMaskXYZ

These are all the masks for the implementation Users should go through the API to access these.

const v128 g_VMaskXYZW

These are all the masks for the implementation Users should go through the API to access these.

const v128 g_VMaskXZ

These are all the masks for the implementation Users should go through the API to access these.

const v128 g_VMaskXZW

These are all the masks for the implementation Users should go through the API to access these.

const v128 g_VMaskY

These are all the masks for the implementation Users should go through the API to access these.

const v128 g_VMaskYW

These are all the masks for the implementation Users should go through the API to access these.

const v128 g_VMaskYZ

These are all the masks for the implementation Users should go through the API to access these.

const v128 g_VMaskYZW

These are all the masks for the implementation Users should go through the API to access these.

const v128 g_VMaskZ

These are all the masks for the implementation Users should go through the API to access these.

const v128 g_VMaskZW

These are all the masks for the implementation Users should go through the API to access these.

const Geo::v128 g_VMinusOnes

Some common useful constants.

const Geo::v128 g_VMinusOneTwoEights

Some common useful constants.

const Geo::v128 g_VOneOverOneTwoSevens

Some common useful constants.

const Geo::v128 g_VOneOverPi

Some common useful constants.

const Geo::v128 g_VOneOverTwoFives

Some common useful constants.

const Geo::v128 g_VOneOverTwoPi

Some common useful constants.

const Geo::v128 g_VOnes

Some common useful constants.

const Geo::v128 g_VOneTwoSevens

Some common useful constants.

const Geo::v128 g_VPi

Some common useful constants.

const Geo::v128 g_VQuarters

Some common useful constants.

const Geo::v128 g_VThirds

Some common useful constants.

const Geo::v128 g_VThrees

Some common useful constants.

const Geo::v128 g_VTwoFiveFives

Some common useful constants.

const Geo::v128 g_VTwos

Some common useful constants.

const v128 g_VUnitW

Unit vectors.

const v128 g_VUnitX

Unit vectors.

const v128 g_VUnitY

Unit vectors.

const v128 g_VUnitZ

Unit vectors.

const Geo::v128 g_VZero

Some common useful constants.

bool g_waitOnExit = false

Should we wait before exiting the process, when an unhandled exception is encountered.

const Geo::u32 GEO_CPU_FEATURE_AVX = 0x00000100

This cpu supports AVX.

const Geo::u32 GEO_CPU_FEATURE_F16C = 0x00000200

This cpu supports F16C.

const Geo::u32 GEO_CPU_FEATURE_FMA3 = 0x00000400

This cpu supports FMA3.

const Geo::u32 GEO_CPU_FEATURE_FMA4 = 0x00000080

This cpu supports FMA4.

const Geo::u32 GEO_CPU_FEATURE_MMX = 0x00000001

This cpu supports mmx technology.

const Geo::u32 GEO_CPU_FEATURE_SSE = 0x00000002

This cpu supports version 1 of SSE.

const Geo::u32 GEO_CPU_FEATURE_SSE2 = 0x00000004

This cpu supports version 2 of SSE.

const Geo::u32 GEO_CPU_FEATURE_SSE3 = 0x00000008

This cpu supports version 3 of SSE.

const Geo::u32 GEO_CPU_FEATURE_SSE41 = 0x00000020

This cpu supports version 4.1 of SSE.

const Geo::u32 GEO_CPU_FEATURE_SSE42 = 0x00000040

This cpu supports version 4.2 of SSE.

const Geo::u32 GEO_CPU_FEATURE_SSSE3 = 0x00000010

This cpu supports the Supplemental Streaming SIMD Extensions 3 (SSSE3).

const GeoThreadHandle GEO_INVALID_THREAD_HANDLE

A thread handle value that is never valid.

const GeoLogHandlerCount GEO_LOG_MAX_HANDLERS_PER_TYPE = 4

The maximum number of log handlers that can be installed per log message type.

const s32 GEO_LOG_MAX_MSG_LENGTH = 8192

Maximum length of a log message.

const s32 GEO_LOG_MSG_TYPE_MAX_LENGTH = 64

Minimum required buffer size needed for GeoLogMsgType().

const eGeoLogMsgType GEO_LOG_NUM_MSG_TYPE_INDEX[GEO_LOG_NUM_MSG_TYPES] = {LOG_INFO, LOG_DEBUG, LOG_STATUS, LOG_WARN, LOG_FATAL, LOG_ASSERT}

Define the order in which the message types are represented in internal data structures.

const u8 GEO_LOG_NUM_MSG_TYPES = 6

The number of types of log message.

const Geo::s32 HASH_SIZE_SHA1 = 20

The size of an SHA-1 hash.

const eGeoLogMsgTypeMask LOG_ALL = LOG_INFO | LOG_DEBUG | LOG_STATUS | LOG_WARN | LOG_FATAL | LOG_ASSERT

A bit mask for containing all the valid message types.

Functions

Name Description
Abs(s64)

Return the absolute value of a number.

Abs(float)

Return the absolute value of a number.

Abs(double)

Return the absolute value of a number.

Abs(s32)

Return the absolute value of a number.

Abs(v128Param)

Returns a vector with the Abs function applied to all 4 elements.

ApplyBarycentricWeights(const Geo::BaryWeights &, const v128 &, const v128 &, const v128 &)

Apply barycentric weights to triangle vertex attributes.

ArrayToString(const Geo::GeoArray< T > &, const C *)

Function to make a string by concatenating an array of elements using IGeoStream::operator<< to convert each element to a string and placing the given separator between each element.

Base64Decode(const char *, size_t, Geo::u8 *)

Converts a C-string of Base64 into raw binary.

Base64Encode(const Geo::u8 *, size_t, char *)

Converts raw binary into Base64 for storage in text files.

begin(ArrayRange< T > &)

Return iterator to support ranged-based for loop.

begin(const ArrayRange< T > &)

Return iterator to support ranged-based for loop.

BloatTriangle(ConvexHull *, Geo::v128, Geo::v128, Geo::v128, float, Geo::s32)

Bloat a triangle by a specified amount.

BuildPointKdTree(PointSplitState &)

Construct a kd-tree of points.

ByteSwap(T)

Generic swap that works for any built-in type <= 8 bytes.

ByteSwap(double)

Generic swap that works for any built-in type <= 8 bytes.

ByteSwap(float)

Generic swap that works for any built-in type <= 8 bytes.

ByteSwap16(u16)

Fundamental byte-swapping macros.

ByteSwap32(u32)

Fundamental byte-swapping macros.

ByteSwap32F(float)

Fundamental byte-swapping macros.

ByteSwap64(u64)

Fundamental byte-swapping macros.

ByteSwapArray16(Geo::u16 *, Geo::u32)

Byte swap an array of 16-bit values.

ByteSwapArray32(Geo::u32 *, Geo::u32)

Byte swap an array of 32-bit values.

ByteSwapArray64(Geo::u64 *, Geo::u32)

Byte swap an array of 64-bit values.

ByteSwapArrayFloat(float *, Geo::u32)

Byte swap an array of 32-bit float values.

CalcCubeMapCoordinatesForDirection(Geo::v128, Geo::s32, Geo::s32 &, float &, float &)

Compute the cube map texel coordinate for a given direction and cubemap resolution.

CalcDirectionForCubeMapCoordinate(Geo::s32, Geo::s32, Geo::s32, Geo::s32)

Generate a direction vector for a cubemap texel coordinate.

CalcDirectionForCubeMapTexel(Geo::s32, float, float)

Generate a direction vector for a cubemap texel UV coordinate.

Ceil(float)

Compute the next whole number greater than a.

CheckPaddingZeroed(const T &)

Checks if the given object has all it's 'padding' fields set to zero.

Clamp(T &, const T &, const T &)

Clamp a numeric type T to the given range.

ClosestPointInTriangle(const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, const Geo::v128 &)

Gives the closest point in triangle abc to point p.

CombineStatistics(const Statistics &, const Statistics &)

Combine the values in statsA and statsB so that the properties of each member are retained over the whole set.

Compatibility_ReadWideString(IffReader &, GeoString< char > &, Geo::s32)

Read a type that used to be GeoString<wchar_t>, and is now GeoString<char>

CompressStream(GeoMemoryStream &, GeoMemoryStream &)

Compress the input stream with the ZLib library, placing the result in the output stream.

ComputeKdTreeBounds(PointSplitBounds *, const PointSplit *, const PointLeaf *, const Geo::GeoBoundingBox *)

Compute a AABB bounds object for each split point in a kd-tree.

ComputeStatistics(Statistics &, const Geo::v128 *, const Geo::v128 *, const Geo::s32, const Geo::v128 &)

Computes the difference between two vector arrays.

ConstructFloat8(Geo::u32, Geo::s32)

Return the float represented by the specified 4-bit mantissa and the specified exponent.

ConstructFloatPow2(int)

Constructs a float which is exactly equal to 1x2^exponent.

ConvertColourToV(GeoColour)

The 4 float components of v128 correspond to the native ordering of the 4 byte components of u32.

ConvertFloatToHalf(float)

Convert a float to a half.

ConvertFloatToHalfArray(Geo::u16 *, const float *, Geo::u32)

Convert an array of floats to an array of halves.

ConvertHalfToFloat(Geo::u16)

Convert a half to a float.

ConvertHalfToFloatArray(const Geo::u16 *, float *, Geo::u32)

Convert an array of halves to an array of floats.

ConvertV128ToHalfVectorArray(Geo::u64 *, const Geo::v128 *, Geo::u32)

Convert an array of v128s to an array of half vectors.

ConvertVToColour(v128)

The 4 float components of v128 correspond to the native ordering of the 4 byte components of u32.

ConvertVToIntensity(v128)

The 4 float components of v128 correspond to the native ordering of the 4 byte components of u32.

Copy(const GeoList< T > &, GeoList< T > &)

Appends the contents of the 'source' GeoList to the 'dest' GeoList.

CopyGlobalBufferToClipboard()

Copies error data to the Windows clipboard.

CopyStreamToStream(IGeoStream &, GeoMemoryStream &)

Copy the contents of the source IGeoStream (src) to the destination GeoMemoryStream (dst).

CountLeadingZeroBits(u32)

Returns the number of consecutive leading zero bits.

CountSetBits(u8)

Returns the number of set bits.

CountTrailingZeroBits(u32)

Returns the number of consecutive trailing zero bits.

CropWhitespace(GeoString< T > &)

Removes leading and trailing whitespace characters from the provided string.

Cross(VectorD, VectorD)

Double precision vector operators.

DebugBreakAtStreamPosition(Geo::u64, const Geo::IGeoStream &, size_t)

Breaks into the debugger if the given current position would advance beyond the given target position after advancing by the given number of bytes.

Deserialise(GeoRaySet &, const char *)

Deserialises a list of line segments from a file.

DivideAndRoundUp(T, T)

Perform an integer division that rounds the result to the next integer.

Dot(VectorD, VectorD)

Double precision vector operators.

end(const ArrayRange< T > &)

Return iterator to support ranged-based for loop.

end(ArrayRange< T > &)

Return iterator to support ranged-based for loop.

Equal(MatrixParam, MatrixParam)

Return true if all corresponding matrix elements are exactly equal.

EqualWithinEpsilon(MatrixParam, MatrixParam)

Return true if all corresponding matrix elements are within an epsilon.

EqualWithinEpsilon(v128Param, v128Param, v128Param)

Returns true if all elements of a and b are within g_VecEpsilon of each other.

EqualWithinEpsilon(float, float, float)

Returns true if Abs(a - b) is less than the epsilon.

EvaluateStringExpression(StringExpression< T >)

Concatenate and return all of the strings in the expression with a single allocation.

FastFloatToInt(float)

Converts a float into a signed integer using a faster method than the standard C truncation convention which requires a rounding mode change.

FileExists(const char *)

Checks that testFile exists.

FileExistsAndIsNewer(const char *, const char *)

Checks that testFile exists and is newer than exemplarFile.

FileIsWritable(const char *)

Checks that the file named filename can be written to.

FindIndex(const GeoArray< T > &, const T &)

Find array index for first element that matches data, returns -1 if no match.

Floor(float)

Compute the next whole number smaller than a.

FreeLoadedFile(void *)

Free a previously loaded file.

FromVector(const v128 &)

Convert from a vector.

GenerateGuidFromString(const GeoString< char > &)

Convert a string to a GUID by hashing.

GenerateGuidFromString(GeoGuid &, const GeoString< char > &)

Convert a string to a GUID by hashing.

GenerateUnitSquareFastPoissonDistribution(const s32 &, GeoArray< GeoPoint2 > &, const u32 &)

Helper function to generate fast poisson samples in the 2D unit square.

GenerateUnitSquareSobolDistribution(const s32 &, GeoArray< GeoPoint2 > &, const u32 &)

Helper function to generate sobol samples in the 2D unit square.

Geo__itt_domain_create(const char *)

Safe forwarding to Intel GPA functions (tests if Dll has been loaded before making the call)

Geo__itt_id_create(const __itt_domain *, __itt_id)

Safe forwarding to Intel GPA functions (tests if Dll has been loaded before making the call)

Geo__itt_id_destroy(const __itt_domain *, __itt_id)

Safe forwarding to Intel GPA functions (tests if Dll has been loaded before making the call)

Geo__itt_relation_add(const __itt_domain *, __itt_id, __itt_relation, __itt_id)

Safe forwarding to Intel GPA functions (tests if Dll has been loaded before making the call)

Geo__itt_relation_add_to_current(const __itt_domain *, __itt_id)

Safe forwarding to Intel GPA functions (tests if Dll has been loaded before making the call)

Geo__itt_string_handle_create(const char *)

Safe forwarding to Intel GPA functions (tests if Dll has been loaded before making the call)

Geo__itt_task_begin(const __itt_domain *, __itt_id, __itt_id, __itt_string_handle *)

Safe forwarding to Intel GPA functions (tests if Dll has been loaded before making the call)

Geo__itt_task_end(const __itt_domain *)

Safe forwarding to Intel GPA functions (tests if Dll has been loaded before making the call)

Geo__itt_task_group(const __itt_domain *, __itt_id, __itt_id, __itt_string_handle *)

Safe forwarding to Intel GPA functions (tests if Dll has been loaded before making the call)

GEO_DELETE_ARRAY_T(T *&)

Templated function equivalent of GEO_DELETE_ARRAY A handy template so you don't have to enter the type param (and potentially get it wrong)

GEO_DELETE_T(T *&)

Templated function equivalent of GEO_DELETE A handy template so you don't have to enter the type param (and potentially get it wrong)

GeoAlign(T *, s32)

Align the supplied pointer to the supplied boundary.

GeoAlign(T, s32)

Align the supplied value to the supplied boundary.

GeoAToF(const char *)

Equivalent to atof.

GeoAToI(const char *)

Equivalent to atoi.

GeoAttachLogger(GeoLogHandler, eGeoLogMsgTypeMask)

Attach a log handler which will be passed messages of the requested types.

GeoConstructAPIFilename(const char *, char *)

Construct a filename for use in the underlying platform filesystem API.

GeoCreateThread(GeoThreadStartRoutine, void *)

Platform specific thread creation function.

GeoDeleteFile(const char *)

Delete a file.

GeoDestruct(T &)

Calls destructor on object.

GeoDestruct(v128 &)

Calls destructor on object.

GeoDetachAllLoggers(eGeoLogMsgTypeMask)

Detach all log handlers for the specified message types.

GeoDetachLogger(GeoLogHandler, eGeoLogMsgTypeMask)

Detach a previously attached log handler, it if was previously attached.

GeoDirectoryCreate(const char *)

Creates a directory and all the directories leading up to it.

GeoFClose(FILE *)

A safe alternative to fclose.

GeoFEof(FILE *)

A safe alternative to feof.

GeoFError(FILE *)

A safe alternative to ferror. Returns a non-zero value to indicate an error.

GeoFOpen(const char *, const char *)

GeoFOpen.

GeoFRead(void *, size_t, size_t, FILE *)

A safe alternative to fread.

GeoFSeek(offset_t, GeoFSeekOrigin, FILE *)

A safe alternative to fseek.

GeoFTell(FILE *)

A safe alternative to ftell.

GeoFWrite(const void *, size_t, size_t, FILE *)

A safe alternative to fwrite.

GeoGetCurrentPlatform()

Get the platform this code was compiled for.

GeoGetCurrentThreadHandle()

Platform specific thread accessor function.

GeoGetPlatformName(ePlatform)

Returns a text string containing the platform name.

GeoInterlockedAdd32(GeoAtomic< u32 > &, u32)

Atomically add amount to value pointed to by addend, returns the new value.

GeoInterlockedAdd64(GeoAtomic< s64 > &, s64)

Atomically add amount to value pointed to by addend, returns the new value.

GeoInterlockedDec32(GeoAtomic< u32 > &)

Atomically decrement value pointed to by addend, returns the new value.

GeoInterlockedExchange32(GeoAtomic< u32 > &, u32)

Atomically sets a value, and returns its previous value.

GeoInterlockedExchange64(GeoAtomic< u64 > &, u64)

Atomically sets a value, and returns its previous value.

GeoInterlockedInc32(GeoAtomic< u32 > &)

Atomically increment value pointed to by addend, returns the new value.

GeoInterlockedInc64(GeoAtomic< s64 > &)

Atomically increment value pointed to by addend, returns the new value.

GeoInterlockedSub32(GeoAtomic< u32 > &, u32)

Atomically subtract amount to value pointed to by addend, returns new value.

GeoIsAligned(T *, s32)

Check if the supplied address is aligned to the given alignment.

GeoIsAligned(T, s32)

Check if the supplied value is aligned to the given alignment.

GeoIsLoggerAttached(eGeoLogMsgTypeMask)

Return true if at least one logger is attached for all of the specified message types.

GeoLogHandler_Debugger(eGeoLogMsgType, u32, const char *)

A log message handler for writing messages to the debugger output channel.

GeoLogHandler_Popup(eGeoLogMsgType, u32, const char *)

A log message handler for displaying messages in a popup box.

GeoLogHandler_Stdout(eGeoLogMsgType, u32, const char *)

A log message handler for writing messages to stdout.

GeoLogHandler_Stdout_SetOrigin(const char *)

To support the MS error message format (see http://tinyurl.com/6hm53bz) allow user to set an Origin, otherwise just leave empty.

GeoLogMsgType(eGeoLogMsgType, u32, char *)

It is convenient to have a textual label for a given channel easily available.

GeoPrintf(eGeoLogMsgType, const char *, ...)

Messages are passed through the logger using a "printf()" like function.

GeoPrintf(eGeoLogMsgType, u32, const char *, ...)

Messages are passed through the logger using a "printf()" like function.

GeoRectFromCoords(float, float, float, float)

Function to construct a GeoRect from the minimum and maximum X and Y co-ordinates.

GeoRectFromCoordsUnsafe(float, float, float, float)

Function to construct a GeoRect from the minimum and maximum X and Y co-ordinates.

GeoRectFromSize(float, float, float, float)

Function to construct a GeoRect from a minimum X and Y co-ordinate, a width and a height.

GeoRectHeight(GeoRect)

Functions to get various co-ordinates from a rect.

GeoRectMaxX(GeoRect)

Functions to get various co-ordinates from a rect.

GeoRectMaxY(GeoRect)

Functions to get various co-ordinates from a rect.

GeoRectMinX(GeoRect)

Functions to get various co-ordinates from a rect.

GeoRectMinY(GeoRect)

Functions to get various co-ordinates from a rect.

GeoRectWidth(GeoRect)

Functions to get various co-ordinates from a rect.

GeoReleaseThread(GeoThreadHandle)

Platform specific thread release function.

GeoRenameFile(const char *, const char *)

Rename a file.

GeoResumeThread(GeoThreadHandle)

Platform specific thread resume function.

GeoSetThreadAffinity(GeoThreadHandle, Geo::u64)

Platform specific set thread affinity function.

GeoSleepThread(u32)

Platform specific thread sleep function.

GeoSPrintf(char *, size_t, const char *, ...)

Equivalent to sprintf.

GeoStageBegin(const char *)

Begin a statistics block.

GeoStageEnd()

End a statistics block.

GeoStatistic(const char *, float)

Log a single statistic, as a name/value pair.

GeoStatistic(const char *, double)

Log a single statistic, as a name/value pair.

GeoStatistic(const char *, const char *)

Log a single statistic, as a name/value pair.

GeoStatistic(const char *, Geo::u64)

Log a single statistic, as a name/value pair.

GeoStatistic(const char *, Geo::s64)

Log a single statistic, as a name/value pair.

GeoStatistic(const char *, Geo::s32)

Log a single statistic, as a name/value pair.

GeoStatistic(const char *, Geo::u32)

Log a single statistic, as a name/value pair.

GeoStatisticsBegin(const char *, const char *, const char *)

Begin a StatusXml file.

GeoStatisticsEnd()

End the StatusXml file (note that you may wish to set the filename to NULL after this)

GeoStatusLogHandler_XmlFile(eGeoLogMsgType, u32, const char *)

The event handler for the StatusXml file.

GeoStatusLogHandler_XmlFile_SetName(const char *, bool)

Set the name of the StatusXml file writer. If not called, no file is created.

GeoStrCat(char *, size_t, const char *)

Equivalent to strcat.

GeoStrCmp(const char *, const char *)

Equivalent to strcmp.

GeoStrCpy(char *, size_t, const char *)

Equivalent to strcpy.

GeoStrICmp(const char *, const char *)

Equivalent to stricmp.

GeoStrLen(const char *)

Equivalent to strlen.

GeoStrLwr(char *)

Equivalent to strlwr.

GeoStrNCat(char *, size_t, const char *, size_t)

Equivalent to strncat.

GeoStrNCmp(const char *, const char *, size_t)

Equivalent to strncmp.

GeoStrNCpy(char *, size_t, const char *, size_t)

Equivalent to strncpy.

GeoStrToS16(const char *)

Simple interpretation of the strtoXXX family of functions, returning a Geo::s16.

GeoStrToS32(const char *)

Simple interpretation of the strtoXXX family of functions, returning a Geo::s32.

GeoStrToS64(const char *)

Simple interpretation of the strtoXXX family of functions, returning a Geo::s64.

GeoStrToU16(const char *)

Simple interpretation of the strtoXXX family of functions, returning a Geo::u16.

GeoStrToU32(const char *)

Simple interpretation of the strtoXXX family of functions, returning a Geo::u32.

GeoStrToU64(const char *)

Simple interpretation of the strtoXXX family of functions, returning a Geo::u64.

GeoThreadEqual(GeoThreadHandle, GeoThreadHandle)

Platform specific thread comparison function.

GeoUnhandledExceptionFilter(PEXCEPTION_POINTERS)

Unhandled exception filter, registered by InstallGeoErrorHandler()

GeoVSCPrintf(const char *, va_list)

Equivalent to vscprintf.

GeoVSPrintf(char *, size_t, const char *, va_list)

Equivalent to vsprintf.

GeoWaitThread(GeoThreadHandle)

Platform specific thread wait function.

GeoYieldThread()

Platform specific thread yield function.

GetBarycentricWeights(const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, const Geo::v128 &)

Compute the barycentric weights in a triangle given a position.

GetCpuFeatures()

Retrieve the processors features as a set of flags.

GetCpuVendor()

Get the PC CPU vendor.

GetCpuVendorAsString()

Get the PC CPU vendor as a string.

GetExceptionString(DWORD)

====================================================================== Given an exception code, returns a pointer to a static string with a

description of the exception


GetFileSystemPrefix()

Get the previously set file system prefix for the current platform.

GetFloatExponent(float)

Extract the exponent of the given float, accounting for the bias (i.e. the result is in the range -127 to +128).

GetFloatMantissa(float)

Extracts the mantissa of the given float.

GetFriendlyName(eRTAPI)

Gets the name of the given ray-tracing API.

GetiOSAppDocumentsDir()

Returns the path to the application Documents directory on the current iOS device/simulator.

GetLogicalAddress(PVOID, LPCH, DWORD, DWORD &, DWORD &)

============================================================================= Given a linear address, locates the module, section, and offset containing that address.

GetLogicalCpuCoreCount()

Get the number of logical cores.

GetMatrixFromString(const C *)

Read 16 float values from a string and build a Matrix. Same argument order as the 16 float constructor.

GetMemoryAllocator()

Gets the currently set memory allocator, or NULL if none has been set yet.

GetNormal(const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, eWindingOrder::Value)

Compute a normal from three vertices. The windingOrder parameter determines which side of the triangle the normal is for.

GetNumPageFaults()

The number of page faults that occurred during the process life.

GetPeakProcessMemoryInfo()

The peak amount of memory allocated by the process.

GetTotalMemoryInUse()

The total amount of memory currently allocated (allocations minus deallocations)

GetTotalProcessMemoryInfo()

The total amount of memory currently allocated by the process.

GetTotalSystemMemory()

Get the total amount of system physical memory.

GetV128FromString(const C *)

Parses a v128 from the given string.

GetV128FromStringXYZ(const C *, float)

Parses a v128 from the given string, ignoring the W-component and instead setting it to the given value.

HalfVectorToV128(const Geo::u16 *)

Convert a 4-element array of half floats to a v128.

HalfVectorToV128_Portable(const Geo::u16 *)

Convert a 4-element array of half floats to a v128.

HashBig(const void *, size_t, u32)

This is the same as HashWord() on big-endian machines.

HashLittle(GeoStringView< char >)

This will create a simple u32 hash from the (case-sensitive) string supplied.

HashLittle(const void *, size_t, u32)

Hash a variable-length key of bytes into a 32-bit value.

HashSHA1(const Geo::u8 *, Geo::s32)

Hashes the given array of bytes using SHA1 and returns a string representing the hash.

HashSHA1(const Geo::u8 *, Geo::s32, Geo::u8 *)

Hashes the given array of bytes using SHA1. The outputBytes parameter must have at least HASH_SIZE_SHA1 bytes allocated.

HashSHA1(GeoFileStringView)

Hashes the given string using SHA1 and returns a GUID representing the hash.

HashWord(const u32 *, size_t, u32)

Produce a hash from a string of Geo::u32 This works on all machines.

InstallGeoErrorHandler(bool)

Sets up program-wide error handling behaviour, including the unhandled exception handler.

IntersectTriangle(BaryWeights &, const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, bool, eWindingOrder::Value)

Intersect a triangle by a ray. If ignoreBackFaces is true then the windingOrder parameter determines which side of the triangle is the front.

InvokeFileOpenCallback(const char *, const char *)

Invoke the file open callback, if set.

IsFinite(MatrixParam)

Returns true if all of the 16 elements of m are finite.

IsFinite(const BaryWeights &)

Check that the weights are finite.

IsFinite(v128Param)

Returns true if all of the 4 elements of v are finite.

IsInsideInclusive(const BaryWeights &)

Test if barycentric weights encode a position inside the triangle.

IsLittleEndian(void)

Returns true if little endian.

IsMultiplePower2(const void *, u64)

Returns true if p is multiple of the specified power of 2.

IsMultiplePower2(u64, u64)

Returns true if u is multiple of the specified power of 2.

IsNan(v128Param)

Returns true if any of the 4 elements of v are NANs.

IsNan(MatrixParam)

Returns true if all of the 16 elements of m are finite.

IsPermutationMatrix(MatrixParam)

Returns true if the matrix is a valid permutation matrix, where each column and each row consists of a single positive or negative "1" and the rest "0".

IsPower2(u64)

Return true is unsignedInt is a power of 2 or not.

IsWhitespace(char)

Returns whether the given character is a whitespace character.

Length(VectorD)

Double precision vector operators.

Lerp(v128Param, v128Param, v128Param)

Linearly interpolated between the corresponding components of a and b.

Lerp(float, float, float)

Linearly interpolate between a and b with factor s.

LoadFile(const char *, u32 &, u32, u32)

A safe alternative to ferror.

LoadFileStr(const char *, u32 &, u32)

Load a file and append a null terminator.

LoadIntelGPALibrary()

Load the Intel Graphics Performance Analyzer Dll and initialise all utilised function pointers.

LoadInterface(IGeoInputStream &, u32)

Load an Interface object from a stream. Interface must have same functional API as an IGeoSerialisable.

LoadInterface(const char *, u32, bool)

Load a Precompute interface from disk, using the given filename.

LoadInterfaceCompressed(const char *, u32, bool)

Load an IGeoSerialisable interface from disk, using the given compressed or uncompressed file.

LocateLeafForPoint(const Geo::v128 *, const PointSplit *, const Geo::v128 &)

Locate the leaf index for a given point in a kd-tree.

LocateLeavesOverlappingBox(Geo::GeoArray< Geo::s32 > &, const Geo::PointSplitBounds *, const PointSplit *, const Geo::GeoBoundingBox &)

Locate a set of leaf indices that overlap a box.

LocateLeavesOverlappingPoint(Geo::GeoArray< Geo::s32 > &, const Geo::PointSplitBounds *, const PointSplit *, const Geo::v128 &)

Locate a set of leaf indices that overlap a point.

LocateLeavesWithinBox(Geo::GeoArray< Geo::s32 > &, const Geo::GeoBoundingBox &, const Geo::v128 *, const PointSplit *)

Locate a set of leaf indices that intersect a box.

Log(float, float)

Calculate the logarithm with specified base of the given number;.

LogStatistics(const IGeoRayTracingContext *, const double &)

Log ray tracing timings.

MakeArrayRange(T *, T *)

Returns an array range for first and last.

MakeFileStream(const char *, IGeoStream::EStreamMode, GeoFileStream::EStreamFormat)

Factory method to create appropriate file stream like object.

MakeGeoArray(StridedArrayView< T >)

Create a GeoArray which is a copy of the specified strided array view.

MakeGeoArray(const T *, s32)

Create a GeoArray which is a copy of the specified array.

MakeGeoError(const ErrorType &)

Creates a GeoError struct by filling in the given error code, textual message and payload data.

MakeGeoError(const char *, TPayload *)

Creates a GeoError struct by filling in the given error code, textual message and payload data.

MakeGeoPair(const T1 &, const T2 &)

Function to create a Geo::GeoPair, similar to the STL function std::make_pair.

MakeGeoTriple(const T1 &, const T2 &, const T3 &)

Function to create a Geo::GeoTriple, extended from MakeGeoPair.

MakeStridedArrayView(const GeoArray< T > &)

Create a StridedArrayView which refers to the entire of the specified array.

MakeStridedArrayView(const T *, Geo::s32, Geo::s32)

Create a read-only view into an array with optional stride.

MakeStringExpression(T)

Return a string concatenation expression consisting of the specified string.

MatrixToString(MatrixParam)

Creates a GeoString containing the 16 elements of the matrix (space-separated) in a form compatible with GetMatrixFromString.

MatrixToUtf8String(MatrixParam)

Creates a GeoString containing the 16 elements of the matrix (space-separated) in a form compatible with GetMatrixFromString.

Max(const T &, const T &)

Return the Max of a and b.

Max(const GeoPoint3D &, const GeoPoint3D &)

Gets the component-wise maximum of two points.

Max(const GeoPoint2D &, const GeoPoint2D &)

Gets the component-wise maximum of two points.

Max(const v128 &, const v128 &)

Returns a vector where each element has the maximum value of the corresponding values in a and b NOTE - the Min3 template function will work with the v128 type as well.

Max3(const T &, const T &, const T &)

Return the Max of {a,b,c}.

MConstructCubeMapInvViewMatrix(Geo::s32)

Construct the inverse of the view matrix for a specific cubemap face.

MConstructCubeMapViewMatrix(Geo::s32)

Construct a view matrix for a specific cubemap face.

MConstructQuaternion(Quat)

Construct a matrix from a quaternion.

MDet(MatrixParam)

Determinant (returned as a broadcast float)

MemoryTrackerReport(s16, bool)

This will generate a report on memory leaks, and attempt to release the leaks.

MGetRotation(Geo::MatrixParam)

Deconstruct the matrix to retrieve the rotation part as a quaternion.

MGetTranslation(Geo::MatrixParam)

Deconstruct the matrix to retrieve the translation part as a vector.

Min(const T &, const T &)

Return the Max of a and b.

Min(const GeoPoint3D &, const GeoPoint3D &)

Gets the component-wise minimum of two points.

Min(const v128 &, const v128 &)

Returns a vector where each element has the minimum value of the corresponding values in a and b NOTE - the Min3 template function will work with the v128 type as well.

Min3(const T &, const T &, const T &)

Return the Min of {a,b,c}.

MInverse(MatrixParam, v128)

with a precomputed 1/determinant

MInverse(MatrixParam)

Generalised inverse.

MInverseSimple(MatrixParam)

Inverts assuming only rotation and translation.

Mod(float, float)

Return a modulo b.

MortonDecode(Geo::u64, Geo::s32 &, Geo::s32 &)

Map from a linear z-order space filling curve back to x and y components.

MortonDecode(Geo::u64, Geo::s32 &, Geo::s32 &, Geo::s32 &)

Map from a linear z-order space filling curve back to x, y and z components.

MortonEncode(Geo::s32, Geo::s32)

Map from x and y components to a linear z-order space filling curve.

MortonEncode(Geo::s32, Geo::s32, Geo::s32)

Map from x, y and z components to a linear z-order space filling curve.

MTranspose(MatrixParam)

Determinant (returned as a broadcast float)

numeric_cast(Y)

Safer static cast that 'protects' against underflow/overflow.

operator-(Geo::v128Param)

The unary - operator. Equivalent to (VZero() - v);.

operator-(Geo::v128Param, Geo::v128Param)

Operator - (component-wise subtraction)

operator-(VectorD, VectorD)

Double precision vector operators.

operator!=(const GeoAllocatorUnchecked< T1 > &, const GeoAllocatorUnchecked< T2 > &)

Comparison operators for allocator classes.

operator!=(const GeoList< _Ty, _Alloc > &, const GeoList< _Ty, _Alloc > &)

Operator overloads for GeoList.

operator!=(const GeoAllocator< T1 > &, const GeoAllocator< T2 > &)

Comparison operators for allocator classes.

operator!=(const GeoFixedPoolAllocator< T1 > &, const GeoFixedPoolAllocator< T2 > &)

Comparison operators for allocator classes.

operator*(Geo::v128Param, Geo::v128Param)

Operator * (component-wise multiplication)

operator*(double, VectorD)

Double precision vector operators.

operator*=(Geo::v128 &, Geo::v128Param)

Inplace *.

operator/(VectorD, VectorD)

Double precision vector operators.

operator/(Geo::v128Param, Geo::v128Param)

Operator / (component-wise division)

operator/=(Geo::v128 &, Geo::v128Param)

Inplace /.

operator+(Geo::v128Param, Geo::v128Param)

Operator + (component-wise addition)

operator+(Geo::v128Param)

The unary + operator (effectively a no-op)

operator+=(Geo::v128 &, Geo::v128Param)

Inplace +.

operator<(const GeoPoint3 &, const GeoPoint3 &)

Allow GeoPoint3 to be used as a key for GeoMap.

operator<(GeoStringView< T >, GeoStringView< T >)

Comparison (required to use strings as keys in a map).

operator<(const GeoPoint3D &, const GeoPoint3D &)

Allow GeoPoint3D to be used as a key for GeoMap.

operator<(const GeoList< _Ty, _Alloc > &, const GeoList< _Ty, _Alloc > &)

Operator overloads for GeoList.

operator<<(IGeoStream &, const v128 &)

Functions to write items to a stream as text.

operator<<(IGeoStream &, const Matrix &)

Functions to write items to a stream as text.

operator<<(IGeoStream &, const GeoGuid &)

Functions to write items to a stream as text.

operator<<(IGeoStream &, s32)

Functions to write items to a stream as text.

operator<<(IGeoStream &, u32)

Functions to write items to a stream as text.

operator<<(IGeoStream &, float)

Functions to write items to a stream as text.

operator<<(IGeoStream &, const char *)

Functions to write items to a stream as text.

operator<<(IGeoStream &, const GeoString< char > &)

Functions to write items to a stream as text.

operator<<(IGeoStream &, const GeoVariant &)

Writes a GeoVariant to an IGeoStream as text, commonly used to write properties in Xml.

operator<<(IGeoStream &, double)

Functions to write items to a stream as text.

operator<<(IGeoStream &, GeoStringView< char >)

Functions to write items to a stream as text.

operator<=(const GeoList< _Ty, _Alloc > &, const GeoList< _Ty, _Alloc > &)

Operator overloads for GeoList.

operator-=(Geo::v128 &, Geo::v128Param)

Inplace -.

operator==(const GeoPoint3 &, const GeoPoint3 &)

Equality operator.

operator==(const GeoArray< T > &, const GeoArray< T > &)

Array equality testing function.

operator==(const GeoAllocator< T1 > &, const GeoAllocator< T2 > &)

Comparison operators for allocator classes.

operator==(const GeoFixedPoolAllocator< T1 > &, const GeoFixedPoolAllocator< T2 > &)

Comparison operators for allocator classes.

operator==(const GeoList< _Ty, _Alloc > &, const GeoList< _Ty, _Alloc > &)

Operator overloads for GeoList.

operator==(const GeoAllocatorUnchecked< T1 > &, const GeoAllocatorUnchecked< T2 > &)

Comparison operators for allocator classes.

operator>(const GeoList< _Ty, _Alloc > &, const GeoList< _Ty, _Alloc > &)

Operator overloads for GeoList.

operator>=(const GeoList< _Ty, _Alloc > &, const GeoList< _Ty, _Alloc > &)

Operator overloads for GeoList.

PackFloatToFixedWidth(float)

Packs a single-precision floating point number into a floating point number with the given number of exponent and mantissa bits.

PackFloatToRgbm(v128, bool)

Pack a v128 colour value into a u32 in RGBM format.

PackFloatToSharedExponent999e5(v128)

Packs a 4-vector of single-precision floating point numbers into a "shared exponent" 999e5 format.

PrintError(const GeoError &)

Sends a GeoError object to the listeners attached to the GeoPrintf handlers.

PrintExceptionMessage(const WCHAR *, ...)

Since printf(...) in an exception handler seems to disappear into the ether when the process opened in a pipe We will print to both the screen and the shared memory block of OutputDebugString()

PrintExceptionMessage(const char *, ...)

Since printf(...) in an exception handler seems to disappear into the ether when the process opened in a pipe We will print to both the screen and the shared memory block of OutputDebugString()

PrintTotalMemorySummaryForMarker(const char *, const char *, s32)

Print a basic report to the LOG_INFO stream.

QApplyToVec(Quat, v128)

Assumes q is unit.

QBuildFromEulerAngles(float, float, float)

Converts quaternion into euler angles in XYZ order, stored in those components.

QBuildMatrix(MatrixParam)

Construct a matrix from a quaternion.

QClosestSlerp(Quat, Quat, v128)

Flips inputs to be on the same hyper-hemisphere. Use QFullSlerp if desired.

QConjugate(Quat)

q* = -xyz, +w

QFullSlerp(Quat, Quat, v128)

Does not flip inputs to be on the same hyper-hemisphere. Use QClosestSlerp if desired.

QIdentity()

q* = -xyz, +w

QLerp(Quat, Quat, v128)

Assumes a and b are unit.

QMul(Quat, Quat)

quat multiply.

QSqrt(Quat)

Assumes q is unit.

RasterizeTriangle(float, float, float, float, float, float, RasterizationClient, void *)

rasterize a triangle

RasterizeWindingAgnosticTriangle(float, float, float, float, float, float, RasterizationClient, void *)

rasterize a triangle regardless of winding order

ReadArray(IGeoInputStream &, GeoArray< T > &)

Helper function to read a GeoArray from an IGeoInputStream, with all memory issues monitored and errors reported to GeoPrintf.

ReadArray(IGeoInputStream &, GeoArray< T * > &)

Helper function to read a GeoArray from an IGeoInputStream, with all memory issues monitored and errors reported to GeoPrintf.

ReadArray(IGeoInputStream &, Geo::GeoArray< T * > &, TCreateAndLoadFunction)

Helper function to read a GeoArray from an IGeoInputStream.

ReadMap(IGeoInputStream &, GeoMap< K, T > &)

Helper function to read a GeoMap from an IGeoInputStream, with all memory issues monitored and errors reported to GeoPrintf.

ReadObject(IGeoInputStream &, Geo::GeoArray< T > &)

ReadObject adapter for ReadArray.

ReadObject(IGeoInputStream &, GeoString< char > &)

Allow the IGeoStream implementation to treat a GeoString as a value object, so that you can call Read/Write as you would a fundamental type.

ReadObject(IGeoInputStream &, bool &)

Ensure that boolean values are read/written 'efficiently' and portably.

ReadObject(Reader &, T &)

default implementation of overloadable reader function

RemoveGeoErrorHandler()

Unregister the unhandled exception handler.

RoundToNextMultiplePower2(u32, u32)

This will round the number u to the next multiple of a power of 2 if the number isn't already a multiple of the power of 2.

RoundToNextPower2(u32)

Round a 32bit unsigned int to the next power of 2.

RoundToNextPower2(u64)

Round a 64bit unsigned int to the next power of 2.

RoundToPrevMultiplePower2(u32, u32)

This will round the number u down to the previous multiple of a power of 2 if the number isn't already a multiple of the power of 2.

SafeDestructArrayContents(Geo::GeoArray< tType * > &, tTypeDestructor)

Given a GeoArray of pointers, and a destruct function (or any type that has operator()), destroy the elements and clear the array.

SafeRelease(T &)

Scoped safe release function.

SaveFile(const char *, const void *, u32)

Save a file.

SaveInterface(const Interface *, const char *, Geo::u32)

Save an IGeoSerialisable interface to disk, using the given filename.

SaveInterfaceCompressed(const Interface *, const char *, Geo::u32)

Save an IGeoSerialisable interface to disk in compressed format, using the given filename.

SaveInterfaceDebug(const Interface *, const char *, u32)

Save the object in both binary and text form with the given filename.

SaveInterfaceIfChanged(const Interface *, const char *, Geo::u32)

Save an IGeoSerialisable interface to disk, using the given filename.

ScaleRect(GeoRect, float)

Function to scale a bounding box.

Serialise(const GeoRaySet &, const char *)

Serialises a list of line segments to a file.

SetFileOpenCallback(FileOpenCallback)

Set the function to be called when a file is opened, or a null pointer to disable the callback.

SetFileSystemPrefix(const char *)

Set a file system prefix for the current platform.

SetMemoryAllocator(MemoryAllocator *)

Set the memory allocator.

SetWaitOnExit(bool)

Sets whether the program will wait before exiting when an unhandled exception is encountered.

SplitStringToFloats(const C *)

Function to parse incoming string into an array of floats.

SplitStringToIntegers(const C *)

Function to parse incoming string into an array of integers.

StopAndEnterDebugger()

Drop into the debugger.

StringConcatenator()

Return an empty string concatenation expression.

swap(GeoList< _Ty, _Alloc > &, GeoList< _Ty, _Alloc > &)

Optimised std::swap compatible function.

swap(GeoMap< _Kty, _Ty, _Pr, _Alloc > &, GeoMap< _Kty, _Ty, _Pr, _Alloc > &)

Optimised std::swap compatible function.

Swap(T &, T &)

A generic swap function. Template parameter T must be CopyConstructable and Assignable.

SysInitialise()

Initialise platform-specific OS basics.

SysQueryCurrentTime()

Return the current system time in seconds since 1970-01-01T00:00:00.

SysQueryPerformanceCounter()

Returns the current performance counter.

SysQueryPerformanceFrequency()

Returns the number of system performance counter ticks in a second.

SysTidyup()

Tidyup platform-specific OS basics.

TestSamplingDistributions(const char *, const s32 &)

Write out raysets representing the ray distributions for debugging and visualisation.

ToVector(const BaryWeights &)

Convert to a vector.

UncompressStream(GeoMemoryStream &, GeoMemoryStream &)

Uncompress a stream created by the CompressStream function above into a new stream.

UniformInteger(RNG &)

Random unsigned 32 bit integer, [0, 0xffffffff] (inclusive)

UniformSignedUnitDouble(RNG &)

Random double, [-1, 1] (inclusive)

UniformSignedUnitFloat(RNG &)

Random float, [-1, 1] (inclusive)

UniformUnitClopenDouble(RNG &)

Random double, [0, 1)

UniformUnitClopenFloat(RNG &)

Random float, [0, 1)

UniformUnitDouble(RNG &)

Random double, [0, 1] (inclusive)

UniformUnitFloat(RNG &)

Random float, [0, 1] (inclusive)

UniformUnitOpenDouble(RNG &)

Random double, (0, 1)

UniformUnitOpenFloat(RNG &)

Random float, (0, 1)

UnionOfRects(GeoRect, GeoRect)

Union of two bounding boxes.

UnpackFloatFromFixedWidth(u32)

Unacks a single-precision floating point number from a floating point number with the given number of exponent and mantissa bits.

UnpackFloatFromSharedExponent999e5(u32)

Unpacks a 4-vector of single-precision floating point numbers from a "shared exponent" 999e5 format.

UnpackRgbmToFloat(u32)

Unpack an rgbm colour into a v128.

V128ToHalfVector(Geo::v128, Geo::u16 *)

Convert a v128 to a 4-element array of half floats.

V128ToHalfVector_Portable(Geo::v128, Geo::u16 *)

Convert a v128 to a 4-element array of half floats.

V128ToUtf8String(const Geo::v128 &)

Creates a GeoString representation of the vector (space-separated).

V128ToUtf8StringXYZ(const Geo::v128 &)

Creates a GeoString representation of the vector (space-separated).

VBroadcast(float)

Construct a v128 by broadcasting a float into all elements.

VBroadcastInt(s32)

Construct a v128 by converting an integer to a float and broadcasting it into all elements.

VCeil(v128Param)

Return ceil(v).

VCompareEquals(v128Param, v128Param)

Compares all corresponding elements to see if a == b (exact equals).

VCompareGE(v128Param, v128Param)

Compares all corresponding elements to see if a >= b.

VCompareGT(v128Param, v128Param)

Compares all corresponding elements to see if a > b.

VCompareIsFinite(v128Param)

Tests all elements of v to see if they are finite or not.

VCompareIsNan(v128Param)

Tests all elements of v to see if any of them are NANs.

VCompareLE(v128Param, v128Param)

Compares all corresponding elements to see if a <= b.

VCompareLT(v128Param, v128Param)

Compares all corresponding elements to see if a < b.

VCompareWithFlagsEquals(v128Param, v128Param, u32 &)

Compares all corresponding elements to see if a == b (exact equals).

VCompareWithFlagsGE(v128Param, v128Param, u32 &)

Compares all corresponding elements to see if a >= b.

VCompareWithFlagsGT(v128Param, v128Param, u32 &)

Compares all corresponding elements to see if a > b.

VCompareWithFlagsLE(v128Param, v128Param, u32 &)

Compares all corresponding elements to see if a <= b.

VCompareWithFlagsLT(v128Param, v128Param, u32 &)

Compares all corresponding elements to see if a < b.

VConstruct(float, float, float, float)

Construct a v128 from 4 floats. Fairly slow.

VConstructBitwise(u32, u32, u32, u32)

Re-intreprets 4 ints as floats and construct a vector from them.

VConstructU32(u32, u32, u32, u32)

Construct a uint32x4_t from 4 uint32s, without reinterpreting as floats. Result is a vector of uint32s.

VCross3(v128Param, v128Param)

Cross the first 3 elements of each.

VCross3ZeroW(v128Param, v128Param)

Cross the first 3 elements of each.

VEulerAnglesFromQuaternion(Quat)

Converts quaternion into euler angles in XYZ order, stored in those components.

VFrac(Geo::v128Param)

Returns the fractional part of each element of v.

VGetMaskNotSignBit()

Returns a mask with everything but the 4 sign bits set.

VGetMaskSignBit()

Returns a mask with just the 4 sign bits set.

VLeftOf2(const Geo::v128 &, const Geo::v128 &, const Geo::v128 &)

Determines if the point 'c' is to the left of the line formed by joining 'a' and 'b'.

VLength(VectorD)

Double precision vector operators.

VLoadAligned(const float *)

Load a 4-float array from 16-byte aligned memory.

VLoadUnaligned(const float *)

Load a 4-float array from arbitrarily aligned memory. Cannot be null.

VMadd(Geo::v128Param, Geo::v128Param, Geo::v128Param)

This is a vector multiply accumulate operation returning (a * b) + c.

VNegate(v128Param)

Return -v. You can use the operator overload instead if you prefer.

VNormaliseLuminance(v128)

Normalise the intensity of a colour vector to have unit luminance.

VOpAnd(Geo::v128Param, Geo::v128Param)

This is a bitwise & operation.

VOpOnesCompl(Geo::v128Param)

This is a bitwise ~ operation.

VOpOr(Geo::v128Param, Geo::v128Param)

This is a bitwise | operation.

VOpXor(Geo::v128Param, Geo::v128Param)

This is a bitwise ^ operation.

VPackX4(const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, const Geo::v128 &)

Packs the X component from each of the four vectors into a single vector.

VPerpendicular(v128Param, float)

Returns a vector perpendicular to v (with one of its components being zero).

VRecip(v128Param)

Return 1.f / v. (inaccurate)

VRecipFast(v128Param)

Return 1.f / v. (fast approximate where available. If not, implemented as VRecip)

VRecipSqrt(v128Param)

Return 1.f / sqrt(v). (inaccurate)

VRecipSqrtFast(v128Param)

Return 1.f / sqrt(v). (inaccurate)

VReverse(v128Param)

Reverses the order of the components from xyzw to wzyx.

VRightOf2(const Geo::v128 &, const Geo::v128 &, const Geo::v128 &)

Determines if the point 'c' is to the right of the line formed by joining 'a' and 'b'.

VScaleAndAdd(const Geo::v128 &, float, const Geo::v128 &, float)

Calculates a * s + b * t.

VShuffle(v128Param, int, int, int, int)

Returns the specified permutation of the parameter vector. Any permutation is valid.

VSignedArea2(const Geo::v128 &, const Geo::v128 &, const Geo::v128 &)

Calculates the signed area of the given triangle in 2D space (z-coordinates ignored)

VSlerp2(const Geo::v128 &, const Geo::v128 &, float)

Spherical linear interpolation between 'a' and 'b', with weight 't'.

VSqrt(v128Param)

Return sqrt(v). (more inaccurate than the reciprocal version on non-sse hardware)

VTestFlagsAllFalse(u32)

Tests the flags produced by the VCompareWithFlags* operations.

VTestFlagsAllTrue(u32)

Tests the flags produced by the VCompareWithFlags* operations.

VTestFlagsSomeFalse(u32)

Tests the flags produced by the VCompareWithFlags* operations.

VTestFlagsSomeTrue(u32)

Tests the flags produced by the VCompareWithFlags* operations.

VZero()

A fully-zeroed out vector.

WillConvertToCurrentEndian(EConvertEndianMode)

Will a conversion of mode result in moving to the current platform? If the result is true, the (incoming) data should be swapped before use.

WithinClosed(const T &, const T &, const T &)

A generic within function.

WriteArray(IGeoStream &, const GeoArray< T * > &, Geo::u32)

Helper function to write a GeoArray to an IGeoStream.

WriteArray(IGeoStream &, const GeoArray< T > &)

Helper function to write a GeoArray to an IGeoStream. Deals with arrays of values.

WriteArray(IGeoStream &, const GeoImmutableArray< T > &)

Helper function to write a GeoImmutableArray to an IGeoStream. Deals with arrays of values.

WriteArray(IGeoStream &, const GeoArray< T * > &)

Helper function to write a GeoArray to an IGeoStream.

WriteArray(IGeoStream &, const Geo::GeoArray< T * > &, TSaveFunction)

Helper function to write a GeoArray to an IGeoStream.

WriteArrayImpl(Writer &, const T *, const T *)

Write an array to the stream.

WriteFileIfChanged(GeoMemoryStream &, const char *)

Save a GeoMemoryStream to disk, modifying the file only if the contents change (or the file didn't exist).

WriteMap(IGeoStream &, const GeoMap< K, T > &)

Helper function to write a GeoMap to an IGeoStream.

WriteObject(IGeoStream &, const Geo::GeoImmutableArray< T > &)

WriteObject adapter for WriteArray.

WriteObject(IGeoStream &, const Geo::GeoArray< T > &)

WriteObject adapter for WriteArray.

WriteObject(IGeoStream &, ArrayRange< T >)

Write a blittable range object to the stream.

WriteObject(IGeoStream &, bool const &)

Ensure that boolean values are read/written 'efficiently' and portably.

WriteObject(IGeoStream &, GeoString< char > const &)

Allow the IGeoStream implementation to treat a GeoString as a value object, so that you can call Read/Write as you would a fundamental type.

WriteObject(IGeoStream &, const Geo::GeoPair< T1, T2 > &)

Write a GeoPair that is not blittable because it contains padding.

WriteObject(Writer &, const T &)

default implementation of overloadable writer function

WriteObjectBinary(const char *, const T &, WritePolicy)

Write the object using the policy in binary form with the given filename.

WriteObjectDebug(const char *, const T &, WritePolicy)

Write the object using the policy in both binary and text form with the given filename.

WriteProperty(Geo::IGeoStream &, const char *, const T &, bool)

Write a blittable property.

WriteProperty(IGeoStream &, const char *, ArrayRange< T >)

Write a range property to the stream.

WriteRange(IGeoStream &, ArrayRange< T >)

Write a blittable range object to the stream.

WriteRange(IGeoStream &, Iterator, Iterator)

Write a range property to the stream.

WriteRangeImpl(Writer &, const T *, const T *, GeoStd::FalseType)

Write a non-blittable range to the stream.

WriteStackDetails(PCONTEXT, bool)

============================================================

Walks the stack, and writes the results to the report file


Enums

Name Description
Dimension3

An enumeration of the dimensions of 3D space.

eBoxLocation

Location of a box relative to a plane.

EConvertEndianMode

Enumeration used to control behaviour of various endian swapping functions.

ECpuGpuMode

Controls how the hardware is used by Enlighten to generate precompute data.

eCpuVendor

PC CPU vendors.

eGeoErrorSeverity

The severity of an error.

eGeoLogMsgType

enum eGeoLogMsgType

ePlatform

Enumeration for those cases at runtime that we need to do separate functionality for each platform.

ePointLocation

Location of a point relative to a plane.

eRTAPI

Ray-tracing APIs.

eVShufflePosition

Shuffle constants for the GEO_VSHUFFLE macro.

GeoFSeekOrigin

To avoid pulling in the entire stdio header, use our own values for GeoFSeek.

PackedIntegerSize

The number of bits into which an integer is packed.

Sign

A sign bit.

Typedefs

Name Description
Geo::GeoTriple< double, double, double > BaryWeights

Container for barycentric weights expanded to a triplet for convenience.

AbstractRayChunk< ClippedRay > ClippedRayChunk

A chunk of clipped rays.

u8 eGeoLogMsgTypeMask

A bit mask containing one or more message type flags.

void(* FileOpenCallback)(const char *path, const char *mode)

path: path to the file being opened.

u32 GeoColour

An 8-bit colour.

GeoString< char > GeoFileString

String type used for file paths.

GeoStringView< char > GeoFileStringView

String type used for file paths.

GeoString< char > GeoGuidString

String type that can contain a textual GeoGuid representation.

bool(* GeoLogHandler)(eGeoLogMsgType msgType, u32 code, const char *msgText)

A log handler is a function which gets called when messages are passed using GeoPrintf().

s8 GeoLogHandlerCount

An internal handler count variable; signed because -1 is used to indicate an empty handler list.

GeoString< char > GeoNetworkString

String type used for networking.

v128 GeoPlane3

A plane in 3D. xyz are the ABC coefficients for the plane normal and w satisfies Ax + By + Cz + D = 0.

v128 GeoRect

A GeoRect is actually just a 4-vector (Geo::v128).

GeoString< char > GeoSymbolString

String type used for internal symbol matching.

void * GeoThreadHandle

When threading is unavailable, just use a void* as the unsupported type.

u32 GeoThreadResult

Return type of a thread function.

GeoThreadResult(GEO_THREAD_CALLING_CONV * GeoThreadStartRoutine)(void *lpThreadParameter)

Thread start function prototype.

GeoString< char > GeoUIString

String type used for user interface and feedback.

GeoString< char > GeoUtf8FileString

String type used for file paths when ASCII is required (rare).

const Matrix & MatrixParam

The type to pass with a function argument so that the compiler does the minimum amount of work.

bool(* MemoryLimitCallback)(s64 delta)

Called when memory is allocated or deallocated. Returns false when memory exceeds the limit.

__int64 offset_t

A offset type, similar to size_t (off_t is not supported on all used platforms)

PackedInteger4< 8 > PackedByte4

Alias for four 8bits package.

v128 Quat

Quaternion definition.

void(* RasterizationClient)(const RastFragment *fragment, void *user)

callback function for rasterization

AbstractRayChunk< Rayf > RayChunk

A chunk of rays.

GeoEmbreeContext RayTracingContext

The default ray tracing context to use when casting single rays.

short s16

Signed 16-bit integer.

int s32

Signed 32-bit integer.

s32 s32a

Signed 32-bit integer.

__int64 s64

Signed 64-bit integer.

s64 s64a

Signed 64-bit integer.

char s8

Signed 8-bit integer.

const Impl::Empty * TypeId

A value that uniquely identifies a type within a single executable or dynamic library.

unsigned short u16

Unsigned 16-bit integer.

unsigned int u32

Unsigned 32-bit integer.

u32 u32a

Unsigned 32-bit integer.

unsigned __int64 u64

Unsigned 64-bit integer.

u64 u64a

Unsigned 64-bit integer.

unsigned char u8

Unsigned 8-bit integer.

__m128 v128

A 4-float intrinsic vector type laid out as {x,y,z,w} - the same way you would lay out a structure.

v128 v128Param

Type that should be used for passing v128s as parameters.

v128 v128ParamAfterThird

On x86 you can't pass more than 3 v128s by value, so we need an extra typedef for the 4th and above vector parameters to make them by-ref on x86.


s64 Geo::Abs


public: s64 Abs
(
    s64 a
)


Return the absolute value of a number.


float Geo::Abs


public: float Abs
(
    float a
)


Return the absolute value of a number.


double Geo::Abs


public: double Abs
(
    double a
)


Return the absolute value of a number.


s32 Geo::Abs


public: s32 Abs
(
    s32 a
)


Return the absolute value of a number.


GEO_FORCE_INLINE v128 Geo::Abs


public: v128 Abs
(
    v128Param a
)


Returns a vector with the Abs function applied to all 4 elements.


Geo::v128 GEO_CALL Geo::ApplyBarycentricWeights


public: Geo::v128GEO_CALL ApplyBarycentricWeights
(
    const Geo::BaryWeights & bary,
    const v128 & a,
    const v128 & b,
    const v128 & c
)


Apply barycentric weights to triangle vertex attributes.


Geo::GeoString<C> Geo::ArrayToString


public: Geo::GeoString< C > ArrayToString
(
    const Geo::GeoArray< T > & arr,
    const C * separator
)


Function to make a string by concatenating an array of elements using IGeoStream::operator<< to convert each element to a string and placing the given separator between each element.


Geo::u8* Geo::Base64Decode


public: Geo::u8 * Base64Decode
(
    const char * data,
    size_t input_length,
    Geo::u8 * buffer
)


Converts a C-string of Base64 into raw binary.


char* Geo::Base64Encode


public: char * Base64Encode
(
    const Geo::u8 * data,
    size_t input_length,
    char * buffer
)


Converts raw binary into Base64 for storage in text files.


T* Geo::begin


public: T * begin
(
    ArrayRange< T > & a
)


Return iterator to support ranged-based for loop.


const T* Geo::begin


public: const T * begin
(
    const ArrayRange< T > & a
)


Return iterator to support ranged-based for loop.


Geo::s32 Geo::BloatTriangle


public: Geo::s32 BloatTriangle
(
    ConvexHull * out,
    Geo::v128 a,
    Geo::v128 b,
    Geo::v128 c,
    float bloat,
    Geo::s32 cornerSmoothness
)


Bloat a triangle by a specified amount.

You can specify how refined you want the rounded corners to be, or 0 if you just want a single join point in the centre. The number correlates to how many segments the widest corner will have (and will scale from there). As this is a reasonably quick function, you should pass in a convex hull with the appropriate number of points allocated to it.

Returns

The number of points used, or -1 if there wasn't enough space.

Note

Passing NULL for outIS VALID


: this will return the number of points the final result will use.

Winding order is irrelevant: it is corrected internally.


bool GEO_CALL Geo::BuildPointKdTree


public: bool GEO_CALL BuildPointKdTree
(
    PointSplitState & commonState
)


Construct a kd-tree of points.

The points in commonState.m_PointArray will be sorted inplace into a balanced kd-tree, and the corresponding leaf nodes and split nodes (aka internal or branch nodes) will be pushed into commonState.m_Splits and commonState.m_Leaves. The root node of the tree is always the first element in commonState.m_Splits. This call will always succeed under normal operation, but could fail internally if we run out of memory. However, because we build a balanced tree it's possible to pre-allocate an upper bound on all memory. We also assume all points are finite, but do not check this explicitly. If we do run into memory allocation issues, we return false. Otherwise this returns true.


T Geo::ByteSwap


public: T ByteSwap
(
    T x
)


Generic swap that works for any built-in type <= 8 bytes.


double Geo::ByteSwap


public: double ByteSwap
(
    double x
)


Generic swap that works for any built-in type <= 8 bytes.


float Geo::ByteSwap


public: float ByteSwap
(
    float x
)


Generic swap that works for any built-in type <= 8 bytes.


u16 Geo::ByteSwap16


public: u16 ByteSwap16
(
    u16 x
)


Fundamental byte-swapping macros.


u32 Geo::ByteSwap32


public: u32 ByteSwap32
(
    u32 x
)


Fundamental byte-swapping macros.


float Geo::ByteSwap32F


public: float ByteSwap32F
(
    float x
)


Fundamental byte-swapping macros.


u64 Geo::ByteSwap64


public: u64 ByteSwap64
(
    u64 x
)


Fundamental byte-swapping macros.


void GEO_CALL Geo::ByteSwapArray16


public: void GEO_CALL ByteSwapArray16
(
    Geo::u16 * pArray,
    Geo::u32 elementCount
)


Byte swap an array of 16-bit values.


void GEO_CALL Geo::ByteSwapArray32


public: void GEO_CALL ByteSwapArray32
(
    Geo::u32 * pArray,
    Geo::u32 elementCount
)


Byte swap an array of 32-bit values.


void GEO_CALL Geo::ByteSwapArray64


public: void GEO_CALL ByteSwapArray64
(
    Geo::u64 * pArray,
    Geo::u32 elementCount
)


Byte swap an array of 64-bit values.


void GEO_CALL Geo::ByteSwapArrayFloat


public: void GEO_CALL ByteSwapArrayFloat
(
    float * pArray,
    Geo::u32 elementCount
)


Byte swap an array of 32-bit float values.


void GEO_CALL Geo::CalcCubeMapCoordinatesForDirection


public: void GEO_CALL CalcCubeMapCoordinatesForDirection
(
    Geo::v128 direction,
    Geo::s32 faceWidth,
    Geo::s32 & faceIdx,
    float & x,
    float & y
)


Compute the cube map texel coordinate for a given direction and cubemap resolution.

Note

x and y are returned as floats but in texel coordinates rather than normalised UVs.


Geo::v128 GEO_CALL Geo::CalcDirectionForCubeMapCoordinate


public: Geo::v128GEO_CALL CalcDirectionForCubeMapCoordinate
(
    Geo::s32 faceIdx,
    Geo::s32 x,
    Geo::s32 y,
    Geo::s32 faceWidth
)


Generate a direction vector for a cubemap texel coordinate.


Geo::v128 GEO_CALL Geo::CalcDirectionForCubeMapTexel


public: Geo::v128GEO_CALL CalcDirectionForCubeMapTexel
(
    Geo::s32 faceIdx,
    float u,
    float v
)


Generate a direction vector for a cubemap texel UV coordinate.


float Geo::Ceil


public: float Ceil
(
    float a
)


Compute the next whole number greater than a.


GEO_FORCE_INLINE void Geo::CheckPaddingZeroed


public: GEO_FORCE_INLINE void CheckPaddingZeroed
(
    const T & object
)


Checks if the given object has all it's 'padding' fields set to zero.

Padding fields are identified by their name.


void Geo::Clamp


public: void Clamp
(
    T & toClamp,
    const T & lowerLimit,
    const T & upperLimit
)


Clamp a numeric type T to the given range.


Geo::v128 GEO_CALL Geo::ClosestPointInTriangle


public: Geo::v128GEO_CALL ClosestPointInTriangle
(
    const Geo::v128 & a,
    const Geo::v128 & b,
    const Geo::v128 & c,
    const Geo::v128 & p
)


Gives the closest point in triangle abc to point p.


Statistics GEO_CALL Geo::CombineStatistics


public: StatisticsGEO_CALL CombineStatistics
(
    const Statistics & statsA,
    const Statistics & statsB
)


Combine the values in statsA and statsB so that the properties of each member are retained over the whole set.


bool Geo::Compatibility_ReadWideString


public: bool Compatibility_ReadWideString
(
    IffReader & reader,
    GeoString< char > & object,
    Geo::s32 lastWideVersion
)


Read a type that used to be GeoString<wchar_t>, and is now GeoString<char>


bool GEO_CALL Geo::CompressStream


public: bool GEO_CALL CompressStream
(
    GeoMemoryStream & input,
    GeoMemoryStream & output
)


Compress the input stream with the ZLib library, placing the result in the output stream.


void GEO_CALL Geo::ComputeKdTreeBounds


public: void GEO_CALL ComputeKdTreeBounds
(
    PointSplitBounds * splitBounds,
    const PointSplit * splitArray,
    const PointLeaf * leafArray,
    const Geo::GeoBoundingBox * leafBounds
)


Compute a AABB bounds object for each split point in a kd-tree.

This uses an additional array of bounding boxes for each leaf and recursively combines them up the existing tree structure to build bounds for each PointSplit node. This effectively augments an existing point based kd-tree with range information. No parameter may be null. Only xyz coordinates are considered. The w components are ignored.

Parameters
[out] splitBounds

Contains the resulting bounds information. This must be at least as long as splitArray.

[in] splitArray

The kd-tree split nodes, as built by BuildPointKdTree().

[in] leafArray

The kd-tree leaf nodes, as built by BuildPointKdTree().

[in] leafBounds

An array of bounding boxes to match the ranges of the corresponding leaf nodes in leafArray. The array length and layout must match leafArray.


bool GEO_CALL Geo::ComputeStatistics


public: bool GEO_CALL ComputeStatistics
(
    Statistics & stats,
    const Geo::v128 * vA,
    const Geo::v128 * vB,
    const Geo::s32 numValues,
    const Geo::v128 & mask
)


Computes the difference between two vector arrays.

Returns TRUE on success. Vector array parameters must be valid non-null objects.

Parameters
[inout] stats

Statistics on the difference.

[in] vA

The first vector to compare.

[in] vB

The second vector to compare.

[in] numValues

Number of elements in the two vectors.

[in] mask

Vector for masking out certain elements of the input vectors.


constexpr float Geo::ConstructFloat8


public: constexpr float ConstructFloat8
(
    Geo::u32 mantissa,
    Geo::s32 exponent
)


Return the float represented by the specified 4-bit mantissa and the specified exponent.


GEO_FORCE_INLINE float Geo::ConstructFloatPow2


public: GEO_FORCE_INLINE float ConstructFloatPow2
(
    int exponent
)


Constructs a float which is exactly equal to 1x2^exponent.


v128 GEO_CALL Geo::ConvertColourToV


public: v128GEO_CALL ConvertColourToV
(
    GeoColour colour
)


The 4 float components of v128 correspond to the native ordering of the 4 byte components of u32.


Geo::u16 GEO_CALL Geo::ConvertFloatToHalf


public: Geo::u16GEO_CALL ConvertFloatToHalf
(
    float value
)


Convert a float to a half.

Currently using the portable implementation on all platforms.


void GEO_CALL Geo::ConvertFloatToHalfArray


public: void GEO_CALL ConvertFloatToHalfArray
(
    Geo::u16 * halves,
    const float * floats,
    Geo::u32 count
)


Convert an array of floats to an array of halves.

On SSE platforms a faster implementation is used if:

  • halves is 8-byte aligned.

  • floats is 16-byte aligned.

  • count is a multiple of 4.


float GEO_CALL Geo::ConvertHalfToFloat


public: float GEO_CALL ConvertHalfToFloat
(
    Geo::u16 value
)


Convert a half to a float.

Currently using the portable implementation on all platforms.


void GEO_CALL Geo::ConvertHalfToFloatArray


public: void GEO_CALL ConvertHalfToFloatArray
(
    const Geo::u16 * halves,
    float * floats,
    Geo::u32 count
)


Convert an array of halves to an array of floats.

Currently using the portable implementation on all platforms.


void GEO_CALL Geo::ConvertV128ToHalfVectorArray


public: void GEO_CALL ConvertV128ToHalfVectorArray
(
    Geo::u64 * vHalves,
    const Geo::v128 * v,
    Geo::u32 count
)


Convert an array of v128s to an array of half vectors.


GeoColour GEO_CALL Geo::ConvertVToColour


public: GeoColourGEO_CALL ConvertVToColour
(
    v128 colour
)


The 4 float components of v128 correspond to the native ordering of the 4 byte components of u32.


float GEO_CALL Geo::ConvertVToIntensity


public: float GEO_CALL ConvertVToIntensity
(
    v128 colour
)


The 4 float components of v128 correspond to the native ordering of the 4 byte components of u32.


bool Geo::Copy


public: bool Copy
(
    const GeoList< T > & source,
    GeoList< T > & dest
)


Appends the contents of the 'source' GeoList to the 'dest' GeoList.


void Geo::CopyGlobalBufferToClipboard


public: void CopyGlobalBufferToClipboard()


Copies error data to the Windows clipboard.


bool GEO_CALL Geo::CopyStreamToStream


public: bool GEO_CALL CopyStreamToStream
(
    IGeoStream & src,
    GeoMemoryStream & dst
)


Copy the contents of the source IGeoStream (src) to the destination GeoMemoryStream (dst).


u32 Geo::CountLeadingZeroBits


public: u32 CountLeadingZeroBits
(
    u32 v
)


Returns the number of consecutive leading zero bits.


u32 Geo::CountSetBits


public: u32 CountSetBits
(
    u8 v
)


Returns the number of set bits.


u32 Geo::CountTrailingZeroBits


public: u32 CountTrailingZeroBits
(
    u32 v
)


Returns the number of consecutive trailing zero bits.


void GEO_CALL Geo::CropWhitespace


public: void GEO_CALL CropWhitespace
(
    GeoString< T > & str
)


Removes leading and trailing whitespace characters from the provided string.


VectorD Geo::Cross


public: VectorD Cross
(
    VectorD u,
    VectorD v
)


Double precision vector operators.


void Geo::DebugBreakAtStreamPosition


public: void DebugBreakAtStreamPosition
(
    Geo::u64 targetPosition,
    const Geo::IGeoStream & stream,
    size_t numBytesToBeProcessed
)


Breaks into the debugger if the given current position would advance beyond the given target position after advancing by the given number of bytes.

This is a no-op on non-devel builds.


bool Geo::Deserialise


public: bool Deserialise
(
    GeoRaySet & list,
    const char * filename
)


Deserialises a list of line segments from a file.

The previous contents of the list is deleted. Returns TRUE on success.

Parameters
[in] list

- The list of line segments to read.

[in] filename

- Name of the file to read line segment list from.


T Geo::DivideAndRoundUp


public: T DivideAndRoundUp
(
    T dividend,
    T divisor
)


Perform an integer division that rounds the result to the next integer.


double Geo::Dot


public: double Dot
(
    VectorD lhs,
    VectorD rhs
)


Double precision vector operators.


const T* Geo::end


public: const T * end
(
    const ArrayRange< T > & a
)


Return iterator to support ranged-based for loop.


T* Geo::end


public: T * end
(
    ArrayRange< T > & a
)


Return iterator to support ranged-based for loop.


bool GEO_CALL Geo::Equal


public: bool GEO_CALL Equal
(
    MatrixParam a,
    MatrixParam b
)


Return true if all corresponding matrix elements are exactly equal.


bool GEO_CALL Geo::EqualWithinEpsilon


public: bool GEO_CALL EqualWithinEpsilon
(
    MatrixParam a,
    MatrixParam b
)


Return true if all corresponding matrix elements are within an epsilon.


bool Geo::EqualWithinEpsilon


public: bool EqualWithinEpsilon
(
    v128Param a,
    v128Param b,
    v128Param epsilon
)


Returns true if all elements of a and b are within g_VecEpsilon of each other.

You may specify an epsilon vector that contains different epsilon values in each element if you wish.


bool Geo::EqualWithinEpsilon


public: bool EqualWithinEpsilon
(
    float a,
    float b,
    float epsilon
)


Returns true if Abs(a - b) is less than the epsilon.


GeoFileString Geo::EvaluateStringExpression


public: GeoFileString EvaluateStringExpression
(
    StringExpression< T > s
)


Concatenate and return all of the strings in the expression with a single allocation.


s32 Geo::FastFloatToInt


public: s32 FastFloatToInt
(
    float a
)


Converts a float into a signed integer using a faster method than the standard C truncation convention which requires a rounding mode change.


bool GEO_CALL Geo::FileExists


public: bool GEO_CALL FileExists
(
    const char * testFile
)


Checks that testFile exists.


bool GEO_CALL Geo::FileExistsAndIsNewer


public: bool GEO_CALL FileExistsAndIsNewer
(
    const char * testFile,
    const char * exemplarFile
)


Checks that testFile exists and is newer than exemplarFile.

Returns true iff both files exist and the testFile has been modified more recently than exemplarFile.


bool GEO_CALL Geo::FileIsWritable


public: bool GEO_CALL FileIsWritable
(
    const char * filename
)


Checks that the file named filename can be written to.

Returns true for a writable existing file, or if a file with that name could be created.


Geo::s32 Geo::FindIndex


public: Geo::s32 FindIndex
(
    const GeoArray< T > & lhs,
    const T & data
)


Find array index for first element that matches data, returns -1 if no match.

This requires T to implement operator == (const T& rhs) const.

Note

Make sure your operator == is a const function!


float Geo::Floor


public: float Floor
(
    float a
)


Compute the next whole number smaller than a.


void GEO_CALL Geo::FreeLoadedFile


public: void GEO_CALL FreeLoadedFile
(
    void * file
)


Free a previously loaded file.


BaryWeights GEO_CALL Geo::FromVector


public: BaryWeightsGEO_CALL FromVector
(
    const v128 & w
)


Convert from a vector.


GeoGuid Geo::GenerateGuidFromString


public: GeoGuid GenerateGuidFromString
(
    const GeoString< char > & string
)


Convert a string to a GUID by hashing.


bool Geo::GenerateGuidFromString


public: bool GenerateGuidFromString
(
    GeoGuid & guidFromString,
    const GeoString< char > & string
)


Convert a string to a GUID by hashing.


bool GEO_CALL Geo::GenerateUnitSquareFastPoissonDistribution


public: bool GEO_CALL GenerateUnitSquareFastPoissonDistribution
(
    const s32 & numSamples,
    GeoArray< GeoPoint2 > & samples,
    const u32 & seed
)


Helper function to generate fast poisson samples in the 2D unit square.


bool GEO_CALL Geo::GenerateUnitSquareSobolDistribution


public: bool GEO_CALL GenerateUnitSquareSobolDistribution
(
    const s32 & numSamples,
    GeoArray< GeoPoint2 > & samples,
    const u32 & seed
)


Helper function to generate sobol samples in the 2D unit square.


__itt_domain* GEO_CALL Geo::Geo__itt_domain_create


public: __itt_domain *GEO_CALL Geo__itt_domain_create
(
    const char * name
)


Safe forwarding to Intel GPA functions (tests if Dll has been loaded before making the call)


void GEO_CALL Geo::Geo__itt_id_create


public: void GEO_CALL Geo__itt_id_create
(
    const __itt_domain * domain,
    __itt_id id
)


Safe forwarding to Intel GPA functions (tests if Dll has been loaded before making the call)


void GEO_CALL Geo::Geo__itt_id_destroy


public: void GEO_CALL Geo__itt_id_destroy
(
    const __itt_domain * domain,
    __itt_id id
)


Safe forwarding to Intel GPA functions (tests if Dll has been loaded before making the call)


void GEO_CALL Geo::Geo__itt_relation_add


public: void GEO_CALL Geo__itt_relation_add
(
    const __itt_domain * domain,
    __itt_id head,
    __itt_relation relation,
    __itt_id tail
)


Safe forwarding to Intel GPA functions (tests if Dll has been loaded before making the call)


void GEO_CALL Geo::Geo__itt_relation_add_to_current


public: void GEO_CALL Geo__itt_relation_add_to_current
(
    const __itt_domain * domain,
    __itt_id groupid
)


Safe forwarding to Intel GPA functions (tests if Dll has been loaded before making the call)


__itt_string_handle* GEO_CALL Geo::Geo__itt_string_handle_create


public: __itt_string_handle *GEO_CALL Geo__itt_string_handle_create
(
    const char * name
)


Safe forwarding to Intel GPA functions (tests if Dll has been loaded before making the call)


void GEO_CALL Geo::Geo__itt_task_begin


public: void GEO_CALL Geo__itt_task_begin
(
    const __itt_domain * domain,
    __itt_id taskid,
    __itt_id parentid,
    __itt_string_handle * name
)


Safe forwarding to Intel GPA functions (tests if Dll has been loaded before making the call)


void GEO_CALL Geo::Geo__itt_task_end


public: void GEO_CALL Geo__itt_task_end
(
    const __itt_domain * domain
)


Safe forwarding to Intel GPA functions (tests if Dll has been loaded before making the call)


void GEO_CALL Geo::Geo__itt_task_group


public: void GEO_CALL Geo__itt_task_group
(
    const __itt_domain * domain,
    __itt_id taskid,
    __itt_id parentid,
    __itt_string_handle * name
)


Safe forwarding to Intel GPA functions (tests if Dll has been loaded before making the call)


void Geo::GEO_DELETE_ARRAY_T


public: void GEO_DELETE_ARRAY_T
(
    T *& p
)


Templated function equivalent of GEO_DELETE_ARRAY A handy template so you don't have to enter the type param (and potentially get it wrong)

Note

Make sure the pointer you are deleting is actually the allocated type and not a super class!


void Geo::GEO_DELETE_T


public: void GEO_DELETE_T
(
    T *& p
)


Templated function equivalent of GEO_DELETE A handy template so you don't have to enter the type param (and potentially get it wrong)

Note

Make sure the pointer you are deleting is actually the allocated type and not a super class!


T* Geo::GeoAlign


public: T * GeoAlign
(
    T * ptr,
    s32 align
)


Align the supplied pointer to the supplied boundary.


T Geo::GeoAlign


public: T GeoAlign
(
    T value,
    s32 align
)


Align the supplied value to the supplied boundary.


double GEO_CALL Geo::GeoAToF


public: double GEO_CALL GeoAToF
(
    const char * str
)


Equivalent to atof.


int GEO_CALL Geo::GeoAToI


public: int GEO_CALL GeoAToI
(
    const char * str
)


Equivalent to atoi.


bool Geo::GeoAttachLogger


public: bool GeoAttachLogger
(
    GeoLogHandler logHandler,
    eGeoLogMsgTypeMask typeMask
)


Attach a log handler which will be passed messages of the requested types.

It returns true if it was successfully registered for all message types, otherwise a warning message is raised, and it returns false.


bool Geo::GeoConstructAPIFilename


public: bool GeoConstructAPIFilename
(
    const char * inFilename,
    char * outFilename
)


Construct a filename for use in the underlying platform filesystem API.


GeoThreadHandle Geo::GeoCreateThread


public: GeoThreadHandle GeoCreateThread
(
    GeoThreadStartRoutine function,
    void * data
)


Platform specific thread creation function.


bool Geo::GeoDeleteFile


public: bool GeoDeleteFile
(
    const char * filename
)


Delete a file.


void Geo::GeoDestruct


public: void GeoDestruct
(
    T & object
)


Calls destructor on object.


void Geo::GeoDestruct


public: void GeoDestruct
(
    v128 &
)


Calls destructor on object.


void Geo::GeoDetachAllLoggers


public: void GeoDetachAllLoggers
(
    eGeoLogMsgTypeMask typeMask
)


Detach all log handlers for the specified message types.


bool Geo::GeoDetachLogger


public: bool GeoDetachLogger
(
    GeoLogHandler logHandler,
    eGeoLogMsgTypeMask typeMask
)


Detach a previously attached log handler, it if was previously attached.

Returns true it if was detached, and false otherwise.


bool GEO_CALL Geo::GeoDirectoryCreate


public: bool GEO_CALL GeoDirectoryCreate
(
    const char * directory
)


Creates a directory and all the directories leading up to it.

Used often in the pipeline tools

Note

Does nothing (and returns false) on a console


int GEO_CALL Geo::GeoFClose


public: int GEO_CALL GeoFClose
(
    FILE * stream
)


A safe alternative to fclose.


int GEO_CALL Geo::GeoFEof


public: int GEO_CALL GeoFEof
(
    FILE * stream
)


A safe alternative to feof.


Geo::s32 GEO_CALL Geo::GeoFError


public: Geo::s32GEO_CALL GeoFError
(
    FILE * file
)


A safe alternative to ferror. Returns a non-zero value to indicate an error.


FILE* GEO_CALL Geo::GeoFOpen


public: FILE *GEO_CALL GeoFOpen
(
    const char * filename,
    const char * mode
)


GeoFOpen.

Calls the operating system's fopen() method, and returns a FILE* in the usual fashion, however it takes account of any local system convension for file paths, and transparently manages these behind the scenes.


size_t GEO_CALL Geo::GeoFRead


public: size_t GEO_CALL GeoFRead
(
    void * input,
    size_t size,
    size_t count,
    FILE * file
)


A safe alternative to fread.

This guarantees (unless there is an error) to load the entire data. If the number returned does not match the count specified for input, there was a file IO problem.


int GEO_CALL Geo::GeoFSeek


public: int GEO_CALL GeoFSeek
(
    offset_t offset,
    GeoFSeekOrigin origin,
    FILE * file
)


A safe alternative to fseek.


offset_t GEO_CALL Geo::GeoFTell


public: offset_tGEO_CALL GeoFTell
(
    FILE * file
)


A safe alternative to ftell.


size_t GEO_CALL Geo::GeoFWrite


public: size_t GEO_CALL GeoFWrite
(
    const void * output,
    size_t size,
    size_t count,
    FILE * file
)


A safe alternative to fwrite.


ePlatform Geo::GeoGetCurrentPlatform


public: ePlatform GeoGetCurrentPlatform()


Get the platform this code was compiled for.


GeoThreadHandle Geo::GeoGetCurrentThreadHandle


public: GeoThreadHandle GeoGetCurrentThreadHandle()


Platform specific thread accessor function.


const char* GEO_CALL Geo::GeoGetPlatformName


public: const char *GEO_CALL GeoGetPlatformName
(
    ePlatform platform
)


Returns a text string containing the platform name.


s32 Geo::GeoInterlockedAdd32


public: s32 GeoInterlockedAdd32
(
    GeoAtomic< u32 > & addend,
    u32 amount
)


Atomically add amount to value pointed to by addend, returns the new value.


s64 Geo::GeoInterlockedAdd64


public: s64 GeoInterlockedAdd64
(
    GeoAtomic< s64 > & addend,
    s64 amount
)


Atomically add amount to value pointed to by addend, returns the new value.


s32 Geo::GeoInterlockedDec32


public: s32 GeoInterlockedDec32
(
    GeoAtomic< u32 > & addend
)


Atomically decrement value pointed to by addend, returns the new value.


u32 Geo::GeoInterlockedExchange32


public: u32 GeoInterlockedExchange32
(
    GeoAtomic< u32 > & target,
    u32 value
)


Atomically sets a value, and returns its previous value.


u64 Geo::GeoInterlockedExchange64


public: u64 GeoInterlockedExchange64
(
    GeoAtomic< u64 > & target,
    u64 value
)


Atomically sets a value, and returns its previous value.


s32 Geo::GeoInterlockedInc32


public: s32 GeoInterlockedInc32
(
    GeoAtomic< u32 > & addend
)


Atomically increment value pointed to by addend, returns the new value.


s64 Geo::GeoInterlockedInc64


public: s64 GeoInterlockedInc64
(
    GeoAtomic< s64 > & addend
)


Atomically increment value pointed to by addend, returns the new value.


s32 Geo::GeoInterlockedSub32


public: s32 GeoInterlockedSub32
(
    GeoAtomic< u32 > & addend,
    u32 amount
)


Atomically subtract amount to value pointed to by addend, returns new value.


bool Geo::GeoIsAligned


public: bool GeoIsAligned
(
    T * ptr,
    s32 align
)


Check if the supplied address is aligned to the given alignment.

Parameters
[in] ptr

Address to check. A NULL address will be classified as aligned regardless of alignment.

[in] align

Must be a power of two.


bool Geo::GeoIsAligned


public: bool GeoIsAligned
(
    T value,
    s32 align
)


Check if the supplied value is aligned to the given alignment.

Parameters
[in] value

Value to check alignment of.

[in] align

Must be a power of two.


bool Geo::GeoIsLoggerAttached


public: bool GeoIsLoggerAttached
(
    eGeoLogMsgTypeMask typeMask
)


Return true if at least one logger is attached for all of the specified message types.


bool Geo::GeoLogHandler_Debugger


public: bool GeoLogHandler_Debugger
(
    eGeoLogMsgType msgType,
    u32 code,
    const char * msgText
)


A log message handler for writing messages to the debugger output channel.


bool Geo::GeoLogHandler_Popup


public: bool GeoLogHandler_Popup
(
    eGeoLogMsgType msgType,
    u32 code,
    const char * msgText
)


A log message handler for displaying messages in a popup box.


bool Geo::GeoLogHandler_Stdout


public: bool GeoLogHandler_Stdout
(
    eGeoLogMsgType msgType,
    u32 code,
    const char * msgText
)


A log message handler for writing messages to stdout.


void Geo::GeoLogHandler_Stdout_SetOrigin


public: void GeoLogHandler_Stdout_SetOrigin
(
    const char * filename
)


To support the MS error message format (see http://tinyurl.com/6hm53bz) allow user to set an Origin, otherwise just leave empty.


void Geo::GeoLogMsgType


public: void GeoLogMsgType
(
    eGeoLogMsgType type,
    u32 code,
    char * buffer
)


It is convenient to have a textual label for a given channel easily available.

The given buffer must be at least as long as GEO_LOG_MSG_TYPE_MAX_LENGTH.


bool Geo::GeoPrintf


public: bool GeoPrintf
(
    eGeoLogMsgType msgType,
    const char * fmtStr,
    ...
)


Messages are passed through the logger using a "printf()" like function.

This function will always return true, unless any of the registered handlers return false. This is useful, for instance in the assert handler, where returning false indicates that the debugger should be entered.


bool Geo::GeoPrintf


public: bool GeoPrintf
(
    eGeoLogMsgType msgType,
    u32 code,
    const char * fmtStr,
    ...
)


Messages are passed through the logger using a "printf()" like function.

This function will always return true, unless any of the registered handlers return false. This is useful, for instance in the assert handler, where returning false indicates that the debugger should be entered.


GeoRect Geo::GeoRectFromCoords


public: GeoRect GeoRectFromCoords
(
    float minX,
    float minY,
    float maxX,
    float maxY
)


Function to construct a GeoRect from the minimum and maximum X and Y co-ordinates.


GeoRect Geo::GeoRectFromCoordsUnsafe


public: GeoRect GeoRectFromCoordsUnsafe
(
    float minX,
    float minY,
    float maxX,
    float maxY
)


Function to construct a GeoRect from the minimum and maximum X and Y co-ordinates.


GeoRect Geo::GeoRectFromSize


public: GeoRect GeoRectFromSize
(
    float minX,
    float minY,
    float width,
    float height
)


Function to construct a GeoRect from a minimum X and Y co-ordinate, a width and a height.


float Geo::GeoRectHeight


public: float GeoRectHeight
(
    GeoRect rect
)


Functions to get various co-ordinates from a rect.


float Geo::GeoRectMaxX


public: float GeoRectMaxX
(
    GeoRect rect
)


Functions to get various co-ordinates from a rect.


float Geo::GeoRectMaxY


public: float GeoRectMaxY
(
    GeoRect rect
)


Functions to get various co-ordinates from a rect.


float Geo::GeoRectMinX


public: float GeoRectMinX
(
    GeoRect rect
)


Functions to get various co-ordinates from a rect.


float Geo::GeoRectMinY


public: float GeoRectMinY
(
    GeoRect rect
)


Functions to get various co-ordinates from a rect.


float Geo::GeoRectWidth


public: float GeoRectWidth
(
    GeoRect rect
)


Functions to get various co-ordinates from a rect.


void Geo::GeoReleaseThread


public: void GeoReleaseThread
(
    GeoThreadHandle thread
)


Platform specific thread release function.


bool GEO_CALL Geo::GeoRenameFile


public: bool GEO_CALL GeoRenameFile
(
    const char * oldName,
    const char * newName
)


Rename a file.


void Geo::GeoResumeThread


public: void GeoResumeThread
(
    GeoThreadHandle thread
)


Platform specific thread resume function.


void Geo::GeoSetThreadAffinity


public: void GeoSetThreadAffinity
(
    GeoThreadHandle thread,
    Geo::u64 affinity
)


Platform specific set thread affinity function.


void Geo::GeoSleepThread


public: void GeoSleepThread
(
    u32 ms
)


Platform specific thread sleep function.


int GEO_CALL Geo::GeoSPrintf


public: int GEO_CALL GeoSPrintf
(
    char * buffer,
    size_t numberOfElements,
    const char * format,
    ...
)


Equivalent to sprintf.


void GEO_CALL Geo::GeoStageBegin


public: void GEO_CALL GeoStageBegin
(
    const char * name
)


Begin a statistics block.


void GEO_CALL Geo::GeoStageEnd


public: void GEO_CALL GeoStageEnd()


End a statistics block.


void GEO_CALL Geo::GeoStatistic


public: void GEO_CALL GeoStatistic
(
    const char * name,
    float value
)


Log a single statistic, as a name/value pair.


void GEO_CALL Geo::GeoStatistic


public: void GEO_CALL GeoStatistic
(
    const char * name,
    double value
)


Log a single statistic, as a name/value pair.


void GEO_CALL Geo::GeoStatistic


public: void GEO_CALL GeoStatistic
(
    const char * name,
    const char * value
)


Log a single statistic, as a name/value pair.


void GEO_CALL Geo::GeoStatistic


public: void GEO_CALL GeoStatistic
(
    const char * name,
    Geo::u64 value
)


Log a single statistic, as a name/value pair.


void GEO_CALL Geo::GeoStatistic


public: void GEO_CALL GeoStatistic
(
    const char * name,
    Geo::s64 value
)


Log a single statistic, as a name/value pair.


void GEO_CALL Geo::GeoStatistic


public: void GEO_CALL GeoStatistic
(
    const char * name,
    Geo::s32 value
)


Log a single statistic, as a name/value pair.


void GEO_CALL Geo::GeoStatistic


public: void GEO_CALL GeoStatistic
(
    const char * name,
    Geo::u32 value
)


Log a single statistic, as a name/value pair.


void GEO_CALL Geo::GeoStatisticsBegin


public: void GEO_CALL GeoStatisticsBegin
(
    const char * taskName,
    const char * output,
    const char * version
)


Begin a StatusXml file.


void GEO_CALL Geo::GeoStatisticsEnd


public: void GEO_CALL GeoStatisticsEnd()


End the StatusXml file (note that you may wish to set the filename to NULL after this)


bool GEO_CALL Geo::GeoStatusLogHandler_XmlFile


public: bool GEO_CALL GeoStatusLogHandler_XmlFile
(
    eGeoLogMsgType msgType,
    u32 code,
    const char * msgText
)


The event handler for the StatusXml file.


void GEO_CALL Geo::GeoStatusLogHandler_XmlFile_SetName


public: void GEO_CALL GeoStatusLogHandler_XmlFile_SetName
(
    const char * filename,
    bool logInputOutput
)


Set the name of the StatusXml file writer. If not called, no file is created.


int GEO_CALL Geo::GeoStrCat


public: int GEO_CALL GeoStrCat
(
    char * strDestination,
    size_t numberOfElements,
    const char * strSource
)


Equivalent to strcat.


int GEO_CALL Geo::GeoStrCmp


public: int GEO_CALL GeoStrCmp
(
    const char * strA,
    const char * strB
)


Equivalent to strcmp.


int GEO_CALL Geo::GeoStrCpy


public: int GEO_CALL GeoStrCpy
(
    char * strDestination,
    size_t numberOfElements,
    const char * strSource
)


Equivalent to strcpy.


int GEO_CALL Geo::GeoStrICmp


public: int GEO_CALL GeoStrICmp
(
    const char * strA,
    const char * strB
)


Equivalent to stricmp.


int GEO_CALL Geo::GeoStrLen


public: int GEO_CALL GeoStrLen
(
    const char * strSource
)


Equivalent to strlen.


int GEO_CALL Geo::GeoStrLwr


public: int GEO_CALL GeoStrLwr
(
    char * strSrcDest
)


Equivalent to strlwr.


int GEO_CALL Geo::GeoStrNCat


public: int GEO_CALL GeoStrNCat
(
    char * strDestination,
    size_t numberOfElements,
    const char * strSource,
    size_t count
)


Equivalent to strncat.


int GEO_CALL Geo::GeoStrNCmp


public: int GEO_CALL GeoStrNCmp
(
    const char * strA,
    const char * strB,
    size_t count
)


Equivalent to strncmp.


int GEO_CALL Geo::GeoStrNCpy


public: int GEO_CALL GeoStrNCpy
(
    char * strDestination,
    size_t numberOfElements,
    const char * strSource,
    size_t count
)


Equivalent to strncpy.


s16 GEO_CALL Geo::GeoStrToS16


public: s16GEO_CALL GeoStrToS16
(
    const char * str
)


Simple interpretation of the strtoXXX family of functions, returning a Geo::s16.


s32 GEO_CALL Geo::GeoStrToS32


public: s32GEO_CALL GeoStrToS32
(
    const char * str
)


Simple interpretation of the strtoXXX family of functions, returning a Geo::s32.


s64 GEO_CALL Geo::GeoStrToS64


public: s64GEO_CALL GeoStrToS64
(
    const char * str
)


Simple interpretation of the strtoXXX family of functions, returning a Geo::s64.


u16 GEO_CALL Geo::GeoStrToU16


public: u16GEO_CALL GeoStrToU16
(
    const char * str
)


Simple interpretation of the strtoXXX family of functions, returning a Geo::u16.


u32 GEO_CALL Geo::GeoStrToU32


public: u32GEO_CALL GeoStrToU32
(
    const char * str
)


Simple interpretation of the strtoXXX family of functions, returning a Geo::u32.


u64 GEO_CALL Geo::GeoStrToU64


public: u64GEO_CALL GeoStrToU64
(
    const char * str
)


Simple interpretation of the strtoXXX family of functions, returning a Geo::u64.


bool Geo::GeoThreadEqual


public: bool GeoThreadEqual
(
    GeoThreadHandle a,
    GeoThreadHandle b
)


Platform specific thread comparison function.


LONG WINAPI Geo::GeoUnhandledExceptionFilter


public: LONG WINAPI GeoUnhandledExceptionFilter
(
    PEXCEPTION_POINTERS pExceptionInfo
)


Unhandled exception filter, registered by InstallGeoErrorHandler()


int GEO_CALL Geo::GeoVSCPrintf


public: int GEO_CALL GeoVSCPrintf
(
    const char * format,
    va_list argptr
)


Equivalent to vscprintf.


int GEO_CALL Geo::GeoVSPrintf


public: int GEO_CALL GeoVSPrintf
(
    char * buffer,
    size_t numberOfElements,
    const char * format,
    va_list argptr
)


Equivalent to vsprintf.


void Geo::GeoWaitThread


public: void GeoWaitThread
(
    GeoThreadHandle thread
)


Platform specific thread wait function.


void Geo::GeoYieldThread


public: void GeoYieldThread()


Platform specific thread yield function.


BaryWeights GEO_CALL Geo::GetBarycentricWeights


public: BaryWeightsGEO_CALL GetBarycentricWeights
(
    const Geo::v128 & a,
    const Geo::v128 & b,
    const Geo::v128 & c,
    const Geo::v128 & position
)


Compute the barycentric weights in a triangle given a position.


u32 GEO_CALL Geo::GetCpuFeatures


public: u32GEO_CALL GetCpuFeatures()


Retrieve the processors features as a set of flags.

See Also

GeoCpuID.h


eCpuVendor GEO_CALL Geo::GetCpuVendor


public: eCpuVendorGEO_CALL GetCpuVendor()


Get the PC CPU vendor.


const char* GEO_CALL Geo::GetCpuVendorAsString


public: const char *GEO_CALL GetCpuVendorAsString()


Get the PC CPU vendor as a string.


const char * Geo::GetExceptionString


public: const char * GetExceptionString
(
    DWORD dwCode
)


====================================================================== Given an exception code, returns a pointer to a static string with a

description of the exception



const char* GEO_CALL Geo::GetFileSystemPrefix


public: const char *GEO_CALL GetFileSystemPrefix()


Get the previously set file system prefix for the current platform.


GEO_FORCE_INLINE int Geo::GetFloatExponent


public: GEO_FORCE_INLINE int GetFloatExponent
(
    float f
)


Extract the exponent of the given float, accounting for the bias (i.e. the result is in the range -127 to +128).


GEO_FORCE_INLINE u32 Geo::GetFloatMantissa


public: GEO_FORCE_INLINEu32 GetFloatMantissa
(
    float f
)


Extracts the mantissa of the given float.


const char* Geo::GetFriendlyName


public: const char * GetFriendlyName
(
    eRTAPI api
)


Gets the name of the given ray-tracing API.


GeoFileString Geo::GetiOSAppDocumentsDir


public: GeoFileString GetiOSAppDocumentsDir()


Returns the path to the application Documents directory on the current iOS device/simulator.


BOOL Geo::GetLogicalAddress


public: BOOL GetLogicalAddress
(
    PVOID addr,
    LPCH szModule,
    DWORD len,
    DWORD & section,
    DWORD & offset
)


============================================================================= Given a linear address, locates the module, section, and offset containing that address.

Note: the szModule paramater buffer is an output buffer of length specified

by the len parameter (in characters!)



s32 GEO_CALL Geo::GetLogicalCpuCoreCount


public: s32GEO_CALL GetLogicalCpuCoreCount()


Get the number of logical cores.


Geo::Matrix GEO_CALL Geo::GetMatrixFromString


public: Geo::MatrixGEO_CALL GetMatrixFromString
(
    const C * str
)


Read 16 float values from a string and build a Matrix. Same argument order as the 16 float constructor.


MemoryAllocator* GEO_CALL Geo::GetMemoryAllocator


public: MemoryAllocator *GEO_CALL GetMemoryAllocator()


Gets the currently set memory allocator, or NULL if none has been set yet.


Geo::v128 GEO_CALL Geo::GetNormal


public: Geo::v128GEO_CALL GetNormal
(
    const Geo::v128 & a,
    const Geo::v128 & b,
    const Geo::v128 & c,
    eWindingOrder::Value windingOrder
)


Compute a normal from three vertices. The windingOrder parameter determines which side of the triangle the normal is for.


Geo::s64 GEO_CALL Geo::GetNumPageFaults


public: Geo::s64GEO_CALL GetNumPageFaults()


The number of page faults that occurred during the process life.


Geo::s64 GEO_CALL Geo::GetPeakProcessMemoryInfo


public: Geo::s64GEO_CALL GetPeakProcessMemoryInfo()


The peak amount of memory allocated by the process.


Geo::s64 GEO_CALL Geo::GetTotalMemoryInUse


public: Geo::s64GEO_CALL GetTotalMemoryInUse()


The total amount of memory currently allocated (allocations minus deallocations)


Geo::s64 GEO_CALL Geo::GetTotalProcessMemoryInfo


public: Geo::s64GEO_CALL GetTotalProcessMemoryInfo()


The total amount of memory currently allocated by the process.


Geo::u64 GEO_CALL Geo::GetTotalSystemMemory


public: Geo::u64GEO_CALL GetTotalSystemMemory()


Get the total amount of system physical memory.

Returns

0 on error or if unsupported, otherwise the total system physical memory in bytes


Geo::v128 GEO_CALL Geo::GetV128FromString


public: Geo::v128GEO_CALL GetV128FromString
(
    const C * str
)


Parses a v128 from the given string.


Geo::v128 GEO_CALL Geo::GetV128FromStringXYZ


public: Geo::v128GEO_CALL GetV128FromStringXYZ
(
    const C * str,
    float w
)


Parses a v128 from the given string, ignoring the W-component and instead setting it to the given value.


GEO_FORCE_INLINE Geo::v128 GEO_CALL Geo::HalfVectorToV128


public: GEO_FORCE_INLINEGeo::v128GEO_CALL HalfVectorToV128
(
    const Geo::u16 * vHalf
)


Convert a 4-element array of half floats to a v128.

This version acts as a switch board to the optimized versions (where available)


Geo::v128 GEO_CALL Geo::HalfVectorToV128_Portable


public: Geo::v128GEO_CALL HalfVectorToV128_Portable
(
    const Geo::u16 * vHalf
)


Convert a 4-element array of half floats to a v128.

Currently using the portable implementation on all platforms.


u32 Geo::HashBig


public: u32 HashBig
(
    const void * key,
    size_t length,
    u32 initval
)


This is the same as HashWord() on big-endian machines.

It is different from HashLittle() on all machines. HashBig() takes advantage of big-endian byte ordering.


u32 Geo::HashLittle


public: u32 HashLittle
(
    GeoStringView< char > string
)


This will create a simple u32 hash from the (case-sensitive) string supplied.


u32 Geo::HashLittle


public: u32 HashLittle
(
    const void * key,
    size_t length,
    u32 initval
)


Hash a variable-length key of bytes into a 32-bit value.

Every bit of the key affects every bit of the return value. Two keys differing by one or two bits will have totally different hash values.

The best hash table sizes are powers of 2. There is no need to do mod a prime (mod is sooo slow!). If you need less than 32 bits, use a bitmask. For example, if you need only 10 bits, do h = (h & hashmask(10)); In which case, the hash table should have hashsize(10) elements.

If you are hashing n strings (u8 **)k, do it like this: for (i=0, h=0; i<n; ++i) h = HashLittle( k[i], len[i], h);

By Bob Jenkins, 2006. bob_jenkins@burtleburtle.net. You may use this code any way you wish, private, educational, or commercial. It's free.

Use for hash table lookup, or anything where one collision in 2^^32 is acceptable. Do NOT use for cryptographic purposes.

Parameters
key

The key (the unaligned variable-length array of bytes)

length

The length of the key, counting by bytes

initval

Can be any 4-byte value

Returns

Returns a 32-bit value.


Geo::GeoString<char> Geo::HashSHA1


public: Geo::GeoString< char > HashSHA1
(
    const Geo::u8 * inputBytes,
    Geo::s32 inputNumBytes
)


Hashes the given array of bytes using SHA1 and returns a string representing the hash.


bool Geo::HashSHA1


public: bool HashSHA1
(
    const Geo::u8 * inputBytes,
    Geo::s32 inputNumBytes,
    Geo::u8 * outputBytes
)


Hashes the given array of bytes using SHA1. The outputBytes parameter must have at least HASH_SIZE_SHA1 bytes allocated.


GeoGuid Geo::HashSHA1


public: GeoGuid HashSHA1
(
    GeoFileStringView string
)


Hashes the given string using SHA1 and returns a GUID representing the hash.


u32 Geo::HashWord


public: u32 HashWord
(
    const u32 * k,
    size_t length,
    u32 initval
)


Produce a hash from a string of Geo::u32 This works on all machines.

To be useful, it requires

  • That the key be an array of u32's, and

  • That all your machines have the same endianness, and

  • That the length be the number of u32's in the key The function HashWord() is identical to HashLittle() on little-endian machines, and identical to HashBig() on big-endian machines, except that the length has to be measured in u32s rather than in bytes. HashLittle() is more complicated than HashWord() only because HashLittle() has to dance around fitting the key bytes into registers.


void Geo::InstallGeoErrorHandler


public: void InstallGeoErrorHandler
(
    bool isUnattended
)


Sets up program-wide error handling behaviour, including the unhandled exception handler.


bool GEO_CALL Geo::IntersectTriangle


public: bool GEO_CALL IntersectTriangle
(
    BaryWeights & bary,
    const Geo::v128 & a,
    const Geo::v128 & b,
    const Geo::v128 & c,
    const Geo::v128 & origin,
    const Geo::v128 & direction,
    bool ignoreBackFaces,
    eWindingOrder::Value windingOrder
)


Intersect a triangle by a ray. If ignoreBackFaces is true then the windingOrder parameter determines which side of the triangle is the front.


void Geo::InvokeFileOpenCallback


public: void InvokeFileOpenCallback
(
    const char * path,
    const char * mode
)


Invoke the file open callback, if set.


bool GEO_CALL Geo::IsFinite


public: bool GEO_CALL IsFinite
(
    MatrixParam m
)


Returns true if all of the 16 elements of m are finite.


bool GEO_CALL Geo::IsFinite


public: bool GEO_CALL IsFinite
(
    const BaryWeights & w
)


Check that the weights are finite.


bool Geo::IsFinite


public: bool IsFinite
(
    v128Param v
)


Returns true if all of the 4 elements of v are finite.

TODO - this function doesn't detect INFs yet!


bool GEO_CALL Geo::IsInsideInclusive


public: bool GEO_CALL IsInsideInclusive
(
    const BaryWeights & w
)


Test if barycentric weights encode a position inside the triangle.


bool Geo::IsLittleEndian


public: bool IsLittleEndian
(
    void
)


Returns true if little endian.


bool Geo::IsMultiplePower2


public: bool IsMultiplePower2
(
    const void * p,
    u64 power2
)


Returns true if p is multiple of the specified power of 2.

NOTE - this function will incorrectly report 0 as a power of two. If this is important you will need to handle that case separately i.e. IsMultiplePower2(myPtr) && myPtr


bool Geo::IsMultiplePower2


public: bool IsMultiplePower2
(
    u64 u,
    u64 power2
)


Returns true if u is multiple of the specified power of 2.

NOTE - this function will incorrectly report 0 as a power of two. If this is important you will need to handle that case separately i.e. IsMultiplePower2(myInt) && myInt


bool Geo::IsNan


public: bool IsNan
(
    v128Param v
)


Returns true if any of the 4 elements of v are NANs.


bool GEO_CALL Geo::IsNan


public: bool GEO_CALL IsNan
(
    MatrixParam m
)


Returns true if all of the 16 elements of m are finite.


bool Geo::IsPermutationMatrix


public: bool IsPermutationMatrix
(
    MatrixParam m
)


Returns true if the matrix is a valid permutation matrix, where each column and each row consists of a single positive or negative "1" and the rest "0".


bool Geo::IsPower2


public: bool IsPower2
(
    u64 unsignedInt
)


Return true is unsignedInt is a power of 2 or not.

NOTE - this function will incorrectly report 0 as a power of two. If this is important you will need to handle that case separately i.e. IsPower2(myInt) && myInt


bool Geo::IsWhitespace


public: bool IsWhitespace
(
    char elem
)


Returns whether the given character is a whitespace character.


double Geo::Length


public: double Length
(
    VectorD v
)


Double precision vector operators.


v128 Geo::Lerp


public: v128 Lerp
(
    v128Param a,
    v128Param b,
    v128Param s
)


Linearly interpolated between the corresponding components of a and b.

s is the interpolation factor, typically having values between 0 -> 1.


float Geo::Lerp


public: float Lerp
(
    float a,
    float b,
    float s
)


Linearly interpolate between a and b with factor s.


void* GEO_CALL Geo::LoadFile


public: void *GEO_CALL LoadFile
(
    const char * filename,
    u32 & length,
    u32 align,
    u32 extra_alloc
)


A safe alternative to ferror.

Load a file returns 0 if this fails the loaded file must be freed using FreeLoadedFile


char* GEO_CALL Geo::LoadFileStr


public: char *GEO_CALL LoadFileStr
(
    const char * filename,
    u32 & length,
    u32 align
)


Load a file and append a null terminator.

The loaded file must be freed using FreeLoadedFile.

Returns

Null if this fails


bool GEO_CALL Geo::LoadIntelGPALibrary


public: bool GEO_CALL LoadIntelGPALibrary()


Load the Intel Graphics Performance Analyzer Dll and initialise all utilised function pointers.


Interface* Geo::LoadInterface


public: Interface * LoadInterface
(
    IGeoInputStream & stream,
    u32 section
)


Load an Interface object from a stream. Interface must have same functional API as an IGeoSerialisable.


Interface* Geo::LoadInterface


public: Interface * LoadInterface
(
    const char * filename,
    u32 section,
    bool warnError
)


Load a Precompute interface from disk, using the given filename.


Interface * Geo::LoadInterfaceCompressed


public: Interface * LoadInterfaceCompressed
(
    const char * filename,
    u32 section,
    bool warnError
)


Load an IGeoSerialisable interface from disk, using the given compressed or uncompressed file.


Geo::s32 GEO_CALL Geo::LocateLeafForPoint


public: Geo::s32GEO_CALL LocateLeafForPoint
(
    const Geo::v128 * pointArray,
    const PointSplit * splitArray,
    const Geo::v128 & position
)


Locate the leaf index for a given point in a kd-tree.

This returns the index into the m_Leaves array given to the BuildPointKDTree() function. There is always at least one leaf and every finite point can be classified into a leaf, so this call will never fail under normal operation. All arrays and values are assume to be non-null and finite.


void GEO_CALL Geo::LocateLeavesOverlappingBox


public: void GEO_CALL LocateLeavesOverlappingBox
(
    Geo::GeoArray< Geo::s32 > & leafIndices,
    const Geo::PointSplitBounds * splitBounds,
    const PointSplit * splitArray,
    const Geo::GeoBoundingBox & searchBox
)


Locate a set of leaf indices that overlap a box.

Given a kd-tree structure and bounds information, find and push all leaf indices that overlap searchBox. Only xyz coordinates are considered. The w components are ignored.


void GEO_CALL Geo::LocateLeavesOverlappingPoint


public: void GEO_CALL LocateLeavesOverlappingPoint
(
    Geo::GeoArray< Geo::s32 > & leafIndices,
    const Geo::PointSplitBounds * splitBounds,
    const PointSplit * splitArray,
    const Geo::v128 & position
)


Locate a set of leaf indices that overlap a point.

Given a kd-tree structure and bounds information, find and push all leaf indices that overlap position. Only xyz coordinates are considered. The w components are ignored.


void GEO_CALL Geo::LocateLeavesWithinBox


public: void GEO_CALL LocateLeavesWithinBox
(
    Geo::GeoArray< Geo::s32 > & leafIndices,
    const Geo::GeoBoundingBox & searchBox,
    const Geo::v128 * pointArray,
    const PointSplit * splitArray
)


Locate a set of leaf indices that intersect a box.

Pushed indices that reference into the m_Leaves array into leafIndices for every leaf that intersects searchBox. The bounding box is assumed to have volume. If you need a point location function, use LocateLeafForPoint().


float Geo::Log


public: float Log
(
    float number,
    float base
)


Calculate the logarithm with specified base of the given number;.


void GEO_CALL Geo::LogStatistics


public: void GEO_CALL LogStatistics
(
    const IGeoRayTracingContext * rtCtx,
    const double & time
)


Log ray tracing timings.


GEO_FORCE_INLINE ArrayRange<T> Geo::MakeArrayRange


public: GEO_FORCE_INLINEArrayRange< T > MakeArrayRange
(
    T * first,
    T * last
)


Returns an array range for first and last.


IGeoStream* Geo::MakeFileStream


public: IGeoStream * MakeFileStream
(
    const char * filename,
    IGeoStream::EStreamMode mode,
    GeoFileStream::EStreamFormat format
)


Factory method to create appropriate file stream like object.


GeoArray<T> Geo::MakeGeoArray


public: GeoArray< T > MakeGeoArray
(
    StridedArrayView< T > a
)


Create a GeoArray which is a copy of the specified strided array view.


GeoArray<T> Geo::MakeGeoArray


public: GeoArray< T > MakeGeoArray
(
    const T * p,
    s32 n
)


Create a GeoArray which is a copy of the specified array.


GeoError Geo::MakeGeoError


public: GeoError MakeGeoError
(
    const ErrorType & error
)


Creates a GeoError struct by filling in the given error code, textual message and payload data.

The severity of the error is automatically set using the severity defined in the error class.


GeoError Geo::MakeGeoError


public: GeoError MakeGeoError
(
    const char * message,
    TPayload * pPayload
)


Creates a GeoError struct by filling in the given error code, textual message and payload data.

The severity of the error is automatically set using the severity defined in the payload class.


GeoPair<T1, T2> Geo::MakeGeoPair


public: GeoPair< T1, T2 > MakeGeoPair
(
    const T1 & t1,
    const T2 & t2
)


Function to create a Geo::GeoPair, similar to the STL function std::make_pair.


GeoTriple<T1, T2, T3> Geo::MakeGeoTriple


public: GeoTriple< T1, T2, T3 > MakeGeoTriple
(
    const T1 & t1,
    const T2 & t2,
    const T3 & t3
)


Function to create a Geo::GeoTriple, extended from MakeGeoPair.


StridedArrayView<T> Geo::MakeStridedArrayView


public: StridedArrayView< T > MakeStridedArrayView
(
    const GeoArray< T > & a
)


Create a StridedArrayView which refers to the entire of the specified array.


StridedArrayView<T> Geo::MakeStridedArrayView


public: StridedArrayView< T > MakeStridedArrayView
(
    const T * first,
    Geo::s32 count,
    Geo::s32 stride
)


Create a read-only view into an array with optional stride.


StringExpression< T > Geo::MakeStringExpression


public: StringExpression< T > MakeStringExpression
(
    T value
)


Return a string concatenation expression consisting of the specified string.


Geo::GeoString<char> GEO_CALL Geo::MatrixToString


public: Geo::GeoString< char > GEO_CALL MatrixToString
(
    MatrixParam m
)


Creates a GeoString containing the 16 elements of the matrix (space-separated) in a form compatible with GetMatrixFromString.


Geo::GeoString<char> GEO_CALL Geo::MatrixToUtf8String


public: Geo::GeoString< char > GEO_CALL MatrixToUtf8String
(
    MatrixParam m
)


Creates a GeoString containing the 16 elements of the matrix (space-separated) in a form compatible with GetMatrixFromString.


T Geo::Max


public: T Max
(
    const T & a,
    const T & b
)


Return the Max of a and b.


GeoPoint3D Geo::Max


public: GeoPoint3D Max
(
    const GeoPoint3D & a,
    const GeoPoint3D & b
)


Gets the component-wise maximum of two points.


GeoPoint2D Geo::Max


public: GeoPoint2D Max
(
    const GeoPoint2D & a,
    const GeoPoint2D & b
)


Gets the component-wise maximum of two points.


GEO_FORCE_INLINE v128 Geo::Max


public: v128 Max
(
    const v128 & a,
    const v128 & b
)


Returns a vector where each element has the maximum value of the corresponding values in a and b NOTE - the Min3 template function will work with the v128 type as well.


T Geo::Max3


public: T Max3
(
    const T & a,
    const T & b,
    const T & c
)


Return the Max of {a,b,c}.


Matrix GEO_CALL Geo::MConstructCubeMapInvViewMatrix


public: MatrixGEO_CALL MConstructCubeMapInvViewMatrix
(
    Geo::s32 faceIdx
)


Construct the inverse of the view matrix for a specific cubemap face.


Matrix GEO_CALL Geo::MConstructCubeMapViewMatrix


public: MatrixGEO_CALL MConstructCubeMapViewMatrix
(
    Geo::s32 faceIdx
)


Construct a view matrix for a specific cubemap face.


Matrix Geo::MConstructQuaternion


public: Matrix MConstructQuaternion
(
    Quat q
)


Construct a matrix from a quaternion.


v128 GEO_CALL Geo::MDet


public: v128GEO_CALL MDet
(
    MatrixParam m
)


Determinant (returned as a broadcast float)


void GEO_CALL Geo::MemoryTrackerReport


public: void GEO_CALL MemoryTrackerReport
(
    s16 exitCode,
    bool pauseOnError
)


This will generate a report on memory leaks, and attempt to release the leaks.

It should be called when an application has shut down just before it exits completely. Because it attempts to release any leaks this must be the very last thing an application does.

Note

This doesn't do anything in a release build.


v128 GEO_CALL Geo::MGetRotation


public: v128GEO_CALL MGetRotation
(
    Geo::MatrixParam m
)


Deconstruct the matrix to retrieve the rotation part as a quaternion.


Geo::v128 GEO_CALL Geo::MGetTranslation


public: Geo::v128GEO_CALL MGetTranslation
(
    Geo::MatrixParam m
)


Deconstruct the matrix to retrieve the translation part as a vector.


T Geo::Min


public: T Min
(
    const T & a,
    const T & b
)


Return the Max of a and b.


GeoPoint3D Geo::Min


public: GeoPoint3D Min
(
    const GeoPoint3D & a,
    const GeoPoint3D & b
)


Gets the component-wise minimum of two points.


GEO_FORCE_INLINE v128 Geo::Min


public: v128 Min
(
    const v128 & a,
    const v128 & b
)


Returns a vector where each element has the minimum value of the corresponding values in a and b NOTE - the Min3 template function will work with the v128 type as well.


T Geo::Min3


public: T Min3
(
    const T & a,
    const T & b,
    const T & c
)


Return the Min of {a,b,c}.


Matrix Geo::MInverse


public: MatrixGEO_CALL MInverse
(
    MatrixParam m,
    v128 idet
)


with a precomputed 1/determinant


Matrix Geo::MInverse


public: MatrixGEO_CALL MInverse
(
    MatrixParam m
)


Generalised inverse.


Matrix GEO_CALL Geo::MInverseSimple


public: MatrixGEO_CALL MInverseSimple
(
    MatrixParam m
)


Inverts assuming only rotation and translation.


float Geo::Mod


public: float Mod
(
    float a,
    float b
)


Return a modulo b.


void Geo::MortonDecode


public: void MortonDecode
(
    Geo::u64 morton,
    Geo::s32 & x,
    Geo::s32 & y
)


Map from a linear z-order space filling curve back to x and y components.


void Geo::MortonDecode


public: void MortonDecode
(
    Geo::u64 morton,
    Geo::s32 & x,
    Geo::s32 & y,
    Geo::s32 & z
)


Map from a linear z-order space filling curve back to x, y and z components.


Geo::u64 Geo::MortonEncode


public: Geo::u64 MortonEncode
(
    Geo::s32 x,
    Geo::s32 y
)


Map from x and y components to a linear z-order space filling curve.

x and y must be in the range [0, 2^31)


Geo::u64 Geo::MortonEncode


public: Geo::u64 MortonEncode
(
    Geo::s32 x,
    Geo::s32 y,
    Geo::s32 z
)


Map from x, y and z components to a linear z-order space filling curve.

x, y and z must be in the range [0, 2^21)


Matrix Geo::MTranspose


public: MatrixGEO_CALL MTranspose
(
    MatrixParam m
)


Determinant (returned as a broadcast float)


T Geo::numeric_cast


public: T numeric_cast
(
    Y numval
)


Safer static cast that 'protects' against underflow/overflow.

Template Parameters
T

Type being cast to

Y

Type being cast from

Parameters
numval

Numeric value being cast

Returns

numval as type Y, asserts if the range of Y is exceeded


GEO_FORCE_INLINE Geo::v128 Geo::operator-


public: Geo::v128 operator-
(
    Geo::v128Param v
)


The unary - operator. Equivalent to (VZero() - v);.


GEO_FORCE_INLINE Geo::v128 Geo::operator-


public: Geo::v128 operator-
(
    Geo::v128Param lhs,
    Geo::v128Param rhs
)


Operator - (component-wise subtraction)


VectorD Geo::operator-


public: VectorD operator-
(
    VectorD lhs,
    VectorD rhs
)


Double precision vector operators.


bool Geo::operator!=


public: bool operator!=
(
    const GeoAllocatorUnchecked< T1 > & ,
    const GeoAllocatorUnchecked< T2 > &
)


Comparison operators for allocator classes.


bool Geo::operator!=


public: bool operator!=
(
    const GeoList< _Ty, _Alloc > & _Left,
    const GeoList< _Ty, _Alloc > & _Right
)


Operator overloads for GeoList.


bool Geo::operator!=


public: bool operator!=
(
    const GeoAllocator< T1 > & ,
    const GeoAllocator< T2 > &
)


Comparison operators for allocator classes.


bool Geo::operator!=


public: bool operator!=
(
    const GeoFixedPoolAllocator< T1 > & lhs,
    const GeoFixedPoolAllocator< T2 > & rhs
)


Comparison operators for allocator classes.


GEO_FORCE_INLINE Geo::v128 Geo::operator*


public: Geo::v128 operator*
(
    Geo::v128Param lhs,
    Geo::v128Param rhs
)


Operator * (component-wise multiplication)


VectorD Geo::operator*


public: VectorD operator*
(
    double lhs,
    VectorD rhs
)


Double precision vector operators.


GEO_FORCE_INLINE Geo::v128 & Geo::operator*=


public: Geo::v128 & operator*=
(
    Geo::v128 & lhs,
    Geo::v128Param rhs
)


Inplace *.


VectorD Geo::operator/


public: VectorD operator/
(
    VectorD lhs,
    VectorD rhs
)


Double precision vector operators.


GEO_FORCE_INLINE Geo::v128 Geo::operator/


public: Geo::v128 operator/
(
    Geo::v128Param lhs,
    Geo::v128Param rhs
)


Operator / (component-wise division)


GEO_FORCE_INLINE Geo::v128 & Geo::operator/=


public: Geo::v128 & operator/=
(
    Geo::v128 & lhs,
    Geo::v128Param rhs
)


Inplace /.


GEO_FORCE_INLINE Geo::v128 Geo::operator+


public: Geo::v128 operator+
(
    Geo::v128Param lhs,
    Geo::v128Param rhs
)


Operator + (component-wise addition)


GEO_FORCE_INLINE Geo::v128 Geo::operator+


public: Geo::v128 operator+
(
    Geo::v128Param v
)


The unary + operator (effectively a no-op)


GEO_FORCE_INLINE Geo::v128 & Geo::operator+=


public: Geo::v128 & operator+=
(
    Geo::v128 & lhs,
    Geo::v128Param rhs
)


Inplace +.


bool Geo::operator<


public: bool operator<
(
    const GeoPoint3 & lhs,
    const GeoPoint3 & rhs
)


Allow GeoPoint3 to be used as a key for GeoMap.

Although this will not give any kind of sensible spatial organisation, it is at least a stable, usable ordering.


bool Geo::operator<


public: bool operator<
(
    GeoStringView< T > lhs,
    GeoStringView< T > rhs
)


Comparison (required to use strings as keys in a map).


bool Geo::operator<


public: bool operator<
(
    const GeoPoint3D & lhs,
    const GeoPoint3D & rhs
)


Allow GeoPoint3D to be used as a key for GeoMap.

Although this will not give any kind of sensible spatial organisation, it is at least a stable, usable ordering.


bool Geo::operator<


public: bool operator<
(
    const GeoList< _Ty, _Alloc > & _Left,
    const GeoList< _Ty, _Alloc > & _Right
)


Operator overloads for GeoList.


IGeoStream& Geo::operator<<


public: IGeoStream & operator<<
(
    IGeoStream & stream,
    const v128 & value
)


Functions to write items to a stream as text.


IGeoStream& Geo::operator<<


public: IGeoStream & operator<<
(
    IGeoStream & stream,
    const Matrix & value
)


Functions to write items to a stream as text.


IGeoStream& Geo::operator<<


public: IGeoStream & operator<<
(
    IGeoStream & stream,
    const GeoGuid & value
)


Functions to write items to a stream as text.


IGeoStream& Geo::operator<<


public: IGeoStream & operator<<
(
    IGeoStream & stream,
    s32 value
)


Functions to write items to a stream as text.


IGeoStream& Geo::operator<<


public: IGeoStream & operator<<
(
    IGeoStream & stream,
    u32 value
)


Functions to write items to a stream as text.


IGeoStream& Geo::operator<<


public: IGeoStream & operator<<
(
    IGeoStream & stream,
    float value
)


Functions to write items to a stream as text.


IGeoStream& Geo::operator<<


public: IGeoStream & operator<<
(
    IGeoStream & stream,
    const char * string
)


Functions to write items to a stream as text.


IGeoStream& Geo::operator<<


public: IGeoStream & operator<<
(
    IGeoStream & stream,
    const GeoString< char > & value
)


Functions to write items to a stream as text.


IGeoStream& Geo::operator<<


public: IGeoStream & operator<<
(
    IGeoStream & stream,
    const GeoVariant & value
)


Writes a GeoVariant to an IGeoStream as text, commonly used to write properties in Xml.


IGeoStream& Geo::operator<<


public: IGeoStream & operator<<
(
    IGeoStream & stream,
    double value
)


Functions to write items to a stream as text.


IGeoStream& Geo::operator<<


public: IGeoStream & operator<<
(
    IGeoStream & stream,
    GeoStringView< char > value
)


Functions to write items to a stream as text.


bool Geo::operator<=


public: bool operator<=
(
    const GeoList< _Ty, _Alloc > & _Left,
    const GeoList< _Ty, _Alloc > & _Right
)


Operator overloads for GeoList.


GEO_FORCE_INLINE Geo::v128 & Geo::operator-=


public: Geo::v128 & operator-=
(
    Geo::v128 & lhs,
    Geo::v128Param rhs
)


Inplace -.


bool Geo::operator==


public: bool operator==
(
    const GeoPoint3 & lhs,
    const GeoPoint3 & rhs
)


Equality operator.


bool Geo::operator==


public: bool operator==
(
    const GeoArray< T > & lhs,
    const GeoArray< T > & rhs
)


Array equality testing function.

This requires T to implement operator == (const T& rhs) const.

Note

Make sure your operator == is a const function!


bool Geo::operator==


public: bool operator==
(
    const GeoAllocator< T1 > & ,
    const GeoAllocator< T2 > &
)


Comparison operators for allocator classes.


bool Geo::operator==


public: bool operator==
(
    const GeoFixedPoolAllocator< T1 > & lhs,
    const GeoFixedPoolAllocator< T2 > & rhs
)


Comparison operators for allocator classes.


bool Geo::operator==


public: bool operator==
(
    const GeoList< _Ty, _Alloc > & _Left,
    const GeoList< _Ty, _Alloc > & _Right
)


Operator overloads for GeoList.


bool Geo::operator==


public: bool operator==
(
    const GeoAllocatorUnchecked< T1 > & ,
    const GeoAllocatorUnchecked< T2 > &
)


Comparison operators for allocator classes.


bool Geo::operator>


public: bool operator>
(
    const GeoList< _Ty, _Alloc > & _Left,
    const GeoList< _Ty, _Alloc > & _Right
)


Operator overloads for GeoList.


bool Geo::operator>=


public: bool operator>=
(
    const GeoList< _Ty, _Alloc > & _Left,
    const GeoList< _Ty, _Alloc > & _Right
)


Operator overloads for GeoList.


GEO_FORCE_INLINE u32 Geo::PackFloatToFixedWidth


public: GEO_FORCE_INLINEu32 PackFloatToFixedWidth
(
    float in
)


Packs a single-precision floating point number into a floating point number with the given number of exponent and mantissa bits.


GEO_FORCE_INLINE u32 Geo::PackFloatToRgbm


public: GEO_FORCE_INLINEu32 PackFloatToRgbm
(
    v128 inputValue,
    bool isRgbaByteOrder
)


Pack a v128 colour value into a u32 in RGBM format.


GEO_FORCE_INLINE u32 Geo::PackFloatToSharedExponent999e5


public: GEO_FORCE_INLINEu32 PackFloatToSharedExponent999e5
(
    v128 colour
)


Packs a 4-vector of single-precision floating point numbers into a "shared exponent" 999e5 format.


void Geo::PrintError


public: void PrintError
(
    const GeoError & error
)


Sends a GeoError object to the listeners attached to the GeoPrintf handlers.

This is the simplest response you can have to a GeoError being raised.


void Geo::PrintExceptionMessage


public: void PrintExceptionMessage
(
    const WCHAR * format,
    ...
)


Since printf(...) in an exception handler seems to disappear into the ether when the process opened in a pipe We will print to both the screen and the shared memory block of OutputDebugString()


void Geo::PrintExceptionMessage


public: void PrintExceptionMessage
(
    const char * format,
    ...
)


Since printf(...) in an exception handler seems to disappear into the ether when the process opened in a pipe We will print to both the screen and the shared memory block of OutputDebugString()


bool GEO_CALL Geo::PrintTotalMemorySummaryForMarker


public: bool GEO_CALL PrintTotalMemorySummaryForMarker
(
    const char * name,
    const char * filename,
    s32 lineNumber
)


Print a basic report to the LOG_INFO stream.

Returns

Returns true if a log was printed. It will only be printed if IsTotalMemorySummarySupported() returns true.


v128 Geo::QApplyToVec


public: v128 QApplyToVec
(
    Quat q,
    v128 v
)


Assumes q is unit.


Quat Geo::QBuildFromEulerAngles


public: Quat QBuildFromEulerAngles
(
    float x,
    float y,
    float z
)


Converts quaternion into euler angles in XYZ order, stored in those components.


Quat Geo::QBuildMatrix


public: Quat QBuildMatrix
(
    MatrixParam m
)


Construct a matrix from a quaternion.


Quat Geo::QClosestSlerp


public: Quat QClosestSlerp
(
    Quat a,
    Quat b,
    v128 s
)


Flips inputs to be on the same hyper-hemisphere. Use QFullSlerp if desired.


Quat Geo::QConjugate


public: Quat QConjugate
(
    Quat q
)


q* = -xyz, +w


Quat Geo::QFullSlerp


public: Quat QFullSlerp
(
    Quat a,
    Quat b,
    v128 s
)


Does not flip inputs to be on the same hyper-hemisphere. Use QClosestSlerp if desired.


Quat Geo::QIdentity


public: Quat QIdentity()


q* = -xyz, +w


Quat Geo::QLerp


public: Quat QLerp
(
    Quat a,
    Quat b,
    v128 s
)


Assumes a and b are unit.


Quat Geo::QMul


public: Quat QMul
(
    Quat a,
    Quat b
)


quat multiply.


Quat Geo::QSqrt


public: Quat QSqrt
(
    Quat q
)


Assumes q is unit.


void Geo::RasterizeTriangle


public: void RasterizeTriangle
(
    float x1,
    float y1,
    float x2,
    float y2,
    float x3,
    float y3,
    RasterizationClient emitter,
    void * user
)


rasterize a triangle


void Geo::RasterizeWindingAgnosticTriangle


public: void RasterizeWindingAgnosticTriangle
(
    float x1,
    float y1,
    float x2,
    float y2,
    float x3,
    float y3,
    RasterizationClient emitter,
    void * user
)


rasterize a triangle regardless of winding order


bool Geo::ReadArray


public: bool ReadArray
(
    IGeoInputStream & reader,
    GeoArray< T > & objects
)


Helper function to read a GeoArray from an IGeoInputStream, with all memory issues monitored and errors reported to GeoPrintf.

Deals with arrays of values, the contained type must be considered blittable (see IsBlittable<T>).


bool Geo::ReadArray


public: bool ReadArray
(
    IGeoInputStream & reader,
    GeoArray< T * > & objects
)


Helper function to read a GeoArray from an IGeoInputStream, with all memory issues monitored and errors reported to GeoPrintf.

Deals with arrays of pointers, the storage type must support IGeoSerialisable and have a static Create() method.


bool Geo::ReadArray


public: bool ReadArray
(
    IGeoInputStream & reader,
    Geo::GeoArray< T * > & objects,
    TCreateAndLoadFunction loader
)


Helper function to read a GeoArray from an IGeoInputStream.

Deals with arrays of pointers, the user must provide a TCreateAndLoadFunction callable entity that creates a new object and reads the data from the stream.


bool Geo::ReadMap


public: bool ReadMap
(
    IGeoInputStream & reader,
    GeoMap< K, T > & map
)


Helper function to read a GeoMap from an IGeoInputStream, with all memory issues monitored and errors reported to GeoPrintf.

Deals with arrays of values, the contained type must be considered blittable (see IsBlittable<T>).


void Geo::ReadObject


public: void ReadObject
(
    IGeoInputStream & reader,
    Geo::GeoArray< T > & objects
)


ReadObject adapter for ReadArray.


void Geo::ReadObject


public: void ReadObject
(
    IGeoInputStream & stream,
    GeoString< char > & object
)


Allow the IGeoStream implementation to treat a GeoString as a value object, so that you can call Read/Write as you would a fundamental type.


void Geo::ReadObject


public: void ReadObject
(
    IGeoInputStream & stream,
    bool & object
)


Ensure that boolean values are read/written 'efficiently' and portably.


void Geo::ReadObject


public: void ReadObject
(
    Reader & ,
    T &
)


default implementation of overloadable reader function


void Geo::RemoveGeoErrorHandler


public: void RemoveGeoErrorHandler()


Unregister the unhandled exception handler.


u32 Geo::RoundToNextMultiplePower2


public: u32 RoundToNextMultiplePower2
(
    u32 u,
    u32 power2
)


This will round the number u to the next multiple of a power of 2 if the number isn't already a multiple of the power of 2.

power2 must be a power2. This is asserted on but not verified.


u32 Geo::RoundToNextPower2


public: u32 RoundToNextPower2
(
    u32 u
)


Round a 32bit unsigned int to the next power of 2.

NOTE - This function will round 0 to 0, which isn't a power of 2. If this is important you will need to handle that case separately.


u64 Geo::RoundToNextPower2


public: u64 RoundToNextPower2
(
    u64 u
)


Round a 64bit unsigned int to the next power of 2.

NOTE - This function will round 0 to 0, which isn't a power of 2. If this is important you will need to handle that case separately.


u32 Geo::RoundToPrevMultiplePower2


public: u32 RoundToPrevMultiplePower2
(
    u32 u,
    u32 power2
)


This will round the number u down to the previous multiple of a power of 2 if the number isn't already a multiple of the power of 2.

power2 must be a power2. This is asserted on but not verified.


void Geo::SafeDestructArrayContents


public: void SafeDestructArrayContents
(
    Geo::GeoArray< tType * > & a,
    tTypeDestructor safeDestruct
)


Given a GeoArray of pointers, and a destruct function (or any type that has operator()), destroy the elements and clear the array.

For some irritating reason, you may need to help the compiler infer the template type of the destructor. For example:

SafeDestructArrayContents(m_RadCores, DeleteRadSystemCore);
SafeDestructArrayContents(m_InputWorkspaces, DeleteInputWorkspace);
SafeDestructArrayContents(m_SolverProperties, SafeRelease<BakeInputProperties*>);
SafeDestructArrayContents(m_s32Array, GEO_DELETE_T<s32>);
SafeDestructArrayContents(m_s32BufferArray, GEO_DELETE_ARRAY_T<s32>);


void Geo::SafeRelease


public: void SafeRelease
(
    T & a
)


Scoped safe release function.


bool GEO_CALL Geo::SaveFile


public: bool GEO_CALL SaveFile
(
    const char * filename,
    const void * data,
    u32 length
)


Save a file.

Returns

False if this fails.


bool Geo::SaveInterface


public: bool SaveInterface
(
    const Interface * pInterface,
    const char * filename,
    Geo::u32 section
)


Save an IGeoSerialisable interface to disk, using the given filename.


bool Geo::SaveInterfaceCompressed


public: bool SaveInterfaceCompressed
(
    const Interface * pInterface,
    const char * filename,
    Geo::u32 section
)


Save an IGeoSerialisable interface to disk in compressed format, using the given filename.


bool Geo::SaveInterfaceDebug


public: bool SaveInterfaceDebug
(
    const Interface * pInterface,
    const char * filename,
    u32 section
)


Save the object in both binary and text form with the given filename.


bool Geo::SaveInterfaceIfChanged


public: bool SaveInterfaceIfChanged
(
    const Interface * pInterface,
    const char * filename,
    Geo::u32 section
)


Save an IGeoSerialisable interface to disk, using the given filename.


GeoRect Geo::ScaleRect


public: GeoRect ScaleRect
(
    GeoRect rect,
    float scale
)


Function to scale a bounding box.


bool Geo::Serialise


public: bool Serialise
(
    const GeoRaySet & list,
    const char * filename
)


Serialises a list of line segments to a file.

Returns TRUE on success.

Parameters
[in] list

- The list of line segments to write.

[in] filename

- Name of the file to write line segment list to.


void Geo::SetFileOpenCallback


public: void SetFileOpenCallback
(
    FileOpenCallback callback
)


Set the function to be called when a file is opened, or a null pointer to disable the callback.

This has no effect unless GEO_DEVEL is defined!


void GEO_CALL Geo::SetFileSystemPrefix


public: void GEO_CALL SetFileSystemPrefix
(
    const char * prefix
)


Set a file system prefix for the current platform.

For example, "/app_home" then GeoFOpen "/filename" will open e.g. "/app_home/filename"


void GEO_CALL Geo::SetMemoryAllocator


public: void GEO_CALL SetMemoryAllocator
(
    MemoryAllocator * allocator
)


Set the memory allocator.

You must call this before ANY other Geo calls are made. It can only be set once and cannot be unset. No Geo-derived module is robust to incomplete, slow or buggy MemoryAllocators so be careful!


void Geo::SetWaitOnExit


public: void SetWaitOnExit
(
    bool wait
)


Sets whether the program will wait before exiting when an unhandled exception is encountered.


GeoArray<float> Geo::SplitStringToFloats


public: GeoArray< float > SplitStringToFloats
(
    const C * str
)


Function to parse incoming string into an array of floats.

The floats can be separated by any number of space characters, but no other characters should be present.

Parameters
[in] str

Source string.

Returns

Resulting floats.


GeoArray<T> Geo::SplitStringToIntegers


public: GeoArray< T > SplitStringToIntegers
(
    const C * str
)


Function to parse incoming string into an array of integers.

The integers can be separated by any number of space characters, but no other characters should be present.

Parameters
[in] str

Source string.

Returns

Resulting integers.


void Geo::StopAndEnterDebugger


public: void StopAndEnterDebugger()


Drop into the debugger.


StringExpression<GeoFileStringView> Geo::StringConcatenator


public: StringExpression< GeoFileStringView > StringConcatenator()


Return an empty string concatenation expression.

E.g. EvaluateStringExpression(StringConcatenator() + "a" + "b" + "c") -> "abc"


void Geo::swap


public: void swap
(
    GeoList< _Ty, _Alloc > & _Left,
    GeoList< _Ty, _Alloc > & _Right
)


Optimised std::swap compatible function.


void Geo::swap


public: void swap
(
    GeoMap< _Kty, _Ty, _Pr, _Alloc > & lhs,
    GeoMap< _Kty, _Ty, _Pr, _Alloc > & rhs
)


Optimised std::swap compatible function.


void Geo::Swap


public: void Swap
(
    T & a,
    T & b
)


A generic swap function. Template parameter T must be CopyConstructable and Assignable.


bool GEO_CALL Geo::SysInitialise


public: bool GEO_CALL SysInitialise()


Initialise platform-specific OS basics.


u64 GEO_CALL Geo::SysQueryCurrentTime


public: u64GEO_CALL SysQueryCurrentTime()


Return the current system time in seconds since 1970-01-01T00:00:00.


s64 GEO_CALL Geo::SysQueryPerformanceCounter


public: s64GEO_CALL SysQueryPerformanceCounter()


Returns the current performance counter.


s64 GEO_CALL Geo::SysQueryPerformanceFrequency


public: s64GEO_CALL SysQueryPerformanceFrequency()


Returns the number of system performance counter ticks in a second.


void GEO_CALL Geo::SysTidyup


public: void GEO_CALL SysTidyup()


Tidyup platform-specific OS basics.


bool GEO_CALL Geo::TestSamplingDistributions


public: bool GEO_CALL TestSamplingDistributions
(
    const char * filename,
    const s32 & numSamples
)


Write out raysets representing the ray distributions for debugging and visualisation.


Geo::v128 GEO_CALL Geo::ToVector


public: Geo::v128GEO_CALL ToVector
(
    const BaryWeights & w
)


Convert to a vector.


bool GEO_CALL Geo::UncompressStream


public: bool GEO_CALL UncompressStream
(
    GeoMemoryStream & input,
    GeoMemoryStream & output
)


Uncompress a stream created by the CompressStream function above into a new stream.


u32 Geo::UniformInteger


public: u32 UniformInteger
(
    RNG & rng
)


Random unsigned 32 bit integer, [0, 0xffffffff] (inclusive)


double Geo::UniformSignedUnitDouble


public: double UniformSignedUnitDouble
(
    RNG & rng
)


Random double, [-1, 1] (inclusive)


float Geo::UniformSignedUnitFloat


public: float UniformSignedUnitFloat
(
    RNG & rng
)


Random float, [-1, 1] (inclusive)


double Geo::UniformUnitClopenDouble


public: double UniformUnitClopenDouble
(
    RNG & rng
)


Random double, [0, 1)


float Geo::UniformUnitClopenFloat


public: float UniformUnitClopenFloat
(
    RNG & rng
)


Random float, [0, 1)


double Geo::UniformUnitDouble


public: double UniformUnitDouble
(
    RNG & rng
)


Random double, [0, 1] (inclusive)


float Geo::UniformUnitFloat


public: float UniformUnitFloat
(
    RNG & rng
)


Random float, [0, 1] (inclusive)


double Geo::UniformUnitOpenDouble


public: double UniformUnitOpenDouble
(
    RNG & rng
)


Random double, (0, 1)


float Geo::UniformUnitOpenFloat


public: float UniformUnitOpenFloat
(
    RNG & rng
)


Random float, (0, 1)


GeoRect Geo::UnionOfRects


public: GeoRect UnionOfRects
(
    GeoRect r1,
    GeoRect r2
)


Union of two bounding boxes.


GEO_FORCE_INLINE float Geo::UnpackFloatFromFixedWidth


public: GEO_FORCE_INLINE float UnpackFloatFromFixedWidth
(
    u32 in
)


Unacks a single-precision floating point number from a floating point number with the given number of exponent and mantissa bits.


GEO_FORCE_INLINE v128 Geo::UnpackFloatFromSharedExponent999e5


public: GEO_FORCE_INLINEv128 UnpackFloatFromSharedExponent999e5
(
    u32 colour
)


Unpacks a 4-vector of single-precision floating point numbers from a "shared exponent" 999e5 format.


GEO_FORCE_INLINE v128 Geo::UnpackRgbmToFloat


public: GEO_FORCE_INLINEv128 UnpackRgbmToFloat
(
    u32 rgbm
)


Unpack an rgbm colour into a v128.


GEO_FORCE_INLINE void GEO_CALL Geo::V128ToHalfVector


public: GEO_FORCE_INLINE void GEO_CALL V128ToHalfVector
(
    Geo::v128 fp32,
    Geo::u16 * vOutHalf
)


Convert a v128 to a 4-element array of half floats.

This version acts as a switch board to the optimized versions (where available)


void GEO_CALL Geo::V128ToHalfVector_Portable


public: void GEO_CALL V128ToHalfVector_Portable
(
    Geo::v128 fp32,
    Geo::u16 * vOutHalf
)


Convert a v128 to a 4-element array of half floats.

Currently using the portable implementation on all platforms.


Geo::GeoString<char> GEO_CALL Geo::V128ToUtf8String


public: Geo::GeoString< char > GEO_CALL V128ToUtf8String
(
    const Geo::v128 & v
)


Creates a GeoString representation of the vector (space-separated).

The ..XYZ versions return a string containing only the X, Y and Z components of the vector, the others include W.


Geo::GeoString<char> GEO_CALL Geo::V128ToUtf8StringXYZ


public: Geo::GeoString< char > GEO_CALL V128ToUtf8StringXYZ
(
    const Geo::v128 & v
)


Creates a GeoString representation of the vector (space-separated).

The ..XYZ versions return a string containing only the X, Y and Z components of the vector, the others include W.


GEO_FORCE_INLINE v128 Geo::VBroadcast


public: v128 VBroadcast
(
    float x
)


Construct a v128 by broadcasting a float into all elements.

This is particularly handy when you want to use the vpu to do regular fpu operations.


GEO_FORCE_INLINE v128 Geo::VBroadcastInt


public: v128 VBroadcastInt
(
    s32 x
)


Construct a v128 by converting an integer to a float and broadcasting it into all elements.


GEO_FORCE_INLINE v128 Geo::VCeil


public: v128 VCeil
(
    v128Param v
)


Return ceil(v).


v128 Geo::VCompareEquals


public: v128 VCompareEquals
(
    v128Param a,
    v128Param b
)


Compares all corresponding elements to see if a == b (exact equals).

Returns a mask with the result of all comparisons as true/false mask values.


v128 Geo::VCompareGE


public: v128 VCompareGE
(
    v128Param a,
    v128Param b
)


Compares all corresponding elements to see if a >= b.

Returns a mask with the result of all comparisons as true/false mask values.


v128 Geo::VCompareGT


public: v128 VCompareGT
(
    v128Param a,
    v128Param b
)


Compares all corresponding elements to see if a > b.

Returns a mask with the result of all comparisons as true/false mask values.


v128 Geo::VCompareIsFinite


public: v128 VCompareIsFinite
(
    v128Param v
)


Tests all elements of v to see if they are finite or not.

It returns a mask with true/false mask values with the result of these 4 tests. TODO - this function isn't complete yet as it doesn't detect INF values yet!


v128 Geo::VCompareIsNan


public: v128 VCompareIsNan
(
    v128Param v
)


Tests all elements of v to see if any of them are NANs.

It returns a mask with true/false mask values with the result of these 4 tests.


v128 Geo::VCompareLE


public: v128 VCompareLE
(
    v128Param a,
    v128Param b
)


Compares all corresponding elements to see if a <= b.

Returns a mask with the result of all comparisons as true/false mask values.


v128 Geo::VCompareLT


public: v128 VCompareLT
(
    v128Param a,
    v128Param b
)


Compares all corresponding elements to see if a < b.

Returns a mask with the result of all comparisons as true/false mask values.


v128 Geo::VCompareWithFlagsEquals


public: v128 VCompareWithFlagsEquals
(
    v128Param a,
    v128Param b,
    u32 & flags
)


Compares all corresponding elements to see if a == b (exact equals).

Returns a mask with the result of all comparisons as true/false mask values. It additionally sets flags to be a platform dependent value that encodes the result of the 4 comparisons. You can only use this flag value with the VTestFlags* functions. Do not assume any particular values of the flags as they vary between platforms. The flags enable you to branch from the result of a vpu comparison operation.


v128 Geo::VCompareWithFlagsGE


public: v128 VCompareWithFlagsGE
(
    v128Param a,
    v128Param b,
    u32 & flags
)


Compares all corresponding elements to see if a >= b.

Returns a mask with the result of all comparisons as true/false mask values. It additionally sets flags to be a platform dependent value that encodes the result of the 4 comparisions. You can only use this flag value with the VTestFlags* functions. Do not assume any particular values of the flags as they vary between platforms. The flags enable you to branch from the result of a vpu comparison operation.


v128 Geo::VCompareWithFlagsGT


public: v128 VCompareWithFlagsGT
(
    v128Param a,
    v128Param b,
    u32 & flags
)


Compares all corresponding elements to see if a > b.

Returns a mask with the result of all comparisons as true/false mask values. It additionally sets flags to be a platform dependent value that encodes the result of the 4 comparisons. You can only use this flag value with the VTestFlags* functions. Do not assume any particular values of the flags as they vary between platforms. The flags enable you to branch from the result of a vpu comparison operation.


v128 Geo::VCompareWithFlagsLE


public: v128 VCompareWithFlagsLE
(
    v128Param a,
    v128Param b,
    u32 & flags
)


Compares all corresponding elements to see if a <= b.

Returns a mask with the result of all comparisons as true/false mask values. It additionally sets flags to be a platform dependent value that encodes the result of the 4 comparisons. You can only use this flag value with the VTestFlags* functions. Do not assume any particular values of the flags as they vary between platforms. The flags enable you to branch from the result of a vpu comparison operation.


v128 Geo::VCompareWithFlagsLT


public: v128 VCompareWithFlagsLT
(
    v128Param a,
    v128Param b,
    u32 & flags
)


Compares all corresponding elements to see if a < b.

Returns a mask with the result of all comparisons as true/false mask values. It additionally sets flags to be a platform dependent value that encodes the result of the 4 comparisons. You can only use this flag value with the VTestFlags* functions. Do not assume any particular values of the flags as they vary between platforms. The flags enable you to branch from the result of a vpu comparison operation.


GEO_FORCE_INLINE v128 Geo::VConstruct


public: v128 VConstruct
(
    float x,
    float y,
    float z,
    float w
)


Construct a v128 from 4 floats. Fairly slow.


GEO_FORCE_INLINE v128 Geo::VConstructBitwise


public: v128 VConstructBitwise
(
    u32 x,
    u32 y,
    u32 z,
    u32 w
)


Re-intreprets 4 ints as floats and construct a vector from them.

This is for building a mask if you need one that this file doesn't provide (see below). It's also quite slow, so if you use the mask regularly you might want to declare a static aligned bit of memory and load the vector from that.


uint32x4_t Geo::VConstructU32


public: uint32x4_t VConstructU32
(
    u32 x,
    u32 y,
    u32 z,
    u32 w
)


Construct a uint32x4_t from 4 uint32s, without reinterpreting as floats. Result is a vector of uint32s.


v128 Geo::VCross3


public: v128 VCross3
(
    v128Param lhs,
    v128Param rhs
)


Cross the first 3 elements of each.

Providing the w element of both is finite the resulting w will be 0. If it is not finite the nan or inf will be passed through to the w. (NB: on PPU, w is just cleared.)


GEO_FORCE_INLINE v128 Geo::VCross3ZeroW


public: v128 VCross3ZeroW
(
    v128Param lhs,
    v128Param rhs
)


Cross the first 3 elements of each.

The w element will be set to zero. The w elements of the parameters are not considered. Prefer this if you are not sure if the w elements of your parameters are finite or not.


v128 Geo::VEulerAnglesFromQuaternion


public: v128 VEulerAnglesFromQuaternion
(
    Quat q
)


Converts quaternion into euler angles in XYZ order, stored in those components.


GEO_FORCE_INLINE Geo::v128 Geo::VFrac


public: Geo::v128 VFrac
(
    Geo::v128Param v
)


Returns the fractional part of each element of v.


v128 Geo::VGetMaskNotSignBit


public: v128 VGetMaskNotSignBit()


Returns a mask with everything but the 4 sign bits set.


v128 Geo::VGetMaskSignBit


public: v128 VGetMaskSignBit()


Returns a mask with just the 4 sign bits set.


bool Geo::VLeftOf2


public: bool VLeftOf2
(
    const Geo::v128 & a,
    const Geo::v128 & b,
    const Geo::v128 & c
)


Determines if the point 'c' is to the left of the line formed by joining 'a' and 'b'.


VectorD Geo::VLength


public: VectorD VLength
(
    VectorD v
)


Double precision vector operators.


GEO_FORCE_INLINE v128 Geo::VLoadAligned


public: v128 VLoadAligned
(
    const float * vecToLoad
)


Load a 4-float array from 16-byte aligned memory.

Cannot be null. NOTE: the memory must be aligned or this will crash.


GEO_FORCE_INLINE v128 Geo::VLoadUnaligned


public: v128 VLoadUnaligned
(
    const float * vecToLoad
)


Load a 4-float array from arbitrarily aligned memory. Cannot be null.


GEO_FORCE_INLINE v128 Geo::VMadd


public: Geo::v128 VMadd
(
    Geo::v128Param a,
    Geo::v128Param b,
    Geo::v128Param c
)


This is a vector multiply accumulate operation returning (a * b) + c.


GEO_FORCE_INLINE v128 Geo::VNegate


public: v128 VNegate
(
    v128Param v
)


Return -v. You can use the operator overload instead if you prefer.


v128 Geo::VNormaliseLuminance


public: v128 VNormaliseLuminance
(
    v128 colour
)


Normalise the intensity of a colour vector to have unit luminance.

If colour has no luminance (black, or infs/nans) then this returns black The alpha is always preserved.


GEO_FORCE_INLINE v128 Geo::VOpAnd


public: Geo::v128 VOpAnd
(
    Geo::v128Param lhs,
    Geo::v128Param rhs
)


This is a bitwise & operation.

You can use this with masks to perform a number of useful operations, including zeroing elements. For example: v128 xz = myVec & VGetMaskXZ();


GEO_FORCE_INLINE v128 Geo::VOpOnesCompl


public: Geo::v128 VOpOnesCompl
(
    Geo::v128Param v
)


This is a bitwise ~ operation.

You can use this with masks generate the opposite mask.


GEO_FORCE_INLINE v128 Geo::VOpOr


public: Geo::v128 VOpOr
(
    Geo::v128Param lhs,
    Geo::v128Param rhs
)


This is a bitwise | operation.

You can use this with masks to perform a number of useful operations, including combining vectors and setting sign bits. For example: v128 xyzw = xyonly | zwonly; v128 xznegated = myVec | (VGetMaskSignBit() & VGetMaskXZ());


GEO_FORCE_INLINE v128 Geo::VOpXor


public: Geo::v128 VOpXor
(
    Geo::v128Param lhs,
    Geo::v128Param rhs
)


This is a bitwise ^ operation.

You can use this with masks to perform a number of useful operations, including toggling sign bits and building masks. For example: v128 xySignsSwapped = myVec ^ (VGetMaskSignBit() & VGetMaskXY());


GEO_FORCE_INLINE v128 Geo::VPackX4


public: GEO_FORCE_INLINEGeo::v128 VPackX4
(
    const Geo::v128 & x,
    const Geo::v128 & y,
    const Geo::v128 & z,
    const Geo::v128 & w
)


Packs the X component from each of the four vectors into a single vector.


v128 Geo::VPerpendicular


public: v128 VPerpendicular
(
    v128Param v,
    float ep
)


Returns a vector perpendicular to v (with one of its components being zero).

Must pass a vector with at least one component > g_VecEpsilonF to avoid nasty interactions with VNormalise.


v128 Geo::VRecip


public: v128 VRecip
(
    v128Param v
)


Return 1.f / v. (inaccurate)


GEO_FORCE_INLINE v128 Geo::VRecipFast


public: v128 VRecipFast
(
    v128Param v
)


Return 1.f / v. (fast approximate where available. If not, implemented as VRecip)


v128 Geo::VRecipSqrt


public: v128 VRecipSqrt
(
    v128Param v
)


Return 1.f / sqrt(v). (inaccurate)


v128 Geo::VRecipSqrtFast


public: v128 VRecipSqrtFast
(
    v128Param v
)


Return 1.f / sqrt(v). (inaccurate)


v128 Geo::VReverse


public: v128 VReverse
(
    v128Param v
)


Reverses the order of the components from xyzw to wzyx.


bool Geo::VRightOf2


public: bool VRightOf2
(
    const Geo::v128 & a,
    const Geo::v128 & b,
    const Geo::v128 & c
)


Determines if the point 'c' is to the right of the line formed by joining 'a' and 'b'.


Geo::v128 Geo::VScaleAndAdd


public: Geo::v128 VScaleAndAdd
(
    const Geo::v128 & a,
    float s,
    const Geo::v128 & b,
    float t
)


Calculates a * s + b * t.


v128 Geo::VShuffle


public: v128 VShuffle
(
    v128Param v,
    int x,
    int y,
    int z,
    int w
)


Returns the specified permutation of the parameter vector. Any permutation is valid.


float Geo::VSignedArea2


public: float VSignedArea2
(
    const Geo::v128 & a,
    const Geo::v128 & b,
    const Geo::v128 & c
)


Calculates the signed area of the given triangle in 2D space (z-coordinates ignored)


Geo::v128 Geo::VSlerp2


public: Geo::v128 VSlerp2
(
    const Geo::v128 & a,
    const Geo::v128 & b,
    float t
)


Spherical linear interpolation between 'a' and 'b', with weight 't'.


GEO_FORCE_INLINE v128 Geo::VSqrt


public: v128 VSqrt
(
    v128Param v
)


Return sqrt(v). (more inaccurate than the reciprocal version on non-sse hardware)


bool Geo::VTestFlagsAllFalse


public: bool VTestFlagsAllFalse
(
    u32 flags
)


Tests the flags produced by the VCompareWithFlags* operations.

This returns true if all 4 comparisons were false.


bool Geo::VTestFlagsAllTrue


public: bool VTestFlagsAllTrue
(
    u32 flags
)


Tests the flags produced by the VCompareWithFlags* operations.

This returns true if all 4 comparisons were true.


bool Geo::VTestFlagsSomeFalse


public: bool VTestFlagsSomeFalse
(
    u32 flags
)


Tests the flags produced by the VCompareWithFlags* operations.

This returns true if one or more of the 4 comparisons were false.


bool Geo::VTestFlagsSomeTrue


public: bool VTestFlagsSomeTrue
(
    u32 flags
)


Tests the flags produced by the VCompareWithFlags* operations.

This returns true if one or more of the 4 comparisons were true.


GEO_FORCE_INLINE v128 Geo::VZero


public: v128 VZero()


A fully-zeroed out vector.


bool Geo::WillConvertToCurrentEndian


public: bool WillConvertToCurrentEndian
(
    EConvertEndianMode mode
)


Will a conversion of mode result in moving to the current platform? If the result is true, the (incoming) data should be swapped before use.

If the result is false, the (outgoing) data should be used before swapped. If the mode is ecemNone, the result is undefined.


bool Geo::WithinClosed


public: bool WithinClosed
(
    const T & x,
    const T & a,
    const T & b
)


A generic within function.

Template parameter T must be Comparable (i.e. totally ordered). This function returns true if x lies within the closed interval [a,b], false otherwise.


bool Geo::WriteArray


public: bool WriteArray
(
    IGeoStream & writer,
    const GeoArray< T * > & objects,
    Geo::u32 sections
)


Helper function to write a GeoArray to an IGeoStream.

Deals with arrays of pointers, the storage type must implement IGeoSerialisable (or at least have same function prototype)


bool Geo::WriteArray


public: bool WriteArray
(
    IGeoStream & writer,
    const GeoArray< T > & objects
)


Helper function to write a GeoArray to an IGeoStream. Deals with arrays of values.


bool Geo::WriteArray


public: bool WriteArray
(
    IGeoStream & writer,
    const GeoImmutableArray< T > & objects
)


Helper function to write a GeoImmutableArray to an IGeoStream. Deals with arrays of values.


bool Geo::WriteArray


public: bool WriteArray
(
    IGeoStream & writer,
    const GeoArray< T * > & objects
)


Helper function to write a GeoArray to an IGeoStream.

Deals with arrays of pointers, the storage type must implement IGeoSerialisable (or at least have same function prototype)


bool Geo::WriteArray


public: bool WriteArray
(
    IGeoStream & writer,
    const Geo::GeoArray< T * > & objects,
    TSaveFunction saver
)


Helper function to write a GeoArray to an IGeoStream.

Deals with arrays of pointers, the user must provide a TSaveFunction callable entity that writes the content of an object.


bool Geo::WriteArrayImpl


public: bool WriteArrayImpl
(
    Writer & writer,
    const T * first,
    const T * last
)


Write an array to the stream.


bool GEO_CALL Geo::WriteFileIfChanged


public: bool GEO_CALL WriteFileIfChanged
(
    GeoMemoryStream & ms,
    const char * filename
)


Save a GeoMemoryStream to disk, modifying the file only if the contents change (or the file didn't exist).


bool Geo::WriteMap


public: bool WriteMap
(
    IGeoStream & writer,
    const GeoMap< K, T > & map
)


Helper function to write a GeoMap to an IGeoStream.

Deals with arrays of values, the contained type must be considered blittable (see IsBlittable<T>).


void Geo::WriteObject


public: void WriteObject
(
    IGeoStream & writer,
    const Geo::GeoImmutableArray< T > & objects
)


WriteObject adapter for WriteArray.


void Geo::WriteObject


public: void WriteObject
(
    IGeoStream & writer,
    const Geo::GeoArray< T > & objects
)


WriteObject adapter for WriteArray.


void Geo::WriteObject


public: void WriteObject
(
    IGeoStream & stream,
    ArrayRange< T > range
)


Write a blittable range object to the stream.


void Geo::WriteObject


public: void WriteObject
(
    IGeoStream & stream,
    bool const & object
)


Ensure that boolean values are read/written 'efficiently' and portably.


void Geo::WriteObject


public: void WriteObject
(
    IGeoStream & stream,
    GeoString< char > const & object
)


Allow the IGeoStream implementation to treat a GeoString as a value object, so that you can call Read/Write as you would a fundamental type.


void Geo::WriteObject


public: void WriteObject
(
    IGeoStream & stream,
    const Geo::GeoPair< T1, T2 > & p
)


Write a GeoPair that is not blittable because it contains padding.


void Geo::WriteObject


public: void WriteObject
(
    Writer & ,
    const T &
)


default implementation of overloadable writer function


bool Geo::WriteObjectBinary


public: bool WriteObjectBinary
(
    const char * filename,
    const T & object,
    WritePolicy writePolicy
)


Write the object using the policy in binary form with the given filename.


bool Geo::WriteObjectDebug


public: bool WriteObjectDebug
(
    const char * filename,
    const T & object,
    WritePolicy writePolicy
)


Write the object using the policy in both binary and text form with the given filename.


void Geo::WriteProperty


public: void WriteProperty
(
    Geo::IGeoStream & stream,
    const char * name,
    const T & value,
    bool isFlaky
)


Write a blittable property.


void Geo::WriteProperty


public: void WriteProperty
(
    IGeoStream & stream,
    const char * name,
    ArrayRange< T > range
)


Write a range property to the stream.


void Geo::WriteRange


public: void WriteRange
(
    IGeoStream & stream,
    ArrayRange< T > range
)


Write a blittable range object to the stream.


void Geo::WriteRange


public: void WriteRange
(
    IGeoStream & stream,
    Iterator first,
    Iterator last
)


Write a range property to the stream.


bool Geo::WriteRangeImpl


public: bool WriteRangeImpl
(
    Writer & writer,
    const T * first,
    const T * last,
    GeoStd::FalseType isBlittable
)


Write a non-blittable range to the stream.

Write a blittable range to the stream.


void Geo::WriteStackDetails


public: void WriteStackDetails
(
    PCONTEXT pContext,
    bool bWriteVariables
)


============================================================

Walks the stack, and writes the results to the report file



Dimension3


public: enum Dimension3
{
    DIMENSION3_X = 0,
    DIMENSION3_Y = 1,
    DIMENSION3_Z = 2
}


An enumeration of the dimensions of 3D space.

enumerators
DIMENSION3_X
DIMENSION3_Y
DIMENSION3_Z


eBoxLocation


public: enum eBoxLocation
{
    BL_IN_FRONT,
    BL_BEHIND,
    BL_INTERSECTS,
    NUM_BOX_LOCATIONS
}


Location of a box relative to a plane.

enumerators
BL_IN_FRONT
BL_BEHIND
BL_INTERSECTS
NUM_BOX_LOCATIONS


EConvertEndianMode


public: enum EConvertEndianMode
{
    ecemNone = 0,
    ecemLittleToBig = 1,
    ecemBigToLittle = 2,
    ecemLittleToNative = ecemNone,
    ecemBigToNative = ecemBigToLittle,
    ecemNativeToLittle = ecemNone,
    ecemNativeToBig = ecemLittleToBig
}


Enumeration used to control behaviour of various endian swapping functions.

Determines the direction of the conversion operation.

enumerators
ecemNone
ecemLittleToBig
ecemBigToLittle
ecemLittleToNative
ecemBigToNative
ecemNativeToLittle
ecemNativeToBig


ECpuGpuMode


public: enum ECpuGpuMode
{
    ertCpuShared = 0,
    ertCpuExclusive,
    ertDefault = ertCpuShared
}


Controls how the hardware is used by Enlighten to generate precompute data.

enumerators
ertCpuShared

Use CPU only. Allow multiple concurrent tasks between separate processes.

ertCpuExclusive

Use CPU only. Block task if another Enlighten precompute task is running.

ertDefault

Default is to use CPU only.


eCpuVendor


public: enum eCpuVendor
{
    CPU_VENDOR_UNKNOWN = 0,
    CPU_VENDOR_INTEL,
    CPU_VENDOR_AMD
}


PC CPU vendors.

enumerators
CPU_VENDOR_UNKNOWN
CPU_VENDOR_INTEL
CPU_VENDOR_AMD


eGeoErrorSeverity


public: enum eGeoErrorSeverity
{
    ES_WARNING = 0,
    ES_FATAL = 1
}


The severity of an error.

enumerators
ES_WARNING
ES_FATAL


eGeoLogMsgType


public: enum eGeoLogMsgType
{
    LOG_INFO = 1,
    LOG_DEBUG = 2,
    LOG_STATUS = 4,
    LOG_WARN = 8,
    LOG_FATAL = 16,
    LOG_ASSERT = 32
}


enum eGeoLogMsgType

The message logger knows about different kinds of log message.

Messages are expected to be formatted for output, and in particular should contain trailing line feed characters ("\n") where necessary. It is up to a particular logger handler to translate these into the correct convention for it's use, for example replacing "\n" with "\r\n" when writing to Windows files.

Note: If you add new message remember to preinitialise the LastLogHandler[] array as this will be missed by the compiler! Note: These should be arranged in the order of the frequency at which each message type is expected to be generated, with more frequent first.

enumerators
LOG_INFO

General messages: general information, and other output messages.

LOG_DEBUG

Debug messages: specifically to aid development, usually stripped from release code.

LOG_STATUS

Status messages: specific formatting to enable later processing, used for timing/etc.

LOG_WARN

Warning messages: should be paid attention to, but the program usually continues.

LOG_FATAL

Critical messages: error messages, usually generated to indicate why the program cannot proceed.

LOG_ASSERT

Assert message text: caused by an assertion failure.


ePlatform


public: enum ePlatform
{
    GEO_PLATFORM_WINDOWS,
    GEO_PLATFORM_OSX,
    GEO_PLATFORM_LINUX,
    GEO_PLATFORM_XBOX_ONE,
    GEO_PLATFORM_XSX,
    GEO_PLATFORM_PS4,
    GEO_PLATFORM_IOS,
    GEO_PLATFORM_ANDROID,
    GEO_PLATFORM_LINUX_ARM,
    GEO_PLATFORM_ANDROID_INTEL,
    GEO_PLATFORM_SWITCH,
    GEO_PLATFORM_UNKNOWN
}


Enumeration for those cases at runtime that we need to do separate functionality for each platform.

enumerators
GEO_PLATFORM_WINDOWS

Windows-based PCs (x86, x64, vista, 7, etc)

GEO_PLATFORM_OSX

Mac OSX (x86, x64)

GEO_PLATFORM_LINUX

Linux-based desktop PC.

GEO_PLATFORM_XBOX_ONE

Xbox One.

GEO_PLATFORM_XSX

Xbox Series X.

GEO_PLATFORM_PS4

PlayStation 4.

GEO_PLATFORM_IOS

iOS

GEO_PLATFORM_ANDROID

Android (ARM)

GEO_PLATFORM_LINUX_ARM

Linux-based ARM device.

GEO_PLATFORM_ANDROID_INTEL

Android (x86)

GEO_PLATFORM_SWITCH

Nintendo Switch.

GEO_PLATFORM_UNKNOWN

Unknown platform.


ePointLocation


public: enum ePointLocation
{
    PL_IN_FRONT,
    PL_BEHIND,
    PL_COPLANAR,
    NUM_POINT_LOCATIONS
}


Location of a point relative to a plane.

enumerators
PL_IN_FRONT
PL_BEHIND
PL_COPLANAR
NUM_POINT_LOCATIONS


eRTAPI


public: enum eRTAPI
{
    RTAPI_EMBREE,
    RTAPI_NUM_API
}


Ray-tracing APIs.

enumerators
RTAPI_EMBREE
RTAPI_NUM_API


eVShufflePosition


public: enum eVShufflePosition
{
    VSHUF_X = 0,
    VSHUF_Y = 1,
    VSHUF_Z = 2,
    VSHUF_W = 3
}


Shuffle constants for the GEO_VSHUFFLE macro.

enumerators
VSHUF_X
VSHUF_Y
VSHUF_Z
VSHUF_W


GeoFSeekOrigin


public: enum GeoFSeekOrigin
{
    GEO_SEEK_SET = 0,
    GEO_SEEK_CUR = 1,
    GEO_SEEK_END = 2
}


To avoid pulling in the entire stdio header, use our own values for GeoFSeek.

enumerators
GEO_SEEK_SET

Seek from beginning of file (SEEK_SET)

GEO_SEEK_CUR

Seek from current position (SEEK_CUR)

GEO_SEEK_END

Seek from end of file (SEEK_END)


PackedIntegerSize


public: enum PackedIntegerSize
{
    PACKEDINTEGERSIZE_1 = 0,
    PACKEDINTEGERSIZE_2 = 1,
    PACKEDINTEGERSIZE_4 = 2,
    PACKEDINTEGERSIZE_8 = 3,
    PACKEDINTEGERSIZE_16 = 4
}


The number of bits into which an integer is packed.

enumerators
PACKEDINTEGERSIZE_1
PACKEDINTEGERSIZE_2
PACKEDINTEGERSIZE_4
PACKEDINTEGERSIZE_8
PACKEDINTEGERSIZE_16


Sign


public: enum Sign
{
    SIGN_POSITIVE = 0,
    SIGN_NEGATIVE = 1
}


A sign bit.

enumerators
SIGN_POSITIVE
SIGN_NEGATIVE