GL Studio C++ Runtime API
disti Namespace Reference

Classes

class  AttributeChangedEventEmitter
 
class  AttributeChangedNotifier
 
class  AttributeFnCallback
 
class  AttributeMethodCallback
 
class  AttributeName
 
class  AttributeObserver
 
class  AttributeResourceCallback
 
class  BmpImageLoader
 
class  CallbackAttributeNotifier
 
class  CallbackMethodCallerBase
 
class  CallbackMethodCallerTemplate
 
class  ComponentBase
 
class  ComponentLightMgr
 
class  Culler
 
class  DDSImageLoader
 
struct  DDSTextureInfo
 
class  DisplayEvent
 
class  DisplayFrame
 
class  DisplayObject
 
class  DistiAttribDict
 
class  DistiAttribute
 
class  DistiAttributeAlias
 
class  DistiAttributeAlphaModeEnum
 
class  DistiAttributeBase
 
class  DistiAttributeColorMaterialModeEnum
 
class  DistiAttributeConnectionGlsAngularScaleDataArray
 
class  DistiAttributeConnectionGlsLinearScaleDataArray
 
class  DistiAttributeCWDRelativePath
 
class  DistiAttributeDictionaryAttribute
 
class  DistiAttributeDictionaryAttributeSibling
 
class  DistiAttributeDoubleArray
 
class  DistiAttributeDynamicArray
 
class  DistiAttributeEncodedStdString
 
class  DistiAttributeEncodedString
 
class  DistiAttributeEnum
 
class  DistiAttributeEnumDefList
 
class  DistiAttributeEnumDirect
 
class  DistiAttributeEnumStringPair
 
class  DistiAttributeFilePathClass
 
class  DistiAttributeFixedString
 
class  DistiAttributeFloatArray
 
class  DistiAttributeFovConstraintTypeEnum
 
class  DistiAttributeHomogeneousItemArray
 
class  DistiAttributeImageCodecEnum
 
class  DistiAttributeLightTypeEnum
 
class  DistiAttributeLocation
 
class  DistiAttributeMeshFaceArray
 
class  DistiAttributeNeverWrite
 
class  DistiAttributePolyEndEnum
 
class  DistiAttributePolyModeEnum
 
class  DistiAttributeProperty
 
class  DistiAttributeProtectionEnum
 
class  DistiAttributeShadingEnum
 
class  DistiAttributeSphereMappingTypeEnum
 
class  DistiAttributeStdMap
 
class  DistiAttributeStdString
 
class  DistiAttributeStdVector
 
class  DistiAttributeString
 
class  DistiAttributeTextureFilterEnum
 
class  DistiAttributeTextureModeEnum
 
class  DistiAttributeTexturePointArray
 
class  DistiAttributeUCharOrBool
 
class  DistiAttributeVertexArray
 
class  DistiAttributeVertexArray< Vertex >
 
class  DistiAttributeViewDataArray
 
class  DistiEmptyAttribute
 
class  DistiException
 
class  DynamicArray
 
class  DynamicLibrary
 
class  EditorObjectBase
 
class  Effect_DiffNormSpecRefl
 
class  Effect_DirectXShader
 
class  EmbeddedDisplayFrame
 
class  EventCompressor
 
class  EyePointCalcViewCallback
 
class  EyePointCalcViewCallbackBase
 
class  FilePathClass
 
class  FrameBufferUtility
 
class  GifImageLoader
 
struct  GLMeshFace
 Structure for holding mesh vertex indices. More...
 
struct  GLMeshVertex
 
class  GlobalLightMgr
 
class  GLPolygon
 The Polygon class. Implements Polygons. More...
 
class  GLPolygonGlyph
 
class  Gls3DCable
 
class  GlsAdvancedMesh
 
class  GlsAngularScale
 
class  GlsAngularScaleData
 
class  GlsArialRegular12
 A font wrapped up for consumption by GL Studio. More...
 
class  GlsBuiltVersionInfo2
 
class  GlsClippingGroup
 
class  GlsColor
 
class  glsCommandLine
 
class  GlsCTLTextBox
 The Gls CTL (Complex Text Layout) Text Box. More...
 
class  GlsCylinder
 
class  glsDisplayFrame
 
class  GlsDisplayList
 
class  GlsDynamicPath
 
class  GlsEffect
 
class  GlsEffectFactory
 
class  GlsEllipse
 
class  GlsEyePoint
 
class  GlsFontBase
 
class  GlsFontMan
 
class  GlsFontRenderer
 
class  GlsGeometry_Generic
 
class  GlsGeometryResource
 
class  GlsGeometryResourceMesh
 
class  GlsGlobals
 Hold global objects so we can control order of destruction. More...
 
class  GlsGloFile
 
class  GlsGloFileAttribute
 
class  GlsGloFileNotFoundException
 
class  GlsIndexArray
 
struct  glsInlineImage
 
class  GlsKnob
 
class  GlsLightSource
 
class  GlsLinearFloatController
 
class  GlsLinearScale
 
class  GlsLinearScaleData
 
class  GlsLodGroup
 
class  GlsMatrix
 
class  GlsMatrixAffine
 
class  GlsMimicGroup
 
class  GlsMovieTexture
 
class  GlsMovingEye
 
class  GlsMultiVal
 
class  GlsMultiValBase
 
class  GlsMultiView
 
class  GlsMutexGroup
 
class  GlsNinePatch
 
class  GlsNurbCurve
 
class  GlsOdometer
 
class  GlsPainter
 
class  GlsPathManager
 
class  GlsPolyLine
 
struct  GlsPolyLineFace
 
struct  GlsPolyLineVertex
 
class  GlsPropString
 
class  GlsPropStringQuoted
 
class  GlsPushButton
 
class  GlsQuadListVC_3D
 
class  GlsQuadListVCT_2D
 
class  GlsQuaternion
 
class  GlsRenderEffect
 
class  GlsRenderViewChangeListener
 
class  GlsRenderViewChangeManager
 
class  GlsResourceFileMgr
 
class  GlsResourceFilter
 
class  GlsRSO1_ResourceFilterImpl
 
class  GlsRSOInterface1Impl
 
class  GlsRSOInterface2Impl
 
class  GlsRSOInterface3Impl
 
class  GlsRSOInterfaceImpl
 
class  GlsRSOWrapper
 
class  GlsRuntimeFontBase
 
class  GlsSchematicPolyLineInterconnect
 
class  GlsSchematicTeeInterconnect
 
class  GlsSerialMorphMesh
 
class  GlsSortedDrawable
 
class  GlsSortedDrawGroup
 
class  GlsSphere
 
class  GlsStateManager
 
class  GlsSwitch
 
class  GlsText
 
class  GlsTextBox
 
class  GlsTextCharAttr
 
class  GlsTextGrid
 
class  GlsThumbWheel
 
class  GlsTriangleStrip2D
 
class  GlsUnicodeFontBase
 
class  GlsUnicodeFontDBUFReader
 
class  GlsUniform
 
class  GlsVertexArray
 
class  GlsVideoToTexture
 
class  GLTriMesh
 The glTriMesh class. Implements Triangle Meshes. More...
 
class  Group
 
class  IFloatController
 
interface  IFontImage
 
interface  IGlsEffectFactory
 
interface  IGlsStateManager
 
interface  IGlsStateManagerES20
 
class  Image
 
struct  InlinePixmap
 
class  InputHandler
 
class  InterfaceDescriptionClass
 
class  JpegImageLoader
 
class  KeyboardCallbackBase
 
class  KeyboardEvent
 
class  KeyboardMethodCallback
 
class  List_c
 
class  ListItem
 
class  LiveComponentAccessor
 
class  LiveComponentLibRef
 
class  LocationEvent
 
class  Material
 
struct  MaxDigits10
 
struct  MaxDigits10< double >
 
struct  MaxDigits10< float >
 
struct  MaxDigits10< long double >
 
class  MessageDialogs
 
class  MouseCallbackBase
 
class  MouseEvent
 
class  MouseMethodCallback
 
class  Mutex
 
class  NonCopyable
 
class  ObjectEvent
 
class  OpenGLMatrices
 Class to contain current OpenGL view, projection and draw matrices. More...
 
class  OpenGLWindow
 
class  PlaneClass
 
class  Plugin
 
class  PngImageLoader
 
class  PreciseVertex
 
class  PsdImageLoader
 
class  RgbImageLoader
 
class  RSOInterface1
 
class  RSOInterface2
 
class  RSOInterface3
 
class  RSOInterface4
 
class  RSOInterface5
 
class  RSOResourceFilterImpl
 
class  RuntimeDisplayFrame
 
class  RuntimeMessageDialogs
 
class  ScopedPtr
 
class  SoundSystem
 
class  SplashDisplay
 
class  Statistics
 
class  TextureLoader
 
class  TextureLoaderList
 
class  TexturePalette
 
class  TexturePaletteEntry
 
class  TgaImageLoader
 
class  TiffImageLoader
 
class  Timer
 
class  TraverseGroup
 
struct  V2f
 
struct  V2f_C4ub
 
struct  V2f_T2f
 
struct  V2f_T2f_C4ub
 
struct  V3f_C4ub
 
class  Vertex
 
class  VertexAttribIndexLookup
 
class  VertexNoColor
 
class  WeakRef
 
class  WeakReference
 
class  WeakReferenceable
 
class  WeakReferenceableMixin
 
class  XpmImageLoader
 

Typedefs

typedef DynamicArray< MaterialDynamicMaterialArray
 
typedef void(* DistiAssertHandler) (const char *errMessage)
 
typedef GlsColor glsColor
 Alias for backwards compatibility.
 
typedef VertexNoColor Vector
 

Enumerations

enum  TextureMap_e { TEXTURE_MAP_MODULATE, TEXTURE_MAP_DECAL, TEXTURE_MAP_BLEND, TEXTURE_MAP_REPLACE }
 
enum  TextureFilter_e {
  TEXTURE_FILTER_NEAREST, TEXTURE_FILTER_LINEAR, TEXTURE_FILTER_NEAREST_MIPMAP_NEAREST, TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR,
  TEXTURE_FILTER_NEAREST_MIPMAP_LINEAR, TEXTURE_FILTER_LINEAR_MIPMAP_NEAREST
}
 
enum  DepthBuffer_e { , DEPTH_BUFFER_TEST_NO_WRITE, DEPTH_BUFFER_NO_TEST_AND_WRITE }
 
enum  PolygonMode_e {
  POLY_MODE_UNDEFINED, POLY_MODE_POINTS, POLY_MODE_OUTLINE, POLY_MODE_FILLED,
  POLY_MODE_FILL_AND_OUTLINE
}
 
enum  AlphaMode_e { ALPHA_MODE_UNDEFINED, ALPHA_MODE_OPAQUE, ALPHA_MODE_2_LEVEL, ALPHA_MODE_256_LEVEL }
 
enum  PolygonClose_e { POLY_OPEN, POLY_CLOSED }
 
enum  ShadingType_e { SHADING_FLAT, SHADING_GOURAUD }
 
enum  MemberAccess_e { PUBLIC, PRIVATE, PROTECTED }
 
enum  RedrawBehavior_e { REDRAW_CONDITIONAL, REDRAW_CONSTANT, REDRAW_CONTINUOUS }
 
