55 #include "gls_state_manager.h" 
   70 class CallbackMethodCallerBase;
 
   71 class GlsResourceFilter;
 
   72 class DisplayObjectEditor;
 
   76 class GlsGloFileAttribute;
 
   81 GLS_EXPORT 
void InitializeLibrary(
const char* unlockString=NULL, 
const DisplayFrame* frame = NULL, 
bool checkLicense=
false);
 
   86 GLS_EXPORT 
const char* LicenseUnlockedBy();
 
   88 typedef DisplayObject *DisplayObjectPtr;
 
   89 typedef DynamicArray<DisplayObjectPtr> DisplayObjectArray;
 
   90 typedef DynamicArray<int> DynamicIntArray;
 
  100     friend class DisplayObjectEditor;
 
  115     GLS_EXPORT 
DisplayObject( 
const DisplayObject& 
object, 
const bool generateNames );
 
  130         GLS_ATTRIBUTES_BASIC = 1,
 
  131         GLS_ATTRIBUTES_DYNAMIC = 2,
 
  132         GLS_ATTRIBUTES_APPEARANCE = 4,
 
  133         GLS_ATTRIBUTES_GEOMETRY = 8,
 
  134         GLS_ATTRIBUTES_SPECIALIZED = 16,
 
  135         GLS_ATTRIBUTES_ALL = ~0,
 
  136         GLS_ATTRIBUTES_NONE = 0
 
  151     virtual GLS_EXPORT 
void AlphaMode(
int mode);
 
  167     virtual GLS_EXPORT 
void AntiAlias(
bool alias);
 
  183     virtual GLS_EXPORT 
void SetBlendColor(
const glsColor& color);
 
  198     GLS_EXPORT 
void GetBlendColor(
unsigned char &r,
unsigned char &g,
unsigned char &b,
unsigned char &a);
 
  218     GLS_EXPORT 
void SetBlendColor(
unsigned char r,
unsigned char g,
unsigned char b,
unsigned char a);
 
  226     virtual GLS_EXPORT 
bool Blinking(
void);
 
  231     virtual GLS_EXPORT 
void Blinking(
const bool blink);
 
  236     virtual GLS_EXPORT 
float BlinkRate(
void);
 
  241     virtual GLS_EXPORT 
void BlinkRate(
const float rate);
 
  285     virtual GLS_EXPORT 
void Calculate(
double time);
 
  333     virtual DisplayObject *
CloneObject(
bool generateNames = 
false) = 0;
 
  344     GLS_EXPORT 
void GetColor(
unsigned char c4[]);
 
  353     GLS_EXPORT 
void GetColor(
unsigned char &r,
unsigned char &g,
unsigned char &b,
unsigned char &a);
 
  378     virtual GLS_EXPORT 
void CopyGeometry(DisplayObject *src);
 
  419     inline bool Culled()
 const { 
return _culled; }
 
  420     inline void Culled(
bool val) { _culled = val; }
 
  467     void GLS_EXPORT 
DcsMatrix( 
const GlsMatrixType& matrix );
 
  472     virtual GLS_EXPORT 
void DeleteVertex(
unsigned int index);
 
  482     virtual GLS_EXPORT 
void DepthTest( 
unsigned char zbuf);
 
  486     virtual void Draw(
void) = 0;
 
  520     virtual GLS_EXPORT 
void DynamicRotate(
float x, 
float y, 
float z);
 
  533     virtual GLS_EXPORT 
float DynamicRotation(
int axis);
 
  534     virtual GLS_EXPORT 
Vector DynamicRotation();
 
  547     virtual GLS_EXPORT 
void DynamicScale(
float x, 
float y, 
float z);
 
  563     virtual GLS_EXPORT 
void DynamicTranslate(
float x, 
float y, 
float z, 
bool relative = 
false);
 
  584     virtual GLS_EXPORT 
void DynamicTranslateAxis(
float amount, 
int axis, 
bool relative);
 
  586     virtual GLS_EXPORT 
void DynamicTranslate(
float amount, 
int axis, 
bool relative = 
false);
 
  603     GLS_EXPORT DisplayObjectEditor* 
Editor();
 
  609     GLS_EXPORT 
const DisplayObjectEditor* 
Editor() 
const;
 
  615     GLS_EXPORT 
void Editor(DisplayObjectEditor *editor);
 
  627     virtual GLS_EXPORT 
void GetExtents(
float &x,
float &y,
float &z,
float &x1,
float &y1,
float &z1);
 
  642     GLS_EXPORT 
void GetFillColor(
unsigned char &r,
unsigned char &g,
 
  643                               unsigned char &b,
unsigned char &a);
 
  678     virtual GLS_EXPORT 
