40#ifndef INCLUDED_DISTI_DISPLAY_H
41#define INCLUDED_DISTI_DISPLAY_H
70class CallbackMethodCallerBase;
71class GlsResourceFilter;
72class DisplayObjectEditor;
76class GlsGloFileAttribute;
80GLS_EXPORT void InitializeLibrary(
const char* unlockString = NULL,
const DisplayFrame* frame = NULL,
bool checkLicense =
false );
97 friend class DisplayObjectEditor;
132 GLS_ATTRIBUTES_BASIC = 1,
133 GLS_ATTRIBUTES_DYNAMIC = 2,
134 GLS_ATTRIBUTES_APPEARANCE = 4,
135 GLS_ATTRIBUTES_GEOMETRY = 8,
136 GLS_ATTRIBUTES_SPECIALIZED = 16,
137 GLS_ATTRIBUTES_ALL = ~0,
138 GLS_ATTRIBUTES_NONE = 0
422 inline bool Culled()
const {
return _culled; }
426 inline void Culled(
bool val ) { _culled = val; }
607 virtual GLS_EXPORT void DynamicTranslateAxis(
float amount,
int axis,
bool relative );
666 unsigned char& b,
unsigned char& a );
976 const Vector& logicalCoords,
978 const Vector& directionVector,
986 inline unsigned char Pickable() {
return _pickable; }
1497 Vector* directionVector = NULL,
1511 const Vector* directionVector,
1538 bool _geometryRefresh;
1540 GLS_EXPORT void ApplyTextureMinMagSettings();
1541 GLS_EXPORT void ApplyTextureEnvModeSettings();
1763 void CopyHierarchyPropertiesInternal(
const DisplayObject* src,
bool copyName );
1767 Vector _boundingVolumeCenter;
1769 float _boundingVolumeRadius;
1776 float _dynamicTranslate[ 3 ];
1781 float _dynamicScale[ 3 ];
1785 char* _instanceName;
1789 Vertex _lastDrawMatrixLocation;
1791 bool _lightingEnabled;
1793 bool _needCalculate;
1799 Group* _parentGroup;
1803 unsigned char _pickable;
1805 float _rotation[ 3 ];
1817 GLS_EXPORT void DisplayColorMaterialModeError(
const int mode );
1818 GLS_EXPORT int DisplayColorMaterialModeError();
1820 void CommonConstructorInit(
float x,
float y,
float z );
1823 void OnDCSMatrixChanged();
1826 void OnVerticesChanged();
1829 void OnTextureCoordsChanged();
Definition: disti_metadata.h:514
Definition: disti_metadata.h:87
Definition: callback_caller_base.h:56
bool SphereOutsideFrustum(const Vector ¢er, const float radius) const
Definition: cull.h:98
Definition: display_frame.h:87
virtual void DynamicRotate(float x, float y, float z)
GlsMatrixType * _projMatrix
Definition: display.h:1595
bool WindowToLogical(const Vector &winLoc, Vector &logical, Vector *directionVector=NULL, const OpenGLMatrices &alternateMatrices=OpenGLMatrices())
const DisplayObjectEditor * Editor() const
bool CullTest(const GlsMatrixType *matrix, const Culler &culler)
Definition: display.h:432
virtual void RotationPoint(const Vertex &v)
virtual float ObjectDepth()
void GetFillColor(unsigned char &r, unsigned char &g, unsigned char &b, unsigned char &a)
unsigned char _polygonMode
Definition: display.h:1593
virtual void LightingEnabled(bool lighting)
virtual void CalculateParentBoundingBox()
const DistiAttribDict & Attributes() const
Definition: display.h:182
void InstanceName(const char *name)
DisplayObject(float x, float y, float z)
void CallbackCaller(CallbackMethodCallerBase *cb)
void SetBlendColor(unsigned char color[])
virtual void GetLocation(Vertex &v)
virtual void SetNormals(unsigned int nPoints, Vector *vertices)
virtual int PolygonMode()
void AllocateModelMatrix()
virtual void DynamicTranslate(float amount, int axis, bool relative=false)
virtual void GetTransformedExtents(Vector &min, Vector &max, const GlsMatrixType &matrix, bool resetMinMax=true)
Vector * TextureCoordinates()
Definition: display.h:1266
virtual void MaterialIndices(DynamicArray< int > indices)
virtual Vector DynamicScale()
virtual float LineWidth()
virtual bool HitUtil(float x, float y, float z, float scale, Vertex *vertices, unsigned int vertex_cnt, const Vector &directionVector, Vector *collisionPoint)
bool GetTexturePointTransformationMatrix(GlsMatrixType &world2tex)
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array)
void DynamicScale(const Vector &scale)
void DcsMatrix(const GlsMatrixType &matrix)
GlsColor _color
Definition: display.h:1556
virtual void TextureMagnificationFilter(const int filter)
int * _viewMatrix
Definition: display.h:1628
virtual void MaterialIndex(int index)
void UserData(void *data)
Definition: display.h:1382
virtual float RelativeAngle(const float x, const float y)
virtual void CopyGeometry(DisplayObject *src)
const GlsMatrixType * DrawMatrix()
Definition: display.h:511
virtual void Calculate(double time)
Vector * _texCoord
Definition: display.h:1599
void SetupPolyDrawStyle()
GlsMatrixType _dcsMatrix
Definition: display.h:1560
virtual void Rotate(const Vector &origin, float angle, int axis=Z_AXIS)
virtual void CalculateTextureCoordinates()
void GetExtentsDCS(Vector &min, Vector &max)
virtual void TextureMinificationFilter(const int filter)
virtual GlsPainter * GetPainter()
virtual void UpdateBoundingVolume()
virtual int MaterialIndex()
Vertex * _vertices
Definition: display.h:1624
void DCSToLogical(Vector dcsPoint, Vector &logicalPoint, const GlsMatrixType *dcsMatrix=NULL)
virtual void Blinking(const bool blink)
virtual Vertex WorldVertex(unsigned int i)
virtual void VaListSetNormals(unsigned int nPoints, va_list args)
virtual void SetBlendColor(const GlsColor &color)
DynamicArray< int > _materialIndices
List of materials associated with this object.
Definition: display.h:1580
virtual void ReallocateVertices(unsigned int numVertices, bool initializeNew, bool copyOld)
CallbackMethodCallerBase * CallbackCaller() const
Definition: display.h:313
virtual void DeleteVertex(unsigned int indexAfter) final
Definition: display.h:486
bool ApplyDynamicRotation()
virtual void CopyHierarchyProperties(DisplayObject *src, bool copyName)
AvailableAttributesEnum
Definition: display.h:131
const char * InstanceName() const
void VaSetVertices(unsigned int nPoints,...)
virtual void LineStippleMultiplier(int mult)
virtual int ColorMaterialMode()
virtual void DepthTest(unsigned char zbuf)
bool _attributesAdded
Definition: display.h:1550
virtual void Parent(DisplayFrame *par)
virtual void VaListSetVertices(unsigned int nPoints, va_list args)
virtual int TextureMappingTechnique()
bool _antiAlias
Definition: display.h:1548
virtual int TextureMinificationFilter()
void DynamicRotate(const Vector &v)
void GetBlendColor(unsigned char &r, unsigned char &g, unsigned char &b, unsigned char &a)
static InterfaceListType * StaticGetCppInterfaceDescription(InterfaceListType *addToThisList=NULL)
virtual void PreDraw(const OpenGLMatrices ¤t, Culler &culler)
virtual void GetResources(std::ostream &outstr, GlsResourceFilter *filter=NULL)
bool NeedCalculate()
Definition: display.h:887
virtual void DeleteVertexAt(unsigned int index)
virtual void AlphaMode(int mode)
virtual void CalcDrawMatrix()
virtual void LineStipplePattern(int pattern)
virtual void SetAvailableAttributes(unsigned int value)
DisplayObjectEditor * Editor()
bool LogicalToWindow(const Vector &logical, Vector &winLoc, const OpenGLMatrices &alternateMatrices=OpenGLMatrices())
virtual void Pickable(unsigned char pick)
const Vertex & LastDrawMatrixLocation()
Definition: display.h:1684
virtual DisplayObject * Pick3D(const Vector &winLoc, const Vector &logicalCoords, float scale, const Vector &directionVector, Vector &collisionWinLoc, const OpenGLMatrices &drawnMatrices)
float _lineWidth
Definition: display.h:1576
void Z(const float z)
Definition: display.h:867
void ApplyTextureSettings(int textureIndex=-1)
unsigned int NumberOfVertices() const
Definition: display.h:909
GlsMatrixType DcsMatrix() const
Definition: display.h:467
void * _userData
Definition: display.h:1622
virtual void FinishObject()
Definition: display.h:706
Vertex _location
Definition: display.h:1578
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar=0)
virtual void SetFillColor(const GlsColor &color)
GlsColor _textureBlendColor
Definition: display.h:1602
virtual Vector WorldRotationPoint()
void GetBlendColor(unsigned char color[])
bool _needCalcDrawMatrix
True if CalcDrawMatrix() needs to be called on this object.
Definition: display.h:1570
Vector * GetTextureCoordinates()
Definition: display.h:1273
GlsMatrixType * ModelMatrix()
Vector * _normals
Definition: display.h:1584
void NeedCalculate(bool val)
Definition: display.h:1688
void * UserData() const
Definition: display.h:1377
virtual void WorldVertex(unsigned int i, const Vertex &vert)
void BoundingVolumeRadius(float radius)
virtual void SetVertexColor(unsigned int vertex, unsigned char CurrentFillColor[])
virtual GlsColor GetColor()
unsigned char Pickable()
Definition: display.h:986
virtual void GetCenter(Vector ¢er)
unsigned int _nVertices
Definition: display.h:1589
void DynamicRotate(float angle, int axis)
bool Visibility() const
Definition: display.h:1448
void BoundingVolumeCenter(const Vector ¢er)
unsigned char _polygonEnd
Definition: display.h:1591
virtual void InsertVertex(unsigned int indexAfter) final
Definition: display.h:763
unsigned char _textureMinFilter
Definition: display.h:1610
virtual void PolygonMode(int mode)
virtual bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint)
virtual void CullBackFace(const bool val)
const Vertex & RotationPoint() const
Definition: display.h:1092
Group * ParentGroup() const
Definition: display.h:955
virtual Vector DynamicTranslation()
float Z() const
Definition: display.h:855
virtual void PolygonEnd(const int end)
virtual void SetPainter(GlsPainter *painter)
virtual void TextureMappingTechnique(const int map)
virtual void DynamicTranslate(float x, float y, float z, bool relative=false)
virtual Vector DynamicRotation()
bool _visible
Definition: display.h:1630
virtual void DynamicRotateRelative(float angle, int axis)
virtual void Translate(float tr[])
unsigned int _nTex_vertices
Definition: display.h:1587
float Y() const
Definition: display.h:852
virtual void GetLocation(float &x, float &y, float &z)
void GetFillColor(unsigned char c4[])
static void SetManualBlinkElapsedTime(double elapsedTime)
virtual Vertex * Vertices()
Definition: display.h:1395
virtual void Location(float x, float y, float z)
unsigned char _depthTest
Definition: display.h:1563
virtual int LineStipplePattern()
virtual void GetExtents(float &x, float &y, float &z, float &x1, float &y1, float &z1)
bool Culled() const
Definition: display.h:422
virtual bool BlinkedOff()
virtual void WorldRotationPoint(const Vector &vert)
virtual int TextureMagnificationFilter()
virtual void SetValue(int spec, va_list &args)
virtual DynamicArray< int > & MaterialIndices()
void NotifyAttributeChanged(const AttributeName &name) override
virtual void GetRotationPoint(Vertex &v)
unsigned char _textureMagFilter
Definition: display.h:1608
unsigned char _textureMap
Definition: display.h:1612
void SetFillColor(unsigned char c4[])
Definition: display.h:692
void VaSetTexCoords(unsigned int nPoints,...)
unsigned char _shading
Definition: display.h:1597
void GetColor(unsigned char &r, unsigned char &g, unsigned char &b, unsigned char &a)
virtual DisplayObject * handle(DisplayEvent *ev)
void DynamicRotate(float angle[])
Vector * Normals()
Definition: display.h:892
virtual void TextureRepeat(const int rep)
void Y(const float y)
Definition: display.h:863
void VaSetNormals(unsigned int nPoints,...)
virtual void RotationPoint(float x, float y, float z)
virtual int LineStippleMultiplier()
void SetTexCoords(unsigned int nPoints, Vertex *new_tex_coord)
Definition: display.h:1241
void GetColor(unsigned char c4[])
GlsMatrixType * _drawMatrix
Definition: display.h:1565
virtual void AntiAlias(bool alias)
bool NeedCalcDrawMatrix()
Definition: display.h:515
float X() const
Definition: display.h:849
void PickSetup(float x, float y, float z, Vertex *vertices, unsigned int vertex_cnt, const Vector &directionVector)
GlsMatrixType * ProjMatrix()
virtual GlsColor GetBlendColor()
virtual const Vertex & Location() const
virtual void Visibility(const bool vis)
virtual bool LightingEnabled()
virtual DisplayObject * CloneObject(bool generateNames=false)=0
void DynamicTranslate(const Vector &amount)
virtual void SetColor(const GlsColor &color)
virtual void Location(const Vertex &v)
DisplayObject(const DisplayObject &object, const bool generateNames)
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 bool GetPlaneVectorPoints(Vertex &p1, Vertex &p2, Vertex &p3, Vertex &planeVector)
bool Visible() const
Definition: display.h:1443
virtual int TextureIndex()
DistiAttribDict & Attributes()
Definition: display.h:178
virtual float BlinkRate()
virtual void DynamicScale(float x, float y, float z)
void DynamicTranslate(const Vertex &amount, bool relative)
virtual Vector * GetTexturePoints()
virtual float ObjectWidth()
DisplayFrame * Parent() const
Definition: display.h:945
virtual void SetVertices(unsigned int nPoints, Vertex *vertices)
virtual void Rotate(const Vector &orig, float angle, const Vector &axis)
void Editor(DisplayObjectEditor *editor)
virtual void TextureIndex(int textureIndex)
virtual void InsertVertexAt(unsigned int index)
virtual void TranslateVertices(float x, float y, float z)
virtual void SetOrigin(const Vertex &vert)
int GetApplicableTextureRepeat()
void PickCleanup(Vertex *vertices, unsigned int vertex_cnt)
GlsMatrixType & DcsMatrix()
Definition: display.h:463
virtual void LineWidth(float width)
void SetColor(unsigned char c4[])
Definition: display.h:367
void LastDrawMatrixLocation(const Vertex &loc)
Definition: display.h:1680
void CalcDrawMatrixIfExists()
Definition: display.h:1656
float _blinkRate
Definition: display.h:1554
virtual DistiAttributeBase & Resource(const char *name)
virtual bool CullBackFace()
virtual bool TextureRepeat()
void CalculateCollisionPoint(const Vector &pickLoc, const Vector &directionVector, Vector *collisionPoint)
virtual float ObjectHeight()
int GetApplicableTextureIndex()
const Vector & BoundingVolumeCenter() const
Definition: display.h:260
static void UseManualBlinkElapsedTime(bool useManualTime)
void SetFillColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
Definition: display.h:686
virtual void Translate(float x, float y, float z)
virtual void ParentGroup(Group *group)
virtual float DynamicTranslation(int axis)
virtual void VaListSetTexCoords(unsigned int nPoints, va_list args)
virtual void GenerateInstanceName()
virtual void Rotate(float angle, int axis=Z_AXIS)
void SetBlendColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
bool _blinking
Definition: display.h:1552
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL)
void X(const float x)
Definition: display.h:859
unsigned char _lineStippleMultiplier
Definition: display.h:1572
GlsMatrixType * _modelMatrix
Definition: display.h:1582
Vector _texturePoints[4]
Definition: display.h:1614
unsigned short _lineStipplePattern
Definition: display.h:1574
void SetColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
Definition: display.h:376
virtual void CalculateMatrices(const OpenGLMatrices &newMatrices)
int _alphaMode
Definition: display.h:1546
bool BoundingVolumeHit(const Vector &start, const Vector &direction)
virtual void Shading(const int shading)
bool _cullBackFace
Definition: display.h:1558
bool InsideVertexExtents(float x, float y, unsigned int nVerts, Vertex *verts, float tolerance)
virtual void BlinkRate(const float rate)
virtual GlsColor GetFillColor()
void Culled(bool val)
Definition: display.h:426
unsigned char _textureRepeat
Definition: display.h:1620
virtual void SetTexCoords(unsigned int nPoints, Vector *new_tex_coord, bool isVectorArray=true)
virtual bool IsVisibleInScene(const DisplayObject *obj=NULL) const
float BoundingVolumeRadius() const
Definition: display.h:277
virtual void CopyProperties(DisplayObject *src)
int _textureIndex
Definition: display.h:1604
virtual float DynamicRotation(int axis)
Definition: disti_metadata.h:734
Definition: disti_metadata.h:220
Definition: editor_object_base.h:49
Definition: gls_color.h:54
Definition: gls_glo_file.h:1243
Definition: gls_glo_file.h:105
void Transform(Vector &v) const
Definition: gls_matrix_affine.h:273
Definition: gls_painter.h:51
Definition: gls_resources.h:51
Definition: gls_state_manager_es20_interface.h:67
Definition: gls_state_manager_interface.h:69
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:544
float MagnitudeSquared() const
Definition: vertex.h:338
float y
The Y component.
Definition: vertex.h:88
float x
The X component.
Definition: vertex.h:87
float z
The Z component.
Definition: vertex.h:89
Definition: weak_referenceable_mixin.h:53
The disti::Culler class. Implements view frustum culling.
GL Studio Enumerations and constants.
#define NUM_TEXTURE_POINTS
Number of texture points per object.
Definition: display_types.h:47
The disti::DynamicArray class. A templated array of objects capable of dynamically growing.
Defines a base class which editor objects can derive.
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:457
#define DISTI_FINAL
Macro to wrap the final keyword, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:216
#define DISTI_METHOD_OVERRIDE
Macro to wrap the override keyword, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:214
#define GLS_EXPORT
Macro denoting which functions should be visible from the runtime library.
Definition: gls_include.h:52
The GlsMatrixAffine class.
The GlsPainter interface.
The disti::GlsStateManager factory class. Creates an instance of a state manager that manages the GL ...
Force inclusion of the DirectShow library.
Definition: bmpimage.h:47
DynamicArray< DisplayObjectPtr > DisplayObjectArray
Typedef for a DynamicArray containing DisplayObjects.
Definition: display.h:85
@ Z_AXIS
Definition: vertex.h:77
DynamicArray< int > DynamicIntArray
Typedef for a DynamicArray containing ints.
Definition: display.h:86
VertexNoColor Vector
Definition: gls_font_base.h:69
DistiAttribDict::const_iterator end(const DistiAttribDict &dict)
Definition: disti_metadata.h:959
DisplayObject * DisplayObjectPtr
Typedef for a DisplayObject pointer.
Definition: display.h:84
Generally useful defines, macros, enumerations and function prototypes.
#define MAX(A, B)
Definition: util.h:186
The disti::Vertex class. A class for manipulating 3D vertices.
weak reference and related classes