40 #ifndef INCLUDED_DISTI_GROUP_H
41 #define INCLUDED_DISTI_GROUP_H
55 DISTI_DEPRECATED(
"This identifier is forbidden by the C++ standard. Use BaseClass instead." )
66 bool _performGroupCullCheck;
70 bool _cullTestChildren;
75 virtual GLS_EXPORT
void onVertexchanged(
void );
78 void DummySetUnsignedInt(
const unsigned int& ) {}
79 Group& operator=(
const Group& ) DISTI_SPECIAL_MEM_FUN_DELETE;
80 Group(
const Group& that ) DISTI_SPECIAL_MEM_FUN_DELETE;
95 friend class GroupEditor;
173 unsigned int Count(
void )
const {
return _objects.
Count(); }
199 GLS_EXPORT
explicit Group(
int generateInstance = FALSE );
205 GLS_EXPORT
Group(
const Group& group,
bool generateNames );
215 virtual GLS_EXPORT
~Group();
235 virtual GLS_EXPORT
void Draw(
void );
241 virtual GLS_EXPORT
bool Hit(
float x,
float y,
float z,
float scale,
const Vector& directionVector,
Vector* collisionPoint );
245 const Vector& logicalCoords,
247 const Vector& directionVector,
260 virtual GLS_EXPORT
void CalculateBoundingBox(
void );
266 virtual GLS_EXPORT
void Location(
const Vertex& v ) DISTI_METHOD_OVERRIDE;
267 virtual GLS_EXPORT
void Location(
float x,
float y,
float z );
270 virtual GLS_EXPORT
void Translate(
float x,
float y,
float z );
273 virtual GLS_EXPORT
void Translate(
float transAmount[] );
282 virtual GLS_EXPORT
void GetExtents(
float& x,
float& y,
float& z,
float& x1,
float& y1,
float& z1 );
291 virtual GLS_EXPORT
void Rotate(
const Vector& orig,
float angle,
const Vector& axis );
294 virtual GLS_EXPORT
void Scale(
float scale_x,
float scale_y );
297 GLS_EXPORT
void Scale(
float scale_x,
float scale_y,
float scale_z,
Vertex* anchor = NULL,
int handle = 0 ) DISTI_METHOD_OVERRIDE;
305 virtual GLS_EXPORT
void InsertObject(
DisplayObject* obj,
bool reparent = true,
bool recalculateBoundingbox = true,
int loc = -1 );
319 virtual GLS_EXPORT
void ReorderObject(
unsigned int oldIndex,
unsigned int newIndex );
346 virtual GLS_EXPORT
void LineWidth(
float width ) DISTI_METHOD_OVERRIDE;
347 virtual GLS_EXPORT
float LineWidth(
void ) DISTI_METHOD_OVERRIDE;
355 virtual GLS_EXPORT
int PolygonMode(
void ) DISTI_METHOD_OVERRIDE;
356 virtual GLS_EXPORT
void PolygonMode(
int mode ) DISTI_METHOD_OVERRIDE;
358 virtual GLS_EXPORT
void PolygonEnd( const
int mode ) DISTI_METHOD_OVERRIDE;
359 virtual GLS_EXPORT
int PolygonEnd(
void ) DISTI_METHOD_OVERRIDE;
361 virtual GLS_EXPORT
void Shading( const
int mode ) DISTI_METHOD_OVERRIDE;
362 virtual GLS_EXPORT
int Shading(
void ) DISTI_METHOD_OVERRIDE;
364 virtual GLS_EXPORT
void DepthTest(
unsigned char mode ) DISTI_METHOD_OVERRIDE;
365 virtual GLS_EXPORT
int DepthTest(
void ) DISTI_METHOD_OVERRIDE;
367 virtual GLS_EXPORT
void AntiAlias(
bool mode ) DISTI_METHOD_OVERRIDE;
368 virtual GLS_EXPORT
bool AntiAlias(
void ) DISTI_METHOD_OVERRIDE;
370 virtual GLS_EXPORT
void AlphaMode(
int mode ) DISTI_METHOD_OVERRIDE;
371 virtual GLS_EXPORT
int AlphaMode(
void ) DISTI_METHOD_OVERRIDE;
373 virtual GLS_EXPORT
void CullBackFace( const
bool mode ) DISTI_METHOD_OVERRIDE;
374 virtual GLS_EXPORT
bool CullBackFace(
void ) DISTI_METHOD_OVERRIDE;
377 virtual GLS_EXPORT
void LightingEnabled(
bool lighting ) DISTI_METHOD_OVERRIDE;
382 virtual GLS_EXPORT
void SetBlendColor( const
GlsColor& color );
387 virtual GLS_EXPORT
GlsColor GetBlendColor(
void );
392 virtual GLS_EXPORT
void SetColor( const
GlsColor& color );
397 virtual GLS_EXPORT
GlsColor GetColor(
void );
402 virtual GLS_EXPORT
void SetFillColor( const
GlsColor& color );
407 virtual GLS_EXPORT
GlsColor GetFillColor(
void );
424 virtual GLS_EXPORT
void Calculate(
double time );
436 GLS_EXPORT CompatabilityListItem();
438 GLS_EXPORT CompatabilityListItem* Next();
440 GLS_EXPORT CompatabilityListItem* Prev();
444 static GLS_EXPORT
void RecalcCompatabilityList(
Group* whichGroup );
462 virtual GLS_EXPORT
void SetGroupTextureRepeat(
const int mode );
DisplayObject * FindNonRecursive(DisplayObject *obj)
Definition: display_frame.h:85
virtual const Vertex & Location(void) const
unsigned int Count(void) const
Definition: group.h:173
virtual GlsColor GetBlendColor(void)
#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)
virtual void GetTransformedExtents(Vector &min, Vector &max, const GlsMatrixType &matrix, bool resetMinMax=true)
unsigned Count() const
Definition: dynamic_array.h:204
bool IsEmpty() const
Definition: group.h:188
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:296
virtual void Calculate(double time)
virtual int TextureMagnificationFilter(void)
void DeleteVertexAt(unsigned) override
Definition: group.h:328
virtual void GetExtents(float &x, float &y, float &z, float &x1, float &y1, float &z1)
DisplayFrame * Parent(void) const
Definition: display.h:926
void SetPainter(GlsPainter *painter) override
virtual bool CullBackFace(void) override
DisplayObject * Item(unsigned int index)
virtual int TextureMappingTechnique(void)
virtual DisplayObject * CloneObject(bool generateNames=false)
const DisplayObjectArray & Objects() const
Definition: group.h:152
virtual void DeleteAllChildren()
DisplayObject * FirstObject()
virtual bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint)
virtual GlsColor GetFillColor(void)
virtual DisplayObject * Pick3D(const Vector &winLoc, const Vector &logicalCoords, float scale, const Vector &directionVector, Vector &collisionWinLoc, const OpenGLMatrices &drawnMatrices)
virtual int Shading(void) override
virtual void CopyGeometry(DisplayObject *src)
The disti::DisplayObject class and global enumerations.
const DisplayObject * operator[](unsigned int index) const
Definition: group.h:179
virtual float LineWidth(void) override
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL)
Definition: gls_painter.h:51
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 void PreDraw(const OpenGLMatrices ¤t, Culler &culler)
virtual GlsColor GetColor(void)
virtual int TextureMinificationFilter(void)
virtual bool AntiAlias(void) override
CompatabilityListItem * Last()
bool CullTestChildren(void) const
Definition: group.h:167
DisplayObject * FindByName(const char *name)
virtual void SetFillColor(const GlsColor &color)
void InitialGroupCount(unsigned int cnt)
virtual void Translate(float x, float y, float z)
bool PerformGroupCullCheck(void) const
Definition: group.h:161
Definition: gls_color.h:53
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array)
virtual void Rotate(float angle, int axis=Z_AXIS)
char * InstanceName(void)
virtual void SetColor(const GlsColor &color)
int Position(const DisplayObject *obj) const
virtual void SetAvailableAttributes(unsigned int value)
virtual void CalculateTextureCoordinates(void) override
DistiAttribDict::const_iterator begin(const DistiAttribDict &dict)
Definition: disti_metadata.h:860
virtual void SetGroupLocation(const Vertex &v)
DisplayObject * LastObject(void)
DisplayObject * FindByName(DisplayObject *obj)
Definition: group.h:129
DisplayObject * FindByQualifiedName(const char *name)
virtual int LineStipplePattern(void) override
virtual void TranslateVertices(float x, float y, float z)
virtual void SetBlendColor(const GlsColor &color)
virtual void Rotate(const Vector &orig, float angle, const Vector &axis)
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 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 void CopyProperties(DisplayObject *src)
virtual DisplayObject * handle(DisplayEvent *ev)