GL Studio API
|
Typedefs | |
typedef DynamicArray< Material, false > | DynamicMaterialArray |
typedef void(* | DistiAssertHandler) (const char *errMessage) |
typedef VertexNoColor | Vector |
Functions | |
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) |
template<class Class > | |
AttributeObserver * | CreateAttributeMethodCallback (Class *const obj, const typename AttributeMethodCallback< Class >::Callback method) |
template<class Class > | |
AttributeObserver * | CreateAttributeResourceCallback (Class *const obj, const char *attributeName) |
template<class T > | |
void | SetAndNotifyIfChanged (AttributeChangedNotifier *object, T &property, const T &newValue, const AttributeName &name) |
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) |
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) |
void | SetNPOTState (ImageNPOTMode state) |
ImageNPOTMode | DoesSystemSupportNPOT () |
void | SetReleaseImageDataDefault (bool enable) |
bool | GetReleaseImageDataDefault (void) |
template<class Class > | |
KeyboardCallbackBase * | CreateInputHandlerCallback (const typename KeyboardMethodCallback< 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,...) |
Group * | Tessellate (Group *obj_list, CreateGroupFunc, CreatePolyFunc, DecomposeFunc) |
Group * | Tessellate (Group *object_list, int tesstype, CreateGroupFunc, CreatePolyFunc, DecomposeFunc) |
Group * | TessellateGlyph (Group *obj_list, CreateGroupFunc, CreatePolyFunc, DecomposeFunc) |
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) |
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= '/') |
float | AngularDistanceDeg (float angle1, float angle2) |
float | AngularDistanceRad (float angle1, float angle2) |
bool | GetComponentClassNames (const char *dllFileName, DynamicArray< std::string, false > &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) |
GlsRenderEffect * | 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) |
Variables | |
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 int | MAX_SPLINE_VERTICES = 2000 |
const int | MIN_NUMBER_POINTS = 2 |
const int | NUMBER_POINTS_TO_CONSIDER = 3 |
Contains GL Studio classes and other DiSTI code.
typedef void(* DistiAssertHandler) (const char *errMessage) |
The callback type. It receives an error message string
typedef DynamicArray<Material, false> DynamicMaterialArray |
Typedef for dynamic array of materials
typedef VertexNoColor Vector |
This typedef is a changed from pre 3.0 versions. Now Vector is different from Vertex. It now contains no color information
enum AlphaMode_e |
Enumeration for Alpha Blending/Testing mode
enum ColorMaterialMode_e |
Enumeration for an object's usage of glColorMaterial
enum DepthBuffer_e |
enum EventType_e |
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
enum GLS_Initializers |
Initializers
Light Source Initializers
Sphere Initializers
enum GlsDefinedColorEnum |
GL Studio color defines
enum glsImageCodec |
enum glsSphereMapping_e |
enum ImageNPOTMode |
enum LightType_e |
LightType_e
List Iterator Direction
enum MemberAccess_e |
enum MouseButtonType_e |
enum MouseEventType_e |
Enumeration for mouse event types
enum PickableType_e |
Enumeration for the type of picking for an object
enum PolygonClose_e |
enum PolygonMode_e |
Enumeration for polygon drawing mode of the object
enum RedrawBehavior_e |
enum RotationAxis |
enum ShadingType_e |
enum SpecialKeyState_e |
Enumeration for keyboard modifiers
enum TextureFilter_e |
Enumeration for texture filtering mode of the object
enum TextureMap_e |
Enumeration for texture mapping mode of the object
enum TextureState_e |
Current state of texture in the texture palette
enum Views |
View
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 | ||
) |
angle1 | First angle |
angle2 | Second angle |
float disti::AngularDistanceRad | ( | float | angle1, |
float | angle2 | ||
) |
angle1 | First angle |
angle2 | Second angle |
void disti::AppendTrailingSlash | ( | char * | s | ) |
Appends a trailing slash to a path string, if one isn't there already
s | File path |
void disti::AppendTrailingSlash | ( | std::string & | s | ) |
Appends a trailing slash to a path string, if one isn't there already
s | File path |
int disti::C_EncodeString | ( | char * | dest, |
const char * | src, | ||
const int | dest_str_length | ||
) |
Encodes a string using C language encoding
dest | Destination string |
src | Source string |
dest_str_length | Size of the destination buffer |
std::string disti::C_EncodeString | ( | const std::string & | src | ) |
Returns and encoded std::string using C language encoding
src | Source 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
|
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.
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!
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.
obj | The display object that will move (usually the needle) |
value | The actual value that the needle should point to. |
gauge_values | A 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. |
segments | The number of pairs in the gauge_values array. |
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.
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!
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.
licenseGroupName | A name for what this license allows. i.e. "GL Studio Runtime". |
feature | The specific feature that will be checked out. |
version | The specific version that will be checked out. |
quiet | When 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.
b0 | The label for button 0 (ESC is shortcut for this Right button) |
b1 | The label for button 1 (RET is shortcut for this Center button) |
b2 | The label for button 3 (left-most button) |
s | The text string to display |
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.
b0 | The label for button 0 (ESC is shortcut for this Right button) |
b1 | The label for button 1 (RET is shortcut for this Center button) |
b2 | The label for button 3 (left-most button) |
defaultChoice | The value returned when in command-line mode |
s | The text string to display |
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.
obj | the object to call the method on |
method | a 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.
obj | the object to set the resource on |
attributeName | the 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.)
Type | The type of the property (int, float, glsColor, etc.) |
Class | The class of the object that owns this parameter (typically a subclass of DisplayObject) |
attrName | The attribute name for this property. |
obj | The display object instance associated with this property. |
setMethod | The setter method for the property (can be NULL) |
getMethod | The getter method for the property (can be NULL) |
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.
KeyboardCallbackBase* disti::CreateInputHandlerCallback | ( | const typename KeyboardMethodCallback< Class >::Callback | method, |
Class *const | obj | ||
) |
helper method to create a KeyboardCallbackBase from a class method
method | a class method pointer |
obj | the 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
dest | Destination string |
src | Source string |
dest_str_length | Size of the destination buffer |
std::string disti::DecodeString | ( | const std::string & | src | ) |
Decodes a std::string that was encoded using EncodeString
src | Encoded Source 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
[in] | matrix | the matrix to decompose |
[out] | scale | a vector that contains the x, y, and z scale factors |
[out] | location | a vector that contains the x, y, and z translation |
[out] | rotation | a 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.
[in] | matrix | the matrix to decompose |
[in] | scale | a vector that contains the x, y, and z scale factors |
decompose the scale factors from a GlsMatrix
[in] | m | the matrix to decompose |
void disti::DistiAssertDebug | ( | const char * | expression, |
const char * | filename, | ||
unsigned int | lineNumber | ||
) |
Do not call DistiAssertDebug directly, instead use the DistiAssert macro
void disti::DistiAssertRelease | ( | const char * | expression, |
const char * | filename, | ||
unsigned int | lineNumber | ||
) |
Do not call DistiAssertRelease directly, instead use the DistiAssert macro
ImageNPOTMode disti::DoesSystemSupportNPOT | ( | ) |
Determines if Non Power Of Two textures are supported.
|
inline |
Emits the specfied ObjectEvent
|
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.
dest | Destination string |
src | Source string |
dest_str_length | Size of the destination buffer |
std::string disti::EncodeString | ( | const std::string & | src | ) |
Encodes a std::string such that there are no whitespace characters in the string
src | Source 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.
x | first number to use in the comparison which determines the range |
y | number to check if within the range determined by x and precision |
precision | number 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
s | The 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
s | The text string to display |
bool disti::FileExists | ( | const char * | filename | ) |
filename | The filename to check |
std::string disti::FileExtension | ( | const std::string & | filepath | ) |
filepath | Filepath to get extension from |
std::string disti::FileName | ( | const std::string & | filepath | ) |
filepath |
std::string disti::FilePath | ( | const std::string & | filepath | ) |
filepath | A 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).
new_origin | Vector to the new coordinate system origin. |
new_i | Vector parallel to the new x-axis with magnitude equal to one unit in the new coordinate system. |
new_j | Vector parallel to the new y-axis with magnitude equal to one unit in the new coordinate system. |
new_k | Vector parallel to the new z-axis with magnitude equal to one unit in the new coordinate system. |
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.
arraySize | The size of vertex_array |
array | The Vertex array |
index1 | variable to receive 1st array index |
index2 | variable to receive 2nd array index |
index3 | variable to receive 3rd array index |
isVectorArray | true if array points to a Vector array, false if it points to a Vertex array |
|
inline |
Vertex version of FindNonColinearVertices
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 | ) |
bool disti::GetComponentClassNames | ( | const char * | dllFileName, |
DynamicArray< std::string, false > & | 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
source | The number to break up |
_1 | The 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 | ) |
filename | Filename 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 | ) |
name | A string containing just the file name without a path |
const char* disti::GetFilePath | ( | const char * | name | ) |
name | A string containing a file with a path |
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.
from | The DisplayObject to start at |
to | The DisplayObject to end at |
outTransform | Out parameter - If the function returns true, this will contain the resulting transformation. |
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.
from | The DisplayObject to start at |
to | The DisplayObject to end at |
outTransform | Out parameter - If the function returns true, this will contain the resulting transformation. |
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.
topFrame | The frame in which the qualification will make sense. |
obj | The object which is a direct child or located somewhere below topFrame. |
bool disti::GetReleaseImageDataDefault | ( | void | ) |
Returns the current value for the flag controlling the default behavior for new Image instances. See SetReleaseImageDataDefault() for more details.
FILE* disti::gls_fopen | ( | const char * | filename, |
const char * | flags | ||
) |
Attempts to open the given file. Relative file paths are resolved using ResolvePath.
filename | The name of the file to open |
flags | fopen style file arguments (e.g. "r") |
void disti::GlsAssert | ( | const char * | expression, |
const char * | filename, | ||
unsigned int | lineNumber | ||
) |
Do not call GlsAssert directly, instead use the GLS_ASSERT macro
|
inline |
index | of defined color |
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.
value | The value to be converted. |
gauge_values | A 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. |
segments | The number of pairs in the gauge_values array. |
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.
point | Returned parameter, contains intersection point on success |
lineVector | Direction of the vector |
linePoint | Origin point of the vector |
planeNormal | Surface normal of the plane |
planePoint | A point on the plane |
bool disti::IsDirectory | ( | const char * | filename | ) |
filename | The filename to check |
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.
origin | The origin of the line to test |
direction | The direction vector of the line |
v0 | The first triangle point |
v1 | The second triangle point |
v2 | The third triangle point |
collisionPoint | Returns where the triangle was hit (only set if the triangle was actually hit) |
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.
s | The 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.
p1 | First point |
p2 | Second point |
p3 | Third point |
Test if the given points are not colinear (they are not in a line)
|
inline |
event | The event to check |
eventName | The eventName to compare |
eventData | optional eventData to compare, if NULL, it will not be checked, otherwise, it will. |
|
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.
std::ostream& disti::operator<< | ( | std::ostream & | outstr, |
const Material & | mat | ||
) |
Stream operator to write a material to a stream
|
inline |
Out stream operator for VerticalAlignment_t enumeration.
|
inline |
Out stream operator for EllipsizeMode_t enumeration.
std::istream& disti::operator>> | ( | std::istream & | instr, |
Material & | mat | ||
) |
Stream operator to read a material from a stream
|
inline |
In stream operator for VerticalAlignment_t enumeration.
|
inline |
In stream operator for EllipsizeMode_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>/
path | A path to convert |
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)
p1 | First point in the vector |
p2 | Second point in the vector |
p3 | A point in the plane p1,p2,p3 |
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
finder | The 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.
resourcePath | The 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
s | The text string to display |
bool disti::RampBool | ( | double | time | ) |
RampBool can be used to generate varying data for testing purposes.
time | The system time (Available from the Calculate method) |
double disti::RampDouble | ( | double | time, |
double | min, | ||
double | max | ||
) |
RampDouble is used to generate varying data for testing purposes.
time | The system time (Available from the Calculate method) |
min | The smallest value to return |
max | The largest value to return |
float disti::RampFloat | ( | double | time, |
float | min, | ||
float | max | ||
) |
RampFloat is used to generate varying data for testing purposes.
time | The system time (Available from the Calculate method) |
min | The smallest value to return |
max | The largest value to return |
int disti::RampInt | ( | double | time, |
int | min, | ||
int | max | ||
) |
The ramp functions can be used to generate varying data for testing purposes.
time | The system time (Available from the Calculate method) |
min | The smallest value to return |
max | The largest value to return |
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.
origin | The origin of the ray to test |
direction | The direction vector of the ray |
v0 | The first triangle point |
v1 | The second triangle point |
v2 | The third triangle point |
collisionPoint | Returns where the triangle was hit (only set if the triangle was actually hit) |
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.
path | The path to operate on. |
slash | The type of slash to search for. |
std::string disti::ResolvePath | ( | const char * | path | ) |
Resolves the given path searching the resource path list. The CWD is always implicity searched first.
path | The relative path to resolve |
std::string disti::ResolveRuntimeResourcePath | ( | const char * | fileName | ) |
Prepends the resource path to a file name.
[in] | fileName | The name of the file |
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
filename | The name of the file to open |
flags | fopen style file arguments (e.g. "r") |
f | Contains file pointer on success |
int disti::Safe_fopen | ( | const char * | filename, |
char * | flags, | ||
std::fstream & | outstr | ||
) |
Stream version
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
object | the object to notify |
property | the storage for the data that is going to be set |
newValue | the new value to set |
name | the 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.
state | The 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.)
enable | The new default value |
Tesselator functions. Implements polygon tessellation.Called by application to perform a CSG operation while tesselating one group of objects.
obj_list | Pointer to group of objects to tessellate |
Group* disti::Tessellate | ( | Group * | object_list, |
int | tesstype, | ||
CreateGroupFunc | , | ||
CreatePolyFunc | , | ||
DecomposeFunc | |||
) |
Called by application to perform a CSG operation while tesselating two objects.
object_list | List containing the two objects to tessellate |
tesstype | The operation to perform (union, intersect, subtract) |
Group* disti::TessellateGlyph | ( | Group * | obj_list, |
CreateGroupFunc | , | ||
CreatePolyFunc | , | ||
DecomposeFunc | |||
) |
Called by application to perform a CSG operation on a character glyph
obj_list | Pointer to group of objects to tessellate |
std::string disti::Uppercase | ( | const std::string & | str | ) |
Returns a string which is the uppercase version of the passed parameter.
str | original string to convert to Uppercase |
T* disti::ValidatePointer | ( | const T *const | p | ) |
Assert the pointer is not null and return it
unsigned char glsDefinedColors[GLS_COLOR_MAX][4] |
GLS | specific color index |
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