| GL Studio C++ Runtime API

gls_geometry_resource_mesh.h
Go to the documentation of this file.
1/*! \file
2 \brief The disti::GlsGeometryResourceMesh class.
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
41#ifndef INCLUDED_GLS_GEOMETRY_RESOURCE_MESH_H
42#define INCLUDED_GLS_GEOMETRY_RESOURCE_MESH_H
43
44#include "display.h"
45#include "gls_cpp_lang_support.h"
46#include "gls_geometry_resource.h"
47#include "gls_render_effect.h"
48#include <cstddef>
49
50/// Provides support for creating DLLs.
51#if( defined( GLSGEN_EXPORT_GLSADVANCEDMESH ) || defined( GLSGEN_IMPORT_GLSADVANCEDMESH ) || defined( GLS_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \
52 && defined( _MSC_VER )
53# if defined( GLSGEN_EXPORT_GLSADVANCEDMESH ) || defined( GLS_EXPORT_GENERATED )
54# define GLSGEN_GlsAdvancedMesh_EXPORT __declspec( dllexport )
55# else
56# define GLSGEN_GlsAdvancedMesh_EXPORT __declspec( dllimport )
57# endif
58#else
59# define GLSGEN_GlsAdvancedMesh_EXPORT
60#endif
61///////////////////////////////////////////////////////////////////////////////
62
63 namespace disti
64{
65// Forward Declaration
66 class GlsSortedDrawable;
67
68#ifdef GLES
69// Forward Declaration
70 class GlsGloFileAttribute;
71#endif
72
73/**
74 This is an abstrace base class for objects that use a GlsGeometryResource for rendering (e.g. GlsAdvancedMesh)
75 This class implements Draw / Pick routines that use a RenderMesh provided by the derived classes. The appearance of the mesh is affected by the IndexBufferEffectsArray.
76 This class also implements Translate, Rotate, and Scale through a GeometryTransform matrix.
77*/
78 class GlsGeometryResourceMesh : public DisplayObject
79 , public GlsGeometryResource::Observer
80{
81#if !defined( GLES )
82 friend class GlsGeometryResourceMesh_SortedDrawable;
83#endif
84
85 public:
86 DISTI_DEPRECATED( "This identifier is forbidden by the C++ standard. Use BaseClass instead." )
87 typedef DisplayObject _BaseClass; ///< Deprecated typedef for the base class.
88 typedef DisplayObject BaseClass; ///< Typedef for the base class.
89 friend class GlsGeometryResourceMeshEditor;
90
91 /** Create a new GlsGeometryResourceMesh */
92 GLSGEN_GlsAdvancedMesh_EXPORT GlsGeometryResourceMesh();
93
94 /** Create a copy of a GlsGeometryResourceMesh
95 * \param that The GlsGeometryResourceMesh to copy from
96 * \param generateNames Whether or not to generate a new instance name for the copy
97 */
98 GLSGEN_GlsAdvancedMesh_EXPORT GlsGeometryResourceMesh( const GlsGeometryResourceMesh& that, const bool generateNames );
99
100 /** GlsGeometryResourceMesh destructor */
101 GLSGEN_GlsAdvancedMesh_EXPORT ~GlsGeometryResourceMesh();
102
103 //////////////////////////////////////////////////
104 // Overridden base class methods
105 //////////////////////////////////////////////////
106
107 /* Callback for when a resource could invalidate the scene */
108 virtual void OnGeometryResourceChanged() DISTI_METHOD_OVERRIDE
109 {
110 InvalidatePainter();
111 }
112
113 virtual GLSGEN_GlsAdvancedMesh_EXPORT void SetAvailableAttributes( unsigned int value ) DISTI_METHOD_OVERRIDE;
114 virtual GLSGEN_GlsAdvancedMesh_EXPORT void CopyProperties( DisplayObject* src ) DISTI_METHOD_OVERRIDE;
115 virtual GLSGEN_GlsAdvancedMesh_EXPORT void CopyGeometry( DisplayObject* src ) DISTI_METHOD_OVERRIDE;
116 virtual GLSGEN_GlsAdvancedMesh_EXPORT void UpdateBoundingVolume() DISTI_METHOD_OVERRIDE;
117
118#ifndef GLES
119 virtual GLSGEN_GlsAdvancedMesh_EXPORT InterfaceListType* GetCppInterfaceDescription( InterfaceListType* addToThisList = NULL ) DISTI_METHOD_OVERRIDE;
120 virtual GLSGEN_GlsAdvancedMesh_EXPORT void GetCppInterfaceDescriptionFree( InterfaceListType* array ) DISTI_METHOD_OVERRIDE;
121#endif
122
123 virtual GLSGEN_GlsAdvancedMesh_EXPORT void PreDraw( const OpenGLMatrices& parentMatrices, Culler& culler ) DISTI_METHOD_OVERRIDE;
124 virtual GLSGEN_GlsAdvancedMesh_EXPORT void Draw() DISTI_METHOD_OVERRIDE;
125
126 virtual GLSGEN_GlsAdvancedMesh_EXPORT void GetTransformedExtents( Vector& min, Vector& max, const GlsMatrixType& matrix, bool resetMinMax = true ) DISTI_METHOD_OVERRIDE;
127 virtual GLSGEN_GlsAdvancedMesh_EXPORT void GetExtents( float& minx, float& miny, float& minz, float& maxx, float& maxy, float& maxz ) DISTI_METHOD_OVERRIDE;
128
129 virtual GLSGEN_GlsAdvancedMesh_EXPORT DisplayObject* Pick3D( const Vector& winLoc, const Vector& logicalCoords, float scale, const Vector& directionVector, Vector& collisionWinLoc, const OpenGLMatrices& drawnMatrices ) DISTI_METHOD_OVERRIDE;
130
131 virtual GLSGEN_GlsAdvancedMesh_EXPORT bool Hit( float x, float y, float z, float scale, const Vector& directionVector, Vector* collisionPoint ) DISTI_METHOD_OVERRIDE;
132
133 virtual GLSGEN_GlsAdvancedMesh_EXPORT void Scale( float px, float py, float pz, Vertex* anchor, int handleBar = 0 ) DISTI_METHOD_OVERRIDE;
134 virtual GLSGEN_GlsAdvancedMesh_EXPORT void Rotate( const Vector& orig, float angle, const Vector& axis ) DISTI_METHOD_OVERRIDE;
135 virtual GLSGEN_GlsAdvancedMesh_EXPORT void TranslateVertices( float x, float y, float z ) DISTI_METHOD_OVERRIDE;
136
137 /// Override base class since a mesh can have multiple textures.
138 /// \return -2 if multiple textures applied to object, -1 if no texture
139 /// otherwise if all faces use same texture, returns the texture
140 /// index that is shared by the faces.
141 virtual GLSGEN_GlsAdvancedMesh_EXPORT int TextureIndex() DISTI_METHOD_OVERRIDE;
142
143 /* Override base class since a mesh can have multiple textures */
144 virtual GLSGEN_GlsAdvancedMesh_EXPORT void TextureIndex( int index ) DISTI_METHOD_OVERRIDE;
145
146 /// Override base class since a mesh can have multiple textures.
147 /// \return Whether or not the OpenGL state changed.
148 virtual GLSGEN_GlsAdvancedMesh_EXPORT bool SetupTexture();
149
150 /// Override base class since a mesh can have multiple materials.
151 /// \param index The material index to set.
152 virtual GLSGEN_GlsAdvancedMesh_EXPORT void MaterialIndex( unsigned int index );
153
154 /// Override base class since a mesh can have multiple materials.
155 /// \return The first index in the _materialIndices array.
156 virtual GLSGEN_GlsAdvancedMesh_EXPORT int MaterialIndex() DISTI_METHOD_OVERRIDE;
157
158 /// Set the _materialIndices array for this object.
159 /// \param indices The new indices to set.
160 virtual GLSGEN_GlsAdvancedMesh_EXPORT void MaterialIndices( DynamicArray<int> indices ) DISTI_METHOD_OVERRIDE;
161
162 /* Override base class since a mesh can have multiple materials */
163 virtual GLSGEN_GlsAdvancedMesh_EXPORT DynamicArray<int>& MaterialIndices() DISTI_METHOD_OVERRIDE;
164
165 //////////////////////////////////////////////////
166 // GlsGeometryResourceMesh specific operations
167 //////////////////////////////////////////////////
168
169 /// Set the matrix that is applied before the geometry resource is drawn.
170 /// \param value The transform value to set.
171 GLSGEN_GlsAdvancedMesh_EXPORT void SetGeometryTransform( const GlsMatrixType& value );
172
173 /// Set the matrix that is applied before the geometry resource is drawn.
174 /// \param matrix Array of 16 doubles that make up the new transform matrix.
175 GLSGEN_GlsAdvancedMesh_EXPORT void SetGeometryTransform( const double* matrix );
176
177 /**
178 * \returns The matrix that is applied before the geometry resource is drawn.
179 * Lifetime is guaranteed to coincide with the GlsGeometryResourceMesh's lifetime.
180 */
181 const GlsMatrixType& GetGeometryTransform() { return _geometryTransform; }
182
183 /**
184 * \returns The number of IndexBuffers in the current render mesh
185 */
186 unsigned int NumIndexBuffers()
187 {
188 return GetRenderMesh()->NumIndexBuffers();
189 }
190
191 /**
192 * \returns The size of the IndexBufferEffects array
193 */
194 unsigned int NumIndexBufferEffects()
195 {
196 return _indexBufferEffects.Count();
197 }
198
199 /// \return Whether or not the draw order of the mesh can be modified for performance.
200 bool ReorderAtWill() { return _reorderAtWill; }
201
202 /// Sets whether or not the draw order of the mesh can be modified for performance.
203 /// \param reorderAtWill The new reorder flag.
204 void ReorderAtWill( bool reorderAtWill ) { _reorderAtWill = reorderAtWill; }
205
206 /// Set the size of the IndexBufferEffects array.
207 /// This will release any effects that are no longer referenced.
208 /// \param newSize The new number of effects to set.
209 virtual GLSGEN_GlsAdvancedMesh_EXPORT void ResizeIndexBufferEffectsArray( unsigned int newSize );
210
211 /** Access the GlsRenderEffect that is used to render the specified index buffer (may be NULL)
212 * \param bufferNum The IndexBuffer to get the effect for. Must be between 0 and NumIndexBuffers().
213 * \returns Pointer to the index buffer effect used when rendering the specified GlsGeometryResource IndexBuffer
214 */
215 GlsRenderEffect* GetIndexBufferEffect( unsigned int bufferNum )
216 {
217 if( bufferNum >= _indexBufferEffects.Count() )
218 {
219 return NULL;
220 }
221
222 return _indexBufferEffects[ bufferNum ];
223 }
224
225 /** Set the GlsRenderEffect to use when rendering the given index buffer.
226 * If this value is NULL, the geometry will be rendered with a default effect.
227 * Note: the GlsGeometryResourceMesh will increment the reference count on the new effect and release any effect that was previously referenced.
228 * \param bufferNum The IndexBuffer to get the effect for. Should be between 0 and NumIndexBuffers().
229 * \param newEffect [out] Pointer to the index buffer effect to use when rendering the specified GlsGeometryResource IndexBuffer.
230 */
231 void SetIndexBufferEffect( unsigned int bufferNum, GlsRenderEffect* newEffect )
232 {
233 if( bufferNum >= _indexBufferEffects.Count() )
234 {
235 ResizeIndexBufferEffectsArray( bufferNum + 1 );
236 }
237
238 GlsRenderEffect* oldEffect = _indexBufferEffects[ bufferNum ];
239 _indexBufferEffects[ bufferNum ] = newEffect;
240
241 if( newEffect )
242 {
243 newEffect->AddRef();
244 }
245 if( oldEffect )
246 {
247 oldEffect->Release();
248 }
249 }
250
251 /// Implemented by the derived class.
252 /// \return The mesh that should be rendered / picked.
253 virtual GlsGeometryResource* GetRenderMesh() = 0;
254
255#ifdef GLES
256 /** Set a single attribute from the GLO file.
257 * \param data The attribute to set and its associated data.
258 */
259 virtual GLSGEN_GlsAdvancedMesh_EXPORT void SetFromGloData( GlsGloFileAttribute& data ) DISTI_METHOD_OVERRIDE;
260#endif
261
262 protected:
263 GlsMatrixType _geometryTransform; ///< Transformation matrix to be applied to all geometry in this mesh.
264
265 DynamicArray<int> _newMaterialIndices; ///< Intermediate data storage to make the setting of new material indices through the Faces simpler.
266
267 bool _reorderAtWill; ///< Determines whether or not the draw order of this mesh can be modified to increase performance.
268
269 typedef DynamicArray<GlsRenderEffect*> IndexBufferEffectArrayT; ///< Typedef for a list of effects (shaders).
270 IndexBufferEffectArrayT _indexBufferEffects; ///< The effect to use for each index buffer.
271
272 class DistiAttributeIndexBufferEffectArray;
273
274#if !defined( GLES )
275 typedef DynamicArray<GlsSortedDrawable*> SortedDrawableArrayT; ///< Typedef for a list of sorted drawables.
276 SortedDrawableArrayT _indexBufferDrawables; ///< GlsSortedDrawable for each index buffer.
277#endif
278
279 /// Draw the given mesh object, used by internal draw code.
280 /// \note Not normally called by users.
281 /// \param renderMesh The mesh to draw.
282 GLSGEN_GlsAdvancedMesh_EXPORT void DrawIndexBuffers( GlsGeometryResource* renderMesh );
283
284 /// Sets up the default shader program for mesh drawing.
285 /// \note Not normally called by users.
286 GLSGEN_GlsAdvancedMesh_EXPORT void SetupDefaultEffect();
287
288 /// Resets the shader program state after mesh drawing.
289 /// \note Not normally called by users.
290 GLSGEN_GlsAdvancedMesh_EXPORT void CleanupDefaultEffect();
291
292 /// Draw all underlying mesh objects, used by internal draw code.
293 /// \note Not normally called by users.
294 GLSGEN_GlsAdvancedMesh_EXPORT void DrawGeometry();
295
296#ifdef GLES
297 /// Creates or updates an effect where the effect's properties apply based on what the data provides. Used by SetFromGloData.
298 /// \param data File that contains binary data about the buffer effect.
299 /// \return True if it successfully applied the index buffer effect. Returns false on error.
300 bool SetGloIndexBufferEffect( GlsGloFileAttribute& data );
301
302 /// Reads in the given file data to create and initialize the geometry data such as its vertices, normals, and bounding volume.
303 /// \param data File that contains binary data about this object's geometry.
304 /// \return The resulting geometry resource that has its vertices, normals, colors, and bounding volume initialized. Returns null if there's an error.
305 GlsGeometry_Generic* LoadGloGeometryResourceData( GlsGloFileAttribute& data );
306#endif
307
308 private:
309 // Cache for the extents to prevent re-calculation when nothing has changed.
310 struct LastExtents
311 {
312 unsigned int id;
313 GlsMatrixType transformMatrix;
314 Vector min;
315 Vector max;
316
317 LastExtents()
318 : id( GlsGeometryResource::s_invalidDataChangedCounter )
319 {}
320 } _lastExtents;
321
322 // Disable implicit generated Members
323 GlsGeometryResourceMesh& operator=( const GlsGeometryResourceMesh& rhs ) DISTI_SPECIAL_MEM_FUN_DELETE;
324 GlsGeometryResourceMesh( const GlsGeometryResourceMesh& src ) DISTI_SPECIAL_MEM_FUN_DELETE;
325
326 void CopyGeometryInternal( const GlsGeometryResourceMesh& src );
327 /* Utility routines used to detect when the material indices has changed */
328 void OnMatChanged();
329 void OnMatChanged( DynamicArray<int>& a, DynamicArray<int>& b );
330 void ReplaceMaterial( unsigned int oldIndex, unsigned int newIndex );
331};
332
333// Used by code generator.
334/// \cond INTERNAL
335 GLSGEN_GlsAdvancedMesh_EXPORT GlsRenderEffect* CreateRenderEffect_DiffNormSpecRefl(
336 unsigned int material_index,
337 int diffuse_texture_index,
338 int normal_texture_index,
339 int specular_texture_index,
340 int reflection_texture_index,
341 float diffuse_amount,
342 float normal_amount,
343 float specular_amount,
344 float reflection_amount,
345 bool useVertexColors,
346 bool normalFlipGreen,
347 float diff_map_offset_v = 0.0f,
348 float diff_map_offset_u = 0.0f,
349 float diff_map_tiling_u = 1.0f,
350 float diff_map_tiling_v = 1.0f,
351 float diff_map_angle_w = 0.0f,
352 float norm_map_offset_v = 0.0f,
353 float norm_map_offset_u = 0.0f,
354 float norm_map_tiling_u = 1.0f,
355 float norm_map_tiling_v = 1.0f,
356 float norm_map_angle_w = 0.0f,
357 float spec_map_offset_v = 0.0f,
358 float spec_map_offset_u = 0.0f,
359 float spec_map_tiling_u = 1.0f,
360 float spec_map_tiling_v = 1.0f,
361 float spec_map_angle_w = 0.0f );
362/// \endcond
363} // namespace disti
364
365#endif
disti::Culler
Definition: cull.h:50
disti::DisplayObject
Definition: display.h:96
disti::DisplayObject::InvalidatePainter
void InvalidatePainter()
disti::DynamicArray
Definition: dynamic_array.h:79
disti::DynamicArray::Count
unsigned Count() const
Definition: dynamic_array.h:218
disti::GlsGeometryResourceMesh
Definition: gls_geometry_resource_mesh.h:80
disti::GlsGeometryResourceMesh::MaterialIndices
virtual DynamicArray< int > & MaterialIndices() DISTI_METHOD_OVERRIDE
disti::GlsGeometryResourceMesh::NumIndexBufferEffects
unsigned int NumIndexBufferEffects()
Definition: gls_geometry_resource_mesh.h:194
disti::GlsGeometryResourceMesh::SetAvailableAttributes
virtual void SetAvailableAttributes(unsigned int value) DISTI_METHOD_OVERRIDE
disti::GlsGeometryResourceMesh::DrawGeometry
void DrawGeometry()
disti::GlsGeometryResourceMesh::Draw
virtual void Draw() DISTI_METHOD_OVERRIDE
disti::GlsGeometryResourceMesh::CleanupDefaultEffect
void CleanupDefaultEffect()
disti::GlsGeometryResourceMesh::ReorderAtWill
bool ReorderAtWill()
Definition: gls_geometry_resource_mesh.h:200
disti::GlsGeometryResourceMesh::ResizeIndexBufferEffectsArray
virtual void ResizeIndexBufferEffectsArray(unsigned int newSize)
disti::GlsGeometryResourceMesh::MaterialIndex
virtual int MaterialIndex() DISTI_METHOD_OVERRIDE
disti::GlsGeometryResourceMesh::GetTransformedExtents
virtual void GetTransformedExtents(Vector &min, Vector &max, const GlsMatrixType &matrix, bool resetMinMax=true) DISTI_METHOD_OVERRIDE
disti::GlsGeometryResourceMesh::SetGeometryTransform
void SetGeometryTransform(const GlsMatrixType &value)
disti::GlsGeometryResourceMesh::SetFromGloData
virtual void SetFromGloData(GlsGloFileAttribute &data) DISTI_METHOD_OVERRIDE
disti::GlsGeometryResourceMesh::Hit
virtual bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint) DISTI_METHOD_OVERRIDE
disti::GlsGeometryResourceMesh::PreDraw
virtual void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler) DISTI_METHOD_OVERRIDE
disti::GlsGeometryResourceMesh::GlsGeometryResourceMesh
GlsGeometryResourceMesh()
disti::GlsGeometryResourceMesh::_reorderAtWill
bool _reorderAtWill
Determines whether or not the draw order of this mesh can be modified to increase performance.
Definition: gls_geometry_resource_mesh.h:267
disti::GlsGeometryResourceMesh::GetRenderMesh
virtual GlsGeometryResource * GetRenderMesh()=0
disti::GlsGeometryResourceMesh::_indexBufferEffects
IndexBufferEffectArrayT _indexBufferEffects
The effect to use for each index buffer.
Definition: gls_geometry_resource_mesh.h:270
disti::GlsGeometryResourceMesh::GetIndexBufferEffect
GlsRenderEffect * GetIndexBufferEffect(unsigned int bufferNum)
Definition: gls_geometry_resource_mesh.h:215
disti::GlsGeometryResourceMesh::TranslateVertices
virtual void TranslateVertices(float x, float y, float z) DISTI_METHOD_OVERRIDE
disti::GlsGeometryResourceMesh::Rotate
virtual void Rotate(const Vector &orig, float angle, const Vector &axis) DISTI_METHOD_OVERRIDE
disti::GlsGeometryResourceMesh::TextureIndex
virtual int TextureIndex() DISTI_METHOD_OVERRIDE
disti::GlsGeometryResourceMesh::IndexBufferEffectArrayT
DynamicArray< GlsRenderEffect * > IndexBufferEffectArrayT
Typedef for a list of effects (shaders).
Definition: gls_geometry_resource_mesh.h:269
disti::GlsGeometryResourceMesh::DrawIndexBuffers
void DrawIndexBuffers(GlsGeometryResource *renderMesh)
disti::GlsGeometryResourceMesh::_geometryTransform
GlsMatrixType _geometryTransform
Transformation matrix to be applied to all geometry in this mesh.
Definition: gls_geometry_resource_mesh.h:263
disti::GlsGeometryResourceMesh::GetExtents
virtual void GetExtents(float &minx, float &miny, float &minz, float &maxx, float &maxy, float &maxz) DISTI_METHOD_OVERRIDE
disti::GlsGeometryResourceMesh::CopyGeometry
virtual void CopyGeometry(DisplayObject *src) DISTI_METHOD_OVERRIDE
disti::GlsGeometryResourceMesh::ReorderAtWill
void ReorderAtWill(bool reorderAtWill)
Definition: gls_geometry_resource_mesh.h:204
disti::GlsGeometryResourceMesh::_newMaterialIndices
DynamicArray< int > _newMaterialIndices
Intermediate data storage to make the setting of new material indices through the Faces simpler.
Definition: gls_geometry_resource_mesh.h:265
disti::GlsGeometryResourceMesh::SetGloIndexBufferEffect
bool SetGloIndexBufferEffect(GlsGloFileAttribute &data)
disti::GlsGeometryResourceMesh::SetupTexture
virtual bool SetupTexture()
disti::GlsGeometryResourceMesh::NumIndexBuffers
unsigned int NumIndexBuffers()
Definition: gls_geometry_resource_mesh.h:186
disti::GlsGeometryResourceMesh::Pick3D
virtual DisplayObject * Pick3D(const Vector &winLoc, const Vector &logicalCoords, float scale, const Vector &directionVector, Vector &collisionWinLoc, const OpenGLMatrices &drawnMatrices) DISTI_METHOD_OVERRIDE
disti::GlsGeometryResourceMesh::CopyProperties
virtual void CopyProperties(DisplayObject *src) DISTI_METHOD_OVERRIDE
disti::GlsGeometryResourceMesh::Scale
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar=0) DISTI_METHOD_OVERRIDE
disti::GlsGeometryResourceMesh::SetupDefaultEffect
void SetupDefaultEffect()
disti::GlsGeometryResourceMesh::OnGeometryResourceChanged
virtual void OnGeometryResourceChanged() DISTI_METHOD_OVERRIDE
Callback method to be called by this observer.
Definition: gls_geometry_resource_mesh.h:108
disti::GlsGeometryResourceMesh::LoadGloGeometryResourceData
GlsGeometry_Generic * LoadGloGeometryResourceData(GlsGloFileAttribute &data)
disti::GlsGeometryResourceMesh::UpdateBoundingVolume
virtual void UpdateBoundingVolume() DISTI_METHOD_OVERRIDE
disti::GlsGeometryResourceMesh::SetIndexBufferEffect
void SetIndexBufferEffect(unsigned int bufferNum, GlsRenderEffect *newEffect)
Definition: gls_geometry_resource_mesh.h:231
disti::GlsGeometryResourceMesh::GetGeometryTransform
const GlsMatrixType & GetGeometryTransform()
Definition: gls_geometry_resource_mesh.h:181
disti::GlsGeometryResource::Observer
Definition: gls_geometry_resource.h:295
disti::GlsGeometryResource
Definition: gls_geometry_resource.h:87
disti::GlsGeometryResource::NumIndexBuffers
unsigned int NumIndexBuffers() const
Definition: gls_geometry_resource.h:478
disti::GlsGeometry_Generic
Definition: gls_geometry_resource.h:514
disti::GlsGloFileAttribute
Definition: gls_glo_file.h:1243
disti::GlsMatrixAffine< double >
disti::GlsRenderEffect
Definition: gls_render_effect.h:116
disti::GlsRenderEffect::Release
virtual void Release()=0
Release a reference to this object.
disti::GlsRenderEffect::AddRef
virtual void AddRef()=0
Add to this object's reference count.
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.
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_geometry_resource.h
The disti::GlsGeometryResource class.
GLSGEN_GlsAdvancedMesh_EXPORT
#define GLSGEN_GlsAdvancedMesh_EXPORT
Provides support for creating DLLs.
Definition: gls_geometry_resource_mesh.h:59
gls_render_effect.h
The disti::GlsRenderEffect class.
disti
Definition: bmpimage.h:47