enum  PickableType_e { PICK_NEVER, PICK_FIRST, PICK_BEST, PICK_ALWAYS }
 
enum  ColorMaterialMode_e {
  NO_COLOR_MATERIAL, DIFFUSE_COLOR_MATERIAL, AMBIENT_COLOR_MATERIAL, DIFFUSE_AND_AMBIENT_COLOR_MATERIAL,
  EMISSION_COLOR_MATERIAL, SPECULAR_COLOR_MATERIAL
}
 
enum  Views
 
enum  GLS_Initializers
 
enum  EventType_e {
  EVENT_MOUSE, EVENT_KEYBOARD, EVENT_TIMER, EVENT_OBJECT,
  EVENT_KEYBOARD_UP
}
 
enum  MouseEventType_e {
  MOUSE_DOWN, MOUSE_UP, MOUSE_MOVE, MOUSE_DRAG,
  MOUSE_LEAVE, MOUSE_ENTER, MOUSE_WHEEL_MINUS, MOUSE_WHEEL_PLUS,
  MOUSE_RECEIVE_MULTITOUCH, MOUSE_CANCEL, MOUSE_DOUBLE
}
 
enum  MouseButtonType_e { MOUSE_LBUTTON = 1, MOUSE_MBUTTON = 2, MOUSE_RBUTTON = 4, MOUSE_BUTTON_ANY = 7 }
 
enum  SpecialKeyState_e
 
enum  GLS_Cylinder_Initializers
 
enum  StdUniforms_e
 
enum  StdAttribs_e
 
enum  GLS_EyePoint_Initializers
 
enum  LightType_e
 
enum  GLS_LightSource_Initializers
 
enum  glsSphereMapping_e { GLS_SPHERE_SPHERICAL_MAP, GLS_SPHERE_CYLINDER_MAP }
 
enum  GLS_Sphere_Initializers
 
enum  InputOrientationEnum
 Enumeration for Input Operators.
 
enum  InputPositionEnum
 Enumeration for Input Operators.
 
enum  glsImageCodec { GLS_CODEC_RAW, GLS_CODEC_LZ77, GLS_CODEC_JPEG }
 
enum  ImageNPOTMode { GLS_NPOT_AUTO, GLS_NPOT_ENABLED, GLS_NPOT_DISABLED }
 
enum  ListIteratorDirection
 
enum  TextureState_e { TEXTURE_UNUSED, TEXTURE_IGNORED, TEXTURE_INVALID, TEXTURE_VALID }
 
enum  GlsDefinedColorEnum
 
enum  RotationAxis { X_AXIS, Y_AXIS, Z_AXIS }
 

Functions

void SetAbsolutePlacementDefault (bool value)
 
bool GetAbsolutePlacementDefault ()
 
std::string GetComponentDirectory (void *module)
 
DXGI_FORMAT GetDXGIFormat (const DDS_PIXELFORMAT &ddpf)
 
D3DFORMAT GetD3D9Format (const DDS_PIXELFORMAT &ddpf)
 
void DistiAssertDebug (const char *expression, const char *filename, unsigned int lineNumber)
 
void DistiAssertRelease (const char *expression, const char *filename, unsigned int lineNumber)
 
void GlsVerify (const char *expression, const char *filename, unsigned int lineNumber)
 
void GlsAssert (const char *expression, const char *filename, unsigned int lineNumber)
 
template<class T >
T * ValidatePointer (const T *const p)
 
std::ostream & operator<< (std::ostream &outstr, const AttributeName &name)
 Defines the stream out operator.
 
bool operator== (const AttributeName &attr1, const AttributeName &attr2)
 
bool operator!= (const AttributeName &attr1, const AttributeName &attr2)
 
bool operator== (const AttributeName &lName, const char *rName)
 Defines various == operators which makes the users syntax easier.
 
template<class Class >
AttributeObserverCreateAttributeMethodCallback (Class *const obj, const typename AttributeMethodCallback< Class >::Callback method)
 
template<class Class >
AttributeObserverCreateAttributeResourceCallback (Class *const obj, const char *attributeName)
 
template<class T >
void SetAndNotifyIfChanged (AttributeChangedNotifier *object, T &property, const T &newValue, const AttributeName &name)
 
DistiAttribDict::const_iterator begin (const DistiAttribDict &dict)
 
template<class T , bool Obsolete, class U >
unsigned FindIndexOf (const DynamicArray< T, Obsolete > &array, const U &object)
 
template<class T , bool Obsolete>
void DeleteEachAndClear (DynamicArray< T, Obsolete > &array)
 
template<class T , bool Obsolete>
T * begin (DynamicArray< T, Obsolete > &array)
 Overload begin() so that range-for loops and other constructs work with DynamicArray.
 
template<class T , bool Obsolete>
const T * begin (const DynamicArray< T, Obsolete > &array)
 Overload begin() so that range-for loops and other constructs work with DynamicArray.
 
template<class T , bool Obsolete>
T * end (DynamicArray< T, Obsolete > &array)
 Overload end() so that range-for loops and other constructs work with DynamicArray.
 
template<class T , bool Obsolete>
const T * end (const DynamicArray< T, Obsolete > &array)
 Overload end() so that range-for loops and other constructs work with DynamicArray.
 
template<class T , bool Obsolete>
void DeleteArraysAndClear (DynamicArray< T, Obsolete > &array)
 
void EmitObjectEvent (DisplayObject *self, ObjectEvent *event)
 
void EmitObjectEvent (DisplayObject *self, const char *eventName, const char *eventData=NULL)
 
bool ObjectEventIs (DisplayEvent *event, const char *eventName, const char *eventData=NULL)
 
bool OnKeyEvent (KeyboardEvent *kev, bool alphaNumeric, int key, int modifierMask=0)
 
template<class Type >
Vector DecomposeScale (const GlsMatrix< Type, 4 > &m)
 
template<class Type >
GlsMatrix< Type, 4 > DecomposeRotationMatrix (const GlsMatrix< Type, 4 > &matrix, const Vector &scale)
 
template<class Type >
void DecomposeMatrix (const GlsMatrix< Type, 4 > &matrix, Vector &scale, Vector &location, GlsQuaternion< Type > &rotation)
 
template<typename Type , class Class >
DistiAttributeProperty< Class, Type, Type > * CreateDistiAttributeProperty (const AttributeName &attrName, Class *const obj, const typename DistiAttributeProperty< Class, Type, Type >::SetMethodType setMethod, const typename DistiAttributeProperty< Class, Type, Type >::GetMethodType getMethod=NULL)
 
template<typename Type , class Class >
DistiAttributeProperty< Class, Type, Type > * CreateDistiAttributeProperty (const AttributeName &attrName, Class *const obj, const typename DistiAttributeProperty< Class, Type, Type >::SetMethodType setMethod, const typename DistiAttributeProperty< Class, Type, Type >::GetMethodConstType getMethod)
 
template<typename Type , class Class >
DistiAttributeProperty< Class, Type > * CreateDistiAttributeProperty (const AttributeName &attrName, Class *const obj, const typename DistiAttributeProperty< Class, Type >::GetMethodConstType getMethod)
 
template<typename Type , class Class >
DistiAttributeProperty< Class, Type > * CreateDistiAttributeProperty (const AttributeName &attrName, Class *const obj, const typename DistiAttributeProperty< Class, Type >::GetMethodType getMethod)
 
template<typename Type , class Class >
DistiAttributeProperty< Class, Type, const Type & > * CreateDistiAttributeProperty (const AttributeName &attrName, Class *const obj, const typename DistiAttributeProperty< Class, Type, const Type & >::SetMethodType setMethod, const typename DistiAttributeProperty< Class, Type, const Type & >::GetMethodType getMethod=NULL)
 
template<typename Type , class Class >
DistiAttributeProperty< Class, Type, const Type & > * CreateDistiAttributeProperty (const AttributeName &attrName, Class *const obj, const typename DistiAttributeProperty< Class, Type, const Type & >::SetMethodType setMethod, const typename DistiAttributeProperty< Class, Type, const Type & >::GetMethodConstType getMethod)
 
template<typename GetReturnT , typename SetArgT , class Class >
DistiAttributeProperty< Class, GetReturnT, SetArgT > * CreateDistiAttributeProperty (const AttributeName &attrName, Class *const obj, const typename DistiAttributeProperty< Class, GetReturnT, SetArgT >::SetMethodType setMethod, const typename DistiAttributeProperty< Class, GetReturnT, SetArgT >::GetMethodType getMethod)
 
template<class Class >
DistiAttributeProperty< Class, Vector, const Vertex &, const Vertex & > * CreateDistiAttributePropertyVertexToVector (const AttributeName &attrName, Class *const obj, const typename DistiAttributeProperty< Class, Vector, const Vertex &, const Vertex & >::SetMethodType setMethod, const typename DistiAttributeProperty< Class, Vector, const Vertex &, const Vertex & >::GetMethodConstType getMethod)
 
GlsRuntimeFontBaseGetGlsRuntimeFontBase (const GlsFontBase *font)
 
const GlsUnicodeFontBaseGetGlsUnicodeFontBase (const GlsFontBase *font)
 
float AngularDistance (float angle1, float angle2)
 
float AngularDistanceAbs (float angle1, float angle2)
 
void GetDigits (int source, int *_1, int *_2=NULL, int *_3=NULL, int *_4=NULL, int *_5=NULL, int *_6=NULL, int *_7=NULL, int *_8=NULL)
 
void ChangeNeedle (DisplayObject *obj, const float value, float gauge_values[][2], const int segments)
 Rotates a needle on a non-linear scale Rotates a needle object to the degree amount determined by the given value relative to the minimum and maximum values. Use multiple segments to map a gauge with a non-linear readout. More...
 
int RampInt (double time, int min, int max)
 
bool RampBool (double time)
 
float RampFloat (double time, float min, float max)
 
double RampDouble (double time, double min, double max)
 
float Interpolate (const float value, float gauge_values[][2], const int segments)
 Interpolates based on the specified array. More...
 
void ChangeHStrip (DisplayObject *obj, float value, const float min, const float max, float refPt, const float locAtMin, const float locAtMax)
 Moves an object horizontally based on the given values. Moves a digit strip horizontally to the location determined by the given value relative to the minimum and maximum values. More...
 
void ChangeVStrip (DisplayObject *obj, float value, const float min, const float max, const float refPt, const float locAtMin, const float locAtMax)
 Moves an object vertically based on the given values. Moves a digit strip vertically to the location determined by the given value relative to the minimum and maximum values. More...
 
void ChangeHTexture (DisplayObject *obj, const float unit_movement, const float min_units, const float max_units, float units, const float starting_x)
 
void ChangeVTexture (DisplayObject *obj, const float unit_movement, const float min_units, const float max_units, float units, const float starting_y)
 Move a texture within an object to make the object appear to be moving in a Vertical direction. Useful for instruments with moving digits. Assumptions: The Texture cannot be rotated, The object cannot be flipped, or reversed Min value is on the bottom side of the texture Max value is on the top side of the texture The Texture height and width must be powers of 2! More...
 
int CalcSwitchPosDCS (DisplayObject *self, DisplayEvent *ev, InputOrientationEnum inputType, int numPositions, float scale=1.0f)
 
