GL Studio C++ Runtime API
|
#include <display.h>
Public Types | |
enum | AvailableAttributesEnum { GLS_ATTRIBUTES_BASIC = 1 , GLS_ATTRIBUTES_DYNAMIC = 2 , GLS_ATTRIBUTES_APPEARANCE = 4 , GLS_ATTRIBUTES_GEOMETRY = 8 , GLS_ATTRIBUTES_SPECIALIZED = 16 , GLS_ATTRIBUTES_ALL = ~0 , GLS_ATTRIBUTES_NONE = 0 } |
Public Member Functions | |
DisplayObject (float x, float y, float z) | |
DisplayObject (const DisplayObject &object, const bool generateNames) | |
virtual | ~DisplayObject () |
void | Destroy () |
virtual void | SetAvailableAttributes (unsigned int value) |
virtual void | AlphaMode (int mode) |
virtual int | AlphaMode () |
virtual bool | AntiAlias () |
virtual void | AntiAlias (bool alias) |
void | ApplyTextureSettings (int textureIndex=-1) |
DistiAttribDict & | Attributes () |
const DistiAttribDict & | Attributes () const |
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) |
virtual bool | BlinkedOff () |
virtual bool | Blinking () |
virtual void | Blinking (const bool blink) |
virtual float | BlinkRate () |
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 () |
virtual void | CalculateTextureCoordinates () |
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 () |
bool | Culled () const |
void | Culled (bool val) |
bool | CullTest (const GlsMatrixType *matrix, const Culler &culler) |
GlsMatrixType & | DcsMatrix () |
GlsMatrixType | DcsMatrix () const |
void | DcsMatrix (const GlsMatrixType &matrix) |
virtual void | DeleteVertexAt (unsigned int index) |
virtual void | DeleteVertex (unsigned int indexAfter) final |
virtual int | DepthTest () |
virtual void | DepthTest (unsigned char zbuf) |
virtual void | Draw ()=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 | DynamicRotation () |
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 | 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 | FinishObject () |
virtual void | GenerateInstanceName () |
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 () |
const char * | InstanceName () const |
void | InstanceName (const char *name) |
virtual bool | LightingEnabled () |
virtual void | LightingEnabled (bool lighting) |
virtual int | LineStippleMultiplier () |
virtual void | LineStippleMultiplier (int mult) |
virtual int | LineStipplePattern () |
virtual void | LineStipplePattern (int pattern) |
virtual float | LineWidth () |
virtual void | LineWidth (float width) |
virtual const Vertex & | Location () 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 () const |
float | Y () const |
float | Z () 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 () |
virtual float | ObjectHeight () |
virtual float | ObjectWidth () |
virtual void | SetOrigin (const Vertex &vert) |
virtual void | Parent (DisplayFrame *par) |
DisplayFrame * | Parent () const |
virtual void | ParentGroup (Group *group) |
Group * | ParentGroup () 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 () |
virtual void | PolygonEnd (const int end) |
virtual int | PolygonMode () |
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 | RestoreAntiAlias () |
void | RestoreLighting () |
void | RestoreLineStyle () |
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 () |
bool | SetupAntiAlias () |
void | SetupDepthTest () |
void | SetupLighting () |
bool | SetupLineStyle () |
void | SetupPolyDrawStyle () |
void | SetupShading () |
bool | SetupTexture () |
virtual int | Shading () |
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 () |
Vector * | GetTextureCoordinates () |
virtual int | TextureIndex () |
virtual void | TextureIndex (int textureIndex) |
virtual Vector * | GetTexturePoints () |
virtual bool | TextureRepeat () |
virtual void | TextureRepeat (const int rep) |
virtual int | TextureMappingTechnique () |
virtual void | TextureMappingTechnique (const int map) |
virtual int | TextureMagnificationFilter () |
virtual void | TextureMagnificationFilter (const int filter) |
virtual int | TextureMinificationFilter () |
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 * | UserData () 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 () const |
bool | Visibility () const |
virtual void | Visibility (const bool vis) |
virtual Vector | WorldRotationPoint () |
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 void | NotifyAttributeChanged (const AttributeName &name)=0 |
virtual | ~AttributeChangedNotifier () |
Public Member Functions inherited from WeakReferenceableMixin | |
void | AddWeakReference (WeakReference *weakRef) override |
void | NotifyWeakReferenceDestroyed (WeakReference *ref) override |
virtual void | AddWeakReference (WeakReference *weakRef)=0 |
virtual void | NotifyWeakReferenceDestroyed (WeakReference *weakReference)=0 |
Static Public Member Functions | |
static InterfaceListType * | StaticGetCppInterfaceDescription (InterfaceListType *addToThisList=NULL) |
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) |
virtual int | ColorMaterialMode () |
void | AllocateModelMatrix () |
bool | ApplyDynamicRotation () |
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 | LastDrawMatrixLocation (const Vertex &loc) |
const Vertex & | LastDrawMatrixLocation () |
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 () | |
virtual | ~WeakReferenceableMixin () |
Friends | |
class | DisplayObjectEditor |
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 |
Get the alpha mode for this object
Reimplemented in Gls3DCable, GlsRSOWrapper, and Group.
|
virtual |
Set the alpha mode state for this object
mode | which alpha mode to use when drawing |
Reimplemented in Gls3DCable, GlsRSOWrapper, and Group.
|
virtual |
Get the anti aliasing state this object
Reimplemented in Gls3DCable, GlsRSOWrapper, and Group.
|
virtual |
Set the anti aliasing state for this object
alias | Whether or not to perform anti aliasing |
Reimplemented in GlsAngularScale, GlsRSOWrapper, Gls3DCable, and Group.
|
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.
|
inline |
Gets the full list of attributes for this object, except const.
|
virtual |
|
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 SplashDisplay, Gls3DCable, GlsMovieTexture, GlsMovingEye, GlsMutexGroup, GlsNinePatch, GlsSchematicPolyLineInterconnect, GlsSchematicTeeInterconnect, GlsTextBox, GlsTextGrid, GlsRSOWrapper, and Group.
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 GLPolygon, Gls3DCable, GlsEllipse, GlsNurbCurve, GlsSchematicPolyLineInterconnect, GlsSchematicTeeInterconnect, GlsCylinder, GlsSphere, and Group.
|
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 GLPolygon, SplashDisplay, Gls3DCable, GlsAdvancedMesh, GlsAngularScale, GlsPushButton, GlsClippingGroup, GlsCTLTextBox, GlsDynamicPath, GlsEllipse, GlsKnob, GlsLinearFloatController, GlsLinearScale, GlsMimicGroup, GlsMovieTexture, GlsMovingEye, GlsMultiView, GlsMutexGroup, GlsNinePatch, GlsNurbCurve, GlsOdometer, GlsPathManager, GlsPolyLine, GlsSchematicPolyLineInterconnect, GlsSchematicTeeInterconnect, GlsSerialMorphMesh, GlsSwitch, GlsTextBox, GlsTextGrid, GlsThumbWheel, GlsVideoToTexture, ComponentBase, GlsCylinder, GlsEyePoint, GlsLightSource, GlsRSOWrapper, GlsSphere, GLTriMesh, and Group.
|
protectedvirtual |
|
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 GlsAdvancedMesh, GlsCTLTextBox, GlsGeometryResourceMesh, GlsNurbCurve, GlsSchematicPolyLineInterconnect, GlsSerialMorphMesh, GlsTextBox, GlsTextGrid, ComponentBase, GlsCylinder, GlsEyePoint, GlsRSOWrapper, GlsSphere, GlsText, GLTriMesh, Group, GlsAngularScale, GlsEllipse, GlsLinearScale, GlsNinePatch, and GlsPolyLine.
|
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 Gls3DCable, GlsAdvancedMesh, GlsAngularScale, GlsPushButton, GlsClippingGroup, GlsCTLTextBox, GlsDynamicPath, GlsEllipse, GlsGeometryResourceMesh, GlsKnob, GlsLinearFloatController, GlsLinearScale, GlsMimicGroup, GlsMovieTexture, GlsMovingEye, GlsMultiView, GlsMutexGroup, GlsNinePatch, GlsOdometer, GlsPathManager, GlsPolyLine, GlsSchematicPolyLineInterconnect, GlsSchematicTeeInterconnect, GlsSerialMorphMesh, GlsSwitch, GlsTextBox, GlsTextGrid, GlsThumbWheel, GlsVideoToTexture, ComponentBase, GlsCylinder, GlsEyePoint, GlsLightSource, GlsRSOWrapper, GlsSphere, GlsText, GLTriMesh, and Group.
|
virtual |
Returns if back faces should be removed
Reimplemented in Gls3DCable, GlsRSOWrapper, and Group.
|
virtual |
Sets if back faces should be removed
val | True if back faces should be removed |
Reimplemented in Gls3DCable, Group, and GlsRSOWrapper.
|
inline |
|
inline |
Set whether or not the object is to be culled.
val | The new cull value. |
|
inline |
|
inline |
Gets the objects Dynamic Coordinate System (DCS) Matrix.
|
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.
index | The index of the vertex to delete. |
Reimplemented in GLPolygon, GlsNurbCurve, GlsPolyLine, and GlsSchematicPolyLineInterconnect.
|
virtual |
Get the z buffering state for this object
Reimplemented in Gls3DCable, GlsRSOWrapper, and Group.
|
virtual |
Set the z buffering state for this object
zbuf | Whether or not to perform z buffering |
Reimplemented in Gls3DCable, Group, and GlsRSOWrapper.
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 GLPolygon, Gls3DCable, GlsAngularScale, GlsPushButton, GlsClippingGroup, GlsCTLTextBox, GlsDynamicPath, GlsEllipse, GlsGeometryResourceMesh, GlsKnob, GlsLinearFloatController, GlsLinearScale, GlsLodGroup, GlsMimicGroup, GlsMovieTexture, GlsMovingEye, GlsMultiView, GlsMutexGroup, GlsNinePatch, GlsNurbCurve, GlsOdometer, GlsPathManager, GlsPolyLine, GlsSchematicPolyLineInterconnect, GlsSchematicTeeInterconnect, GlsSortedDrawGroup, GlsSwitch, GlsTextBox, GlsTextGrid, GlsThumbWheel, GlsVideoToTexture, ComponentBase, GlsCylinder, GlsEyePoint, GlsLightSource, GlsRSOWrapper, GlsSphere, GLTriMesh, Group, and Statistics.
|
inline |
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, |
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 | ( | 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 |
Returns the dynamic rotation for this object on all axes.
|
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
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 scale values for an object.
x | X scale |
y | Y scale |
z | Z scale |
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 |
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 |
|
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 |
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 |
|
virtual |
Returns the current dynamic translation for all axes
|
virtual |
Returns the current dynamic translation for the specified axis
axis | Z_AXIS, Y_AXIS, or X_AXIS |
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. |
|
inlinevirtual |
Allows the object the opportunity to configure itself after having all its children initialized and properties set by the code generator. By default, users do not need to call this function, it is called by the generated code in CreateObjects() if the object is a user defined class. User defined classes can override this, calling BaseClass::FinishObject(), before supplying class specific initialization code as needed. User code should only conisder itself and its children as the hierarchy above will not have been set up yet. User code should not call FinishObject on its children, since it will have already been called when those children were created. This method will be called by generated code once this object and its children have been fully instantiated.
|
virtual |
Dynamically generate a name for the object, based on the current time
Reimplemented in GlsMovingEye.
|
protected |
|
protected |
|
virtual |
Gets the texture blend color for the object
Reimplemented in Group, Gls3DCable, GlsRSOWrapper, and Group.
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); |
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); |
|
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, GlsRSOWrapper, and Group.
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) |
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) |
|
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 GlsEyePoint, GlsMovingEye, SplashDisplay, Gls3DCable, GlsAdvancedMesh, GlsAngularScale, GlsPushButton, GlsClippingGroup, GlsCTLTextBox, GlsDynamicPath, GlsEllipse, GlsGeometryResourceMesh, GlsKnob, GlsLinearFloatController, GlsLinearScale, GlsMimicGroup, GlsMovieTexture, GlsMultiView, GlsMutexGroup, GlsNinePatch, GlsNurbCurve, GlsOdometer, GlsPathManager, GlsPolyLine, GlsSchematicPolyLineInterconnect, GlsSchematicTeeInterconnect, GlsSerialMorphMesh, GlsSwitch, GlsTextBox, GlsTextGrid, GlsThumbWheel, GlsVideoToTexture, ComponentBase, GlsCylinder, GlsLightSource, GlsRSOWrapper, GlsSphere, GlsText, GLTriMesh, and Group.
|
virtual |
Frees the memory allocated by a previous call to GetCppInterfaceDescription
array | Memory allocated by a previous call to GetCppInterfaceDescription |
Reimplemented in SplashDisplay, Gls3DCable, GlsAdvancedMesh, GlsAngularScale, GlsPushButton, GlsClippingGroup, GlsCTLTextBox, GlsDynamicPath, GlsEllipse, GlsGeometryResourceMesh, GlsKnob, GlsLinearFloatController, GlsLinearScale, GlsMimicGroup, GlsMovieTexture, GlsMovingEye, GlsMultiView, GlsMutexGroup, GlsNinePatch, GlsNurbCurve, GlsOdometer, GlsPathManager, GlsPolyLine, GlsSchematicPolyLineInterconnect, GlsSchematicTeeInterconnect, GlsSerialMorphMesh, GlsSwitch, GlsTextBox, GlsTextGrid, GlsThumbWheel, GlsVideoToTexture, ComponentBase, GlsCylinder, GlsLightSource, GlsRSOWrapper, GlsSphere, GlsText, GLTriMesh, Group, and GlsEyePoint.
|
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 GlsAngularScale, GlsEllipse, GlsGeometryResourceMesh, GlsNinePatch, GlsPolyLine, GlsNurbCurve, GlsSchematicPolyLineInterconnect, ComponentBase, GlsCylinder, GlsRSOWrapper, GlsSphere, and Group.
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 |
|
virtual |
Gets the fill color of the object
Reimplemented in GlsCylinder, GlsSphere, Group, GlsEllipse, Gls3DCable, GlsEllipse, GlsNinePatch, GlsCylinder, GlsSphere, and Group.
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 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 |
Gets the location of the origin of the object
v | Will be filled in with the current location |
|
virtual |
|
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 GlsCylinder, and GlsSphere.
|
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 Gls3DCable, GlsDynamicPath, GlsPathManager, GlsMultiView, ComponentBase, GlsRSOWrapper, and Group.
|
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.
world2tex | Returned matrix result. |
|
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 GlsAngularScale, GlsEllipse, GlsNinePatch, GlsGeometryResourceMesh, GlsNurbCurve, ComponentBase, GlsRSOWrapper, and Group.
|
virtual |
Handles an event that is sent to the object.
ev | The event to send to the object |
Reimplemented in GlsMimicGroup, Gls3DCable, GlsAngularScale, GlsPushButton, GlsDynamicPath, GlsEllipse, GlsKnob, GlsLinearFloatController, GlsMultiView, GlsOdometer, GlsSchematicPolyLineInterconnect, GlsSchematicTeeInterconnect, GlsSwitch, GlsThumbWheel, and GlsRSOWrapper.
|
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. |
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, GlsAngularScale, GlsDynamicPath, GlsEllipse, GlsGeometryResourceMesh, GlsLinearFloatController, GlsLinearScale, GlsNinePatch, GlsNurbCurve, GlsPathManager, GlsPolyLine, GlsSchematicPolyLineInterconnect, GlsSchematicTeeInterconnect, GlsCylinder, GlsLightSource, GlsSphere, GLTriMesh, and Group.
|
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. |
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.
index | The index to insert a vertex at. |
Reimplemented in GlsSchematicPolyLineInterconnect.
|
protected |
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 | ( | ) |
Gets the name for the object.
const char * InstanceName | ( | ) | const |
Gets the name for the object, but const.
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.
obj | The object to start traversing from, defaults to this object if NULL. |
Reimplemented in GlsPushButton, GlsMutexGroup, and GlsSwitch.
|
inlineprotected |
Used internally to determine if the user has modified the location.
|
inlineprotected |
Used internally to determine if the user has modified the location.
loc | The location to set. |
|
virtual |
Reimplemented in Gls3DCable, GlsRSOWrapper, and Group.
|
virtual |
Sets the lighting state.
lighting | The new lighting state. |
Reimplemented in Gls3DCable, GlsRSOWrapper, and Group.
|
virtual |
Get the line stipple multiplier for this object
Reimplemented in Gls3DCable, GlsRSOWrapper, and Group.
|
virtual |
Set the line stipple multiplier for this object
mult | The new line stipple pattern |
Reimplemented in Gls3DCable, GlsRSOWrapper, and Group.
|
virtual |
Get the line stipple pattern for this object
Reimplemented in Gls3DCable, GlsRSOWrapper, and Group.
|
virtual |
Set the line stipple pattern for this object
pattern | The new line stipple pattern |
Reimplemented in Gls3DCable, GlsRSOWrapper, and Group.
|
virtual |
Gets the width of lines in the object.
Reimplemented in Gls3DCable, GlsRSOWrapper, and Group.
|
virtual |
Sets the width of lines in the object.
width | The new line width of the object in logical units |
Reimplemented in Gls3DCable, GlsRSOWrapper, and Group.
|
virtual |
Reimplemented in Group, and ComponentBase.
|
virtual |
Sets the location of the origin of the object
v | The new location |
Reimplemented in Group, ComponentBase, ComponentBase, and Group.
|
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, ComponentBase, ComponentBase, and Group.
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 |
Reimplemented in GlsGeometryResourceMesh, GlsRSOWrapper, and GLTriMesh.
|
virtual |
Sets the material index.
index | The new material index to set. |
Reimplemented in GlsRSOWrapper.
|
virtual |
Reimplemented in GlsGeometryResourceMesh, and GLTriMesh.
|
virtual |
Sets the list of material indices.
indices | The new material list to set. |
Reimplemented in GLTriMesh, and GlsGeometryResourceMesh.
GlsMatrixType * ModelMatrix | ( | ) |
|
inline |
|
inline |
|
inlineprotected |
Set whether or not Calculate() will be called on this object.
val | The new calculate value. |
|
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
|
inline |
Gets the parent display frame pointer for this object
|
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, ComponentBase, ComponentBase, and Group.
|
inline |
Gets the parentGroup pointer for this object
|
virtual |
Sets the parentGroup pointer for this object
group | The group to which this object belongs |
Reimplemented in GlsSchematicTeeInterconnect.
|
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 GlsPushButton, GlsClippingGroup, GlsGeometryResourceMesh, GlsMultiView, GlsMutexGroup, GlsThumbWheel, ComponentBase, GlsRSOWrapper, Group, GLPolygon, and Gls3DCable.
|
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 GlsPolyLine, Gls3DCable, GlsRSOWrapper, and Group.
|
virtual |
Sets the polygon end mode (Open or Closed) for the polygon
end | Enumeration indicating open or closed mode |
Reimplemented in GlsPolyLine, GlsPolyLine, GlsRSOWrapper, Gls3DCable, and Group.
|
virtual |
Gets the polygon drawing mode for this object
Reimplemented in Gls3DCable, GlsNinePatch, GlsRSOWrapper, and Group.
|
virtual |
Sets the polygon drawing mode for this object
mode | The new polygon drawing mode for this object |
Reimplemented in Gls3DCable, GlsNinePatch, GlsRSOWrapper, and Group.
|
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 GlsCTLTextBox, ComponentBase, GlsLightSource, GlsRSOWrapper, Group, Statistics, Gls3DCable, GlsAdvancedMesh, GlsAngularScale, GlsPushButton, GlsDynamicPath, GlsEllipse, GlsGeometryResourceMesh, GlsKnob, GlsLinearFloatController, GlsLinearScale, GlsLodGroup, GlsMovieTexture, GlsMultiView, GlsMutexGroup, GlsNurbCurve, GlsOdometer, GlsPolyLine, GlsSchematicPolyLineInterconnect, GlsSchematicTeeInterconnect, GlsSerialMorphMesh, GlsSwitch, GlsThumbWheel, and GlsVideoToTexture.
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");
name | The name of the attribute to be returned. |
Reimplemented in Gls3DCable, GlsDynamicPath, GlsMultiView, GlsPathManager, ComponentBase, and GlsRSOWrapper.
void RestoreAlpha | ( | ) |
Restores the alpha test/blend settings if they were changed from default
void RestoreAntiAlias | ( | ) |
Restores the antialias settings if they were changed from default
void RestoreLighting | ( | ) |
Restores the lighting state
void RestoreLineStyle | ( | ) |
Sets the line style settings to their defaults
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 GlsCylinder, GlsEyePoint, GlsSphere, GlsText, Group, GlsNurbCurve, GlsPolyLine, GlsAngularScale, GlsEllipse, GlsGeometryResourceMesh, GlsLinearScale, GlsNinePatch, GlsNurbCurve, GlsPolyLine, GlsSchematicPolyLineInterconnect, GlsSchematicTeeInterconnect, ComponentBase, ComponentBase, GlsCylinder, GlsEyePoint, GlsRSOWrapper, GlsRSOWrapper, GlsSphere, GlsText, and Group.
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 |
Reimplemented in GlsCylinder, GlsEyePoint, GlsSphere, GlsText, Group, GlsNurbCurve, and GlsPolyLine.
|
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. |
Reimplemented in GlsCylinder, GlsEyePoint, GlsSphere, GlsText, Group, GlsNurbCurve, and GlsPolyLine.
|
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 GlsNurbCurve, GlsAngularScale, GlsCTLTextBox, GlsEllipse, GlsLinearScale, GlsNinePatch, GlsPolyLine, GlsTextBox, GlsTextGrid, GlsSphere, GlsCylinder, GlsSphere, GlsNurbCurve, GlsPolyLine, GlsTextBox, GlsTextGrid, GlsGeometryResourceMesh, GlsSchematicPolyLineInterconnect, GlsSchematicTeeInterconnect, GlsCylinder, ComponentBase, GlsRSOWrapper, ComponentBase, GlsRSOWrapper, and Group.
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.
spec | The enum for the first attribute value to set. |
|
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 GlsNurbCurve, Gls3DCable, GlsAdvancedMesh, GlsAngularScale, GlsPushButton, GlsClippingGroup, GlsCTLTextBox, GlsDynamicPath, GlsEllipse, GlsGeometryResourceMesh, GlsKnob, GlsLinearFloatController, GlsLinearScale, GlsLodGroup, GlsMimicGroup, GlsMovieTexture, GlsMovingEye, GlsMultiView, GlsMutexGroup, GlsNinePatch, GlsOdometer, GlsPathManager, GlsPolyLine, GlsSchematicPolyLineInterconnect, GlsSchematicTeeInterconnect, GlsSerialMorphMesh, GlsSwitch, GlsTextBox, GlsTextGrid, GlsThumbWheel, GlsVideoToTexture, ComponentBase, GlsCylinder, GlsEyePoint, GlsLightSource, GlsSphere, GlsText, GLTriMesh, and Group.
|
virtual |
Sets the texture blend color for the object
color | A GlsColor |
Reimplemented in Group, Gls3DCable, GlsRSOWrapper, and Group.
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, GlsPolyLine, Gls3DCable, GlsAngularScale, GlsLinearScale, GlsPolyLine, GlsRSOWrapper, and Group.
|
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) |
|
virtual |
Sets the RGBA color for filling the object
color | The new RGBA fill color (0-255 range) for the object |
Reimplemented in GlsCylinder, GlsSphere, Group, GlsEllipse, GlsNurbCurve, GlsPolyLine, Gls3DCable, GlsEllipse, GlsNinePatch, GlsNurbCurve, GlsPolyLine, GlsCylinder, GlsSphere, and Group.
|
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) |
|
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) |
|
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.
elapsedTime | The blink time to be set. |
|
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, GlsSchematicTeeInterconnect, GlsRSOWrapper, and Group.
|
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
nPoints | The number of texture vertices in the object. |
new_tex_coord | The texture coordinates for the object. |
bool SetupAlpha | ( | ) |
Sets the alpha blending state based on object settings.
bool SetupAntiAlias | ( | ) |
Sets the antialias settings based on object settings.
void SetupDepthTest | ( | ) |
Sets the depth test settings based on object settings
void SetupLighting | ( | ) |
Sets the lighting state
bool SetupLineStyle | ( | ) |
Sets the line style settings based on object settings
void SetupPolyDrawStyle | ( | ) |
Sets the polygon draw style based on object settings
void SetupShading | ( | ) |
Sets the shading settings based on object settings
bool SetupTexture | ( | ) |
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 Gls3DCable, GlsAngularScale, GlsPushButton, GlsClippingGroup, GlsDynamicPath, GlsEllipse, GlsKnob, GlsLinearScale, GlsLodGroup, GlsMimicGroup, GlsMovieTexture, GlsMovingEye, GlsMultiView, GlsMutexGroup, GlsNinePatch, GlsOdometer, GlsPathManager, GlsPolyLine, GlsSchematicPolyLineInterconnect, GlsSchematicTeeInterconnect, GlsSwitch, GlsTextGrid, GlsThumbWheel, GlsVideoToTexture, ComponentBase, GlsCylinder, GlsEyePoint, GlsLightSource, GlsRSOWrapper, GlsSphere, GlsText, and GLTriMesh.
|
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, GlsNurbCurve, GlsPolyLine, GlsSchematicPolyLineInterconnect, GlsSchematicTeeInterconnect, GlsTextBox, and GlsTextGrid.
|
virtual |
Gets the polygon shading mode (Flat or gouraud) for the polygon
Reimplemented in Gls3DCable, GlsRSOWrapper, and Group.
|
virtual |
Sets the polygon shading mode (Flat or gouraud) for the polygon
shading | Enumeration indicating shading mode |
Reimplemented in Gls3DCable, Group, and GlsRSOWrapper.
|
static |
addToThisList | If not NULL this list will be added to then returned. If NULL a new list will be created. |
|
inline |
Gets the object's texture coordinates
|
virtual |
Get the texture index for this object
Reimplemented in GlsCylinder, GlsSphere, GlsGeometryResourceMesh, ComponentBase, GlsRSOWrapper, 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 GlsGeometryResourceMesh, ComponentBase, GlsCylinder, GlsSphere, GLTriMesh, GlsCylinder, GlsSphere, and GlsRSOWrapper.
|
virtual |
Gets the texture magnification filter for this object
Reimplemented in Gls3DCable, GlsRSOWrapper, and Group.
|
virtual |
Sets the texture magnification filter for this object
filter | The new texture magnification filter for this object |
Reimplemented in Gls3DCable, GlsRSOWrapper, and Group.
|
virtual |
Gets the texturing mapping mode for this object
Reimplemented in Gls3DCable, GlsRSOWrapper, and Group.
|
virtual |
Sets the texturing mapping mode for this object
map | The new texture mapping mode for this object |
Reimplemented in Gls3DCable, GlsRSOWrapper, and Group.
|
virtual |
Gets the texture minification filter for this object
Reimplemented in Gls3DCable, GlsRSOWrapper, and Group.
|
virtual |
Sets the texture minification filter for this object
filter | The new texture minification filter for this object |
Reimplemented in Gls3DCable, GlsRSOWrapper, and Group.
|
virtual |
Gets the texturing repeat mode for this object
Reimplemented in Group, 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, GlsRSOWrapper, and Group.
|
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 GlsGeometryResourceMesh, and Group.
|
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, GlsEllipse, GlsGeometryResourceMesh, GlsNinePatch, and GlsRSOWrapper.
|
static |
Sets whether the application should use the system time or a manual time for calculating the blink state of objects
useManualTime | If true, will use user defined time, otherwise system time. |
|
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
x | The new x location. |
|
inline |
|
inline |
Sets y component of location
y | The new x location. |
|
inline |
|
inline |
Sets z component of location
z | The new x 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 |
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 |
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