GL Studio C++ Runtime API
group.h
Go to the documentation of this file.
1 /*! \file
2  \brief The disti::Group class. Implements groups of objects.
3 
4  \par Copyright Information
5 
6  Copyright (c) 2017 by The DiSTI Corporation.<br>
7  11301 Corporate Blvd; Suite 100<br>
8  Orlando, Florida 32817<br>
9  USA<br>
10  <br>
11  All rights reserved.<br>
12 
13  This Software contains proprietary trade secrets of DiSTI and may not be
14 reproduced, in whole or part, in any form, or by any means of electronic,
15 mechanical, or otherwise, without the written permission of DiSTI. Said
16 permission may be derived through the purchase of applicable DiSTI product
17 licenses which detail the distribution rights of this content and any
18 Derivative Works based on this or other copyrighted DiSTI Software.
19 
20  NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
21 AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
22 PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
23 AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
24 IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
25 PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
26 
27  LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
28 IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
29 INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
30 DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
31 INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
32 INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBILITY
33 OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
34 EXCEED FIVE DOLLARS (US$5.00).
35 
36  The aforementioned terms and restrictions are governed by the laws of the
37 State of Florida and the United States of America.
38 
39 */
40 #ifndef INCLUDED_DISTI_GROUP_H
41 #define INCLUDED_DISTI_GROUP_H
42 
43 #include "display.h"
44 #include "dynamic_array.h"
45 #include "gls_cpp_lang_support.h"
46 
47 namespace disti
48 {
49 /**
50  * The Group class. Implements groups of objects
51  */
52 class Group : public DisplayObject
53 {
54 public:
55  DISTI_DEPRECATED( "This identifier is forbidden by the C++ standard. Use BaseClass instead." )
56  typedef DisplayObject _BaseClass;
57  typedef DisplayObject BaseClass;
58 
59 private:
60  /** If true, this object will be eligible for culling based on its static extents.
61  * IMPORTANT: The cull will only be acturate within the STATIC extents of the group
62  * If any child moves outside the static extents using Dynamic operations, it will
63  * be over-culled.
64  * The default is false, and only leaf nodes (non-groups) will cull.
65  */
66  bool _performGroupCullCheck;
67 
68  /** If true, cull checking will pass on to children of this group.
69  * If false, children will not be culled (if this group is not culled) */
70  bool _cullTestChildren;
71 
72  DisplayObject* BestPick( const Vector& winLoc, const Vector& logicalCoords, float scale, const Vector& directionVector, Vector& collisionWinLoc /*Returned*/, const OpenGLMatrices& drawnMatrices );
73  DisplayObject* FirstPick( const Vector& winLoc, const Vector& logicalCoords, float scale, const Vector& directionVector, Vector& collisionWinLoc /*Returned*/, const OpenGLMatrices& drawnMatrices );
74 
75  virtual GLS_EXPORT void onVertexchanged( void );
76 
77  // GLS-8709 - There should be an attribute type that doesn't require a dummy setter and also does not write the GLS file.
78  void DummySetUnsignedInt( const unsigned int& ) {} // Used for making a read only property
79  Group& operator=( const Group& ) DISTI_SPECIAL_MEM_FUN_DELETE;
80  Group( const Group& that ) DISTI_SPECIAL_MEM_FUN_DELETE;
81 
82 protected:
83  DisplayObjectArray _objects; /** The objects contained in this group */
84 
85  /** Helper method for child classes of group that don't want to call Group::SetAvailableAttributes */
86  virtual GLS_EXPORT void AddAvailableAttributes( unsigned int availableAttributes );
87 
88  /** Grow bounding box to accomodate new object
89  * \param obj The new object in the group
90  * \pre obj Must already be added to the group
91  */
92  virtual GLS_EXPORT void GrowBoundingBox( DisplayObject* obj );
93 
94 public:
95  friend class GroupEditor;
96 
97 #ifndef GLES
98  /* See base class */
99  virtual GLS_EXPORT InterfaceListType* GetCppInterfaceDescription( InterfaceListType* addToThisList = NULL ) DISTI_METHOD_OVERRIDE;
100 
101  /* See base class */
102  virtual GLS_EXPORT void GetCppInterfaceDescriptionFree( InterfaceListType* array ) DISTI_METHOD_OVERRIDE;
103 #endif
104 
105  /** Finds a pointer to the display object in the group, using the object's
106  * instance name as a key.
107  * \note If there are multiple DisplayObjects within the group with the same name,
108  * only the first instance will be found. This can be an issue if a sub-component
109  * contains objects with the same name as the object you are searching for.
110  * \param name Instance name of the object to find
111  * \return A pointer to the object if it is in the group, otherwise NULL
112  */
113  GLS_EXPORT DisplayObject* FindByName( const char* name );
114 
115  /** Finds a pointer to the display object in the group, using the object's
116  * instance name as a key.
117  * This does not desend into components, as they are different frames
118  * with possibility for duplicate names as the current frame.
119  * \param name Instance name of the object to find
120  * \return A pointer to the object if it is in the group, otherwise NULL
121  */
122  virtual GLS_EXPORT DisplayObject* FindByNameSameFrame( const char* name );
123 
124  /** Finds a pointer to the display object in the group, using the object's
125  * instance name as a key.
126  * \param obj Pointer to the object to find
127  * \return A pointer to the object if it is in the group, otherwise NULL
128  */
130 
131  /** Finds a pointer to the DisplayObject in the group using a qualified instance name.
132  * This allows precise searches for an object contained within a sub-component.
133  * (e.g. "cockpit.altimeter.needle"). To find an object in the same DisplayFrame
134  * use just the instance name. (e.g. "cockpit")
135  * The dot denotes crossing of DisplayFrame boundaries.
136  * \sa GetQualifiedInstanceName
137  * \param name Qualified instance name of the object to find
138  * \returns A pointer to the object if it is in the group, otherwise NULL
139  */
140  GLS_EXPORT DisplayObject* FindByQualifiedName( const char* name );
141 
142  /** Finds a pointer to the display object in the group, using the object's address as a key
143  * \param obj Pointer to the object to find
144  * \return A pointer to the object if it is in the group, otherwise NULL
145  */
146  GLS_EXPORT DisplayObject* FindNonRecursive( DisplayObject* obj );
147 
148  /** Returns a reference to the object array for this group */
149  DisplayObjectArray& Objects() { return _objects; }
150 
151  /** Returns a const reference to the object array for this const group */
152  const DisplayObjectArray& Objects() const { return _objects; }
153 
154  /** Returns the DisplayObject at the given group index
155  * \param index The index of the object to find
156  * \return A pointer to the object if it is in the group, otherwise NULL
157  */
158  GLS_EXPORT DisplayObject* Item( unsigned int index );
159 
160  /** Returns whether or not this group should be considered for culling */
161  bool PerformGroupCullCheck( void ) const { return _performGroupCullCheck; }
162 
163  /** Sets whether or not this group should be considered for culling */
164  GLS_EXPORT void PerformGroupCullCheck( bool mode );
165 
166  /** Returns whether or not this group's children should be considered for culling */
167  bool CullTestChildren( void ) const { return _cullTestChildren; }
168 
169  /** Sets whether or not this group's children should be considered for culling */
170  GLS_EXPORT void CullTestChildren( bool mode );
171 
172  /** \return The number of objects in this group. (Non recursive count) */
173  unsigned int Count( void ) const { return _objects.Count(); }
174 
175  /** Overload of the array index operator to allow you to treat this Group as an array of objects */
176  DisplayObjectPtr operator[]( unsigned int index ) { return _objects[ index ]; }
177 
178  /** Overload of the array index operator to allow you to treat this const Group as an array of const objects */
179  const DisplayObject* operator[]( unsigned int index ) const { return _objects[ index ]; }
180 
181  /** \return pointer to the first element in the group, or NULL if it doesn't exist */
182  GLS_EXPORT DisplayObject* FirstObject();
183 
184  /** \return pointer to the last element in the group, or NULL if it doesn't exist */
185  GLS_EXPORT DisplayObject* LastObject( void );
186 
187  /** \return True if this group is empty */
188  bool IsEmpty() const { return ( Count() == 0 ); }
189 
190  /** Get the index position of the specified object in the list
191  * \param obj The object to find
192  * \return The index of the object in the list, -1 if it isn't in the list
193  */
194  GLS_EXPORT int Position( const DisplayObject* obj ) const;
195 
196  /** Construct a new group.
197  * \param generateInstance Whether or not to generate an instance name for this group
198  */
199  GLS_EXPORT explicit Group( int generateInstance = FALSE );
200 
201  /** Copy construct a new group, performing a "deep copy" by cloning objects in the group.
202  * \param group The group to clone.
203  * \param generateNames Whether or not to generate a new instance name for this group and its children.
204  */
205  GLS_EXPORT Group( const Group& group, bool generateNames );
206 
207  /** Sets the initial number of entries in a group
208  * \param cnt The initial number of entries
209  */
210  GLS_EXPORT void InitialGroupCount( unsigned int cnt );
211 
212  static GLS_EXPORT DisplayObject* CreateInstance();
213 
214  /** Destroy a group object */
215  virtual GLS_EXPORT ~Group();
216 
217  /** Actually delete all the children of the group.
218  * This does a recursive "delete" on all the children.
219  * This does NOT just remove them from the group.
220  */
221  virtual GLS_EXPORT void DeleteAllChildren();
222 
223  virtual GLS_EXPORT void SetAvailableAttributes( unsigned int value ) DISTI_METHOD_OVERRIDE;
224 
225  /* See base class */
226  virtual GLS_EXPORT DisplayObject* CloneObject( bool generateNames = false ) DISTI_METHOD_OVERRIDE;
227 
228  /* See base class */
229  virtual GLS_EXPORT void CopyGeometry( DisplayObject* src ) DISTI_METHOD_OVERRIDE;
230 
231  /* See base class */
232  virtual GLS_EXPORT void CopyProperties( DisplayObject* src ) DISTI_METHOD_OVERRIDE;
233 
234  /* See base class */
235  virtual GLS_EXPORT void Draw( void ) DISTI_METHOD_OVERRIDE;
236 
237  /* See base class */
238  virtual GLS_EXPORT void PreDraw( const OpenGLMatrices& current, Culler& culler ) DISTI_METHOD_OVERRIDE;
239 
240  /* See base class */
241  virtual GLS_EXPORT bool Hit( float x, float y, float z, float scale, const Vector& directionVector, Vector* collisionPoint ) DISTI_METHOD_OVERRIDE;
242 
243  /* See base class */
244  virtual GLS_EXPORT DisplayObject* Pick3D( const Vector& winLoc,
245  const Vector& logicalCoords,
246  float scale,
247  const Vector& directionVector,
248  Vector& collisionWinLoc /*Returned*/,
249  const OpenGLMatrices& drawnMatrices ) DISTI_METHOD_OVERRIDE;
250 
251  using BaseClass::Parent;
252 
253  /* See base class */
254  virtual GLS_EXPORT void Parent( DisplayFrame* par ) DISTI_METHOD_OVERRIDE;
255 
256  /* See base class */
257  GLS_EXPORT void SetPainter( GlsPainter* painter ) DISTI_METHOD_OVERRIDE;
258 
259  /* See base class */
260  virtual GLS_EXPORT void CalculateBoundingBox( void );
261 
262  /* Unhides base class implementation. */
263  using BaseClass::Location;
264 
265  /* See base class */
266  virtual GLS_EXPORT void Location( const Vertex& v ) DISTI_METHOD_OVERRIDE;
267  virtual GLS_EXPORT void Location( float x, float y, float z ) DISTI_METHOD_OVERRIDE;
268 
269  /* See base class */
270  virtual GLS_EXPORT void Translate( float x, float y, float z ) DISTI_METHOD_OVERRIDE;
271 
272  /* See base class */
273  virtual GLS_EXPORT void Translate( float transAmount[] ) DISTI_METHOD_OVERRIDE;
274 
275  /* See base class */
276  virtual GLS_EXPORT void TranslateVertices( float x, float y, float z ) DISTI_METHOD_OVERRIDE;
277 
278  /* See base class */
279  virtual GLS_EXPORT void TranslateVertices( float transAmount[] );
280 
281  /* See base class */
282  virtual GLS_EXPORT void GetExtents( float& x, float& y, float& z, float& x1, float& y1, float& z1 ) DISTI_METHOD_OVERRIDE;
283 
284  /* See base class */
285  virtual GLS_EXPORT void GetTransformedExtents( Vector& min, Vector& max, const GlsMatrixType& matrix, bool resetMinMax = true ) DISTI_METHOD_OVERRIDE;
286 
287  /* Unhides base class implementation. */
288  using BaseClass::Rotate;
289 
290  /* See base class */
291  virtual GLS_EXPORT void Rotate( const Vector& orig, float angle, const Vector& axis ) DISTI_METHOD_OVERRIDE;
292 
293  /* Scale in X-Y plane using the center of the group as the anchor. */
294  virtual GLS_EXPORT void Scale( float scale_x, float scale_y );
295 
296  /* See base class */
297  GLS_EXPORT void Scale( float scale_x, float scale_y, float scale_z, Vertex* anchor = NULL, int handle = 0 ) DISTI_METHOD_OVERRIDE;
298 
299  /** Adds the specified object into the group, at the end of the list
300  * \param obj A pointer to the object to add
301  * \param reparent Whether or not the object parent should be set to this group
302  * \param recalculateBoundingbox Whether or not to recalculate the bounding box
303  * \param loc Where to insert it (defaults to -1 which means at the end of the list)
304  */
305  virtual GLS_EXPORT void InsertObject( DisplayObject* obj, bool reparent = true, bool recalculateBoundingbox = true, int loc = -1 );
306 
307  /** Removes the specified object from this group. Does not delete it.
308  * \param obj The display object to removed
309  * \param recalculateBoundingbox
310  * \return True if the object was found and removed from this group
311  */
312  virtual GLS_EXPORT bool DeleteObject( DisplayObject* obj, bool recalculateBoundingbox = true );
313 
314  /** Change the draw order of a child object within this group
315  * \param oldIndex The old index of the object
316  * \param newIndex The new index of the object
317  * \pre oldIndex and newIndex must be valid indices
318  */
319  virtual GLS_EXPORT void ReorderObject( unsigned int oldIndex, unsigned int newIndex );
320 
321  /** Adds the specified object into the group, at the head of the list
322  * Treats the list like a stack, hence the name Push
323  * \param obj A pointer to the object to add
324  */
325  virtual GLS_EXPORT void PushObject( DisplayObject* obj );
326 
327  /** It is not possible to modify a Group's Vertices. Overriden to disable. */
328  GLS_EXPORT void DeleteVertexAt( unsigned ) DISTI_METHOD_OVERRIDE {}
329 
330  /** It is not possible to modify a Group's Vertices. Overriden to disable. */
331  GLS_EXPORT void InsertVertexAt( unsigned ) DISTI_METHOD_OVERRIDE {}
332 
333  /** Copies the given vertex data into the group's location vertex
334  * thereby moving the group's location member without affecting
335  * its child objects.
336  * \param v - Given vertex
337  */
338  virtual GLS_EXPORT void SetGroupLocation( const Vertex& v );
339 
340  /* See base class */
341  virtual GLS_EXPORT void GetResources( std::ostream& outstr, GlsResourceFilter* filter = NULL ) DISTI_METHOD_OVERRIDE;
342 
343  /* See base class */
344  virtual GLS_EXPORT void CalculateTextureCoordinates( void ) DISTI_METHOD_OVERRIDE;
345 
346  virtual GLS_EXPORT void LineWidth( float width ) DISTI_METHOD_OVERRIDE;
347  virtual GLS_EXPORT float LineWidth( void ) DISTI_METHOD_OVERRIDE;
348 
349  virtual GLS_EXPORT void LineStipplePattern( int pattern ) DISTI_METHOD_OVERRIDE;
350  virtual GLS_EXPORT int LineStipplePattern( void ) DISTI_METHOD_OVERRIDE;
351 
352  virtual GLS_EXPORT void LineStippleMultiplier( int mult ) DISTI_METHOD_OVERRIDE;
353  virtual GLS_EXPORT int LineStippleMultiplier( void ) DISTI_METHOD_OVERRIDE;
354 
355  virtual GLS_EXPORT int PolygonMode( void ) DISTI_METHOD_OVERRIDE;
356  virtual GLS_EXPORT void PolygonMode( int mode ) DISTI_METHOD_OVERRIDE;
357 
358  virtual GLS_EXPORT void PolygonEnd( const int mode ) DISTI_METHOD_OVERRIDE;
359  virtual GLS_EXPORT int PolygonEnd( void ) DISTI_METHOD_OVERRIDE;
360 
361  virtual GLS_EXPORT void Shading( const int mode ) DISTI_METHOD_OVERRIDE;
362  virtual GLS_EXPORT int Shading( void ) DISTI_METHOD_OVERRIDE;
363 
364  virtual GLS_EXPORT void DepthTest( unsigned char mode ) DISTI_METHOD_OVERRIDE;
365  virtual GLS_EXPORT int DepthTest( void ) DISTI_METHOD_OVERRIDE;
366 
367  virtual GLS_EXPORT void AntiAlias( bool mode ) DISTI_METHOD_OVERRIDE;
368  virtual GLS_EXPORT bool AntiAlias( void ) DISTI_METHOD_OVERRIDE;
369 
370  virtual GLS_EXPORT void AlphaMode( int mode ) DISTI_METHOD_OVERRIDE;
371  virtual GLS_EXPORT int AlphaMode( void ) DISTI_METHOD_OVERRIDE;
372 
373  virtual GLS_EXPORT void CullBackFace( const bool mode ) DISTI_METHOD_OVERRIDE;
374  virtual GLS_EXPORT bool CullBackFace( void ) DISTI_METHOD_OVERRIDE;
375 
376  virtual GLS_EXPORT bool LightingEnabled() DISTI_METHOD_OVERRIDE;
377  virtual GLS_EXPORT void LightingEnabled( bool lighting ) DISTI_METHOD_OVERRIDE;
378 
379  /* Unhides base class implementation. */
380  using BaseClass::SetBlendColor;
381 
382  virtual GLS_EXPORT void SetBlendColor( const GlsColor& color ) DISTI_METHOD_OVERRIDE;
383 
384  /* Unhides base class implementation. */
385  using BaseClass::GetBlendColor;
386 
387  virtual GLS_EXPORT GlsColor GetBlendColor( void ) DISTI_METHOD_OVERRIDE;
388 
389  /* Unhides base class implementation. */
390  using BaseClass::SetColor;
391 
392  virtual GLS_EXPORT void SetColor( const GlsColor& color ) DISTI_METHOD_OVERRIDE;
393 
394  /* Unhides base class implementation. */
395  using BaseClass::GetColor;
396 
397  virtual GLS_EXPORT GlsColor GetColor( void ) DISTI_METHOD_OVERRIDE;
398 
399  /* Unhides base class implementation. */
400  using BaseClass::SetFillColor;
401 
402  virtual GLS_EXPORT void SetFillColor( const GlsColor& color ) DISTI_METHOD_OVERRIDE;
403 
404  /* Unhides base class implementation. */
405  using BaseClass::GetFillColor;
406 
407  virtual GLS_EXPORT GlsColor GetFillColor( void ) DISTI_METHOD_OVERRIDE;
408 
409  virtual GLS_EXPORT void TextureRepeat( const int rep ) DISTI_METHOD_OVERRIDE;
410  using BaseClass::TextureRepeat;
411 
412  virtual GLS_EXPORT void TextureMappingTechnique( const int map ) DISTI_METHOD_OVERRIDE;
413  virtual GLS_EXPORT int TextureMappingTechnique( void ) DISTI_METHOD_OVERRIDE;
414 
415  virtual GLS_EXPORT void TextureMinificationFilter( const int filter ) DISTI_METHOD_OVERRIDE;
416  virtual GLS_EXPORT int TextureMinificationFilter( void ) DISTI_METHOD_OVERRIDE;
417 
418  virtual GLS_EXPORT void TextureMagnificationFilter( const int filter ) DISTI_METHOD_OVERRIDE;
419  virtual GLS_EXPORT int TextureMagnificationFilter( void ) DISTI_METHOD_OVERRIDE;
420 
421  /** Call the Calculate method for all children
422  * \param time The current time
423  */
424  virtual GLS_EXPORT void Calculate( double time ) DISTI_METHOD_OVERRIDE;
425 
426  /** The following class is provided for GL Studio 2.1 backward compatibility.
427  * This interface is deprecated and should only be used to support legacy code.
428  */
430  {
431  protected:
432  unsigned int _index;
433  Group* _parentGroup;
434 
435  public:
436  GLS_EXPORT CompatabilityListItem();
437 
438  GLS_EXPORT CompatabilityListItem* Next();
439 
440  GLS_EXPORT CompatabilityListItem* Prev();
441 
442  GLS_EXPORT DisplayObject* DataPtr();
443 
444  static GLS_EXPORT void RecalcCompatabilityList( Group* whichGroup );
445  };
446 
447  /** \return The first object in this group
448  */
449  GLS_EXPORT CompatabilityListItem* First();
450 
451  /** \return The last object in this group
452  */
453  GLS_EXPORT CompatabilityListItem* Last();
454 
455  DynamicArray<CompatabilityListItem> _compatList; /** Use for 2.1 compatibility only */
456 
457 private:
458  /** Sets the texturing repeat mode for this object without affecting
459  * the settings of its children.
460  * \param rep The new texture repeat mode for this object (boolean)
461  */
462  virtual GLS_EXPORT void SetGroupTextureRepeat( const int mode );
463 };
464 
465 /// Overload begin() so that range-for loops and other constructs work with Group
466 inline DisplayObjectPtr* begin( Group& group )
467 {
468  return begin( group.Objects() );
469 }
470 
471 /// Overload begin() so that range-for loops and other constructs work with Group
472 inline const DisplayObjectPtr* begin( const Group& group )
473 {
474  return begin( group.Objects() );
475 }
476 
477 /// Overload begin() so that range-for loops and other constructs work with Group
478 inline DisplayObjectPtr* end( Group& group )
479 {
480  return end( group.Objects() );
481 }
482 
483 /// Overload begin() so that range-for loops and other constructs work with Group
484 inline const DisplayObjectPtr* end( const Group& group )
485 {
486  return end( group.Objects() );
487 }
488 
489 } // namespace disti
490 
491 #endif
Definition: cull.h:49
DisplayObject * FindNonRecursive(DisplayObject *obj)
Definition: display_frame.h:85
virtual const Vertex & Location(void) const
unsigned int Count(void) const
Definition: group.h:173
Definition: vertex.h:409
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:436
virtual void GrowBoundingBox(DisplayObject *obj)
unsigned Count() const
Definition: dynamic_array.h:204
virtual DisplayObject * Pick3D(const Vector &winLoc, const Vector &logicalCoords, float scale, const Vector &directionVector, Vector &collisionWinLoc, const OpenGLMatrices &drawnMatrices) override
bool IsEmpty() const
Definition: group.h:188
virtual void CopyProperties(DisplayObject *src) override
virtual void InsertObject(DisplayObject *obj, bool reparent=true, bool recalculateBoundingbox=true, int loc=-1)
The disti::DynamicArray class. A templated array of objects capable of dynamically growing...
virtual int PolygonEnd(void) override
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:473
virtual void PreDraw(const OpenGLMatrices &current, Culler &culler) override
virtual void TranslateVertices(float x, float y, float z) override
void DeleteVertexAt(unsigned) override
Definition: group.h:328
DisplayFrame * Parent(void) const
Definition: display.h:932
virtual bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint) override
void SetPainter(GlsPainter *painter) override
Definition: display.h:98
virtual bool CullBackFace(void) override
DisplayObject * Item(unsigned int index)
const DisplayObjectArray & Objects() const
Definition: group.h:152
virtual void GetExtents(float &x, float &y, float &z, float &x1, float &y1, float &z1) override
virtual int TextureMinificationFilter(void) override
virtual void DeleteAllChildren()
virtual DisplayObject * CloneObject(bool generateNames=false) override
DisplayObject * FirstObject()
virtual void Rotate(const Vector &orig, float angle, const Vector &axis) override
virtual int Shading(void) override
virtual void SetBlendColor(const GlsColor &color) override
The disti::DisplayObject class and global enumerations.
const DisplayObject * operator[](unsigned int index) const
Definition: group.h:179
virtual float LineWidth(void) override
virtual ~Group()
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL) override
virtual void Calculate(double time) override
Definition: gls_painter.h:51
virtual int TextureMappingTechnique(void) override
DisplayObjectPtr operator[](unsigned int index)
Definition: group.h:176
virtual void ReorderObject(unsigned int oldIndex, unsigned int newIndex)
virtual void PushObject(DisplayObject *obj)
CompatabilityListItem * First()
virtual bool DeleteObject(DisplayObject *obj, bool recalculateBoundingbox=true)
virtual GlsColor GetFillColor(void) override
virtual bool AntiAlias(void) override
CompatabilityListItem * Last()
virtual void Translate(float x, float y, float z) override
bool CullTestChildren(void) const
Definition: group.h:167
DisplayObject * FindByName(const char *name)
void InitialGroupCount(unsigned int cnt)
bool PerformGroupCullCheck(void) const
Definition: group.h:161
virtual void CopyGeometry(DisplayObject *src) override
Definition: gls_color.h:53
char * InstanceName(void)
int Position(const DisplayObject *obj) const
virtual void CalculateTextureCoordinates(void) override
DistiAttribDict::const_iterator begin(const DistiAttribDict &dict)
Definition: disti_metadata.h:863
virtual void SetGroupLocation(const Vertex &v)
DisplayObject * LastObject(void)
virtual int TextureMagnificationFilter(void) override
DisplayObject * FindByName(DisplayObject *obj)
Definition: group.h:129
virtual GlsColor GetBlendColor(void) override
DisplayObject * FindByQualifiedName(const char *name)
virtual void SetColor(const GlsColor &color) override
Definition: group.h:52
virtual void SetAvailableAttributes(unsigned int value) override
virtual int LineStipplePattern(void) override
Definition: vertex.h:84
virtual void SetFillColor(const GlsColor &color) override
virtual GlsColor GetColor(void) override
virtual void Draw(void) override
virtual DisplayObject * FindByNameSameFrame(const char *name)
DisplayObjectArray & Objects()
Definition: group.h:149
virtual void GetResources(std::ostream &outstr, GlsResourceFilter *filter=NULL) override
Definition: gls_resources.h:50
virtual bool TextureRepeat(void)
virtual int PolygonMode(void) override
virtual bool LightingEnabled() override
Macros and helper code to determine what subset of C++11/14/17 is available.
virtual int DepthTest(void) override
virtual int LineStippleMultiplier(void) override
Definition: bmpimage.h:46
void InsertVertexAt(unsigned) override
Definition: group.h:331
virtual void GetTransformedExtents(Vector &min, Vector &max, const GlsMatrixType &matrix, bool resetMinMax=true) override
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array) override
virtual int AlphaMode(void) override
const DisplayObjectPtr * end(const Group &group)
Overload begin() so that range-for loops and other constructs work with Group.
Definition: group.h:484
virtual void AddAvailableAttributes(unsigned int availableAttributes)
virtual DisplayObject * handle(DisplayEvent *ev)