DisplayObjectPtrbegin (Group &group)
 Overload begin() so that range-for loops and other constructs work with Group.
 
const DisplayObjectPtrbegin (const Group &group)
 Overload begin() so that range-for loops and other constructs work with Group.
 
DisplayObjectPtrend (Group &group)
 Overload begin() so that range-for loops and other constructs work with Group.
 
const DisplayObjectPtrend (const Group &group)
 Overload begin() so that range-for loops and other constructs work with Group.
 
void SetNPOTState (ImageNPOTMode state)
 
ImageNPOTMode DoesSystemSupportNPOT ()
 
void SetReleaseImageDataDefault (bool enable)
 
bool GetReleaseImageDataDefault (void)
 
template<class Class >
KeyboardCallbackBaseCreateInputHandlerCallback (const typename KeyboardMethodCallback< Class >::Callback method, Class *const obj)
 
template<class Class >
MouseCallbackBaseCreateInputHandlerCallback (const typename MouseMethodCallback< Class >::Callback method, Class *const obj)
 
std::ostream & operator<< (std::ostream &outstr, const Material &mat)
 
std::istream & operator>> (std::istream &instr, Material &mat)
 
void EnableDialogs (bool)
 
void PopupsUseCommandLine (bool)
 
void MsgBox (const char *s,...)
 
void Error (const char *s,...)
 
void Error_NoVarArg (const char *s)
 
int Question (const char *s,...)
 
int Choice (const char *b0, const char *b1, const char *b2, const char *s,...)
 
int ChoiceWithDefault (const char *b0, const char *b1, const char *b2, const int defaultChoice, const char *s,...)
 
GroupTessellate (Group *obj_list, CreateGroupFunc, CreatePolyFunc, DecomposeFunc)
 
GroupTessellate (Group *object_list, int tesstype, CreateGroupFunc, CreatePolyFunc, DecomposeFunc)
 
GroupTessellateGlyph (Group *obj_list, CreateGroupFunc, CreatePolyFunc, DecomposeFunc)
 
template<class X , class X1 , class X2 >
bool BETWEEN (const X &x, const X1 &x1, const X2 &x2)
 
template<class X >
bool IS_NEGATIVE (const X &x)
 
template<class X >
bool IS_POSITIVE (const X &x)
 
template<class X >
bool CloseToZero (const X x, const X threshold=X(1e-1))
 
template<class X >
bool VeryCloseToZero (X x)
 
template<class X >
bool IsNearZero (X x)
 
template<class X >
bool IS_ZERO (X x)
 
float OpenGLVersion ()
 
unsigned char * GlsDefinedColor (GlsDefinedColorEnum index)
 
void ChangeGlsDefinedColor (GlsDefinedColorEnum index, unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha)
 
template<class T1 , class T2 >
bool Equal (T1 x, T2 y, float precision=0.001f)
 
template<class T >
const T & Min (const T &x, const T &y)
 
template<class T >
const T & Max (const T &x, const T &y)
 
template<class T , class Pred >
const T & Min (const T &x, const T &y, Pred pr)
 
template<class T , class Pred >
const T & Max (const T &x, const T &y, Pred pr)
 
template<class T >
GlsMatrixAffine< T > FindCoordinateTransformation (const Vector &new_origin, const Vector &new_i, const Vector &new_j, const Vector &new_k)
 
bool GetObjectCoordinatesTransformSameView (DisplayObject *from, DisplayObject *to, GlsMatrixType *outTransform)
 
DisplayFrameGetTopLevelDisplayFrame (DisplayFrame *frame)
 
bool GetObjectCoordinatesTransform (DisplayObject *from, DisplayObject *to, GlsMatrixType *outTransform)
 
bool NotColinear (const Vector &a, const Vector &b, const Vector &c)
 
bool FindNonColinearVertices (int arraySize, Vector array[], int &index1, int &index2, int &index3, bool isVectorArray=true)
 
bool FindNonColinearVertices (int arraySize, Vertex array[], int &index1, int &index2, int &index3)
 
bool CalculateTexPointsFromTexCoords (DisplayObject *object)
 
int EncodeString (char *dest, const char *src, const int dest_str_length)
 
std::string EncodeString (const std::string &src)
 
int EncodedStringMinLength ()
 
int C_EncodeString (char *dest, const char *src, const int dest_str_length)
 
std::string C_EncodeString (const std::string &src)
 
int DecodeString (char *dest, const char *src, const int dest_str_length)
 
std::string DecodeString (const std::string &src)
 
int range_check (int num, double val,...)
 
int Safe_fopen (const char *filename, char *flags, FILE **f)
 
int Safe_fopen (const char *filename, char *flags, std::fstream &outstr)
 
void PushResourcePath (const char *resourcePath)
 
void PopResourcePath ()
 
void PushResourceFinder (std::string(*finder)(const std::string &))
 
std::string ResolvePath (const char *path)
 
FILE * gls_fopen (const char *filename, const char *flags)
 
std::string ResolveRuntimeResourcePath (const char *fileName)
 
bool FileExists (const char *filename)
 
bool IsDirectory (const char *filename)
 
std::string FileExtension (const std::string &filepath)
 
std::string FileName (const std::string &filepath)
 
std::string FilePath (const std::string &filepath)
 
const char * GetFilePath (const char *name)
 
char * GetFileName (const char *name)
 
void AppendTrailingSlash (char *s)
 
void AppendTrailingSlash (std::string &s)
 
char * PathToOS (const char *path)
 
std::string GetExtension (const std::string &filename)
 
const char * GetBaseName (const char *path)
 
char * GetBaseName (char *path)
 
void RemoveDoubleSlashes (char *path, char slash= '/')
 
void RemoveSpaces (std::string &entry)
 
float AngularDistanceDeg (float angle1, float angle2)
 
float AngularDistanceRad (float angle1, float angle2)
 
bool GetComponentClassNames (const char *dllFileName, DynamicArray< std::string > &nameList, const char *createClassTag="CreateComponent_")
 
std::string GetDefaultComponentClassName (const char *dllFileName)
 
std::string GetQualifiedInstanceName (const DisplayFrame *topFrame, const DisplayObject *obj)
 
std::string Uppercase (const std::string &str)
 
bool CheckDistiLicense (const char *licenseGroupName, const char *feature, const char *version, bool quiet)
 
void GlsGetOrtho (GlsMatrixType &m, double left, double right, double bottom, double top, double zNear, double zFar)
 
void GlsGetPerspective (GlsMatrixType &m, double fovy, double aspect, double zNear, double zFar)
 
int IntersectionVectorAndPlane (VertexNoColor &point, const Vector &lineVector, const VertexNoColor &linePoint, const Vector &planeNormal, const Vector &planePoint)
 
VertexNoColor ProjectedIntersectingPoint (const VertexNoColor &p1, const VertexNoColor &p2, const VertexNoColor &p3)
 
bool LineHitsTriangle (const Vector &origin, const Vector &direction, const Vector &v0, const Vector &v1, const Vector &v2, Vector *collisionPoint=0)
 
bool RayHitsTriangle (const Vector &origin, const Vector &direction, const Vector &v0, const Vector &v1, const Vector &v2, Vector *collisionPoint=0)
 
void FindCollision (const Vector &origin, const Vector &vert1, const Vector &vert2, const Vector &vert3, VertexNoColor *collisionPoint, const Vector &directionVector)
 
VertexNoColor Normal (const VertexNoColor &p1, const VertexNoColor &p2, const VertexNoColor &p3)
 
std::istream & operator>> (std::istream &instr, disti::GlsCTLTextBox::VerticalAlignment_t &verticalAlignment)
 
std::ostream & operator<< (std::ostream &outstr, disti::GlsCTLTextBox::VerticalAlignment_t verticalAlignment)
 
std::istream & operator>> (std::istream &instr, disti::GlsCTLTextBox::EllipsizeMode_t &ellipsizeMode)
 
std::ostream & operator<< (std::ostream &outstr, disti::GlsCTLTextBox::EllipsizeMode_t ellipsizeMode)
 
std::istream & operator>> (std::istream &instr, disti::GlsCTLTextBox::TextDirection_t &direction)
 
std::ostream & operator<< (std::ostream &outstr, disti::GlsCTLTextBox::TextDirection_t direction)
 
std::istream & operator>> (std::istream &instr, disti::GlsCTLTextBox::ResizeMode_t &direction)
 
std::ostream & operator<< (std::ostream &outstr, disti::GlsCTLTextBox::ResizeMode_t direction)
 
GlsRenderEffectCreateRenderEffect_DiffNormSpecRefl (unsigned int material_index, int diffuse_texture_index, int normal_texture_index, int specular_texture_index, int reflection_texture_index, float diffuse_amount, float normal_amount, float specular_amount, float reflection_amount, bool useVertexColors, bool normalFlipGreen, float diff_map_offset_v=0.0f, float diff_map_offset_u=0.0f, float diff_map_tiling_u=1.0f, float diff_map_tiling_v=1.0f, float diff_map_angle_w=0.0f, float norm_map_offset_v=0.0f, float norm_map_offset_u=0.0f, float norm_map_tiling_u=1.0f, float norm_map_tiling_v=1.0f, float norm_map_angle_w=0.0f, float spec_map_offset_v=0.0f, float spec_map_offset_u=0.0f, float spec_map_tiling_u=1.0f, float spec_map_tiling_v=1.0f, float spec_map_angle_w=0.0f)
 
std::istream & operator>> (std::istream &instr, disti::GlsTextBox::ResizeMode_t &direction)
 
std::ostream & operator<< (std::ostream &outstr, disti::GlsTextBox::ResizeMode_t direction)
 

Variables

const unsigned g_itemNotFound = UINT_MAX
 Constant returned by FindIndexOf() if the item is not found.
 
const char * STD_UNIFORM_STRINGS [MAX_STD_UNIFORMS]
 
const char * STD_ATTRIB_STRINGS [MAX_STD_ATTRIBS]
 
const int IMG_TRANSPARENT = 0
 
const int IMG_NON_TRANSPARENT = 255
 
const int MAX_MIP_MAP_IMAGES = 16
 
const int INLINE_TEXTURE_LINE_LENGTH = 240
 
unsigned char glsDefinedColors [GLS_COLOR_MAX][4]
 
const double DEG_TO_RAD = 3.14159265358979323846 / 180.0
 
const double RAD_TO_DEG = 180.0 / 3.14159265358979323846
 
const int MAX_SPLINE_VERTICES = 2000
 
const int MIN_NUMBER_POINTS = 2
 
const int NUMBER_POINTS_TO_CONSIDER = 3
 

Detailed Description

Contains GL Studio classes and other DiSTI code.

Typedef Documentation

typedef void( * DistiAssertHandler) (const char *errMessage)

The callback type. It receives an error message string

Typedef for dynamic array of materials

This typedef is a changed from pre 3.0 versions. Now Vector is different from Vertex. It now contains no color information

Enumeration Type Documentation

Enumeration for Alpha Blending/Testing mode

Enumerator
ALPHA_MODE_UNDEFINED 

Alpha mode is not defined. Used by the properties page

ALPHA_MODE_OPAQUE 

