| 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; ///< Deprecated typedef for the base class.
57 typedef DisplayObject BaseClass; ///< Typedef for the base class.
58
59private:
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();
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 /// \param availableAttributes Bit field for attribute types to create.
87 virtual GLS_EXPORT void AddAvailableAttributes( unsigned int availableAttributes );
88
89 /** Grow bounding box to accomodate new object
90 * \param obj The new object in the group
91 * \pre obj Must already be added to the group
92 */
93 virtual GLS_EXPORT void GrowBoundingBox( DisplayObject* obj );
94
95 public:
96 friend class GroupEditor;
97
98#ifndef GLES
99 virtual GLS_EXPORT InterfaceListType* GetCppInterfaceDescription( InterfaceListType* addToThisList = NULL ) DISTI_METHOD_OVERRIDE;
100 virtual GLS_EXPORT void GetCppInterfaceDescriptionFree( InterfaceListType* array ) DISTI_METHOD_OVERRIDE;
101#endif
102
103 /** Finds a pointer to the display object in the group, using the object's
104 * instance name as a key.
105 * \note If there are multiple DisplayObjects within the group with the same name,
106 * only the first instance will be found. This can be an issue if a sub-component
107 * contains objects with the same name as the object you are searching for.
108 * \param name Instance name of the object to find
109 * \return A pointer to the object if it is in the group, otherwise NULL
110 */
111 GLS_EXPORT DisplayObject* FindByName( const char* name );
112
113 /** Finds a pointer to the display object in the group, using the object's
114 * instance name as a key.
115 * This does not desend into components, as they are different frames
116 * with possibility for duplicate names as the current frame.
117 * \param name Instance name of the object to find
118 * \return A pointer to the object if it is in the group, otherwise NULL
119 */
120 virtual GLS_EXPORT DisplayObject* FindByNameSameFrame( const char* name );
121
122 /** Finds a pointer to the display object in the group, using the object's
123 * instance name as a key.
124 * \param obj Pointer to the object to find
125 * \return A pointer to the object if it is in the group, otherwise NULL
126 */
127 DisplayObject* FindByName( DisplayObject* obj ) { return FindByName( obj->InstanceName() ); }
128
129 /** Finds a pointer to the DisplayObject in the group using a qualified instance name.
130 * This allows precise searches for an object contained within a sub-component.
131 * (e.g. "cockpit.altimeter.needle"). To find an object in the same DisplayFrame
132 * use just the instance name. (e.g. "cockpit")
133 * The dot denotes crossing of DisplayFrame boundaries.
134 * \sa GetQualifiedInstanceName
135 * \param name Qualified instance name of the object to find
136 * \returns A pointer to the object if it is in the group, otherwise NULL
137 */
138 GLS_EXPORT DisplayObject* FindByQualifiedName( const char* name );
139
140 /** Finds a pointer to the display object in the group, using the object's address as a key
141 * \param obj Pointer to the object to find
142 * \return A pointer to the object if it is in the group, otherwise NULL
143 */
144 GLS_EXPORT DisplayObject* FindNonRecursive( DisplayObject* obj );
145
146 /// \return A reference to the object array for this group.
147 DisplayObjectArray& Objects() { return _objects; }
148
149 /// \return A const reference to the object array for this const group.
150 const DisplayObjectArray& Objects() const { return _objects; }
151
152 /** Returns the DisplayObject at the given group index
153 * \param index The index of the object to find
154 * \return A pointer to the object if it is in the group, otherwise NULL
155 */
156 GLS_EXPORT DisplayObject* Item( unsigned int index );
157
158 /// \return Whether or not this group should be considered for culling.
159 bool PerformGroupCullCheck() const { return _performGroupCullCheck; }
160
161 /// Sets whether or not this group should be considered for culling.
162 /// \param mode The new cull mode for the group.
163 GLS_EXPORT void PerformGroupCullCheck( bool mode );
164
165 /// \return Whether or not this group's children should be considered for culling.
166 bool CullTestChildren() const { return _cullTestChildren; }
167
168 /// Sets whether or not this group's children should be considered for culling.
169 /// \param mode The new cull mode to set.
170 GLS_EXPORT void CullTestChildren( bool mode );
171
172 /** \return The number of objects in this group. (Non recursive count) */
173 unsigned int Count() 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 /// \param index The object index to be returned.
177 /// \return A pointer to the requested object.
178 DisplayObjectPtr operator[]( unsigned int index ) { return _objects[ index ]; }
179
180 /// Overload of the array index operator to allow you to treat this const Group as an array of const objects.
181 /// \param index The object index to be returned.
182 /// \return A pointer to the requested object.
183 const DisplayObject* operator[]( unsigned int index ) const { return _objects[ index ]; }
184
185 /** \return pointer to the first element in the group, or NULL if it doesn't exist */
186 GLS_EXPORT DisplayObject* FirstObject();
187
188 /** \return pointer to the last element in the group, or NULL if it doesn't exist */
189 GLS_EXPORT DisplayObject* LastObject();
190
191 /** \return True if this group is empty */
192 bool IsEmpty() const { return ( Count() == 0 ); }
193
194 /** Get the index position of the specified object in the list
195 * \param obj The object to find
196 * \return The index of the object in the list, -1 if it isn't in the list
197 */
198 GLS_EXPORT int Position( const DisplayObject* obj ) const;
199
200 /** Construct a new group.
201 * \param generateInstance Whether or not to generate an instance name for this group
202 */
203 GLS_EXPORT explicit Group( int generateInstance = FALSE );
204
205 /** Copy construct a new group, performing a "deep copy" by cloning objects in the group.
206 * \param group The group to clone.
207 * \param generateNames Whether or not to generate a new instance name for this group and its children.
208 */
209 GLS_EXPORT Group( const Group& group, bool generateNames );
210
211 /** Sets the initial number of entries in a group
212 * \param cnt The initial number of entries
213 */
214 GLS_EXPORT void InitialGroupCount( unsigned int cnt );
215
216 /// \return A pointer to a new Group object.
217 static GLS_EXPORT DisplayObject* CreateInstance();
218
219 /** Destroy a group object */
220 virtual GLS_EXPORT ~Group();
221
222 /** Actually delete all the children of the group.
223 * This does a recursive "delete" on all the children.
224 * This does NOT just remove them from the group.
225 */
226 virtual GLS_EXPORT void DeleteAllChildren();
227
228 virtual GLS_EXPORT void SetAvailableAttributes( unsigned int value ) DISTI_METHOD_OVERRIDE;
229
230 virtual GLS_EXPORT DisplayObject* CloneObject( bool generateNames = false ) DISTI_METHOD_OVERRIDE;
231 virtual GLS_EXPORT void CopyGeometry( DisplayObject* src ) DISTI_METHOD_OVERRIDE;
232 virtual GLS_EXPORT void CopyProperties( DisplayObject* src ) DISTI_METHOD_OVERRIDE;
233 virtual GLS_EXPORT void Draw() DISTI_METHOD_OVERRIDE;
234 virtual GLS_EXPORT void PreDraw( const OpenGLMatrices& current, Culler& culler ) DISTI_METHOD_OVERRIDE;
235 virtual GLS_EXPORT bool Hit( float x, float y, float z, float scale, const Vector& directionVector, Vector* collisionPoint ) DISTI_METHOD_OVERRIDE;
236
237 virtual GLS_EXPORT DisplayObject* Pick3D( const Vector& winLoc,
238 const Vector& logicalCoords,
239 float scale,
240 const Vector& directionVector,
241 Vector& collisionWinLoc /*Returned*/,
242 const OpenGLMatrices& drawnMatrices ) DISTI_METHOD_OVERRIDE;
243
244 using BaseClass::Parent;
245 virtual GLS_EXPORT void Parent( DisplayFrame* par ) DISTI_METHOD_OVERRIDE;
246
247 GLS_EXPORT void SetPainter( GlsPainter* painter ) DISTI_METHOD_OVERRIDE;
248
249 /// Recalculates the 3D bounding volume of the object, setting the Group's vertices.
250 /// Affects the results of GetExtents().
251 /// This should be called when a Group's children are modified.
252 virtual GLS_EXPORT void CalculateBoundingBox();
253
254 /* Unhides base class implementation. */
255 using BaseClass::Location;
256 virtual GLS_EXPORT void Location( const Vertex& v ) DISTI_METHOD_OVERRIDE;
257 virtual GLS_EXPORT void Location( float x, float y, float z ) DISTI_METHOD_OVERRIDE;
258 virtual GLS_EXPORT void Translate( float x, float y, float z ) DISTI_METHOD_OVERRIDE;
259 virtual GLS_EXPORT void Translate( float transAmount[] ) DISTI_METHOD_OVERRIDE;
260 virtual GLS_EXPORT void TranslateVertices( float x, float y, float z ) DISTI_METHOD_OVERRIDE;
261
262 /// Translates the group by the specified amount my changing the
263 /// vertices instead of changing the _location value, moving all subobjects.
264 /// \param transAmount A pointer to an array of floats representing X, Y, and Z to translate.
265 virtual GLS_EXPORT void TranslateVertices( float transAmount[] );
266
267 virtual GLS_EXPORT void GetExtents( float& x, float& y, float& z, float& x1, float& y1, float& z1 ) DISTI_METHOD_OVERRIDE;
268 virtual GLS_EXPORT void GetTransformedExtents( Vector& min, Vector& max, const GlsMatrixType& matrix, bool resetMinMax = true ) DISTI_METHOD_OVERRIDE;
269
270 /* Unhides base class implementation. */
271 using BaseClass::Rotate;
272 virtual GLS_EXPORT void Rotate( const Vector& orig, float angle, const Vector& axis ) DISTI_METHOD_OVERRIDE;
273
274 /// Scale in X-Y plane using the center of the group as the anchor.
275 /// \param scale_x The X factor to scale by.
276 /// \param scale_y The Y factor to scale by.
277 virtual GLS_EXPORT void Scale( float scale_x, float scale_y );
278 GLS_EXPORT void Scale( float scale_x, float scale_y, float scale_z, Vertex* anchor = NULL, int handle = 0 ) DISTI_METHOD_OVERRIDE;
279
280 /** Adds the specified object into the group, at the end of the list
281 * \param obj A pointer to the object to add
282 * \param reparent Whether or not the object parent should be set to this group
283 * \param recalculateBoundingbox Whether or not to recalculate the bounding box
284 * \param loc Where to insert it (defaults to -1 which means at the end of the list)
285 */
286 virtual GLS_EXPORT void InsertObject( DisplayObject* obj, bool reparent = true, bool recalculateBoundingbox = true, int loc = -1 );
287
288 /** Removes the specified object from this group. Does not delete it.
289 * \param obj The display object to removed
290 * \param recalculateBoundingbox
291 * \return True if the object was found and removed from this group
292 */
293 virtual GLS_EXPORT bool DeleteObject( DisplayObject* obj, bool recalculateBoundingbox = true );
294
295 /** Change the draw order of a child object within this group
296 * \param oldIndex The old index of the object
297 * \param newIndex The new index of the object
298 * \pre oldIndex and newIndex must be valid indices
299 */
300 virtual GLS_EXPORT void ReorderObject( unsigned int oldIndex, unsigned int newIndex );
301
302 /** Adds the specified object into the group, at the head of the list
303 * Treats the list like a stack, hence the name Push
304 * \param obj A pointer to the object to add
305 */
306 virtual GLS_EXPORT void PushObject( DisplayObject* obj );
307
308 /** It is not possible to modify a Group's Vertices. Overriden to disable. */
309 GLS_EXPORT void DeleteVertexAt( unsigned ) DISTI_METHOD_OVERRIDE;
310
311 /** It is not possible to modify a Group's Vertices. Overriden to disable. */
312 GLS_EXPORT void InsertVertexAt( unsigned ) DISTI_METHOD_OVERRIDE;
313
314 /** Copies the given vertex data into the group's location vertex
315 * thereby moving the group's location member without affecting
316 * its child objects.
317 * \param v - Given vertex
318 */
319 virtual GLS_EXPORT void SetGroupLocation( const Vertex& v );
320
321 virtual GLS_EXPORT void GetResources( std::ostream& outstr, GlsResourceFilter* filter = NULL ) DISTI_METHOD_OVERRIDE;
322
323 virtual GLS_EXPORT void CalculateTextureCoordinates() DISTI_METHOD_OVERRIDE;
324
325 virtual GLS_EXPORT void LineWidth( float width ) DISTI_METHOD_OVERRIDE;
326 virtual GLS_EXPORT float LineWidth() DISTI_METHOD_OVERRIDE;
327
328 virtual GLS_EXPORT void LineStipplePattern( int pattern ) DISTI_METHOD_OVERRIDE;
329 virtual GLS_EXPORT int LineStipplePattern() DISTI_METHOD_OVERRIDE;
330
331 virtual GLS_EXPORT void LineStippleMultiplier( int mult ) DISTI_METHOD_OVERRIDE;
332 virtual GLS_EXPORT int LineStippleMultiplier() DISTI_METHOD_OVERRIDE;
333
334 virtual GLS_EXPORT int PolygonMode() DISTI_METHOD_OVERRIDE;
335 virtual GLS_EXPORT void PolygonMode( int mode ) DISTI_METHOD_OVERRIDE;
336
337 virtual GLS_EXPORT void PolygonEnd( const int mode ) DISTI_METHOD_OVERRIDE;
338 virtual GLS_EXPORT int PolygonEnd() DISTI_METHOD_OVERRIDE;
339
340 virtual GLS_EXPORT void Shading( const int mode ) DISTI_METHOD_OVERRIDE;
341 virtual GLS_EXPORT int Shading() DISTI_METHOD_OVERRIDE;
342
343 virtual GLS_EXPORT void DepthTest( unsigned char mode ) DISTI_METHOD_OVERRIDE;
344 virtual GLS_EXPORT int DepthTest() DISTI_METHOD_OVERRIDE;
345
346 virtual GLS_EXPORT void AntiAlias( bool mode ) DISTI_METHOD_OVERRIDE;
347 virtual GLS_EXPORT bool AntiAlias() DISTI_METHOD_OVERRIDE;
348
349 virtual GLS_EXPORT void AlphaMode( int mode ) DISTI_METHOD_OVERRIDE;
350 virtual GLS_EXPORT int AlphaMode() DISTI_METHOD_OVERRIDE;
351
352 virtual GLS_EXPORT void CullBackFace( const bool mode ) DISTI_METHOD_OVERRIDE;
353 virtual GLS_EXPORT bool CullBackFace() DISTI_METHOD_OVERRIDE;
354
355 virtual GLS_EXPORT bool LightingEnabled() DISTI_METHOD_OVERRIDE;
356 virtual GLS_EXPORT void LightingEnabled( bool lighting ) DISTI_METHOD_OVERRIDE;
357
358 /* Unhides base class implementation. */
359 using BaseClass::SetBlendColor;
360
361 virtual GLS_EXPORT void SetBlendColor( const GlsColor& color ) DISTI_METHOD_OVERRIDE;
362
363 /* Unhides base class implementation. */
364 using BaseClass::GetBlendColor;
365
366 virtual GLS_EXPORT GlsColor GetBlendColor() DISTI_METHOD_OVERRIDE;
367
368 /* Unhides base class implementation. */
369 using BaseClass::SetColor;
370
371 virtual GLS_EXPORT void SetColor( const GlsColor& color ) DISTI_METHOD_OVERRIDE;
372
373 /* Unhides base class implementation. */
374 using BaseClass::GetColor;
375
376 virtual GLS_EXPORT GlsColor GetColor() DISTI_METHOD_OVERRIDE;
377
378 /* Unhides base class implementation. */
379 using BaseClass::SetFillColor;
380
381 virtual GLS_EXPORT void SetFillColor( const GlsColor& color ) DISTI_METHOD_OVERRIDE;
382
383 /* Unhides base class implementation. */
384 using BaseClass::GetFillColor;
385
386 virtual GLS_EXPORT GlsColor GetFillColor() DISTI_METHOD_OVERRIDE;
387
388 virtual GLS_EXPORT void TextureRepeat( const int rep ) DISTI_METHOD_OVERRIDE;
389 using BaseClass::TextureRepeat;
390
391 virtual GLS_EXPORT void TextureMappingTechnique( const int map ) DISTI_METHOD_OVERRIDE;
392 virtual GLS_EXPORT int TextureMappingTechnique() DISTI_METHOD_OVERRIDE;
393
394 virtual GLS_EXPORT void TextureMinificationFilter( const int filter ) DISTI_METHOD_OVERRIDE;
395 virtual GLS_EXPORT int TextureMinificationFilter() DISTI_METHOD_OVERRIDE;
396
397 virtual GLS_EXPORT void TextureMagnificationFilter( const int filter ) DISTI_METHOD_OVERRIDE;
398 virtual GLS_EXPORT int TextureMagnificationFilter() DISTI_METHOD_OVERRIDE;
399
400 /** Call the Calculate method for all children
401 * \param time The current time
402 */
403 virtual GLS_EXPORT void Calculate( double time ) DISTI_METHOD_OVERRIDE;
404
405 /** The following class is provided for GL Studio 2.1 backward compatibility.
406 * This interface is deprecated and should only be used to support legacy code.
407 */
408 class CompatabilityListItem
409 {
410 protected:
411 unsigned int _index; ///< The underlying index of this child object.
412 Group* _parentGroup; ///< This group's parent group.
413
414 public:
415 GLS_EXPORT CompatabilityListItem();
416
417 /// \return A pointer to the next item in the list.
418 GLS_EXPORT CompatabilityListItem* Next();
419
420 /// \return A pointer to the previous item in the list.
421 GLS_EXPORT CompatabilityListItem* Prev();
422
423 /// \return The underlying object for this list item.
424 GLS_EXPORT DisplayObject* DataPtr();
425
426 /// Configure the list for the specified Group.
427 /// \param whichGroup The Group whose compatibility list is to be configured.
428 static GLS_EXPORT void RecalcCompatabilityList( Group* whichGroup );
429 };
430
431 /** \return The first object in this group
432 */
433 GLS_EXPORT CompatabilityListItem* First();
434
435 /** \return The last object in this group
436 */
437 GLS_EXPORT CompatabilityListItem* Last();
438
439 DynamicArray<CompatabilityListItem> _compatList; ///< Used for GL Studio 2.1 compatibility only.
440
441 private:
442 /** Sets the texturing repeat mode for this object without affecting
443 * the settings of its children.
444 * \param rep The new texture repeat mode for this object (boolean)
445 */
446 virtual GLS_EXPORT void SetGroupTextureRepeat( const int mode );
447};
448
449/// Overload begin() so that range-for loops and other constructs work with Group.
450/// \param group The group whose first element is to be returned.
451/// \return A pointer to the first element.
452 inline DisplayObjectPtr* begin( Group& group )
453{
454 return begin( group.Objects() );
455}
456
457/// Overload begin() so that range-for loops and other constructs work with Group.
458/// \param group The group whose first element is to be returned.
459/// \return A pointer to the first element.
460 inline const DisplayObjectPtr* begin( const Group& group )
461{
462 return begin( group.Objects() );
463}
464
465/// Overload end() so that range-for loops and other constructs work with Group.
466/// \param group The group whose last element is to be returned.
467/// \return A pointer to the last element.
468 inline DisplayObjectPtr* end( Group& group )
469{
470 return end( group.Objects() );
471}
472
473/// Overload end() so that range-for loops and other constructs work with Group.
474/// \param group The group whose last element is to be returned.
475/// \return A pointer to the last element.
476 inline const DisplayObjectPtr* end( const Group& group )
477{
478 return end( group.Objects() );
479}
480
481} // namespace disti
482
483#endif
disti::Culler
Definition: cull.h:50
disti::DisplayFrame
Definition: display_frame.h:87
disti::DisplayObject
Definition: display.h:96
disti::DisplayObject::InstanceName
char * InstanceName()
disti::DisplayObject::handle
virtual DisplayObject * handle(DisplayEvent *ev)
disti::DynamicArray< DisplayObjectPtr >
disti::DynamicArray::Count
unsigned Count() const
Definition: dynamic_array.h:218
disti::GlsColor
Definition: gls_color.h:54
disti::GlsMatrixAffine< double >
disti::GlsPainter
Definition: gls_painter.h:51
disti::GlsResourceFilter
Definition: gls_resources.h:51
disti::Group::CompatabilityListItem
Definition: group.h:409
disti::Group::CompatabilityListItem::RecalcCompatabilityList
static void RecalcCompatabilityList(Group *whichGroup)
disti::Group::CompatabilityListItem::_parentGroup
Group * _parentGroup
This group's parent group.
Definition: group.h:412
disti::Group::CompatabilityListItem::DataPtr
DisplayObject * DataPtr()
disti::Group::CompatabilityListItem::_index
unsigned int _index
The underlying index of this child object.
Definition: group.h:411
disti::Group::CompatabilityListItem::Next
CompatabilityListItem * Next()
disti::Group::CompatabilityListItem::Prev
CompatabilityListItem * Prev()
disti::Group
Definition: group.h:53
disti::Group::PolygonMode
virtual int PolygonMode() override
disti::Group::PerformGroupCullCheck
void PerformGroupCullCheck(bool mode)
disti::Group::TextureMagnificationFilter
virtual int TextureMagnificationFilter() override
disti::Group::operator[]
DisplayObjectPtr operator[](unsigned int index)
Definition: group.h:178
disti::Group::ReorderObject
virtual void ReorderObject(unsigned int oldIndex, unsigned int newIndex)
disti::Group::GetBlendColor
virtual GlsColor GetBlendColor() override
disti::Group::SetPainter
void SetPainter(GlsPainter *painter) override
disti::Group::DeleteAllChildren
virtual void DeleteAllChildren()
disti::Group::Calculate
virtual void Calculate(double time) override
disti::Group::CloneObject
virtual DisplayObject * CloneObject(bool generateNames=false) override
disti::Group::Last
CompatabilityListItem * Last()
disti::Group::SetGroupLocation
virtual void SetGroupLocation(const Vertex &v)
disti::Group::Scale
virtual void Scale(float scale_x, float scale_y)
disti::Group::PerformGroupCullCheck
bool PerformGroupCullCheck() const
Definition: group.h:159
disti::Group::TranslateVertices
virtual void TranslateVertices(float x, float y, float z) override
disti::Group::LineWidth
virtual float LineWidth() override
disti::Group::operator[]
const DisplayObject * operator[](unsigned int index) const
Definition: group.h:183
disti::Group::TextureMappingTechnique
virtual int TextureMappingTechnique() override
disti::Group::Rotate
virtual void Rotate(const Vector &orig, float angle, const Vector &axis) override
disti::Group::GetResources
virtual void GetResources(std::ostream &outstr, GlsResourceFilter *filter=NULL) override
disti::Group::SetAvailableAttributes
virtual void SetAvailableAttributes(unsigned int value) override
disti::Group::GetColor
virtual GlsColor GetColor() override
disti::Group::LastObject
DisplayObject * LastObject()
disti::Group::FirstObject
DisplayObject * FirstObject()
disti::Group::LineStippleMultiplier
virtual int LineStippleMultiplier() override
disti::Group::_objects
DisplayObjectArray _objects
The objects contained in this group.
Definition: group.h:83
disti::Group::LineStipplePattern
virtual int LineStipplePattern() override
disti::Group::Objects
const DisplayObjectArray & Objects() const
Definition: group.h:150
disti::Group::TextureMinificationFilter
virtual int TextureMinificationFilter() override
disti::Group::CullTestChildren
void CullTestChildren(bool mode)
disti::Group::Position
int Position(const DisplayObject *obj) const
disti::Group::Objects
DisplayObjectArray & Objects()
Definition: group.h:147
disti::Group::Count
unsigned int Count() const
Definition: group.h:173
disti::Group::DeleteObject
virtual bool DeleteObject(DisplayObject *obj, bool recalculateBoundingbox=true)
disti::Group::GetFillColor
virtual GlsColor GetFillColor() override
disti::Group::_compatList
DynamicArray< CompatabilityListItem > _compatList
Used for GL Studio 2.1 compatibility only.
Definition: group.h:439
disti::Group::CalculateBoundingBox
virtual void CalculateBoundingBox()
disti::Group::FindByName
DisplayObject * FindByName(const char *name)
disti::Group::Group
Group(int generateInstance=0)
disti::Group::CalculateTextureCoordinates
virtual void CalculateTextureCoordinates() override
disti::Group::SetColor
virtual void SetColor(const GlsColor &color) override
disti::Group::SetFillColor
virtual void SetFillColor(const GlsColor &color) override
disti::Group::GetExtents
virtual void GetExtents(float &x, float &y, float &z, float &x1, float &y1, float &z1) override
disti::Group::FindNonRecursive
DisplayObject * FindNonRecursive(DisplayObject *obj)
disti::Group::CreateInstance
static DisplayObject * CreateInstance()
disti::Group::IsEmpty
bool IsEmpty() const
Definition: group.h:192
disti::Group::CullBackFace
virtual bool CullBackFace() override
disti::Group::LightingEnabled
virtual bool LightingEnabled() override
disti::Group::Hit
virtual bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint) override
disti::Group::CopyProperties
virtual void CopyProperties(DisplayObject *src) override
disti::Group::AlphaMode
virtual int AlphaMode() override
disti::Group::Pick3D
virtual DisplayObject * Pick3D(const Vector &winLoc, const Vector &logicalCoords, float scale, const Vector &directionVector, Vector &collisionWinLoc, const OpenGLMatrices &drawnMatrices) override
disti::Group::AntiAlias
virtual bool AntiAlias() override
disti::Group::InsertVertexAt
void InsertVertexAt(unsigned) override
disti::Group::Draw
virtual void Draw() override
disti::Group::InsertObject
virtual void InsertObject(DisplayObject *obj, bool reparent=true, bool recalculateBoundingbox=true, int loc=-1)
disti::Group::Group
Group(const Group &group, bool generateNames)
disti::Group::Translate
virtual void Translate(float x, float y, float z) override
disti::Group::Shading
virtual int Shading() override
disti::Group::PreDraw
virtual void PreDraw(const OpenGLMatrices &current, Culler &culler) override
disti::Group::Location
virtual const Vertex & Location() const
disti::Group::Parent
DisplayFrame * Parent() const
Definition: display.h:945
disti::Group::InitialGroupCount
void InitialGroupCount(unsigned int cnt)
disti::Group::AddAvailableAttributes
virtual void AddAvailableAttributes(unsigned int availableAttributes)
disti::Group::TextureRepeat
virtual bool TextureRepeat()
disti::Group::GrowBoundingBox
virtual void GrowBoundingBox(DisplayObject *obj)
disti::Group::DeleteVertexAt
void DeleteVertexAt(unsigned) override
disti::Group::PolygonEnd
virtual int PolygonEnd() override
disti::Group::GetTransformedExtents
virtual void GetTransformedExtents(Vector &min, Vector &max, const GlsMatrixType &matrix, bool resetMinMax=true) override
disti::Group::First
CompatabilityListItem * First()
disti::Group::CopyGeometry
virtual void CopyGeometry(DisplayObject *src) override
disti::Group::Item
DisplayObject * Item(unsigned int index)
disti::Group::FindByName
DisplayObject * FindByName(DisplayObject *obj)
Definition: group.h:127
disti::Group::SetBlendColor
virtual void SetBlendColor(const GlsColor &color) override
disti::Group::PushObject
virtual void PushObject(DisplayObject *obj)
disti::Group::~Group
virtual ~Group()
disti::Group::FindByNameSameFrame
virtual DisplayObject * FindByNameSameFrame(const char *name)
disti::Group::FindByQualifiedName
DisplayObject * FindByQualifiedName(const char *name)
disti::Group::CullTestChildren
bool CullTestChildren() const
Definition: group.h:166
disti::Group::DepthTest
virtual int DepthTest() override
disti::OpenGLMatrices
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:544
disti::VertexNoColor
Definition: vertex.h:85
disti::Vertex
Definition: vertex.h:420
display.h
The disti::DisplayObject class and global enumerations.
dynamic_array.h
The disti::DynamicArray class. A templated array of objects capable of dynamically growing.
gls_cpp_lang_support.h
Macros and helper code to determine what subset of C++11/14/17 is available.
DISTI_SPECIAL_MEM_FUN_DELETE
#define DISTI_SPECIAL_MEM_FUN_DELETE
Macro to wrap function deletion, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:246
DISTI_DEPRECATED
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:488
DISTI_METHOD_OVERRIDE
#define DISTI_METHOD_OVERRIDE
Macro to wrap the override keyword, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:222
GLS_EXPORT
#define GLS_EXPORT
Macro denoting which functions should be visible from the runtime library.
Definition: gls_include.h:52
disti
Definition: bmpimage.h:47
disti::begin
DistiAttribDict::const_iterator begin(const DistiAttribDict &dict)
Definition: disti_metadata.h:970
disti::end
DistiAttribDict::const_iterator end(const DistiAttribDict &dict)
Definition: disti_metadata.h:975
FALSE
#define FALSE
False macro, for backward compatibility purposes.
Definition: util.h:107