GL Studio C++ Runtime API
|
#include <display.h>
Public Types | |
enum | AvailableAttributesEnum |
Public Member Functions | |
DisplayObject (float x, float y, float z) | |
DisplayObject (const DisplayObject &object, const bool generateNames) | |
virtual | ~DisplayObject (void) |
void | Destroy () |
virtual void | SetAvailableAttributes (unsigned int value) |
virtual void | AlphaMode (int mode) |
virtual int | AlphaMode (void) |
virtual bool | AntiAlias (void) |
virtual void | AntiAlias (bool alias) |
void | ApplyTextureSettings (int textureIndex=-1) |
DistiAttribDict & | Attributes () |
virtual void | SetBlendColor (const GlsColor &color) |
void | GetBlendColor (unsigned char color[]) |
void | GetBlendColor (unsigned char &r, unsigned char &g, unsigned char &b, unsigned char &a) |
virtual GlsColor | GetBlendColor () |
void | SetBlendColor (unsigned char color[]) |
void | SetBlendColor (unsigned char r, unsigned char g, unsigned char b, unsigned char a) |
bool | BlinkedOff (void) |
virtual bool | Blinking (void) |
virtual void | Blinking (const bool blink) |
virtual float | BlinkRate (void) |
virtual void | BlinkRate (const float rate) |
const Vector & | BoundingVolumeCenter () const |
void | BoundingVolumeCenter (const Vector ¢er) |
bool | BoundingVolumeHit (const Vector &start, const Vector &direction) |
float | BoundingVolumeRadius () const |
void | BoundingVolumeRadius (float radius) |
virtual void | Calculate (double time) |
void | CalculateCollisionPoint (const Vector &pickLoc, const Vector &directionVector, Vector *collisionPoint) |
virtual void | CalculateParentBoundingBox (void) |
virtual void | CalculateTextureCoordinates (void) |
bool | GetTexturePointTransformationMatrix (GlsMatrixType &world2tex) |
CallbackMethodCallerBase * | CallbackCaller () const |
void | CallbackCaller (CallbackMethodCallerBase *cb) |
virtual void | GetCenter (Vector ¢er) |
virtual DisplayObject * | CloneObject (bool generateNames=false)=0 |
virtual GlsColor | GetColor () |
void | GetColor (unsigned char c4[]) |
void | GetColor (unsigned char &r, unsigned char &g, unsigned char &b, unsigned char &a) |
virtual void | SetColor (const GlsColor &color) |
void | SetColor (unsigned char c4[]) |
void | SetColor (unsigned char r, unsigned char g, unsigned char b, unsigned char a) |
virtual void | CopyGeometry (DisplayObject *src) |
virtual void | CopyHierarchyProperties (DisplayObject *src, bool copyName) |
virtual void | CopyProperties (DisplayObject *src) |
virtual InterfaceListType * | GetCppInterfaceDescription (InterfaceListType *addToThisList=NULL) |
virtual void | GetCppInterfaceDescriptionFree (InterfaceListType *array) |
virtual void | CullBackFace (const bool val) |
virtual bool | CullBackFace (void) |
bool | Culled () const |
bool | CullTest (const GlsMatrixType *matrix, const Culler &culler) |
GlsMatrixType & | DcsMatrix () |
void | DcsMatrix (const GlsMatrixType &matrix) |
virtual void | DeleteVertexAt (unsigned int index) |
virtual void | DeleteVertex (unsigned int indexAfter) final |
virtual int | DepthTest (void) |
virtual void | DepthTest (unsigned char zbuf) |
virtual void | Draw (void)=0 |
const GlsMatrixType * | DrawMatrix () |
bool | NeedCalcDrawMatrix () |
void | DynamicRotate (float angle, int axis) |
void | DynamicRotate (const Vector &v) |
void | DynamicRotate (float angle[]) |
virtual void | DynamicRotate (float x, float y, float z) |
virtual void | DynamicRotateRelative (float angle, int axis) |
virtual float | DynamicRotation (int axis) |
virtual Vector | DynamicScale () |
virtual void | DynamicScale (float x, float y, float z) |
void | DynamicScale (const Vector &scale) |
virtual void | DynamicTranslate (float x, float y, float z, bool relative=false) |
void | DynamicTranslate (const Vertex &amount, bool relative) |
void | DynamicTranslate (const Vector &amount) |
virtual void | DynamicTranslate (float amount, int axis, bool relative=false) |
virtual float | DynamicTranslation (int axis) |
virtual Vector | DynamicTranslation () |
DisplayObjectEditor * | Editor () |
const DisplayObjectEditor * | Editor () const |
void | Editor (DisplayObjectEditor *editor) |
virtual void | GetExtents (float &x, float &y, float &z, float &x1, float &y1, float &z1) |
void | GetExtentsDCS (Vector &min, Vector &max) |
void | GetFillColor (unsigned char &r, unsigned char &g, unsigned char &b, unsigned char &a) |
void | GetFillColor (unsigned char c4[]) |
virtual GlsColor | GetFillColor (void) |
void | SetFillColor (unsigned char r, unsigned char g, unsigned char b, unsigned char a) |
void | SetFillColor (unsigned char c4[]) |
virtual void | SetFillColor (const GlsColor &color) |
virtual void | GenerateInstanceName (void) |
virtual DisplayObject * | handle (DisplayEvent *ev) |
virtual bool | Hit (float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint) |
virtual bool | HitUtil (float x, float y, float z, float scale, Vertex *vertices, unsigned int vertex_cnt, const Vector &directionVector, Vector *collisionPoint) |
virtual void | InsertVertexAt (unsigned int index) |
virtual void | InsertVertex (unsigned int indexAfter) final |
char * | InstanceName (void) |
void | InstanceName (const char *name) |
virtual bool | LightingEnabled () |
virtual void | LightingEnabled (bool lighting) |
virtual int | LineStippleMultiplier (void) |
virtual void | LineStippleMultiplier (int mult) |
virtual int | LineStipplePattern (void) |
virtual void | LineStipplePattern (int pattern) |
virtual float | LineWidth (void) |
virtual void | LineWidth (float width) |
virtual const Vertex & | Location (void) const |
virtual void | Location (const Vertex &v) |
virtual void | Location (float x, float y, float z) |
virtual void | GetLocation (Vertex &v) |
virtual void | GetLocation (float &x, float &y, float &z) |
float | X (void) const |
float | Y (void) const |
float | Z (void) const |
void | X (const float x) |
void | Y (const float y) |
void | Z (const float z) |
virtual int | MaterialIndex () |
virtual void | MaterialIndex (int index) |
virtual DynamicArray< int > & | MaterialIndices () |
virtual void | MaterialIndices (DynamicArray< int > indices) |
GlsMatrixType * | ModelMatrix () |
bool | NeedCalculate () |
Vector * | Normals () |
virtual void | SetNormals (unsigned int nPoints, Vector *vertices) |
void | VaSetNormals (unsigned int nPoints,...) |
unsigned int | NumberOfVertices () const |
virtual float | ObjectDepth (void) |
virtual float | ObjectHeight (void) |
virtual float | ObjectWidth (void) |
virtual void | SetOrigin (const Vertex &vert) |
virtual void | Parent (DisplayFrame *par) |
DisplayFrame * | Parent (void) const |
virtual void | ParentGroup (Group *group) |
Group * | ParentGroup (void) const |
virtual DisplayObject * | Pick3D (const Vector &winLoc, const Vector &logicalCoords, float scale, const Vector &directionVector, Vector &collisionWinLoc, const OpenGLMatrices &drawnMatrices) |
unsigned char | Pickable () |
virtual void | Pickable (unsigned char pick) |
virtual int | PolygonEnd (void) |
virtual void | PolygonEnd (const int end) |
virtual int | PolygonMode (void) |
virtual void | PolygonMode (int mode) |
virtual void | PreDraw (const OpenGLMatrices ¤t, Culler &culler) |
GlsMatrixType * | ProjMatrix () |
virtual void | ReallocateVertices (unsigned int numVertices, bool initializeNew, bool copyOld) |
virtual float | RelativeAngle (const float x, const float y) |
virtual DistiAttributeBase & | Resource (const char *name) |
virtual void | GetResources (std::ostream &outstr, GlsResourceFilter *filter=NULL) |
void | RestoreAlpha (void) |
void | RestoreAntiAlias (void) |
void | RestoreLighting (void) |
void | RestoreLineStyle (void) |
const Vertex & | RotationPoint () const |
virtual void | RotationPoint (const Vertex &v) |
virtual void | RotationPoint (float x, float y, float z) |
virtual void | GetRotationPoint (Vertex &v) |
virtual void | Rotate (float angle, int axis=Z_AXIS) |
virtual void | Rotate (const Vector &origin, float angle, int axis=Z_AXIS) |
virtual void | Rotate (const Vector &orig, float angle, const Vector &axis) |
void | SaveMatrices () |
virtual void | Scale (float px, float py, float pz, Vertex *anchor, int handleBar=0) |
void | Set (int spec,...) |
bool | SetupAlpha (void) |
bool | SetupAntiAlias (void) |
void | SetupDepthTest (void) |
void | SetupLighting (void) |
bool | SetupLineStyle (void) |
void | SetupPolyDrawStyle (void) |
void | SetupShading (void) |
bool | SetupTexture (void) |
virtual int | Shading (void) |
virtual void | Shading (const int shading) |
virtual void | GetTransformedExtents (Vector &min, Vector &max, const GlsMatrixType &matrix, bool resetMinMax=true) |
virtual void | SetTexCoords (unsigned int nPoints, Vector *new_tex_coord, bool isVectorArray=true) |
void | SetTexCoords (unsigned int nPoints, Vertex *new_tex_coord) |
void | VaSetTexCoords (unsigned int nPoints,...) |
Vector * | TextureCoordinates (void) |
Vector * | GetTextureCoordinates (void) |
virtual int | TextureIndex (void) |
virtual void | TextureIndex (int textureIndex) |
virtual Vector * | GetTexturePoints (void) |
virtual bool | TextureRepeat (void) |
virtual void | TextureRepeat (const int rep) |
virtual int | TextureMappingTechnique (void) |
virtual void | TextureMappingTechnique (const int map) |
virtual int | TextureMagnificationFilter (void) |
virtual void | TextureMagnificationFilter (const int filter) |
virtual int | TextureMinificationFilter (void) |
virtual void | TextureMinificationFilter (const int filter) |
virtual void | Translate (float tr[]) |
virtual void | Translate (float x, float y, float z) |
virtual void | TranslateVertices (float x, float y, float z) |
virtual void | UpdateBoundingVolume (void) |
void * | UserData (void) const |
void | UserData (void *data) |
virtual void | SetVertexColor (unsigned int vertex, unsigned char CurrentFillColor[]) |
virtual Vertex * | Vertices () |
virtual void | SetVertices (unsigned int nPoints, Vertex *vertices) |
void | VaSetVertices (unsigned int nPoints,...) |
int * | ViewMatrix () |
bool | Visible (void) const |
bool | Visibility (void) const |
virtual void | Visibility (const bool vis) |
virtual Vector | WorldRotationPoint (void) |
virtual void | WorldRotationPoint (const Vector &vert) |
virtual Vertex | WorldVertex (unsigned int i) |
virtual void | WorldVertex (unsigned int i, const Vertex &vert) |
bool | LogicalToWindow (const Vector &logical, Vector &winLoc, const OpenGLMatrices &alternateMatrices=OpenGLMatrices()) |
bool | WindowToLogical (const Vector &winLoc, Vector &logical, Vector *directionVector=NULL, const OpenGLMatrices &alternateMatrices=OpenGLMatrices()) |
void | LogicalToDCS (Vector logicalPoint, Vector &objectLocal, const Vector *directionVector, const Vector &planeNormal=Vector(0, 0, 1), const Vector &planePoint=Vector(), const GlsMatrixType *dcsMatrix=NULL) |
void | DCSToLogical (Vector dcsPoint, Vector &logicalPoint, const GlsMatrixType *dcsMatrix=NULL) |
virtual bool | GetPlaneVectorPoints (Vertex &p1, Vertex &p2, Vertex &p3, Vertex &planeVector) |
void | NotifyAttributeChanged (const AttributeName &name) override |
virtual void | SetPainter (GlsPainter *painter) |
virtual GlsPainter * | GetPainter () |
void | InvalidatePainter () |
virtual bool | IsVisibleInScene (const DisplayObject *obj=NULL) const |
Public Member Functions inherited from AttributeChangedNotifier | |
virtual | ~AttributeChangedNotifier () |
Public Member Functions inherited from WeakReferenceableMixin | |
void | AddWeakReference (WeakReference *weakRef) override |
void | NotifyWeakReferenceDestroyed (WeakReference *ref) override |
Static Public Member Functions | |
static void | UseManualBlinkElapsedTime (bool useManualTime) |
static void | SetManualBlinkElapsedTime (double elapsedTime) |
Protected Member Functions | |
virtual void | VaListSetVertices (unsigned int nPoints, va_list args) |
virtual void | VaListSetNormals (unsigned int nPoints, va_list args) |
virtual void | VaListSetTexCoords (unsigned int nPoints, va_list args) |
void | AllocateModelMatrix () |
bool | ApplyDynamicRotation (void) |
virtual void | CalcDrawMatrix () |
void | CalcDrawMatrixIfExists () |
virtual void | CalculateMatrices (const OpenGLMatrices &newMatrices) |
bool | InsideVertexExtents (float x, float y, unsigned int nVerts, Vertex *verts, float tolerance) |
void | NeedCalculate (bool val) |
void | PickSetup (float x, float y, float z, Vertex *vertices, unsigned int vertex_cnt, const Vector &directionVector) |
void | PickCleanup (Vertex *vertices, unsigned int vertex_cnt) |
virtual void | SetValue (int spec, va_list &args) |
int | GetApplicableTextureIndex () |
int | GetApplicableTextureRepeat () |
Protected Member Functions inherited from WeakReferenceableMixin | |
WeakReferenceableMixin (void) | |
virtual | ~WeakReferenceableMixin () |
Protected Attributes | |
int | _alphaMode |
bool | _antiAlias |
bool | _attributesAdded |
bool | _blinking |
float | _blinkRate |
GlsColor | _color |
bool | _cullBackFace |
GlsMatrixType | _dcsMatrix |
unsigned char | _depthTest |
GlsMatrixType * | _drawMatrix |
unsigned char | _lineStippleMultiplier |
unsigned short | _lineStipplePattern |
float | _lineWidth |
Vertex | _location |
GlsMatrixType * | _modelMatrix |
Vector * | _normals |
unsigned int | _nTex_vertices |
unsigned int | _nVertices |
unsigned char | _polygonEnd |
unsigned char | _polygonMode |
int | _polygonOffset |
GlsMatrixType * | _projMatrix |
unsigned char | _shading |
Vector * | _texCoord |
GlsColor | _textureBlendColor |
int | _textureIndex |
unsigned char | _textureMagFilter |
unsigned char | _textureMinFilter |
unsigned char | _textureMap |
Vector | _texturePoints [4] |
unsigned char | _textureRepeat |
void * | _userData |
Vertex * | _vertices |
int * | _viewMatrix |
bool | _visible |
Protected Attributes inherited from WeakReferenceableMixin | |
DynamicArray< WeakReference * > * | _weakRefs |
Base Class for all graphical objects. It is an abstract class. Each object drawn in the editor will have a corresponding object. All drawn objects are derived from this class.
Sets and retrieves the current setting used for determining what attributes get created for each object.
DisplayObject | ( | float | x, |
float | y, | ||
float | z | ||
) |
The default constructor for display objects. Generally invoked by constructors of derived classes.
x | X coordinate of object location |
y | Y coordinate of object location |
z | Z coordinate of object location |
DisplayObject | ( | const DisplayObject & | object, |
const bool | generateNames | ||
) |
The copy constructor for display objects
object | The display object that is being copied |
generateNames | Whether or not to generate a new instance name |
|
virtual |
Virtual destructor for display object
|
protected |
Allocate the model matrix, if needed
|
virtual |
Set the alpha mode state for this object
mode | which alpha mode to use when drawing |
Reimplemented in Group, Gls3DCable, and GlsRSOWrapper.
|
virtual |
Get the alpha mode for this object
Reimplemented in Group, Gls3DCable, and GlsRSOWrapper.
|
virtual |
Get the anti aliasing state this object
Reimplemented in Group, Gls3DCable, and GlsRSOWrapper.
|
virtual |
Set the anti aliasing state for this object
alias | Whether or not to perform anti aliasing |
Reimplemented in Group, Gls3DCable, GlsAngularScale, and GlsRSOWrapper.
|
protected |
Applies dynamic rotation to object, saving the matrix stack so that dynamic picking can occur
void ApplyTextureSettings | ( | int | textureIndex = -1 | ) |
Second half of texture setup. Applies texture modes like modulate, decal, etc.
textureIndex | Index of the texture to apply |
|
inline |
Gets the full list of attributes for this object
bool BlinkedOff | ( | void | ) |
Determines if the object is blinked on or off
|
virtual |
Get the blinking state this object
|
virtual |
Set the blinking state for this object
blink | Whether or not to blink this object |
|
virtual |
Get the blinking rate this object
|
virtual |
Set the blinking rate for this object
rate | Number of times per second to blink this object |
|
inline |
Get the current bounding volume center
void BoundingVolumeCenter | ( | const Vector & | center | ) |
Set the current bounding volume center
center | The new center |
Determines if the given ray hits this bounding volume
start | Starting point of the ray |
direction | Direction vector of the ray |
|
inline |
Get the bounding sphere radius
void BoundingVolumeRadius | ( | float | radius | ) |
Set the bounding sphere radius
radius | The bounding sphere radius |
|
protectedvirtual |
Creates and recalculates the _drawMatrix If _rotation, _dynamicScale, or _dynamicTranslate change you must call CalcDrawMatrix() If _dcsMatrix, _location, or _rotationPoint change you need to call CalcDrawMatrixIfExists() These are normally called automatically for you by the API Methods that affect those values. Sub-classes may override CalcDrawMatrix() to include additional transformations in the _drawMatrix.
Reimplemented in ComponentBase.
|
inlineprotected |
Recalculates the _drawMatrix if it exists. See CalcDrawMatrix() for more info.
|
virtual |
Provides a mechanism for performing regular calculations, seperate from drawing. In a standalone applicaton Calculate is recursively called by the main loop before the objects are drawn.
time | The elaspsed time in seconds since program start |
Reimplemented in Group, Gls3DCable, GlsTextGrid, GlsRSOWrapper, GlsSchematicTeeInterconnect, GlsMovingEye, GlsTextBox, GlsNinePatch, GlsSchematicPolyLineInterconnect, GlsMovieTexture, GlsMutexGroup, and SplashDisplay.
void CalculateCollisionPoint | ( | const Vector & | pickLoc, |
const Vector & | directionVector, | ||
Vector * | collisionPoint | ||
) |
Calculates where the pick vector hit this object
pickLoc | Start of the pick vector |
directionVector | Direction of the pick vector |
collisionPoint | Returns the collision point |
|
protectedvirtual |
Applies the _drawMatrix to the modelMatrix. If necessary derived classes can save other matrices.
newMatrices | A set of matrices passed down to this object from its parent. |
Reimplemented in ComponentBase.
|
virtual |
Calculates the bounding box of the parent group object.
|
virtual |
Recalculates the texture coordinates for the object based on the TexturePoints.
Reimplemented in Group, Gls3DCable, GlsSphere, GlsCylinder, GlsNurbCurve, GlsSchematicTeeInterconnect, GlsSchematicPolyLineInterconnect, GlsEllipse, and GLPolygon.
|
inline |
void CallbackCaller | ( | CallbackMethodCallerBase * | cb | ) |
Sets the callback method for this object. cb MUST be dynamically allocated since memory management will be passed to this display object. cb will be deleted when a new callback is registered via this method or when the display object is destructed.
cb | The new callback method for this object |
|
pure virtual |
Copy+Create operation in one method. In derived classes, this method will create a new instance of the derived class and then copy the object into the new instance. The cut,copy,paste and undo operations use this method.
generateNames | Whether or not to generate new names for cloned objects |
Implemented in GlsTextGrid, Gls3DCable, GlsCylinder, GlsSphere, Group, GlsCTLTextBox, GlsAngularScale, GlsLinearScale, GlsRSOWrapper, GlsEyePoint, GlsMovingEye, GlsMimicGroup, GlsSchematicTeeInterconnect, GlsNurbCurve, GlsTextBox, GLTriMesh, GlsKnob, GlsSwitch, ComponentBase, GlsAdvancedMesh, GlsNinePatch, GlsSchematicPolyLineInterconnect, GlsPolyLine, GlsPushButton, GlsDynamicPath, GlsLinearFloatController, GlsMovieTexture, SplashDisplay, GlsMutexGroup, GlsVideoToTexture, GlsLightSource, GlsEllipse, GlsClippingGroup, GlsSerialMorphMesh, GLPolygon, GlsOdometer, GlsThumbWheel, GlsMultiView, GLPolygonGlyph, and GlsPathManager.
|
virtual |
Copies the geometry information from one object to another. Used by the undo mechanism to allow user to undo a geometry change.
src | The object to copy geometry from |
Reimplemented in GlsText, GlsTextGrid, Group, GlsCylinder, GlsCTLTextBox, GlsSphere, GlsAngularScale, GlsLinearScale, GlsEyePoint, GlsRSOWrapper, GlsNurbCurve, GlsTextBox, ComponentBase, GLTriMesh, GlsAdvancedMesh, GlsNinePatch, GlsPolyLine, GlsSchematicPolyLineInterconnect, GlsGeometryResourceMesh, GlsEllipse, and GlsSerialMorphMesh.
|
virtual |
Copies the hierarchy information from one object to another
src | The object to copy from |
copyName | Whether or not to copy the object name |
|
virtual |
Copies the attributes except for geometry attributes from one object to another. Used by the undo mechanism to undo most attribute change operations.
src | The object to copy properties from |
Reimplemented in GlsText, GlsTextGrid, Gls3DCable, Group, GlsCTLTextBox, GlsCylinder, GlsAngularScale, GlsSphere, GlsLinearScale, GlsEyePoint, GlsRSOWrapper, GlsMimicGroup, GlsMovingEye, GlsSchematicTeeInterconnect, GlsTextBox, ComponentBase, GlsKnob, GLTriMesh, GlsSwitch, GlsLightSource, GlsAdvancedMesh, GlsNinePatch, GlsPolyLine, GlsSchematicPolyLineInterconnect, GlsPushButton, GlsDynamicPath, GlsLinearFloatController, GlsMovieTexture, GlsMutexGroup, GlsGeometryResourceMesh, GlsVideoToTexture, GlsEllipse, GlsClippingGroup, GlsSerialMorphMesh, GlsThumbWheel, GlsOdometer, GlsMultiView, and GlsPathManager.
|
virtual |
Sets if back faces should be removed
val | True if back faces should be removed |
Reimplemented in Group, Gls3DCable, and GlsRSOWrapper.
|
virtual |
Returns if back faces should be removed
Reimplemented in Group, Gls3DCable, and GlsRSOWrapper.
|
inline |
Whether or not this object is currently culled
|
inline |
|
inline |
Gets the objects Dynamic Coordinate System (DCS) Matrix
void DcsMatrix | ( | const GlsMatrixType & | matrix | ) |
Sets the dcs matrix
matrix | the dcs matrix |
void DCSToLogical | ( | Vector | dcsPoint, |
Vector & | logicalPoint, | ||
const GlsMatrixType * | dcsMatrix = NULL |
||
) |
Transform a point from the object's DCS coordinate system to the logical coordinate system.
dcsPoint | The original point in dcs coordinates |
logicalPoint | The returned point in the objects DCS coordinate system on the XY plane. |
dcsMatrix | An alternate DCS matrix to convert from. |
|
inlinefinalvirtual |
Remove the Vertex at (indexAfter - 1).
indexAfter | One past the index to delete. If it is beyond the number of vertices or is 0, the vertices will be unchanged. |
|
virtual |
Remove the Vertex at index.
Reimplemented in GlsPolyLine, GlsNurbCurve, GlsSchematicPolyLineInterconnect, and GLPolygon.
|
virtual |
Get the z buffering state for this object
Reimplemented in Group, Gls3DCable, and GlsRSOWrapper.
|
virtual |
Set the z buffering state for this object
zbuf | Whether or not to perform z buffering |
Reimplemented in Group, and Gls3DCable.
void Destroy | ( | ) |
Call this to delete objects, as it handles special cases like cleanup of LiveComponents.
|
pure virtual |
Draws this object on the current display frame (_parent member). Pure virtual method
Implemented in GlsTextGrid, Gls3DCable, Group, GlsCTLTextBox, GlsAngularScale, GlsLinearScale, GLTriMesh, GlsSphere, GlsCylinder, GlsRSOWrapper, GlsMimicGroup, GlsEyePoint, GlsMovingEye, GlsSchematicTeeInterconnect, ComponentBase, GlsNurbCurve, GlsTextBox, GlsNinePatch, GlsKnob, GlsSwitch, GlsPolyLine, GlsSchematicPolyLineInterconnect, GlsLightSource, GlsDynamicPath, GlsLinearFloatController, GlsMutexGroup, GlsGeometryResourceMesh, GlsMovieTexture, GlsVideoToTexture, GlsPushButton, GlsEllipse, GlsLodGroup, GlsClippingGroup, GlsOdometer, Statistics, GlsThumbWheel, GLPolygon, GlsMultiView, GlsPathManager, GLPolygonGlyph, and GlsSortedDrawGroup.
|
inline |
void DynamicRotate | ( | float | angle, |
int | axis | ||
) |
Sets the dynamic rotation to the specified value for the specified axis (in degrees)
angle | The new dynamic rotation angle for the object |
axis | The axis to change NOTE: Not virtual |
void DynamicRotate | ( | const Vector & | v | ) |
Sets the dynamic rotation to the specified value for all axes (in degrees)
v | Vector containing the new dynamic rotation angles for each axis |
void DynamicRotate | ( | float | angle[] | ) |
Sets the dynamic rotation to the specified value for all axes (in degrees)
angle | Array of three floats containing the new dynamic rotation angles for each axis |
|
virtual |
Sets the dynamic rotation to the specified value for all axes (in degrees)
x | The new dynamic rotation angle for the X axis |
y | The new dynamic rotation angle for the Y axis |
z | The new dynamic rotation angle for the Z axis NOTE: Is virtual. If needed overload this method. |
|
virtual |
Changes the dynamic rotation by the specified value for the specified axis (in degrees)
angle | The change in dynamic rotation angle for the object |
axis | The axis to change |
|
virtual |
Gets the dynamic rotation to the specified value for the specified axis.
axis | The axis to get the rotation from |
|
virtual |
Returns the dynamic scale values in a Vertex
|
virtual |
Sets the dynamic scale values for an object.
x | X scale |
y | Y scale |
z | Z scale |
void DynamicScale | ( | const Vector & | scale | ) |
Sets the dynamic scale values for an object.
scale | The new dynamic scale for the object |
|
virtual |
Sets the dynamic translation to the specified value for all axes (in logical units)
x | The new dynamic translation for the X axis |
y | The new dynamic translation for the Y axis |
z | The new dynamic translation for the Z axis |
relative | If true will add to existing dynamic translation |
void DynamicTranslate | ( | const Vertex & | amount, |
bool | relative | ||
) |
Sets the dynamic translation to the specified value for all axes (in logical units)
amount | The new dynamic translation for the X, Y, and Z axes |
relative | If true will add to existing dynamic translation NOTE: Not virtual |
void DynamicTranslate | ( | const Vector & | amount | ) |
Sets the dynamic translation to the specified value for all axes (in logical units). Equivalent to DynamicTranslate( amount, false );
amount | The new dynamic translation for the X, Y, and Z axes NOTE: Not virtual |
|
virtual |
Sets the dynamic translation to the specified value for the specified axis
amount | The new dynamic translation for the axis |
axis | Z_AXIS, Y_AXIS, or X_AXIS |
relative | If true will add to existing dynamic translation |
|
virtual |
Returns the current dynamic translation for the specified axis
axis | Z_AXIS, Y_AXIS, or X_AXIS |
|
virtual |
Returns the current dynamic translation for all axes
DisplayObjectEditor* Editor | ( | ) |
Used in the editor to access editor functionality. Gets the editor object pointer. USER CODE SHOULD NOT USE THIS METHOD!
const DisplayObjectEditor* Editor | ( | ) | const |
Used in the editor to access editor functionality. Gets the editor object pointer. USER CODE SHOULD NOT USE THIS METHOD!
void Editor | ( | DisplayObjectEditor * | editor | ) |
Used in the editor to access editor functionality. Sets the editor object pointer. USER CODE SHOULD NOT USE THIS METHOD!
editor | Pointer to editor object. |
|
virtual |
Dynamically generate a name for the object, based on the current time
Reimplemented in GlsMovingEye.
|
protected |
Returns the local setting for _textureIndex if not -1, otherwise returns the group texture index.
|
protected |
Returns the local setting for _textureRepeat if _textureIndex is not -1, otherwise returns the group texture repeat setting.
void GetBlendColor | ( | unsigned char | color[] | ) |
Gets the texture blend color for the object
color | Filled in with RGBA (0-255 range) NOTE: Not Virtual. Simply calls void GetBlendColor(const GlsColor& color); |
void GetBlendColor | ( | unsigned char & | r, |
unsigned char & | g, | ||
unsigned char & | b, | ||
unsigned char & | a | ||
) |
Gets the texture blend color for the object
r | Returns red color component (0-255 range) |
g | Returns Green color component (0-255 range) |
b | Returns Blue color component (0-255 range) |
a | Returns Alpha color component (0-255 range) NOTE: Not Virtual. Simply calls void GetBlendColor(const GlsColor& color); |
|
virtual |
Gets the texture blend color for the object
Reimplemented in Group, Gls3DCable, and GlsRSOWrapper.
|
virtual |
Gets the location of the center of the object in logical units. Value is based on the extents of the object and does not take into consideration dynamic rotation
center | Will contain the center coordinate on return |
|
virtual |
Gets the color for the object outline
Reimplemented in Group, Gls3DCable, and GlsRSOWrapper.
void GetColor | ( | unsigned char | c4[] | ) |
Gets the RGBA color for the object outline
c4 | Gets the RGBA line color (0-255 range) for the object NOTE: Not Virtual. Simply calls void GetColor(const GlsColor& color) |
void GetColor | ( | unsigned char & | r, |
unsigned char & | g, | ||
unsigned char & | b, | ||
unsigned char & | a | ||
) |
Gets the RGBA color for the object outline
r | Gets the red component (0-255 range) of the line color for the object |
g | Gets the blue component (0-255 range) of the line color for the object |
b | Gets the green component (0-255 range) of the line color for the object |
a | Gets the alpha component (0-255 range) of the line color for the object NOTE: Not Virtual. Simply calls void GetColor(const GlsColor& color) |
|
virtual |
Get the details of the Cpp Interface The actual interface is exposed in compiled code.
addToThisList | If not NULL this list will be added to then returned. If NULL a new list will be created. |
Reimplemented in GlsText, GlsTextGrid, GlsCylinder, GlsSphere, GlsCTLTextBox, Gls3DCable, GlsLightSource, GLTriMesh, GlsAngularScale, GlsLinearScale, GlsMovingEye, GlsEyePoint, GlsRSOWrapper, GlsMimicGroup, GlsPushButton, GlsSchematicTeeInterconnect, GlsTextBox, GlsNurbCurve, ComponentBase, GlsKnob, GlsSwitch, GlsAdvancedMesh, GlsNinePatch, GlsPolyLine, GlsSchematicPolyLineInterconnect, SplashDisplay, GlsDynamicPath, GlsLinearFloatController, GlsGeometryResourceMesh, GlsMovieTexture, GlsMutexGroup, GlsVideoToTexture, GlsEllipse, GlsClippingGroup, GlsSerialMorphMesh, GlsThumbWheel, GlsOdometer, GlsMultiView, Group, and GlsPathManager.
|
virtual |
Frees the memory allocated by a previous call to GetCppInterfaceDescription
array | Memory allocated by a previous call to GetCppInterfaceDescription |
Reimplemented in GlsText, GlsTextGrid, GlsCylinder, GlsSphere, GlsCTLTextBox, Gls3DCable, GlsLightSource, GLTriMesh, GlsAngularScale, GlsLinearScale, GlsMovingEye, GlsEyePoint, GlsRSOWrapper, GlsMimicGroup, GlsPushButton, GlsTextBox, GlsSchematicTeeInterconnect, GlsNurbCurve, ComponentBase, GlsKnob, GlsSwitch, GlsAdvancedMesh, GlsNinePatch, GlsPolyLine, GlsSchematicPolyLineInterconnect, SplashDisplay, GlsDynamicPath, GlsLinearFloatController, GlsGeometryResourceMesh, GlsMovieTexture, GlsMutexGroup, GlsVideoToTexture, GlsEllipse, GlsClippingGroup, GlsSerialMorphMesh, GlsThumbWheel, GlsOdometer, GlsMultiView, Group, and GlsPathManager.
|
virtual |
Figure out the static extents for the object. Used by the editor as part of the pick operation and for figuring out the size of groups.
x | Gets the minimum x extent |
y | Gets the minimum y extent |
z | Gets the minimum z extent |
x1 | Gets the maximum x extent |
y1 | Gets the maximum y extent |
z1 | Gets the maximum z extent |
Reimplemented in Group, GlsAngularScale, GlsSphere, GlsCylinder, GlsRSOWrapper, GlsNurbCurve, ComponentBase, GlsSchematicPolyLineInterconnect, GlsGeometryResourceMesh, GlsEllipse, GlsPolyLine, and GlsNinePatch.
Determines the static extents of geometry projected to the XY plane of the object's DCS.
min | Returns the minimum values found in the traversal |
max | Returns the maximum values found in the traversal |
void GetFillColor | ( | unsigned char & | r, |
unsigned char & | g, | ||
unsigned char & | b, | ||
unsigned char & | a | ||
) |
Gets the RGBA color for filling the object
r | Gets the red component (0-255 range) of the fill color for the object |
g | Gets the blue component (0-255 range) of the fill color for the object |
b | Gets the green component (0-255 range) of the fill color for the object |
a | Gets the alpha component (0-255 range) of the fill color for the object NOTE: NOT Virtual Simply calls GlsColor GetFillColor() |
void GetFillColor | ( | unsigned char | c4[] | ) |
Gets the RGBA color for filling the object
c4 | Gets the RGBA fill color (0-255 range) for the object NOTE: NOT Virtual. Simply calls GlsColor GetFillColor() |
|
virtual |
Gets the fill color of the object
Reimplemented in Group, Gls3DCable, GlsCylinder, GlsSphere, GlsEllipse, and GlsNinePatch.
|
virtual |
Gets the location of the origin of the object
v | Will be filled in with the current location |
|
virtual |
Gets the location of the origin of the object
x | Will be filled in with the x coordinate |
y | Will be filled in with the y coordinate |
z | Will be filled in with the z coordinate |
|
virtual |
Returns the painter for this object, or NULL of none. The return value is an observer pointer and should not be deleted
|
virtual |
Finds three coplanar points and the surface normal, if possible. This calculation is performed using the Vertices() of this object. Used in the editor to determine how to map a texture onto an object.
p1 | Returns a point on the plane |
p2 | Returns a point on the plane |
p3 | Returns a point on the plane |
planeVector | Returns the surface normal of the plane |
Reimplemented in GlsSphere, and GlsCylinder.
|
virtual |
Writes the resources (attributes) of this object to the specified stream. The output of this method can be controlled by the GlsResourceFilter. Note that if filter->NamesOnly() is false (the default), then only resources that can return a value will appear in the list.
outstr | The stream to write to |
filter | The filter to determine what to write |
Reimplemented in Group, ComponentBase, Gls3DCable, GlsRSOWrapper, GlsDynamicPath, GlsMultiView, and GlsPathManager.
|
virtual |
Gets the location of the rotation point for the object.
v | Will be filled in with the current rotation point |
|
inline |
Gets the object's texture coordinates
|
virtual |
Gets the object's texture points
bool GetTexturePointTransformationMatrix | ( | GlsMatrixType & | world2tex | ) |
Converts the object's texture points into a transformation matrix for use in calculating the object's texture coordinates
|
virtual |
Determines the static extents of the geometry projected to the XY plane of an arbirary coordinate system.
min | Returns the minimum values found in the traversal |
max | Returns the maximum values found in the traversal |
matrix | Transformation matrix from logical coordinates to the coordinate system to determine the extents in. |
resetMinMax | Normally not specified by user. Should be true for the initial call. |
Reimplemented in Group, GlsAngularScale, GlsRSOWrapper, ComponentBase, GlsEllipse, GlsGeometryResourceMesh, and GlsNinePatch.
|
virtual |
Handles an event that is sent to the object.
ev | The event to send to the object |
Reimplemented in GlsMimicGroup, Gls3DCable, GlsAngularScale, GlsRSOWrapper, GlsPushButton, GlsSchematicTeeInterconnect, GlsKnob, GlsSwitch, GlsEllipse, GlsSchematicPolyLineInterconnect, GlsDynamicPath, GlsLinearFloatController, GlsThumbWheel, GlsMultiView, and GlsOdometer.
|
virtual |
Determines if the object is hit by a pick ray starting at (x,y,z) and pointing towards directionVector in object logical coordinate system. If Pickable() == PICK_BEST it will return the closest point that was hit, otherwise it returns the first point that was hit. This method should not pick points behind the viewer.
x | X coordinate of pick ray start in logical coordinates. |
y | Y coordinate of pick ray start in logical coordinates. |
y | Y coordinate of pick ray start in logical coordinates. |
z | Z coordinate of pick ray start in logical coordinates. |
scale | The scale factor of the window. Affects picking of outlines. Standard value is 1.0. |
directionVector | The direction of the pick ray. |
collisionPoint | If this method returns true, this Vector will contain the location that was hit in logical coordinates. |
Reimplemented in Gls3DCable, Group, GlsAngularScale, GlsLightSource, GlsLinearScale, GLTriMesh, GlsSphere, GlsCylinder, GlsNurbCurve, GlsSchematicTeeInterconnect, GlsPolyLine, GlsSchematicPolyLineInterconnect, GlsGeometryResourceMesh, GlsDynamicPath, GlsLinearFloatController, GlsEllipse, GlsNinePatch, and GlsPathManager.
|
virtual |
Determines if the object is hit by a pick ray starting at (x,y,z) and pointing towards directionVector in the object logical coordinate system If Pickable() == PICK_BEST it will return the closest point that was hit, otherwise it returns the first point that was hit. This method should not pick points behind the viewer.
x | X coordinate of pick ray start in logical coordinates. |
y | Y coordinate of pick ray start in logical coordinates. |
y | Y coordinate of pick ray start in logical coordinates. |
z | Z coordinate of pick ray start in logical coordinates. |
scale | The scale factor of the window. Affects picking of outlines. Standard value is 1.0. |
vertices | An array of vertices describing the Object. |
vertex_cnt | Size of the vertices array. |
directionVector | The direction of the pick vector. |
collisionPoint | If this method returns true, this Vector will contain the location that was hit in logical coordinates. |
Comment: The hit determination algorithm is based on the principle that a point is inside a polygon if a line drawn through the point intersects an even number of edges.
|
inlinefinalvirtual |
Insert a new vertex into the vertex array, duplicating the vertex at (indexAfter - 1).
indexAfter | One past the index to insert. The vertex before this (or the last vertex, if more than the number of vertices) will be duplicated. If 0, the 0th vertex will be duplicated. |
|
virtual |
Insert a vertex at index. Duplicate the vertex pointed to by index, so that there are two vertices that are exactly the same. If index is greater than the number of vertices, then the last vertex is duplicated.
Reimplemented in GlsSchematicPolyLineInterconnect.
|
protected |
Returns true if the point is inside the 2D extents of the given vertices
x | X coordinate of pick point |
y | Y coordinate of pick point |
nVerts | Number of vertices to try |
verts | Vertex array to try |
tolerance | Picking tolerance |
char* InstanceName | ( | void | ) |
Gets the name for the object.
void InstanceName | ( | const char * | name | ) |
Sets the name for the object. This name corresponds to the name that is generated in the source code.
name | The new name for the object |
void InvalidatePainter | ( | ) |
Invalidates the painter set on this object if that painter exists. Typically called by user code when it modifies an object in such a way where the painter invalidation system wouldn't work automatically (for example, directly modifying vertex data).
|
virtual |
Traverses upward in the hierarchy to determine if this object is visible in the scene. Overloaded for classes that handle child visibility without using the Visibility flag such as GlsMutexGroup.
Reimplemented in GlsPushButton, GlsSwitch, and GlsMutexGroup.
|
virtual |
Gets the lighting state
Reimplemented in Group, Gls3DCable, and GlsRSOWrapper.
|
virtual |
Sets the lighting state
Reimplemented in Group, Gls3DCable, and GlsRSOWrapper.
|
virtual |
Get the line stipple multiplier for this object
Reimplemented in Group, Gls3DCable, and GlsRSOWrapper.
|
virtual |
Set the line stipple multiplier for this object
mult | The new line stipple pattern |
Reimplemented in Group, Gls3DCable, and GlsRSOWrapper.
|
virtual |
Get the line stipple pattern for this object
Reimplemented in Group, Gls3DCable, and GlsRSOWrapper.
|
virtual |
Set the line stipple pattern for this object
pattern | The new line stipple pattern |
Reimplemented in Group, Gls3DCable, and GlsRSOWrapper.
|
virtual |
Gets the width of lines in the object.
Reimplemented in Group, Gls3DCable, and GlsRSOWrapper.
|
virtual |
Sets the width of lines in the object.
width | The new line width of the object in logical units |
Reimplemented in Group, Gls3DCable, and GlsRSOWrapper.
|
virtual |
Reimplemented in ComponentBase.
|
virtual |
Sets the location of the origin of the object
v | The new location |
Reimplemented in Group, and ComponentBase.
|
virtual |
Sets the location of the origin of the object
x | X Coordinate of the new location |
y | Y Coordinate of the new location |
z | Z Coordinate of the new location |
Reimplemented in Group, and ComponentBase.
void LogicalToDCS | ( | Vector | logicalPoint, |
Vector & | objectLocal, | ||
const Vector * | directionVector, | ||
const Vector & | planeNormal = Vector(0, 0, 1) , |
||
const Vector & | planePoint = Vector() , |
||
const GlsMatrixType * | dcsMatrix = NULL |
||
) |
PROJECT a point from logical coordinates to the object's DCS's XY plane
logicalPoint | The original point in logical coordinates |
objectLocal | The returned point in the objects DCS coordinate system on the XY plane. |
directionVector | The direction vector to use when projecting the point. If NULL, the point will be converted but not projected. |
planeNormal | |
planePoint | |
dcsMatrix | An alternate DCS matrix to convert to. |
bool LogicalToWindow | ( | const Vector & | logical, |
Vector & | winLoc, | ||
const OpenGLMatrices & | alternateMatrices = OpenGLMatrices() |
||
) |
Convert a point from logical coordinates to window coordinates
logical | The point in logical coordinates |
winLoc | The returned value in window coordinates. Z Ranges from 0.0 to 1.0. 0.0 is near clip, 1.0 is far clip. |
alternateMatrices | When supplied it is used instead of self determined matrices. |
|
virtual |
Gets material index. Returns -1 if multiple are applied.
Reimplemented in GlsGeometryResourceMesh, GlsRSOWrapper, and GLTriMesh.
|
virtual |
Sets the material index.
|
virtual |
Gets a vector of material indices.
Reimplemented in GlsGeometryResourceMesh, and GLTriMesh.
|
virtual |
Sets the vector of material indices.
Reimplemented in GlsGeometryResourceMesh, and GLTriMesh.
GlsMatrixType* ModelMatrix | ( | ) |
|
inline |
|
inline |
|
inlineprotected |
Set the value of _needCalculate
|
inline |
Gets the object's normals.
|
overridevirtual |
Implements AttributeChangedNotifier::NotifyAttributeChanged. Notify the class that the attribute has changed. Observers of the attribute will have their callbacks called
name | the name of the attribute |
Implements AttributeChangedNotifier.
|
inline |
Gets the object's number of vertices.
|
virtual |
Get the depth (in the Z Dimension) of the object in logical units. Value is based on the extents of the object and does not take into consideration dynamic rotation
|
virtual |
Get the height (in the Y Dimension) of the object in logical units. Value is based on the extents of the object and does not take into consideration dynamic rotation
|
virtual |
Get the width (in the X Dimension) of the object in logical units. Value is based on the extents of the object and does not take into consideration dynamic rotation
|
virtual |
Sets the parent display frame pointer for this object to the indicated display frame
par | The new display frame to be the parent object |
Reimplemented in Group, and ComponentBase.
|
inline |
Gets the parent display frame pointer for this object
|
virtual |
Sets the parentGroup pointer for this object
group | The group to which this object belongs |
Reimplemented in GlsSchematicTeeInterconnect.
|
inline |
Gets the parentGroup pointer for this object
|
virtual |
Attempts to pick an object in 3D and accounting for dynamic rotations and translations of this object or parent objects. It also looks at the pickable status and attempts to return the "Best" pick if that is what is desired.
Note: This method will pick objects in the scene based on a pick ray starting at winLoc and pointing into the screen. It will not pick objects behind the depth specified by winLoc.z. Typically winLoc.z should be set to 0 to ensure that the pick ray starts at near clip plane.
winLoc | Device coordinates for the mouse click. Z value should be set to 0 to ensure pick ray starts at near clip plane. |
logicalCoords | The start of the pick ray in logical coordinates. Should be calculated from the winLoc using this->WindowToLogical(winLoc, logicalCoords, &directionVector). |
scale | Current window scale. Affects picking radius of outlines. Initial value should typically be 1.0. |
directionVector | The direction of the pick ray in logical coordinates. Should be calculated from the winLoc using this->WindowToLogical(winLoc, logicalCoords, &directionVector). |
collisionWinLoc | Returns where the pick vector intersects the object that is hit in device coordinates. |
drawnMatrices | The matrices used to draw the object, including matrices set by parents that may have dynamically rotated, translated or scaled this object. Initial value should typically be a default OpenGLMatrices() object. |
Reimplemented in Gls3DCable, ComponentBase, Group, GlsRSOWrapper, GlsThumbWheel, GlsPushButton, GLPolygon, GlsGeometryResourceMesh, GlsMutexGroup, GlsClippingGroup, and GlsMultiView.
|
inline |
|
virtual |
|
protected |
Restores the temporarily rotated vertices
vertices | Vertex array to restore |
vertex_cnt | Number of vertices to restore |
|
protected |
Sets up the object for picking by dynamically rotating vertices
x | X coordinate of pick point |
y | Y coordinate of pick point |
z | Z coordinate of pick point |
vertices | Vertex array to setup |
vertex_cnt | Number of vertices to setup |
directionVector | dynamic rotation vector |
|
virtual |
Gets the polygon end mode (Open or Closed) for the polygon
Reimplemented in Group, Gls3DCable, and GlsRSOWrapper.
|
virtual |
Sets the polygon end mode (Open or Closed) for the polygon
end | Enumeration indicating open or closed mode |
Reimplemented in Group, Gls3DCable, GlsPolyLine, and GlsRSOWrapper.
|
virtual |
Gets the polygon drawing mode for this object
Reimplemented in Group, Gls3DCable, GlsRSOWrapper, and GlsNinePatch.
|
virtual |
Sets the polygon drawing mode for this object
mode | The new polygon drawing mode for this object |
Reimplemented in Group, Gls3DCable, GlsNinePatch, and GlsRSOWrapper.
|
virtual |
Traverses the hierarchy calculating the _modelMatrix, _projMatrix, _viewMatrix as needed.
current | Current matrices inherited from parent |
culler | Object that possibly marks this object for culling |
Reimplemented in ComponentBase, Gls3DCable, Group, GlsCTLTextBox, GlsAngularScale, GlsLinearScale, GlsRSOWrapper, GlsSchematicTeeInterconnect, GlsNurbCurve, GlsAdvancedMesh, GlsKnob, GlsSwitch, GlsPolyLine, GlsSchematicPolyLineInterconnect, GlsLightSource, GlsDynamicPath, GlsLinearFloatController, GlsMutexGroup, GlsGeometryResourceMesh, GlsMovieTexture, GlsLodGroup, GlsVideoToTexture, GlsPushButton, GlsEllipse, GlsSerialMorphMesh, GlsOdometer, GlsThumbWheel, Statistics, and GlsMultiView.
GlsMatrixType* ProjMatrix | ( | ) |
|
virtual |
Reallocates the vertex and texture coordinate and normal arrays. Existing vertices are copied . If the new size is less than the old size, the first numVertices vertices are copied. If the new size is larger, all vertices are copied and the new vertices are initialized to zero.
numVertices | The new number of vertices for the object |
initializeNew | Whether or not to initialize the new vertices |
copyOld | Whether or not to copy the old data |
|
virtual |
Return the relative angle of an line constructed from the given point to the _location of the object, (in the xy plane)
x | X coordinate of endpoint |
y | Y coordinate of endpoint |
|
virtual |
Gets a reference to the specified attribute for reading and writing. This reference can be streamed into and out of variables. For Example: someObject->Resource("Visible") >> someBool; someBool << someObject->Resource("Visible");
Reimplemented in ComponentBase, Gls3DCable, GlsRSOWrapper, GlsDynamicPath, GlsMultiView, and GlsPathManager.
void RestoreAlpha | ( | void | ) |
Restores the alpha test/blend settings if they were changed from default
void RestoreAntiAlias | ( | void | ) |
Restores the antialias settings if they were changed from default
void RestoreLighting | ( | void | ) |
Restores the lighting state
void RestoreLineStyle | ( | void | ) |
Sets the line style settings to their defaults
|
virtual |
Rotates the object (around the specified axis) by the angle indicated, at the object's rotation point. Recalculates the vertex data.
angle | The angle to rotate by, in degrees |
axis | The axis to rotate the object around. |
Rotates the object (around the specified axis) by the angle indicated, at the point specified. Recalculates the vertex data.
origin | The point to rotate around |
angle | The angle to rotate by, in degrees |
axis | The axis to rotate the object around |
Rotates the object (around the specified axis) by the angle indicated, at the point specified. Recalculates the vertex data.
orig | The point to rotate around |
angle | The angle to rotate by, in degrees |
axis | The arbitrary axis to rotate the object around |
Reimplemented in GlsText, Group, ComponentBase, GlsCylinder, GlsAngularScale, GlsSphere, GlsLinearScale, GlsEyePoint, GlsNurbCurve, GlsSchematicTeeInterconnect, GlsSchematicPolyLineInterconnect, GlsPolyLine, GlsGeometryResourceMesh, GlsEllipse, and GlsNinePatch.
|
inline |
|
virtual |
Sets the location of the rotation point for the object. Dynamic rotation of the object will cause the object to be rotated around this point.
v | The new rotation point |
|
virtual |
Sets the location of the rotation point for the object. Dynamic rotation of the object will cause the object to be rotated around this point.
x | X Coordinate of the new rotation point |
y | Y Coordinate of the new rotation point |
z | Z Coordinate of the new rotation point |
void SaveMatrices | ( | ) |
Causes the Projection, Model and View matrix for this object to be saved. Used by the 3D picking algorithm. Normally not used by the user.
|
virtual |
Scales the object, either the handleBar, or the Anchor is used to translate the object, not both. Anchor takes presidence, if it is set HandleBar is ignored. The footprint is different from the 2D scale so the compiler can destinguish the two.
px | Value of the percentage of scale in x-axis |
py | Value of the percentage of scale in y-axis |
pz | Value of the percentage of scale in z-axis |
anchor | Anchor from which to scale object relative to |
handleBar | Vertex that is being dragged |
Reimplemented in GlsTextGrid, Group, ComponentBase, GlsCTLTextBox, GlsAngularScale, GlsLinearScale, GlsSphere, GlsCylinder, GlsTextBox, GlsSchematicTeeInterconnect, GlsNurbCurve, GlsSchematicPolyLineInterconnect, GlsPolyLine, GlsGeometryResourceMesh, GlsEllipse, and GlsNinePatch.
void Set | ( | int | spec, |
... | |||
) |
Set attributes of the object using VarArgs style interface Object attributes are defined with an enumeration. This routine is designed to make generated code very clean and readable.
|
virtual |
Specifies which attributes are available for the object. Currently the available attributes cannot be changed after they have been set. (Only the first call has an effect.)
value | A bitfield specifying which types of attributes to make available. |
Reimplemented in GlsText, Gls3DCable, Group, GLTriMesh, GlsCTLTextBox, GlsAngularScale, GlsLinearScale, GlsCylinder, GlsEyePoint, GlsTextGrid, GlsSphere, GlsMimicGroup, GlsMovingEye, GlsPolyLine, GlsSchematicTeeInterconnect, GlsNurbCurve, GlsTextBox, GlsKnob, GlsSwitch, GlsAdvancedMesh, GlsNinePatch, GlsSchematicPolyLineInterconnect, GlsLodGroup, GlsLightSource, GlsPushButton, GlsDynamicPath, GlsGeometryResourceMesh, GlsLinearFloatController, GlsMovieTexture, GlsMutexGroup, GlsVideoToTexture, ComponentBase, GlsEllipse, GlsSerialMorphMesh, GlsClippingGroup, GlsOdometer, GlsThumbWheel, GlsMultiView, and GlsPathManager.
|
virtual |
Sets the texture blend color for the object
color | A GlsColor |
Reimplemented in Group, Gls3DCable, and GlsRSOWrapper.
void SetBlendColor | ( | unsigned char | color[] | ) |
Sets the texture blend color for the object
color | RGBA color (0-255 range) NOTE: Not Virtual. Simply calls void SetBlendColor(const GlsColor& color); |
void SetBlendColor | ( | unsigned char | r, |
unsigned char | g, | ||
unsigned char | b, | ||
unsigned char | a | ||
) |
Sets the texture blend color for the object
r | Red color component (0-255 range) |
g | Green color component (0-255 range) |
b | Blue color component (0-255 range) |
a | Alpha color component (0-255 range) NOTE: Not Virtual. Simply calls void SetBlendColor(const GlsColor& color); |
|
virtual |
Sets the RGBA color for the object outline
color | The new color |
Reimplemented in Group, Gls3DCable, GlsAngularScale, GlsLinearScale, GlsRSOWrapper, and GlsPolyLine.
|
inline |
Sets the RGBA color for the object outline
c4 | The new RGBA (0-255 range) line color for the object NOTE: Not Virtual. Simply calls void SetColor(const GlsColor& color) |
|
inline |
Sets the RGBA color for the object outline
r | The new red component (0-255 range) of the line color for the object |
g | The new blue component (0-255 range) of the line color for the object |
b | The new green component (0-255 range) of the line color for the object |
a | The new alpha component (0-255 range) of the line color for the object NOTE: Not Virtual. Simply calls void SetColor(const GlsColor& color) |
|
inline |
Sets the RGBA color for filling the object
r | The new red component (0-255 range) of the fill color for the object |
g | The new blue component (0-255 range) of the fill color for the object |
b | The new green component (0-255 range) of the fill color for the object |
a | The new alpha component (0-255 range) of the fill color for the object NOTE: Not Virtual. Simply calls void SetFillColor(const GlsColor& color) |
|
inline |
Sets the RGBA color for filling the object
c4 | The new RGBA fill color (0-255 range) for the object NOTE: Not Virtual. Simply calls void SetFillColor(const GlsColor& color) |
|
virtual |
Sets the RGBA color for filling the object
color | The new RGBA fill color (0-255 range) for the object |
Reimplemented in Group, Gls3DCable, GlsCylinder, GlsSphere, GlsNurbCurve, GlsNinePatch, GlsEllipse, and GlsPolyLine.
|
static |
Sets the time the application will use to determine the blink state of objects. Has no effect if UseManualBlinkElapsedTime was not set to true.
|
virtual |
Sets the vertex normal data for this object
nPoints | The number of vertices in the object |
vertices | The vertex normals for the object |
|
virtual |
Redefines the frame of reference for the object. Since the vertices in the object are specified relative to the _location member, this routine allows you to specify the absolute coordinate for _location and then recalculates the vertices to be relative to that new location
vert | The new origin point for the object |
|
virtual |
Sets the painter for this object. Can be NULL. If the painter is set, this object will call Invalidate() on the painter anytime it changes in a way that affects its rendering.
painter | the painter that is drawing this class. |
Reimplemented in GlsMimicGroup, Group, GlsRSOWrapper, and GlsSchematicTeeInterconnect.
|
virtual |
Sets the texture coordinate data for this object
nPoints | The number of texture vertices in the object |
new_tex_coord | The texture coordinates for the object |
isVectorArray | true if array points to a Vector array, false if it points to a Vertex array |
|
inline |
Vertex version of SetTexCoords
bool SetupAlpha | ( | void | ) |
Sets the alpha test/blend settings based on object settings
bool SetupAntiAlias | ( | void | ) |
Sets the antialias settings based on object settings
void SetupDepthTest | ( | void | ) |
Sets the depth test settings based on object settings
void SetupLighting | ( | void | ) |
Sets the lighting state
bool SetupLineStyle | ( | void | ) |
Sets the line style settings based on object settings
void SetupPolyDrawStyle | ( | void | ) |
Sets the polygon draw style based on object settings
void SetupShading | ( | void | ) |
Sets the shading settings based on object settings
bool SetupTexture | ( | void | ) |
First half of texture setup for the object.
|
protectedvirtual |
Sets an attribute of this object using variable arguments
spec | A GLS_Initializer tag |
args | A variable argument list |
Reimplemented in GlsText, GlsTextGrid, GlsMovingEye, ComponentBase, Gls3DCable, GlsAngularScale, GlsLightSource, GlsLinearScale, GlsEyePoint, GlsRSOWrapper, GlsMimicGroup, GlsSchematicTeeInterconnect, GlsSwitch, GlsCylinder, GlsKnob, GlsPolyLine, GlsEllipse, GLTriMesh, GlsSchematicPolyLineInterconnect, GlsMutexGroup, GlsDynamicPath, GlsLodGroup, GlsMovieTexture, GlsClippingGroup, GlsVideoToTexture, GlsNinePatch, GlsThumbWheel, GlsSphere, GlsOdometer, GlsMultiView, GlsPathManager, and GlsPushButton.
|
virtual |
Changes the color of a vertex
vertex | 1 based index of the vertex to the change color for |
CurrentFillColor | The new RGBA (0-255 range) color for the vertex |
Reimplemented in GlsNurbCurve.
|
virtual |
Sets the vertex data for this polygon You should call UpdateBoundingVolume after changing an object's extents.
nPoints | The number of vertices in the object |
vertices | The vertex data for the object |
Reimplemented in GlsCTLTextBox, GlsPolyLine, GlsSchematicTeeInterconnect, GlsTextBox, GlsNurbCurve, and GlsSchematicPolyLineInterconnect.
|
virtual |
Gets the polygon shading mode (Flat or gouraud) for the polygon
Reimplemented in Group, Gls3DCable, and GlsRSOWrapper.
|
virtual |
Sets the polygon shading mode (Flat or gouraud) for the polygon
shading | Enumeration indicating shading mode |
Reimplemented in Group, Gls3DCable, and GlsRSOWrapper.
|
inline |
Gets the object's texture coordinates
|
virtual |
Get the texture index for this object
Reimplemented in ComponentBase, GlsRSOWrapper, GlsGeometryResourceMesh, and GLTriMesh.
|
virtual |
Sets the texture index to be used when drawing the object.
textureIndex | The texture index to use. -1 indicates that no texture will be drawn. |
Reimplemented in ComponentBase, GlsCylinder, GlsSphere, GlsRSOWrapper, GlsGeometryResourceMesh, and GLTriMesh.
|
virtual |
Gets the texture magnification filter for this object
Reimplemented in Group, Gls3DCable, and GlsRSOWrapper.
|
virtual |
Sets the texture magnification filter for this object
filter | The new texture magnification filter for this object |
Reimplemented in Group, Gls3DCable, and GlsRSOWrapper.
|
virtual |
Gets the texturing mapping mode for this object
Reimplemented in Group, Gls3DCable, and GlsRSOWrapper.
|
virtual |
Sets the texturing mapping mode for this object
map | The new texture mapping mode for this object |
Reimplemented in Group, Gls3DCable, and GlsRSOWrapper.
|
virtual |
Gets the texture minification filter for this object
Reimplemented in Group, Gls3DCable, and GlsRSOWrapper.
|
virtual |
Sets the texture minification filter for this object
filter | The new texture minification filter for this object |
Reimplemented in Group, Gls3DCable, and GlsRSOWrapper.
|
virtual |
Gets the texturing repeat mode for this object
Reimplemented in Gls3DCable, and GlsRSOWrapper.
|
virtual |
Sets the texturing repeat mode for this object
rep | The new texture repeat mode for this object (boolean) |
Reimplemented in Group, Gls3DCable, and GlsRSOWrapper.
|
virtual |
Moves the object by the amount indicated.
tr | Float[3] array containing the x,y,z amounts to translate by |
Reimplemented in ComponentBase, and Group.
|
virtual |
Moves the object by the amount indicated.
x | X amount to translate by |
y | Y amount to translate by |
z | Z amount to translate by |
Reimplemented in ComponentBase, and Group.
|
virtual |
Moves the object's vertices by the amount indicated. Does not change _location.
x | X amount to translate by |
y | Y amount to translate by |
z | Z amount to translate by |
Reimplemented in Group, and GlsGeometryResourceMesh.
|
virtual |
Updates the bounding volume of this object This method should be called if the vertices change for picking and culling to work correctly. This will only update this object. If PerformGroupCullCheck is enabled for one of the objects parents, you may also need to call CalculateParentBoundingBox() to update all of the objects parents.
Reimplemented in GlsAngularScale, GlsRSOWrapper, GlsEllipse, GlsNinePatch, and GlsGeometryResourceMesh.
|
static |
Sets whether the application should use the system time or a manual time for calculating the blink state of objects
|
inline |
Gets the current UserData pointer. UserData is a pointer the user can use to attach user defined data to a GL Studio object.
|
inline |
Sets the current UserData pointer
data | The new UserData pointer |
|
protectedvirtual |
Sets the normal data for this object This function is called as part of VaSetNormals( unsigned int, ... )
nPoints | The number of normals in the object |
args | va_list in the form x,y,z for each normal |
|
protectedvirtual |
Sets the texture coordinate data for this object This function is called as part of VaTexCoords( unsigned int, ... )
nPoints | The number of texture coordinates in the object |
args | va_list in the form x,y,z for each texture coordinate |
|
protectedvirtual |
Sets the vertex data for this object You should call UpdateBoundingVolume after changing an object's extents.
nPoints | The number of vertices in the object |
args | va_list in the form r,g,b,a,x,y,z for each vertex |
Reimplemented in GlsNurbCurve.
void VaSetNormals | ( | unsigned int | nPoints, |
... | |||
) |
Sets the vertex normal data for this object
nPoints | The number of vertices in the object |
... | X,Y,Z for each vertex normal |
void VaSetTexCoords | ( | unsigned int | nPoints, |
... | |||
) |
Sets the texture coordinate data for this object
nPoints | The number of texture vertices in the object |
... | X,Y,Z for each vertex |
void VaSetVertices | ( | unsigned int | nPoints, |
... | |||
) |
Sets the vertex data for this object You should call UpdateBoundingVolume after changing an object's extents.
nPoints | The number of vertices in the object |
... | r,g,b,a,x,y,z for each vertex |
|
inlinevirtual |
Gets the object's vertices. You should call UpdateBoundingVolume after changing an object's extents.
Reimplemented in GlsAngularScale, GlsEllipse, and GlsNinePatch.
int* ViewMatrix | ( | ) |
|
inline |
Get the visibility state this object
|
virtual |
Set the visiblity state for this object
vis | Whether or not enable this object for drawing |
|
inline |
Get the visibility state this object
bool WindowToLogical | ( | const Vector & | winLoc, |
Vector & | logical, | ||
Vector * | directionVector = NULL , |
||
const OpenGLMatrices & | alternateMatrices = OpenGLMatrices() |
||
) |
Convert a point in window coordinates to logical coordinates
winLoc | Coordinate in window coordinates. X and Y are in pixels. Z Ranges from 0.0 to 1.0. 0.0 is near clip, 1.0 is far clip. |
logical | Coordinate in logical coordinates (returned) |
directionVector | normal into the screen at the point (returned) |
alternateMatrices | A Set of matrices that if supplied, will alter the point |
|
virtual |
Gets the rotation point for the object in world coordinates
|
virtual |
Sets the rotation point for the object in world coordinates
vert | The rotation point for the object in world coordinates |
|
virtual |
Gets a vertex from the object, in World coordinates (i.e. not relative to the location as is the case with the Vertices() API call).
i | Index of the vertex to get |
Reimplemented in GlsSchematicPolyLineInterconnect.
|
virtual |
Sets a vertex of the object, in World coordinates (i.e. not relative to the location as is the case with the Vertices() API call. )
i | The 0 based index of the vertex to get |
vert | The new vertex value |
|
inline |
|
inline |
Sets x component of location
|
inline |
|
inline |
Sets y component of location
|
inline |
|
inline |
Sets z component of location
|
protected |
Whether or not to perform alpha testing while drawing.
|
protected |
Whether or not to perform anti-aliasing while drawing.
|
protected |
True if SetAvailableAttributes has been called. Users should not change this.
|
protected |
Whether or not the blinking mode is turned on
|
protected |
Number of times per second the object will blink
|
protected |
The RGBA color for drawing the outline of the object.
|
protected |
Whether or not to remove backfaces
|
protected |
The dynamic coordinate system. The Dynamic changes to rotation, scale, and translate will be modified by this and applied to the _drawMatrix.
|
protected |
What kind of depth testing while drawing. See DepthBuffer_e
|
protected |
The objects current contribution to the draw matrix. This will be multiplied by the current matrix at draw time. If NULL, this object has no contribution (it is not dynamic) See CalcDrawMatrix() for more
|
protected |
True if CalcDrawMatrix() needs to be called on this object The multiplier used when applying a line stipple pattern to a line.
|
protected |
A bit pattern indicating which pixels in a line should be drawn and which pixels should not.
|
protected |
The current width of lines rendered in the object, in logical units
|
protected |
The location of the origin point for this object, in the world coordinate system.
|
protected |
Stores the Model matrix for this object, if needed. Used by Draw() and 3D picking.
|
protected |
The array of vertex normals for this object. The size of this array is based on _nVertices
|
protected |
The number of Texture Coordinate Vertices in this object
|
protected |
The number of vertices in this object
|
protected |
Whether or not this is a CLOSED or OPEN polygon
|
protected |
The mode for drawing the object.
|
protected |
The depth buffer offset for this object
|
protected |
Stores the Projection matrix for this object, if needed. Used by Draw() and 3D picking.
|
protected |
The shading mode for this object
|
protected |
The array of texture coordinates for this object. If an object is untextured, this value is NULL. The size of this array is based on _nTex_vertices
|
protected |
The current texture blend color (used if TextureMapMode is TEXTURE_MAP_BLEND mode only)
|
protected |
The index into the texture palette array of the texture used to to texture this object. A texture index of -1 indicates that no texture is assigned to the object.
|
protected |
The current texturing magnification filter mode for the object
|
protected |
The current texturing map mode for the object.
|
protected |
The current texturing minification filter mode for the object
|
protected |
Used to store the relative placement and rotation of a texture on the object. Texture coordinates are calculated from the texture points. The _texturePoints are relative to the _location, which makes them in the objects coordinate system.
|
protected |
The current texturing repeat mode for the object.
|
protected |
Data pointer for the user to assign as needed
|
protected |
The array of vertices for this object. The vertices are in the object's coordinate system. That is, they are relative to the _location field. This array always has a size based on _nVertices
|
protected |
Stores the View matrix for this object, if needed. Used by Draw() and 3D picking.
|
protected |
Whether or not the object is enabled for drawing