Alpha testing and blending are disabled

ALPHA_MODE_2_LEVEL 

Alpha testing with a threshold of 0.5 is enabled, alpha blending is enabled.

ALPHA_MODE_256_LEVEL 

Alpha blending is enabled, alpha testing is disabled.

Enumeration for an object's usage of glColorMaterial

Enumerator
NO_COLOR_MATERIAL 

glColorMaterial will be disabled for the object

DIFFUSE_COLOR_MATERIAL 

glColorMaterial will be enabled for the diffuse material

AMBIENT_COLOR_MATERIAL 

glColorMaterial will be enabled for the ambient material

DIFFUSE_AND_AMBIENT_COLOR_MATERIAL 

glColorMaterial will be enabled for the diffuse & ambient materials

EMISSION_COLOR_MATERIAL 

glColorMaterial will be enabled for the emission material

SPECULAR_COLOR_MATERIAL 

glColorMaterial will be enabled for the specular material

Enumeration for the Depth Testing and Writting mode

Enumerator
DEPTH_BUFFER_TEST_NO_WRITE 

Tests but doesn't write

DEPTH_BUFFER_NO_TEST_AND_WRITE 

Doesn't test but does write

Enumeration for event types

Enumerator
EVENT_MOUSE 

A Mouse (or touch screen) event

EVENT_KEYBOARD 

A Keyboard event

EVENT_TIMER 

Unused

EVENT_OBJECT 

An event emitted by an object

EVENT_KEYBOARD_UP 

A Keyboard up event (uses KeyboardEvent class)

Cylinder Initializers

Eye Point Initializers

Initializers

Light Source Initializers

Sphere Initializers

GL Studio color defines

Enumerator
GLS_CODEC_RAW 

Image data is not compressed

GLS_CODEC_LZ77 

Image data is compressed with LZ77 (Z-Lib)

GLS_CODEC_JPEG 

Image data is compressed with lossy JPEG

gls Sphere Mapping

Enumerator
GLS_SPHERE_SPHERICAL_MAP 

Spherical texture map

GLS_SPHERE_CYLINDER_MAP 

Cylindrical texture map

Enumerator
GLS_NPOT_AUTO 

Allow Non Power Of Two textures if able

GLS_NPOT_ENABLED 

Always allow Non Power Of Two textures

GLS_NPOT_DISABLED 

Never allow Non Power Of Two textures

LightType_e

List Iterator Direction

Enumeration for the C++ protection status of an object

Enumerator
PUBLIC 

The object will be C++ public status

PRIVATE 

The object will be C++ private status

PROTECTED 

The object will be C++ protected status

Enumeration for mouse buttons

Enumerator
MOUSE_LBUTTON 

Mask that matches only left mouse button

MOUSE_MBUTTON 

Mask that matches only middle mouse button

MOUSE_RBUTTON 

Mask that matches only right mouse button

MOUSE_BUTTON_ANY 

Mask that matches any mouse button

Enumeration for mouse event types

Enumerator
MOUSE_DOWN 

A Mouse button was pushed down

MOUSE_UP 

A Mouse button was released

MOUSE_MOVE 

The mouse moved

MOUSE_DRAG 

The mouse moved while a button was held down

MOUSE_LEAVE 

The mouse exited the object

MOUSE_ENTER 

The mouse entered the object

MOUSE_WHEEL_MINUS 

The mouse wheel was turned in the negative direction

MOUSE_WHEEL_PLUS 

The mouse wheel was turned in the positive direction

MOUSE_RECEIVE_MULTITOUCH 

Handle this event to receive input from multiple touches at the same time

MOUSE_CANCEL 

Handle this event to interrupt the current mouse event

MOUSE_DOUBLE 

A Mouse button was pushed down twice

Enumeration for the type of picking for an object

Enumerator
PICK_NEVER 

Picking will be disabled for this object and all children

PICK_FIRST 

Picking will be based on draw order only. The first geometry hit wins.

PICK_BEST 

Picking will find the best geometry hit of all available children

PICK_ALWAYS 

Picking will ignore geometry of this object, and always return a pick as if hit. This is still only found through normal draw order traversal.

Enumeration for whether or not polygon is closed or open

Enumerator
POLY_OPEN 

Polygon will be drawn open

POLY_CLOSED 

Polygon will be drawn closed

Enumeration for polygon drawing mode of the object

Enumerator
POLY_MODE_UNDEFINED 

Polygon draw style is not defined; not a drawable type. Used with the properties page

POLY_MODE_POINTS 

Polygon will be rendered with a point at each vertex

POLY_MODE_OUTLINE 

Polygon will be rendered as an outline

POLY_MODE_FILLED 

Polygon will be rendered filled-in

POLY_MODE_FILL_AND_OUTLINE 

Polygon will be rendered filled-in and with an outline

Enumeration for the redraw behavior for a display frame

Enumerator
REDRAW_CONDITIONAL 

The display frame is only redrawn when the scene changes

REDRAW_CONSTANT 

The display frame is constantly redrawn at a specified rate

REDRAW_CONTINUOUS 

The display frame is constantly redrawn as fast as possible

Rotation axis enumeration. Passed into rotation calls

Enumerator
X_AXIS 

Rotate around the X Axis

Y_AXIS 

Rotate around the Y Axis

Z_AXIS 

Rotate around the Z Axis

Enumeration for the type of rendering projection for a display frame

Enumerator
SHADING_FLAT 

The object will be drawn with flat shading (monochromatic)

SHADING_GOURAUD 

The object will be drawn with gouraud shading (linear color interpolation)

Enumeration for keyboard modifiers

enumeration for standard shader attributes

enumeration for standard shader uniforms

Enumeration for texture filtering mode of the object

Enumerator
TEXTURE_FILTER_NEAREST 

Nearest pixel filtering

TEXTURE_FILTER_LINEAR 

Bilinear interpolation filtering

TEXTURE_FILTER_NEAREST_MIPMAP_NEAREST 

Selects nearest pixel in the nearest mipmap

TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR 

Linearly interpolates in two mipmaps then linearly interpolates between them

TEXTURE_FILTER_NEAREST_MIPMAP_LINEAR 

Selects nearest pixel in two mipmaps then linearly interpolates between them

TEXTURE_FILTER_LINEAR_MIPMAP_NEAREST 

Linearly interpolates in the nearest mipmap

Enumeration for texture mapping mode of the object

Enumerator
TEXTURE_MAP_MODULATE 

Texture color and alpha are modulated with polygon color and alpha

TEXTURE_MAP_DECAL 

Texture color is blended with polygon color

TEXTURE_MAP_BLEND 

Texture color is blended with polygon color, texture alpha is modulated with polygon alpha

TEXTURE_MAP_REPLACE 

Texture color and alpha replace polygon color and alpha

Current state of texture in the texture palette

Enumerator
TEXTURE_UNUSED 

The texture slot is unused

TEXTURE_IGNORED 

Texture slot does not contain a texture, the user choose to ignore it. It appears UNUSED for most purposes.

TEXTURE_INVALID 

Texture slot contains a texture, but it isn't bound to the GL context

TEXTURE_VALID 

Texture slot contains a texture, and it is bound to the GL context

enum Views

View

Function Documentation

float disti::AngularDistance ( float  angle1,
float  angle2 
)

Returns the minimum angular distance between angle1 and angle2.

float disti::AngularDistanceAbs ( float  angle1,
float  angle2 
)

Returns the absolute value of the minimum angular distance between angle1 and angle2.

float disti::AngularDistanceDeg ( float  angle1,
float  angle2 
)
Returns
The minimum angular distance between angle1 and angle2 in degrees
Parameters
angle1First angle
angle2Second angle
float disti::AngularDistanceRad ( float  angle1,
float  angle2 
)
Returns
The minimum angular distance between angle1 and angle2 in radians
Parameters
angle1First angle
angle2Second angle
void disti::AppendTrailingSlash ( char *  s)

Appends a trailing slash to a path string, if one isn't there already

Parameters
sFile path
void disti::AppendTrailingSlash ( std::string &  s)

Appends a trailing slash to a path string, if one isn't there already

Parameters
sFile path
DistiAttribDict::const_iterator disti::begin ( const DistiAttribDict dict)
inline

Iterator interface for use in range-for loops etc.

bool disti::BETWEEN ( const X &  x,
const X1 &  x1,
const X2 &  x2 
)

Determines if x is included in the range x1 to x2

int disti::C_EncodeString ( char *  dest,
const char *  src,
const int  dest_str_length 
)

Encodes a string using C language encoding

Parameters
destDestination string
srcSource string
dest_str_lengthSize of the destination buffer
Returns
The length of the encoded string
std::string disti::C_EncodeString ( const std::string &  src)

Returns and encoded std::string using C language encoding

Parameters
srcSource string
Returns
The encoded string
int disti::CalcSwitchPosDCS ( DisplayObject self,
DisplayEvent ev,
InputOrientationEnum  inputType,
int  numPositions,
float  scale = 1.0f 
)

Uses event data to calculate a new switch position based on the DCS of the object. This is not intended to be called directly.

bool disti::CalculateTexPointsFromTexCoords ( DisplayObject object)

Recalculate the texture points of a given DisplayObject based on its valid texture coordinates

Returns
true On success
false If the texture points could not be calculated. (The object doesn't have three non-colinear vertices or doesn't have texture coordinates.)
void disti::ChangeGlsDefinedColor ( GlsDefinedColorEnum  index,
unsigned char  red,
unsigned char  green,
unsigned char  blue,
unsigned char  alpha 
)
inline

Allows the user to change the predefined colors

void disti::ChangeHStrip ( DisplayObject obj,
float  value,
const float  min,
const float  max,
float  refPt,
const float  locAtMin,
const float  locAtMax 
)

Moves an object horizontally based on the given values. Moves a digit strip horizontally to the location determined by the given value relative to the minimum and maximum values.