void GenerateInstanceName(
void);
 
  699     virtual GLS_EXPORT 
bool Hit(
float x,
float y,
float z,
float scale, 
const Vector& directionVector,
Vector* collisionPoint);
 
  720     virtual GLS_EXPORT 
bool HitUtil(
float x,
float y,
float z,
float scale,
Vertex *vertices,
unsigned int vertex_cnt, 
const Vector& directionVector,
Vector *collisionPoint);
 
  726     virtual GLS_EXPORT 
void InsertVertex(
unsigned int index);
 
  769     virtual GLS_EXPORT 
float LineWidth(
void);
 
  774     virtual GLS_EXPORT 
void LineWidth(
float width);
 
  791     virtual GLS_EXPORT 
void Location(
float x,
float y,
float z);
 
  803     virtual GLS_EXPORT 
void GetLocation(
float &x,
float &y,
float &z);
 
  927     virtual GLS_EXPORT DisplayObject *
Pick3D(
const Vector& winLoc, 
 
  928                                              const Vector& logicalCoords,
 
  930                                              const Vector& directionVector, 
 
  938     inline unsigned char Pickable() { 
return _pickable; }
 
  944     virtual GLS_EXPORT 
void Pickable(
unsigned char pick);
 
  950     virtual GLS_EXPORT 
int PolygonOffset(
void) 
const;
 
  956     virtual GLS_EXPORT 
void PolygonOffset(
const int offset);
 
  968     virtual GLS_EXPORT 
void PolygonEnd(
const int end);
 
 1001     virtual GLS_EXPORT 
void ReallocateVertices(
unsigned int numVertices,
bool initializeNew,
bool copyOld);
 
 1009     virtual GLS_EXPORT 
float RelativeAngle(
const float x,
const float y);
 
 1071     virtual GLS_EXPORT 
void RotationPoint(
float x,
float y,
float z);
 
 1084     virtual GLS_EXPORT 
void Rotate(
float angle,
int axis=
Z_AXIS);
 
 1111     inline void Scale(
int handleBar,
float px, 
float py,
Vertex *anchor = NULL)
 
 1113         Scale(px, py, 1.0f, anchor, handleBar);
 
 1126     virtual GLS_EXPORT 
void Scale(
float px, 
float py, 
float pz, 
Vertex *anchor, 
int handleBar = 0);
 
 1133     GLS_EXPORT 
void Set(
int spec,...);
 
 1181     virtual GLS_EXPORT 
int Shading(
void);
 
 1187     virtual GLS_EXPORT 
void Shading(
const int shading);
 
 1206     virtual GLS_EXPORT 
void SetTexCoords(
unsigned int nPoints,
Vector* new_tex_coord, 
bool isVectorArray=
true);
 
 1255     virtual GLS_EXPORT 
void TextureIndex(
int textureIndex);
 
 1319     virtual GLS_EXPORT 
void Translate(
float tr[]);
 
 1326     virtual GLS_EXPORT 
void Translate(
float x,
float y,
float z);
 
 1359     virtual GLS_EXPORT 
void SetVertexColor(
unsigned int vertex, 
unsigned char CurrentFillColor[]);
 
 1398     virtual GLS_EXPORT 
void VaListSetNormals(
unsigned int nPoints, va_list args);
 
 1424     virtual GLS_EXPORT 
void Visibility(
const bool vis);
 
 1470                         Vector* directionVector = NULL, 
 
 1484         const Vector* directionVector, 
 
 1505     GLS_EXPORT 
bool Create(GlsGloFile &dataStream, 
Group *parent);
 
 1507     void GeometryRefresh() { _geometryRefresh = 
true; }
 
 1513     bool _geometryRefresh;  
 
 1515     GLS_EXPORT 
void ApplyTextureMinMagSettings();
 
 1516     GLS_EXPORT 
void ApplyTextureEnvModeSettings();
 
 1517     GLS_EXPORT 
bool SetupTextureIsNeeded();
 
 1545     bool _needCalcDrawMatrix; 
 
 1609     virtual GLS_EXPORT 
int ColorMaterialMode(
void); 
 
 1650     inline void LastDrawMatrixLocation(
const Vertex& loc) { _lastDrawMatrixLocation = loc; }
 
 1653     inline const Vertex& LastDrawMatrixLocation() { 
return _lastDrawMatrixLocation; }
 
 1666     GLS_EXPORT 
void PickSetup(
float x,
float y,
float z,
Vertex *vertices,
unsigned int vertex_cnt, 
const Vector& directionVector);
 
 1678     virtual GLS_EXPORT 
void SetFromGloData(GlsGloFileAttribute &data);
 
 1703     GLS_EXPORT 
virtual void SetValue(
int spec,va_list &args);
 
 1707     void CopyGeometryInternal( 
const DisplayObject* src );
 
 1708     void CopyPropertiesInternal( 
const DisplayObject* src );
 
 1709     void CopyHierarchyPropertiesInternal( 
const DisplayObject* src, 
bool copyName );
 
 1713     Vector _boundingVolumeCenter;   
 
 1715     float  _boundingVolumeRadius;   
 
 1722     float _dynamicTranslate[3]; 
 
 1727     float _dynamicScale[3]; 
 
 1731     char* _instanceName;    
 
 1735     Vertex _lastDrawMatrixLocation; 
 
 1737     bool _lightingEnabled;  
 
 1739     bool _needCalculate;    
 
 1745     Group* _parentGroup;    
 
 1747     unsigned char _pickable;    
 
 1761     GLS_EXPORT 
void DisplayColorMaterialModeError(
const int mode);
 
 1762     GLS_EXPORT 
int DisplayColorMaterialModeError();
 
 1764     void CommonConstructorInit(
float x, 
float y, 
float z);
 
 1767     DisplayObject& operator=( 
const DisplayObject& that ); 
 
 1782     IGlsStateManager *_stateManager;
 
 1786     IGlsStateManagerES20 *_stateManagerES20;
 
GlsMatrixType * _drawMatrix
Definition: display.h:1540
float Y(void) const 
Definition: display.h:809
bool InsideVertexExtents(float x, float y, unsigned int nVerts, Vertex *verts, float tolerance)
Definition: display_frame.h:83
void RestoreLighting(void)
virtual void CalculateMatrices(const OpenGLMatrices &newMatrices)
void * UserData(void) const 
Definition: display.h:1348
void SetColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
Definition: display.h:373
void SetTexCoords(unsigned int nPoints, Vertex *new_tex_coord)
Definition: display.h:1212
bool GetTexturePointTransformationMatrix(GlsMatrixType &world2tex)
Vector * _normals
Definition: display.h:1559
virtual const Vertex & Location(void) const 
DistiAttribDict & Attributes()
Definition: display.h:177
virtual void CopyGeometry(DisplayObject *src)
virtual void UpdateBoundingVolume(void)
CallbackMethodCallerBase * CallbackCaller() const 
Definition: display.h:310
virtual void Calculate(double time)
virtual float BlinkRate(void)
virtual void SetVertices(unsigned int nPoints, Vertex *vertices)
void VaSetTexCoords(unsigned int nPoints,...)
void SetupPolyDrawStyle(void)
virtual void SetVertexColor(unsigned int vertex, unsigned char CurrentFillColor[])
Vertex _location
Definition: display.h:1553
GlsMatrixType & DcsMatrix()
Definition: display.h:461
virtual void CalculateParentBoundingBox(void)
void SetFillColor(unsigned char c4[])
Definition: display.h:669
virtual void GetRotationPoint(Vertex &v)
Definition: dynamic_array.h:63
bool BoundingVolumeHit(const Vector &start, const Vector &direction)
The disti::DynamicArray class. A templated array of objects capable of dynamically growing...
GlsMatrixType * ModelMatrix()
Class to contain current OpenGL view, projection and draw matrices. 
Definition: util.h:289
bool SetupLineStyle(void)
void CalculateCollisionPoint(const Vector &pickLoc, const Vector &directionVector, Vector *collisionPoint)
Defines a base class which editor objects can derive. 
virtual int TextureMagnificationFilter(void)
float MagnitudeSquared() const 
Definition: vertex.h:296
virtual Vertex WorldVertex(unsigned int i)
virtual void PreDraw(const OpenGLMatrices ¤t, Culler &culler)
virtual float LineWidth(void)
void ApplyTextureSettings(int textureIndex=-1)
virtual int AlphaMode(void)
virtual void CalculateTextureCoordinates(void)
int GetApplicableTextureIndex()
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array)
The GlsMatrixAffine class. 
unsigned char _lineStippleMultiplier
Definition: display.h:1547
virtual void CopyProperties(DisplayObject *src)
unsigned short _lineStipplePattern
Definition: display.h:1549
bool _visible
Definition: display.h:1607
virtual glsColor GetFillColor(void)
DisplayFrame * Parent(void) const 
Definition: display.h:897
virtual void VaListSetTexCoords(unsigned int nPoints, va_list args)
unsigned char _textureMagFilter
Definition: display.h:1585
virtual void SetValue(int spec, va_list &args)
glsColor _textureBlendColor
Definition: display.h:1579
unsigned char _textureMinFilter
Definition: display.h:1587
bool Visible(void) const 
Definition: display.h:1414
virtual void SetTexCoords(unsigned int nPoints, Vector *new_tex_coord, bool isVectorArray=true)
bool Visibility(void) const 
Definition: display.h:1419
virtual void GetResources(std::ostream &outstr, GlsResourceFilter *filter=NULL)
virtual void CopyHierarchyProperties(DisplayObject *src, bool copyName)
Vector * Normals()
Definition: display.h:844
virtual int MaterialIndex()
bool ApplyDynamicRotation(void)
bool CullTest(const GlsMatrixType *matrix, const Culler &culler)
Definition: display.h:426
virtual float ObjectHeight(void)
static void SetManualBlinkElapsedTime(double elapsedTime)
float _lineWidth
Definition: display.h:1551
DisplayObject(float x, float y, float z)
virtual bool HitUtil(float x, float y, float z, float scale, Vertex *vertices, unsigned int vertex_cnt, const Vector &directionVector, Vector *collisionPoint)
float Z(void) const 
Definition: display.h:812
weak reference and related classes 
virtual DisplayObject * Pick3D(const Vector &winLoc, const Vector &logicalCoords, float scale, const Vector &directionVector, Vector &collisionWinLoc, const OpenGLMatrices &drawnMatrices)
bool SphereOutsideFrustum(const Vector ¢er, const float radius) const 
Definition: cull.h:101
virtual void VaListSetNormals(unsigned int nPoints, va_list args)
static void UseManualBlinkElapsedTime(bool useManualTime)
GlsMatrixType * _projMatrix
Definition: display.h:1572
const Vector & BoundingVolumeCenter() const 
Definition: display.h:256
glsColor _color
Definition: display.h:1531
void SetupDepthTest(void)
void SetColor(unsigned char c4[])
Definition: display.h:364
virtual Vector WorldRotationPoint(void)
virtual void Translate(float tr[])
unsigned char _polygonMode
Definition: display.h:1568
float _blinkRate
Definition: display.h:1529
void DynamicRotate(float angle, int axis)
virtual void ReallocateVertices(unsigned int numVertices, bool initializeNew, bool copyOld)
Vector * _texCoord
Definition: display.h:1576
void DCSToLogical(Vector dcsPoint, Vector &logicalPoint, const GlsMatrixType *dcsMatrix=NULL)
void LogicalToDCS(Vector logicalPoint, Vector &objectLocal, const Vector *directionVector, const Vector &planeNormal=Vector(0, 0, 1), const Vector &planePoint=Vector(), const GlsMatrixType *dcsMatrix=NULL)
virtual int Shading(void)
virtual Vector DynamicScale()
unsigned int _nTex_vertices
Definition: display.h:1562
bool _blinking
Definition: display.h:1527
virtual ~DisplayObject(void)
void Transform(Vector &v) const 
Definition: gls_matrix_affine.h:271
virtual void DeleteVertex(unsigned int index)
VertexNoColor Vector
Definition: gls_font_base.h:68
GlsMatrixType * _modelMatrix
Definition: display.h:1557
virtual Vertex * Vertices()
virtual float ObjectDepth(void)
const GlsMatrixType * DrawMatrix()
Definition: display.h:491
GlsMatrixType * ProjMatrix()
bool NeedCalcDrawMatrix()
Definition: display.h:495
virtual int TextureIndex(void)
GL Studio Enumerations and constants. 
bool _attributesAdded
Definition: display.h:1525
float X(void) const 
Definition: display.h:806
virtual void SetNormals(unsigned int nPoints, Vector *vertices)
virtual DistiAttributeBase & Resource(const char *name)
The disti::Vertex class. A class for manipulating 3D vertices. 
virtual void SetOrigin(const Vertex &vert)
virtual Vector * GetTexturePoints(void)
Generally useful defines, macros, enumerations and function prototypes. 
Vector _texturePoints[4]
Definition: display.h:1591
virtual void DynamicRotateRelative(float angle, int axis)
virtual void SetBlendColor(const glsColor &color)
virtual int TextureMappingTechnique(void)
virtual bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint)
virtual DynamicArray< int > & MaterialIndices()
void UserData(void *data)
Definition: display.h:1353
unsigned char _shading
Definition: display.h:1574
void Y(const float y)
Definition: display.h:818
unsigned char _textureRepeat
Definition: display.h:1597
int _polygonOffset
Definition: display.h:1570
void PickSetup(float x, float y, float z, Vertex *vertices, unsigned int vertex_cnt, const Vector &directionVector)
bool Culled() const 
Definition: display.h:419
void X(const float x)
Definition: display.h:815
Definition: disti_metadata.h:179
void CalcDrawMatrixIfExists()
Definition: display.h:1632
virtual bool CullBackFace(void)
virtual void InsertVertex(unsigned int index)
int _textureIndex
Definition: display.h:1581
Vector * GetTextureCoordinates(void)
Definition: display.h:1244
void Z(const float z)
Definition: display.h:821
virtual void Rotate(float angle, int axis=Z_AXIS)
char * InstanceName(void)
virtual void GetTransformedExtents(Vector &min, Vector &max, const GlsMatrixType &matrix, bool resetMinMax=true)
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL)
unsigned char _textureMap
Definition: display.h:1589
Definition: disti_metadata.h:661
Definition: weak_referenceable_mixin.h:52
virtual glsColor GetColor()
unsigned int _nVertices
Definition: display.h:1564
virtual void GetCenter(Vector ¢er)
void VaSetNormals(unsigned int nPoints,...)
Vector * TextureCoordinates(void)
Definition: display.h:1237
Definition: callback_caller_base.h:56
Definition: gls_color.h:54
virtual int DepthTest(void)
virtual DisplayObject * CloneObject(bool generateNames=false)=0
void VaSetVertices(unsigned int nPoints,...)
unsigned char _depthTest
Definition: display.h:1538
virtual float RelativeAngle(const float x, const float y)
The disti::Culler class. Implements view frustum culling. 
void NotifyAttributeChanged(const AttributeName &name)
bool LogicalToWindow(const Vector &logical, Vector &winLoc, const OpenGLMatrices &alternateMatrices=OpenGLMatrices())
Definition: disti_metadata.h:432
unsigned char Pickable()
Definition: display.h:938
virtual bool AntiAlias(void)
void Scale(int handleBar, float px, float py, Vertex *anchor=NULL)
Definition: display.h:1111
const Vertex & RotationPoint()
Definition: display.h:1055
unsigned char _polygonEnd
Definition: display.h:1566
GlsMatrixType _dcsMatrix
Definition: display.h:1535
virtual void GetLocation(Vertex &v)
void PickCleanup(Vertex *vertices, unsigned int vertex_cnt)
virtual void TranslateVertices(float x, float y, float z)
virtual void Draw(void)=0
int _alphaMode
Definition: display.h:1521
virtual Vector DynamicTranslation()
void NeedCalculate(bool val)
Definition: display.h:1656
virtual bool Blinking(void)
Vertex * _vertices
Definition: display.h:1601
void AllocateModelMatrix()
bool NeedCalculate()
Definition: display.h:839
virtual bool LightingEnabled()
void * _userData
Definition: display.h:1599
virtual void SetAvailableAttributes(unsigned int value)
Definition: gls_resources.h:50
bool _antiAlias
Definition: display.h:1523
unsigned int NumberOfVertices() const 
Definition: display.h:861
virtual bool TextureRepeat(void)
float BoundingVolumeRadius() const 
Definition: display.h:273
bool WindowToLogical(const Vector &winLoc, Vector &logical, Vector *directionVector=NULL, const OpenGLMatrices &alternateMatrices=OpenGLMatrices())
bool SetupAntiAlias(void)
AvailableAttributesEnum
Definition: display.h:129
void GetExtentsDCS(Vector &min, Vector &max)
Definition: disti_metadata.h:83
virtual bool GetPlaneVectorPoints(Vertex &p1, Vertex &p2, Vertex &p3, Vertex &planeVector)
int GetApplicableTextureRepeat()
void RestoreLineStyle(void)
Definition: bmpimage.h:46
virtual int LineStippleMultiplier(void)
virtual void GetExtents(float &x, float &y, float &z, float &x1, float &y1, float &z1)
virtual int PolygonMode(void)
virtual void VaListSetVertices(unsigned int nPoints, va_list args)
virtual int TextureMinificationFilter(void)
DisplayObjectEditor * Editor()
void SetFillColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
Definition: display.h:663
virtual int PolygonEnd(void)
virtual int LineStipplePattern(void)
bool _cullBackFace
Definition: display.h:1533
virtual void SetColor(const glsColor &color)
virtual void CalcDrawMatrix()
void RestoreAntiAlias(void)
virtual glsColor GetBlendColor()
Group * ParentGroup(void) const 
Definition: display.h:907
virtual float ObjectWidth(void)
int * _viewMatrix
Definition: display.h:1605
virtual DisplayObject * handle(DisplayEvent *ev)
virtual void DynamicTranslate(float x, float y, float z, bool relative=false)
Definition: editor_object_base.h:49