Parameters
obj- The display object to move (usually a horizontal strip of digits.
value- The value to be displayed on the digit strip.
min- The smallest value that will be displayed
max- The largest value that will be displayed.
refPt- The location (x) of the object this object is attached to
locAtMin- The location (x-coord) of the digit strip when placed so that the min value is displayed.
locAtMax- The location (x-coord) of the digit strip when placed so that the max value is displayed.
void disti::ChangeHTexture ( DisplayObject obj,
const float  unit_movement,
const float  min_units,
const float  max_units,
float  units,
const float  starting_x 
)

Move a texture within an object to make the object appear to be moving in a Horizontal direction. Useful for instruments with moving digits. Assumptions: The Texture cannot be rotated, The object cannot be flipped, or reversed Min value is on the left side of the texture Max value is on the right side of the texture The Texture height and width must be powers of 2!

Parameters
obj- The object with the texture to move.
unit_movement- How far to move the texture per unit on the scale, e.g., .007227 This is specific to the texture. unit_movement = ((pixel count of largest unit) - (pixel count of smallest unit)) divided by (the pixel width of the image) divided by (number of units between the smallest and largest, e.g., 100 MPH) this then yeilds (pixel ratio) per unit
min_units- The smallest unit displayed, e.g., 0 MPH
max_units- The largest unit displayed, e.g., 100 MPH
units- How many units to move the Scale, e.g. 33 MPH
starting_x- The starting x position of the texture The following code can be used to save the starting position: Vertex *texture = obj->GetTextureCoordinates()[0].x; starting_x = texture[0].x;
void disti::ChangeNeedle ( DisplayObject obj,
const float  value,
float  gauge_values[][2],
const int  segments 
)

Rotates a needle on a non-linear scale Rotates a needle object to the degree amount determined by the given value relative to the minimum and maximum values. Use multiple segments to map a gauge with a non-linear readout.

Parameters
objThe display object that will move (usually the needle)
valueThe actual value that the needle should point to.
gauge_valuesA 2 dimensional array that contains the values and the angles that correspond to the gauge. The first of the pair is the gauge value. The second of the pair is the angle the needle should be rotated in order to point to it. The first pair should be the minimal angle the needle will be rotated while the last pair should be the maximum angle the needle will be rotated.
segmentsThe number of pairs in the gauge_values array.
See also
Uses Interpolate() internally.
void disti::ChangeVStrip ( DisplayObject obj,
float  value,
const float  min,
const float  max,
const float  refPt,
const float  locAtMin,
const float  locAtMax 
)

Moves an object vertically based on the given values. Moves a digit strip vertically to the location determined by the given value relative to the minimum and maximum values.

Parameters
obj- The display object to move (usually a horizontal strip of digits.
value- The value to be displayed on the digit strip.
min- The smallest value that will be displayed
max- The largest value that will be displayed.
refPt- The location (y) of the object this object is attached to
locAtMin- The location (y-coord) of the digit strip when placed so that the min value is displayed.
locAtMax- The location (y-coord) of the digit strip when placed so that the max value is displayed.
void disti::ChangeVTexture ( DisplayObject obj,
const float  unit_movement,
const float  min_units,
const float  max_units,
float  units,
const float  starting_y 
)

Move a texture within an object to make the object appear to be moving in a Vertical direction. Useful for instruments with moving digits. Assumptions: The Texture cannot be rotated, The object cannot be flipped, or reversed Min value is on the bottom side of the texture Max value is on the top side of the texture The Texture height and width must be powers of 2!

Parameters
obj- The object with the texture to move.
unit_movement- How far to move the texture per unit on the scale, e.g., .007227 This is specific to the texture. unit_movement = ((pixel count of largest unit) - (pixel count of smallest unit)) divided by (the pixel width of the image) divided by (number of units between the smallest and largest, e.g., 100 MPH) this then yeilds (pixel ratio) per unit
min_units- The smallest unit displayed, e.g., 0 MPH
max_units- The largest unit displayed, e.g., 100 MPH
units- How many units to move the Scale, e.g. 33 MPH
starting_y- The starting x position of the texture The following code can be used to save the starting position: Vertex *texture = obj->GetTextureCoordinates()[0].y; starting_y = texture[0].y;
bool disti::CheckDistiLicense ( const char *  licenseGroupName,
const char *  feature,
const char *  version,
bool  quiet 
)

Call this to check for the availability of a DiSTI conrolled license. It does not hold the license. It only checks it out and checks it back in.

Parameters
licenseGroupNameA name for what this license allows. i.e. "GL Studio Runtime".
featureThe specific feature that will be checked out.
versionThe specific version that will be checked out.
quietWhen true, no popup will occur upon missing license.
int disti::Choice ( const char *  b0,
const char *  b1,
const char *  b2,
const char *  s,
  ... 
)

Creates and shows a pop-up dialog box and displays a text string and up to (3) buttons labeled according to the last three input parameters. To hide any of the buttons, pass a NULL string to the corresponding param. A question icon is displayed.

Parameters
b0The label for button 0 (ESC is shortcut for this Right button)
b1The label for button 1 (RET is shortcut for this Center button)
b2The label for button 3 (left-most button)
sThe text string to display
Returns
Equals 0 if b0 pressed, 1 if b1 pressed, 2 if b2 pressed
int disti::ChoiceWithDefault ( const char *  b0,
const char *  b1,
const char *  b2,
const int  defaultChoice,
const char *  s,
  ... 
)

Creates and shows a pop-up dialog box and displays a text string and up to (3) buttons labeled according to the last three input parameters. To hide any of the buttons, pass a NULL string to the corresponding param. A question icon is displayed.

Parameters
b0The label for button 0 (ESC is shortcut for this Right button)
b1The label for button 1 (RET is shortcut for this Center button)
b2The label for button 3 (left-most button)
defaultChoiceThe value returned when in command-line mode
sThe text string to display
Returns
Equals 0 if b0 pressed, 1 if b1 pressed, 2 if b2 pressed
bool disti::CloseToZero ( const X  x,
const X  threshold = X( 1e-1 ) 
)

Determines if the argument is small (< 1e-1)

AttributeObserver* disti::CreateAttributeMethodCallback ( Class *const  obj,
const typename AttributeMethodCallback< Class >::Callback  method 
)

Create an AttributeCallbackBase that will call a class method whenever the attribute changes.

Parameters
objthe object to call the method on
methoda class method pointer
AttributeObserver* disti::CreateAttributeResourceCallback ( Class *const  obj,
const char *  attributeName 
)

Create an AttributeCallbackBase that will set another object's attribute whenever the attribute changes.

Parameters
objthe object to set the resource on
attributeNamethe name of the property
DistiAttributeProperty<Class, Type, Type>* disti::CreateDistiAttributeProperty ( const AttributeName attrName,
Class *const  obj,
const typename DistiAttributeProperty< Class, Type, Type >::SetMethodType  setMethod,
const typename DistiAttributeProperty< Class, Type, Type >::GetMethodType  getMethod = NULL 
)

Overloaded helper function to create a DistiAttributeProperty where the setter param is of type Type and the getter is non-const. (See other varians below.)

Template Parameters
TypeThe type of the property (int, float, GlsColor, etc.)
ClassThe class of the object that owns this parameter (typically a subclass of DisplayObject)
Parameters
attrNameThe attribute name for this property.
objThe display object instance associated with this property.
setMethodThe setter method for the property (can be NULL)
getMethodThe getter method for the property (can be NULL)
Returns
The DistiAttributeProperty instance, which is owned by the caller.
Attributes().Add( CreateDistiAttributeProperty<int>( MetaTextureIndex, this, &DisplayObject::TextureIndex, &DisplayObject::TextureIndex ) );
DistiAttributeProperty<Class, Type, Type>* disti::CreateDistiAttributeProperty ( const AttributeName attrName,
Class *const  obj,
const typename DistiAttributeProperty< Class, Type, Type >::SetMethodType  setMethod,
const typename DistiAttributeProperty< Class, Type, Type >::GetMethodConstType  getMethod 
)

Overloaded helper function to create a DistiAttributeProperty where the getter is const.

DistiAttributeProperty<Class, Type>* disti::CreateDistiAttributeProperty ( const AttributeName attrName,
Class *const  obj,
const typename DistiAttributeProperty< Class, Type >::GetMethodConstType  getMethod 
)

Overloaded helper function to create a DistiAttributeProperty where there is no setter method and the getter is const.

DistiAttributeProperty<Class, Type>* disti::CreateDistiAttributeProperty ( const AttributeName attrName,
Class *const  obj,
const typename DistiAttributeProperty< Class, Type >::GetMethodType  getMethod 
)

Overloaded helper function to create a DistiAttributeProperty where there is no setter method and the getter is non-const.

DistiAttributeProperty<Class, Type, const Type&>* disti::CreateDistiAttributeProperty ( const AttributeName attrName,
Class *const  obj,
const typename DistiAttributeProperty< Class, Type, const Type & >::SetMethodType  setMethod,
const typename DistiAttributeProperty< Class, Type, const Type & >::GetMethodType  getMethod = NULL 
)

Overloaded helper function to create a DistiAttributeProperty where the setter param is of type const Type& and the getter is non-const.

DistiAttributeProperty<Class, Type, const Type&>* disti::CreateDistiAttributeProperty ( const AttributeName attrName,
Class *const  obj,
const typename DistiAttributeProperty< Class, Type, const Type & >::SetMethodType  setMethod,
const typename DistiAttributeProperty< Class, Type, const Type & >::GetMethodConstType  getMethod 
)

Overloaded helper function to create a DistiAttributeProperty where the setter param is of type const Type& and the getter is const.

DistiAttributeProperty<Class, GetReturnT, SetArgT>* disti::CreateDistiAttributeProperty ( const AttributeName attrName,
Class *const  obj,
const typename DistiAttributeProperty< Class, GetReturnT, SetArgT >::SetMethodType  setMethod,
const typename DistiAttributeProperty< Class, GetReturnT, SetArgT >::GetMethodType  getMethod 
)

Overloaded helper function to create a DistiAttributeProperty where the getter and setter are different base types (e.g. int vs bool)

DistiAttributeProperty<Class, Vector, const Vertex&, const Vertex&>* disti::CreateDistiAttributePropertyVertexToVector ( const AttributeName attrName,
Class *const  obj,
const typename DistiAttributeProperty< Class, Vector, const Vertex &, const Vertex & >::SetMethodType  setMethod,
const typename DistiAttributeProperty< Class, Vector, const Vertex &, const Vertex & >::GetMethodConstType  getMethod 
)

Overloaded helper function for properties that formerly used DistiAttributeLocation, which wraps properties that are stored in c++ as a Vertex but used in the Resources as a Vector

KeyboardCallbackBase* disti::CreateInputHandlerCallback ( const typename KeyboardMethodCallback< Class >::Callback  method,
Class *const  obj 
)

helper method to create a KeyboardCallbackBase from a class method

Parameters
methoda class method pointer
objthe object to call the method on
MouseCallbackBase* disti::CreateInputHandlerCallback ( const typename MouseMethodCallback< Class >::Callback  method,
Class *const  obj 
)

helper method to create a MouseCallbackBase from a class method

Parameters
methoda class method pointer
objthe object to call the method on
GlsRenderEffect* disti::CreateRenderEffect_DiffNormSpecRefl ( unsigned int  material_index,
int  diffuse_texture_index,
int  normal_texture_index,
int  specular_texture_index,
int  reflection_texture_index,
float  diffuse_amount,
float  normal_amount,
float  specular_amount,
float  reflection_amount,
bool  useVertexColors,
bool  normalFlipGreen,
float  diff_map_offset_v = 0.0f,
float  diff_map_offset_u = 0.0f,
float  diff_map_tiling_u = 1.0f,
float  diff_map_tiling_v = 1.0f,
float  diff_map_angle_w = 0.0f,
float  norm_map_offset_v = 0.0f,
float  norm_map_offset_u = 0.0f,
float  norm_map_tiling_u = 1.0f,
float  norm_map_tiling_v = 1.0f,
float  norm_map_angle_w = 0.0f,
float  spec_map_offset_v = 0.0f,
float  spec_map_offset_u = 0.0f,
float  spec_map_tiling_u = 1.0f,
float  spec_map_tiling_v = 1.0f,
float  spec_map_angle_w = 0.0f 
)

Used by code generator

int disti::DecodeString ( char *  dest,
const char *  src,
const int  dest_str_length 
)

Decodes a string that was encoded using EncodeString

Parameters
destDestination string
srcSource string
dest_str_lengthSize of the destination buffer
Returns
The length of the encoded string
std::string disti::DecodeString ( const std::string &  src)

Decodes a std::string that was encoded using EncodeString

Parameters
srcEncoded Source string
Returns
The decoded string
void disti::DecomposeMatrix ( const GlsMatrix< Type, 4 > &  matrix,
Vector scale,
Vector location,
GlsQuaternion< Type > &  rotation 
)

decompose a GlsMatrix into its scaling, translation, and rotation counterparts. If the x,y, or z scale is determined to be zero, the rotation may not be accurate

Parameters
[in]matrixthe matrix to decompose
[out]scalea vector that contains the x, y, and z scale factors
[out]locationa vector that contains the x, y, and z translation
[out]rotationa quaternion that contains the rotation
GlsMatrix<Type, 4> disti::DecomposeRotationMatrix ( const GlsMatrix< Type, 4 > &  matrix,
const Vector scale 
)

decompose the rotation matrix from a GlsMatrix by dividing out the scale factor. If the x,y, or z scale is determined to be zero, the scale factors not removed from the matrix.

Parameters
[in]matrixthe matrix to decompose
[in]scalea vector that contains the x, y, and z scale factors
Returns
the rotation matrix with the scale factors removed
Vector disti::DecomposeScale ( const GlsMatrix< Type, 4 > &  m)

decompose the scale factors from a GlsMatrix

Parameters
[in]mthe matrix to decompose
Returns
scale a vector that contains the x, y, and z scale factors
void disti::DeleteArraysAndClear ( DynamicArray< T, Obsolete > &  array)

Calls delete[] on each element and then clears the list.

Note
Works only where T is a pointer to an array.
void DeleteEachAndClear ( DynamicArray< T, Obsolete > &  array)

Calls delete on each element and then clears the list.

Note
Works only where T is a pointer.
void disti::DistiAssertDebug ( const char *  expression,
const char *  filename,
unsigned int  lineNumber 
)

Do not call DistiAssertDebug directly, instead use the DistiAssert macro

Note
This function is deprecated; Use GlsAssert or GlsVerify instead.
void disti::DistiAssertRelease ( const char *  expression,
const char *  filename,
unsigned int  lineNumber 
)

Do not call DistiAssertRelease directly, instead use the DistiAssert macro

Note
This function is deprecated; Use GlsAssert or GlsVerify instead.
ImageNPOTMode disti::DoesSystemSupportNPOT ( )

Determines if Non Power Of Two textures are supported.

Returns
GLS_NPOT_ENABLED if NPOT textures are supported, GLS_NPOT_DISABLED otherwise.
void disti::EmitObjectEvent ( DisplayObject self,
ObjectEvent event 
)
inline

Emits the specfied ObjectEvent

void disti::EmitObjectEvent ( DisplayObject self,
const char *  eventName,
const char *  eventData = NULL 
)
inline

Creates an ObjectEvent from the given NULL terminated strings and emits it

void disti::EnableDialogs ( bool  )

Suppresses popup messages when false, defaults to true

int disti::EncodedStringMinLength ( )

Returns a minimum length for a call to EncodeString. This is based on the clear text delimeters

int disti::EncodeString ( char *  dest,
const char *  src,
const int  dest_str_length 
)

Encodes a string such that if it contains newlines, it will be wrapped with the "#$STRING_START$#" and "#$STRING_END$#" delimiters.

Parameters
destDestination string
srcSource string
dest_str_lengthSize of the destination buffer
Returns
The length of the encoded string.
std::string disti::EncodeString ( const std::string &  src)

Encodes a std::string such that there are no whitespace characters in the string

Parameters
srcSource string
Returns
The encoded string
bool disti::Equal ( T1  x,
T2  y,
float  precision = 0.001f 
)

Return whether two numbers are "equal" to eachother taking into account a certain precision. You can use this method on any numeric types and even mix types as the parameters. Eg. you can compare integers with floating point types or compare floats and doubles without casting.

Parameters
xfirst number to use in the comparison which determines the range
ynumber to check if within the range determined by x and precision
precisionnumber that is added to and subtracted from x to determine the range to check y against.
void disti::Error ( const char *  s,
  ... 
)

Creates and shows a pop-up dialog box and displays a text string and (1) button labeled 'OK'. An exclamation icon is displayed

Parameters
sThe text string to display
void disti::Error_NoVarArg ( const char *  s)

Creates and shows a pop-up dialog box and displays a text string and (1) button labeled 'OK'. An exclamation icon is displayed. This versioj does not use varargs for formatting

Parameters
sThe text string to display
bool disti::FileExists ( const char *  filename)
Returns
true if the file exists, false otherwise
Parameters
filenameThe filename to check
std::string disti::FileExtension ( const std::string &  filepath)
Returns
The file extension for a filepath
Parameters
filepathFilepath to get extension from
std::string disti::FileName ( const std::string &  filepath)
Returns
The filename from a file path by stripping off anything to the left of a slash
Parameters
filepath
std::string disti::FilePath ( const std::string &  filepath)
Returns
a string containing the path portion of a filename by stripping off everything to the right of the rightmost slash
Parameters
filepathA string containing a file with a path
void disti::FindCollision ( const Vector origin,
const Vector vert1,
const Vector vert2,
const Vector vert3,
VertexNoColor collisionPoint,
const Vector directionVector 
)

Find the point at which a line intersects a plane. Helper/preparer function for IntersectionVectorAndPlane. /param point Origin of the line /param vert1 First point defining the plane /param vert2 Second point defining the plane /param vert3 Third point defining the plane /param collisionPoint This will be set to the intersection point /param directionVector Vector to which the line is parallel

GlsMatrixAffine<T> disti::FindCoordinateTransformation ( const Vector new_origin,
const Vector new_i,
const Vector new_j,
const Vector new_k 
)

Find a transformation that will convert to a new coordinate system defined by the given origin and basis vectors (i,j,k).

Note
The new i,j,k vectors are in respect to the current origin. (i.e. for transformation that moves the origin along the x axis by 5 units you should pass in (Vector(5,0,0), Vector(1,0,0), Vector(0,1,0) , Vector(0,0,1)) NOT (Vector(5,0,0), Vector(6,0,0), Vector(5,1,0) , Vector(5,0,1)) Template argument is either double or float.
Parameters
new_originVector to the new coordinate system origin.
new_iVector parallel to the new x-axis with magnitude equal to one unit in the new coordinate system.
new_jVector parallel to the new y-axis with magnitude equal to one unit in the new coordinate system.
new_kVector parallel to the new z-axis with magnitude equal to one unit in the new coordinate system.
Returns
transformation matrix to the new coordinate system
unsigned FindIndexOf ( const DynamicArray< T, Obsolete > &  array,
const U &  object 
)

Get the index position of the specified object in the given array

Returns
The index of the object in the list, or g_itemNotFound if it isn't in the list
bool disti::FindNonColinearVertices ( int  arraySize,
Vector  array[],
int &  index1,
int &  index2,
int &  index3,
bool  isVectorArray = true 
)

Search the given Vertex array for the first three non-colinear vertices.

Parameters
arraySizeThe size of vertex_array
arrayThe Vertex array
index1variable to receive 1st array index
index2variable to receive 2nd array index
index3variable to receive 3rd array index
isVectorArraytrue if array points to a Vector array, false if it points to a Vertex array
Returns
true If the vertices were found
false If there are not three non-colinear vertices in the array if this occurs, the index values are undefined
bool disti::FindNonColinearVertices ( int  arraySize,
Vertex  array[],
int &  index1,
int &  index2,
int &  index3 
)
inline

Vertex version of FindNonColinearVertices

bool disti::GetAbsolutePlacementDefault ( )

Gets the default value for absolute placent.

const char* disti::GetBaseName ( const char *  path)

Gets the file name from a filename with path It does not allocate new memory, but rather just returns a pointer inside the original string

char* disti::GetBaseName ( char *  path)
Returns
Pointer to a position within the given path where the filename starts.
Deprecated:
This function is not const-correct. Prefer the const-correct version.
See also
GetBaseName( const char* )
bool disti::GetComponentClassNames ( const char *  dllFileName,
DynamicArray< std::string > &  nameList,
const char *  createClassTag = "CreateComponent_" 
)

Searches the specified binary file for the specified tag, and adds what immediatly follows the tag to the nameList. Returns true if at least one is found, false otherwise.

std::string disti::GetComponentDirectory ( void *  module)

Returns the directory of the .dll or .so that calls this function.

D3DFORMAT disti::GetD3D9Format ( const DDS_PIXELFORMAT ddpf)

Returns the D3DFORMAT that corresponds with the given DDS_PIXELFORMAT

std::string disti::GetDefaultComponentClassName ( const char *  dllFileName)

Opens the DLL and attempts to run GlsDefaultClassName(), if found. Returns an empty string if not found.

void disti::GetDigits ( int  source,
int *  _1,
int *  _2 = NULL,
int *  _3 = NULL,
int *  _4 = NULL,
int *  _5 = NULL,
int *  _6 = NULL,
int *  _7 = NULL,
int *  _8 = NULL 
)

Decomposes an integer into individual digits. Returns the individual digits making up the supplied integer

Parameters
sourceThe number to break up
_1The pointer to the integer to contain the Least Significant Digit (rightmost digit).
_2(optional) The pointer to the integer to containing the second digit from the right.
_3(optional) The pointer to the integer to containing the third digit from the right.
_4(optional) The pointer to the integer to containing the fourth digit from the right.
_5(optional) The pointer to the integer to containing the fifth digit from the right.
_6(optional) The pointer to the integer to containing the sixth digit from the right.
_7(optional) The pointer to the integer to containing the seventh digit from the right.
_8(optional) The pointer to the integer to containing the eigth digit from the right.
DXGI_FORMAT disti::GetDXGIFormat ( const DDS_PIXELFORMAT ddpf)

Returns the DXGI_FORMAT that corresponds with the given DDS_PIXELFORMAT

std::string disti::GetExtension ( const std::string &  filename)
Returns
The file extension for a filename
Parameters
filenameFilename to get extension from No longer allocates memory, you can let the returned string be colected as it falls out of scope
char* disti::GetFileName ( const char *  name)
Returns
The filename from a file path by stripping off anything to the left of a slash
Parameters
nameA string containing just the file name without a path
Warning
If this function is called more than once all previous values WILL CHANGE to contain the newest value
Deprecated:
Use FileName instead
const char* disti::GetFilePath ( const char *  name)
Returns
a pointer to the string containing the path portion of a filename by stripping off everything to the right of the rightmost slash
Parameters
nameA string containing a file with a path
Warning
If this function is called more than once all previous values WILL CHANGE to contain the newest value
Deprecated:
Use FilePath instead
GlsRuntimeFontBase* disti::GetGlsRuntimeFontBase ( const GlsFontBase font)
inline

helper method for safely getting a runtime font base from a font base (if possible)

Parameters
fontfont in question
Returns
runtime font else NULL
const GlsUnicodeFontBase* disti::GetGlsUnicodeFontBase ( const GlsFontBase font)
inline

helper method for safely getting a unicode font base from a font base (if possible)

Parameters
fontfont in question
Returns
unicode font else NULL
bool disti::GetObjectCoordinatesTransform ( DisplayObject from,
DisplayObject to,
GlsMatrixType outTransform 
)

Gets the transformation from one DisplayObject's object coordinates to another's (if possible) This is the preferred method for determining the coordinate space relationship between two objects that have DynamicTransforms applied. Note: This method requires that the two objects are part of the same object heirarchy. Consider using GetObjectCoordinatesTransformSameView if your situation does not meet this requirement.

// Example: Move objB to be in the same location as objA (including all DynamicTransforms)
// Change Location of objB so that it's RotationPoint aligns with the RotationPoint of objA
GlsMatrixType transform;
if( GetObjectCoordinatesTransform( objA, objB, &transform ) )
{
Vector objA_rotationPoint_transformed = transform * (objA->Location() + objA->RotationPoint());
objB->Location( objA_rotationPoint_transformed - objB->RotationPoint() );
}
else
{
// Error: objects are not in the same heirarchy
}
See also
GetObjectCoordinatesTransform
Parameters
fromThe DisplayObject to start at
toThe DisplayObject to end at
outTransformOut parameter - If the function returns true, this will contain the resulting transformation.
Returns
true on success, false if the objects are not in the same heirarchy.
bool disti::GetObjectCoordinatesTransformSameView ( DisplayObject from,
DisplayObject to,
GlsMatrixType outTransform 
)

Gets the transformation from one DisplayObject's object coordinates to another's Note: This method uses a screen-space transformation (DisplayObject::ModelMatrix). This requires that the two objects have been PreDrawn with the same view, but they do not need to be part of the same object heirarchy. Use GetObjectCoordinatesTransform unless GetObjectCoordinatesTransformSameView is required.

See also
GetObjectCoordinatesTransform
Parameters
fromThe DisplayObject to start at
toThe DisplayObject to end at
outTransformOut parameter - If the function returns true, this will contain the resulting transformation.
Returns
true on success, false if there was an error
std::string disti::GetQualifiedInstanceName ( const DisplayFrame topFrame,
const DisplayObject obj 
)

Returns the qualified instance name of an object that is contained within given DisplayFrame. (e.g "cockpit.altimeter.needle") Note that names are only added for each DisplayFrame (not every Group) and the name of the topFrame is not included in the qualified name.

Parameters
topFrameThe frame in which the qualification will make sense.
objThe object which is a direct child or located somewhere below topFrame.
Returns
The qualified instance name or an empty string if the qualified instance name could not be determined.
bool disti::GetReleaseImageDataDefault ( void  )

Returns the current value for the flag controlling the default behavior for new Image instances. See SetReleaseImageDataDefault() for more details.

See also
disti::SetReleaseImageDataDefault( bool )
DisplayFrame* disti::GetTopLevelDisplayFrame ( DisplayFrame frame)

Gets the Topmost Display Frame

Parameters
fromThe DisplayFrame to start at
Returns
the Topmost Display Frame
FILE* disti::gls_fopen ( const char *  filename,
const char *  flags 
)

Attempts to open the given file. Relative file paths are resolved using ResolvePath.

Parameters
filenameThe name of the file to open
flagsfopen style file arguments (e.g. "r")
Returns
FILE pointer or NULL otherwise
void disti::GlsAssert ( const char *  expression,
const char *  filename,
unsigned int  lineNumber 
)

Do not call GlsAssert directly, instead use the GLS_ASSERT macro

unsigned char* disti::GlsDefinedColor ( GlsDefinedColorEnum  index)
inline

Gets a predefined color in

See also
GlsDefinedColorEnum.
Parameters
indexof defined color
Returns
an unsigned char array of the specified index
void disti::GlsGetOrtho ( GlsMatrixType m,
double  left,
double  right,
double  bottom,
double  top,
double  zNear,
double  zFar 
)

This will set the m parameter to an orthographic projection. The current value of m is ignored. This does NOT make any OpenGL calls.

void disti::GlsGetPerspective ( GlsMatrixType m,
double  fovy,
double  aspect,
double  zNear,
double  zFar 
)

This will set the m parameter to a perspective projection. The current value of m is ignored This does NOT make any OpenGL calls.

void disti::GlsVerify ( const char *  expression,
const char *  filename,
unsigned int  lineNumber 
)

Do not call GlsVerify directly, instead use the GLS_VERIFY macro

float disti::Interpolate ( const float  value,
float  gauge_values[][2],
const int  segments 
)

Interpolates based on the specified array.

Returns an iterpolated value determined by the given value relative to the set of specified values. Use multiple segments to map a gauge with a non-linear readout.

Parameters
valueThe value to be converted.
gauge_valuesA 2 dimensional array that contains the values and the angles that correspond to the gauge. The first of the pair is the gauge value. The second of the pair is the angle the needle should be rotated in order to point to it. The first pair should be the minimal value while the last pair should be the maximum value.
segmentsThe number of pairs in the gauge_values array.
Returns
the interpolated value.
See also
Used by ChangeNeedle()
int disti::IntersectionVectorAndPlane ( VertexNoColor point,
const Vector lineVector,
const VertexNoColor linePoint,
const Vector planeNormal,
const Vector planePoint 
)

Computes whether or not a vector intersects a plane.

Parameters
pointReturned parameter, contains intersection point on success
lineVectorDirection of the vector
linePointOrigin point of the vector
planeNormalSurface normal of the plane
planePointA point on the plane
Returns
Non-zero if the vector intersects the plane
bool disti::IS_NEGATIVE ( const X &  x)

Determines if the argument is negative

bool disti::IS_POSITIVE ( const X &  x)

Determines if the argument is positive

bool disti::IS_ZERO ( x)
bool disti::IsDirectory ( const char *  filename)
Returns
true if the file exists and is a directory, false otherwise
Parameters
filenameThe filename to check
bool disti::IsNearZero ( x)

Determines if the argument is very small (< 10E-3)

bool disti::LineHitsTriangle ( const Vector origin,
const Vector direction,
const Vector v0,
const Vector v1,
const Vector v2,
Vector collisionPoint = 0 
)

Determines if a line intersects a triangle, and optionally where.

Parameters
originThe origin of the line to test
directionThe direction vector of the line
v0The first triangle point
v1The second triangle point
v2The third triangle point
collisionPointReturns where the triangle was hit (only set if the triangle was actually hit)
Returns
True if the triangle is hit
Note
This function does what TriangleHit() and DoesLineIntersectTriangle() used to do, namely checking the intersection of a line with a triangle. Most users should use RayHitsTriangle() instead because using a line may return a collision in the opposite direction to the direction vector, which could result in a pick behind the viewer, for instance.
const T& disti::Max ( const T &  x,
const T &  y 
)

Return the maximum of two objects. The class T must have the < operator defined.

const T& disti::Max ( const T &  x,
const T &  y,
Pred  pr 
)

Return the maximum of two objects determined by a predicate. If pr(x, y) is true, y is returned else x.

const T& disti::Min ( const T &  x,
const T &  y 
)

Return the minimum of two objects. The class T must have the < operator defined.

const T& disti::Min ( const T &  x,
const T &  y,
Pred  pr 
)

Return the minimum of two objects determined by a predicate. If pr(x, y) is true, x is returned else y.

void disti::MsgBox ( const char *  s,
  ... 
)

Creates and shows a pop-up dialog box and displays a text string and (1) button labeled 'OK'. An 'i' (information) icon is displayed.

Parameters
sThe text string to display
VertexNoColor disti::Normal ( const VertexNoColor p1,
const VertexNoColor p2,
const VertexNoColor p3 
)

Computes the Normal vector for the plane formed from the three given points.

Parameters
p1First point
p2Second point
p3Third point
Returns
The "normal" vector to the plane formed by p2,p2,p3
bool disti::NotColinear ( const Vector a,
const Vector b,
const Vector c 
)

Test if the given points are not colinear (they are not in a line)

Returns
true if the points are not colinear
false if the points are colinear
bool disti::ObjectEventIs ( DisplayEvent event,
const char *  eventName,
const char *  eventData = NULL 
)
inline
Returns
true if the given DisplayEvent is an ObjectEvent and it's event name matches the given string.
Parameters
eventThe event to check
eventNameThe eventName to compare
eventDataoptional eventData to compare, if NULL, it will not be checked, otherwise, it will.
bool disti::OnKeyEvent ( KeyboardEvent kev,
bool  alphaNumeric,
int  key,
int  modifierMask = 0 
)
inline

Examples: ON( EVENT_MOUSE, MOUSE_DOWN ) { } ON_MOUSE_DOWN( MOUSE_LBUTTON ) { } ON_KEY_DOWN( 'a' ) { } ON_KEY_DOWN_WITH_MODIFIER( 'B', FL_SHIFT ) { } ON_KEY_DOWN_WITH_MODIFIER( 'c', FL_SHIFT | FL_CTRL ) { } ON_SPECIAL_KEY_DOWN( FL_KP+'1' ) { } ON_SPECIAL_KEY_DOWN_WITH_MODIFIER( FL_F+1, FL_CTRL ) { } For a comprehensive list of keys and modifiers refer to Enumerations.H.

If CTRL is expected we need to look at keysym instead. Because CTRL changes the output of the key press to something unexpected we need to check against the key press action instead.

keysym is always lowercase

Compare to zero to avoid performance warnings. Did we find the modifiers we're looking for (modifierMask) in the modifiers currently pressed (kev->modifiers)? OR Are we not looking for any modifiers AND none of the modifiers are currently pressed? (ignoring the lock state and mouse button modifiers)

float disti::OpenGLVersion ( )

Use for determining the current OpenGL version available in the current runtime environment. It may not be valid until called after a valid rendering context has been assigned.

bool disti::operator!= ( const AttributeName attr1,
const AttributeName attr2 
)
inline

Compares this string for inequality to the specified AttributeName. This compare is very fast compared to doing string compares, and is one of the primary reasons for creating this class

std::ostream& disti::operator<< ( std::ostream &  outstr,
const Material mat 
)

Stream operator to write a material to a stream

std::ostream& disti::operator<< ( std::ostream &  outstr,
disti::GlsCTLTextBox::VerticalAlignment_t  verticalAlignment 
)
inline

Out stream operator for VerticalAlignment_t enumeration.

std::ostream& disti::operator<< ( std::ostream &  outstr,
disti::GlsCTLTextBox::EllipsizeMode_t  ellipsizeMode 
)
inline

Out stream operator for EllipsizeMode_t enumeration.

std::ostream& disti::operator<< ( std::ostream &  outstr,
disti::GlsCTLTextBox::TextDirection_t  direction 
)
inline

Out stream operator for TextDirection_t enumeration.

std::ostream& disti::operator<< ( std::ostream &  outstr,
disti::GlsTextBox::ResizeMode_t  direction 
)
inline

Out stream operator for ResizeMode_t enumeration.

std::ostream& disti::operator<< ( std::ostream &  outstr,
disti::GlsCTLTextBox::ResizeMode_t  direction 
)
inline

Out stream operator for ResizeMode_t enumeration.

bool disti::operator== ( const AttributeName attr1,
const AttributeName attr2 
)
inline

Compares this string to the specified AttributeName. This compare is very fast compared to doing string compares, and is one of the primary reasons for creating this class

std::istream& disti::operator>> ( std::istream &  instr,
Material mat 
)

Stream operator to read a material from a stream

std::istream& disti::operator>> ( std::istream &  instr,
disti::GlsCTLTextBox::VerticalAlignment_t verticalAlignment 
)
inline

In stream operator for VerticalAlignment_t enumeration.

std::istream& disti::operator>> ( std::istream &  instr,
disti::GlsCTLTextBox::EllipsizeMode_t ellipsizeMode 
)
inline

In stream operator for EllipsizeMode_t enumeration.

std::istream& disti::operator>> ( std::istream &  instr,
disti::GlsCTLTextBox::TextDirection_t direction 
)
inline

In stream operator for TextDirection_t enumeration.

std::istream& disti::operator>> ( std::istream &  instr,
disti::GlsTextBox::ResizeMode_t &  direction 
)
inline

In stream operator for ResizeMode_t enumeration.

std::istream& disti::operator>> ( std::istream &  instr,
disti::GlsCTLTextBox::ResizeMode_t &  direction 
)
inline

In stream operator for ResizeMode_t enumeration.

char* disti::PathToOS ( const char *  path)

Convert a directory path to have the correct OS slashes /, or . Also make sure that the path ends in a \, or /. So you always have the form <name 1>\<name 2>...<name n>\\, or <name 1>/<name 2>...<name n>/

Parameters
pathA path to convert
Returns
a "new-ed" string which may be longer than the original. It is the calling functions responsibility to free the memory.
void disti::PopResourcePath ( )

Remove the first search path from the stack. The resource search paths are local to the calling thread only. This function should be called from the same thread as the matching PushResourcePath.

void disti::PopupsUseCommandLine ( bool  )

Deprecated functions. Use EnableDialogs() and AreDialogsEnabled() instead.

VertexNoColor disti::ProjectedIntersectingPoint ( const VertexNoColor p1,
const VertexNoColor p2,
const VertexNoColor p3 
)

Finds the point that (1) lies along the plane passing through p3 and perpendicular to the vector p1-p2 and (2) lies along the line defined by p1 and p2

Method: We have 3 unknowns (x,y,z) and 3 equations: The first known equation is the equation of the plane where vA is the vector p2 - p1 eq 1: (x - p3.x)vA.x + (y - p3.y)vA.y + (z - p3.z)vA.z = 0 The second and third equations are the projection form of the line defined by the points p1 and p2. eq 2: (x - p1.x) / (p2.x - p1.x) = (y - p1.y) / (p2.y - p1.y) eq 3: (x - p1.x) / (p2.x - p1.x) = (z - p1.z) / (p2.z - p1.z)

Parameters
p1First point in the vector
p2Second point in the vector
p3A point in the plane p1,p2,p3
Returns
The point of intersection
void disti::PushResourceFinder ( std::string(*)(const std::string &)  finder)

Pushes a function that can locate resources. The Resources finders are applied after the resource paths are searched

Parameters
finderThe function that can locate resources to add to the search paths
void disti::PushResourcePath ( const char *  resourcePath)

Pushes a resource search path onto the stack. The CWD is always implicitly searched first. The resource search paths are local to the calling thread only. This function should be called from the same thread as the resources are loaded from.

Parameters
resourcePathThe directory path to add to the search paths
int disti::Question ( const char *  s,
  ... 
)

Creates and shows a pop-up dialog box and displays a text string and (2) buttons labeled 'Yes' and 'No'. A question mark icon is displayed

Parameters
sThe text string to display
Returns
Equals 1 if user pressed 'Yes', otherwise 0
bool disti::RampBool ( double  time)

RampBool can be used to generate varying data for testing purposes.

Parameters
timeThe system time (Available from the Calculate method)
Returns
A value varying from false to true
double disti::RampDouble ( double  time,
double  min,
double  max 
)

RampDouble is used to generate varying data for testing purposes.

Parameters
timeThe system time (Available from the Calculate method)
minThe smallest value to return
maxThe largest value to return
Returns
A value varying from min to max.
float disti::RampFloat ( double  time,
float  min,
float  max 
)

RampFloat is used to generate varying data for testing purposes.

Parameters
timeThe system time (Available from the Calculate method)
minThe smallest value to return
maxThe largest value to return
Returns
A value varying from min to max.
int disti::RampInt ( double  time,
int  min,
int  max 
)

The ramp functions can be used to generate varying data for testing purposes.

Parameters
timeThe system time (Available from the Calculate method)
minThe smallest value to return
maxThe largest value to return
Returns
A value varying from min to max.
int disti::range_check ( int  num,
double  val,
  ... 
)

Determines if the given value falls in any of the ranges passed in. range_check(int number_of_ranges, double test_value, int index_0,double range_0_min,double range_0_max,

...

int index_n,double range_n_min,double range_n_max);

For example, to return 1 for values 0-10 and 2 for values 10-20:

index = range_check(2,val, 1, 0.0, 10.0, 2, 10.0, 20.0);

bool disti::RayHitsTriangle ( const Vector origin,
const Vector direction,
const Vector v0,
const Vector v1,
const Vector v2,
Vector collisionPoint = 0 
)

Determines if a ray intersects a triangle, and optionally where.

Parameters
originThe origin of the ray to test
directionThe direction vector of the ray
v0The first triangle point
v1The second triangle point
v2The third triangle point
collisionPointReturns where the triangle was hit (only set if the triangle was actually hit)
Returns
True if the triangle is hit
Note
See note on LineHitsTriangle().
void disti::RemoveDoubleSlashes ( char *  path,
char  slash = '/' 
)

Removes and double slashes from a path. It will look for the specified type of slash. It will modify path, but since it can only shrink, no allocation is done.

Parameters
pathThe path to operate on.
slashThe type of slash to search for.
void disti::RemoveSpaces ( std::string &  entry)

Remove possible extra spaces the user might enter in the server name input field.

Parameters
entryString to be manupulated.
std::string disti::ResolvePath ( const char *  path)

Resolves the given path searching the resource path list. The CWD is always implicity searched first.

Parameters
pathThe relative path to resolve
std::string disti::ResolveRuntimeResourcePath ( const char *  fileName)

Prepends the resource path to a file name.

Parameters
[in]fileNameThe name of the file
Returns
string containing ResourcePath + fileName, with OS specific path. On Android, apk asset files are not prepended with a path.
int disti::Safe_fopen ( const char *  filename,
char *  flags,
FILE **  f 
)

Attempts to open the given file. Pops up an error message box if the attempt fails

Parameters
filenameThe name of the file to open
flagsfopen style file arguments (e.g. "r")
fContains file pointer on success
Returns
True if the operation was successful
int disti::Safe_fopen ( const char *  filename,
char *  flags,
std::fstream &  outstr 
)

Stream version

void disti::SetAbsolutePlacementDefault ( bool  value)

Sets the default value for absolute placent. If not set, the default will be true. Typically only used for backwards compatibility with previous versions of GL Studio

Parameters
valuetrue if the absolute placement default should be true, false otherwise.
void disti::SetAndNotifyIfChanged ( AttributeChangedNotifier object,
T &  property,
const T &  newValue,
const AttributeName name 
)

helper method to notify if an attribute has changed through a setter method

Parameters
objectthe object to notify
propertythe storage for the data that is going to be set
newValuethe new value to set
namethe attribute name
void disti::SetNPOTState ( ImageNPOTMode  state)

Enable/Disable global Non Power Of Two capability. This will override the texture's setting from the editor.

Note
NPOT detection is not currently supported. (GLS-5940)
Parameters
stateThe state to set it to. Will enable, disable, or apply auto detection for if NPOT support is available.
void disti::SetReleaseImageDataDefault ( bool  enable)

By default, Image instances release their texture data in main memory after loading it to the GPU. This flag controls that default behavior for new Image instances. Set to false if you want all Images to keep a copy of their texture data loaded in main memory. (Note: This can dramatically increase memory usage.)

Note
The default applies only to Image instances created after this flag is set. To set or get the value behavior for a particular Image instance, call Image::SetReleaseImageDataEnabled() or Image::IsReleaseImageDataEnabled(), respectively.
Default value: true
Parameters
enableThe new default value
See also
disti::Image::SetReleaseImageDataEnabled(), disti::Image::IsReleaseImageDataEnabled()
Group* disti::Tessellate ( Group obj_list,
CreateGroupFunc  ,
CreatePolyFunc  ,
DecomposeFunc   
)

Tesselator functions. Implements polygon tessellation.Called by application to perform a CSG operation while tesselating one group of objects.

Parameters
obj_listPointer to group of objects to tessellate
Returns
Pointer to the group of the polygons generated during tesselation. The polygons will all be 2, or 3 vertices no more!
Group* disti::Tessellate ( Group object_list,
int  tesstype,
CreateGroupFunc  ,
CreatePolyFunc  ,
DecomposeFunc   
)

Called by application to perform a CSG operation while tesselating two objects.

Parameters
object_listList containing the two objects to tessellate
tesstypeThe operation to perform (union, intersect, subtract)
Returns
Pointer to the group of the polygons generated during tesselation
Group* disti::TessellateGlyph ( Group obj_list,
CreateGroupFunc  ,
CreatePolyFunc  ,
DecomposeFunc   
)

Called by application to perform a CSG operation on a character glyph

Parameters
obj_listPointer to group of objects to tessellate
Returns
Pointer to the group of the polygons generated during tesselation. The polygons will have OpenGl drawing primatives, e.g. TRIANGLE_FAN as generated by the tessellator
std::string disti::Uppercase ( const std::string &  str)

Returns a string which is the uppercase version of the passed parameter.

Parameters
stroriginal string to convert to Uppercase
Returns
a string copy of the original but in all caps.
T* disti::ValidatePointer ( const T *const  p)

Assert the pointer is not null and return it

bool disti::VeryCloseToZero ( x)

Determines if the argument is extremely small (< 10E-4)

Variable Documentation

const double DEG_TO_RAD = 3.14159265358979323846 / 180.0

Converts degrees to radians

unsigned char glsDefinedColors[GLS_COLOR_MAX][4]

Predefined colors (see

See also
GlsDefinedColorEnum for the values). Use
GlsDefinedColor() for a range-checked version.
const int IMG_NON_TRANSPARENT = 255

Alpha value for a non-transparent pixel

const int IMG_TRANSPARENT = 0

Alpha value for a transparent pixel

const int INLINE_TEXTURE_LINE_LENGTH = 240

Used to generate inline textures. The writing and reading of the lines need to know the length.

const int MAX_MIP_MAP_IMAGES = 16

Maximum number of mipmapping levels

const int MAX_SPLINE_VERTICES = 2000

Maximum number of tesselated vertices in a spline

const int MIN_NUMBER_POINTS = 2

smallest number of control points in a spline

const int NUMBER_POINTS_TO_CONSIDER = 3

When calculating the current vertices, how many control points should we consider

const double RAD_TO_DEG = 180.0 / 3.14159265358979323846

Converts radians to degrees

const char* STD_ATTRIB_STRINGS[MAX_STD_ATTRIBS]

Variable names for standard shader attributes

const char* STD_UNIFORM_STRINGS[MAX_STD_UNIFORMS]

Variable names for standard shader uniforms