41#ifndef INCLUDED_GLS_GEOMETRY_RESOURCE_MESH_H
42#define INCLUDED_GLS_GEOMETRY_RESOURCE_MESH_H
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 )
56# define GLSGEN_GlsAdvancedMesh_EXPORT __declspec( dllimport )
59# define GLSGEN_GlsAdvancedMesh_EXPORT
66class GlsSortedDrawable;
70class GlsGloFileAttribute;
82 friend class GlsGeometryResourceMesh_SortedDrawable;
86 DISTI_DEPRECATED(
"This identifier is forbidden by the C++ standard. Use BaseClass instead." )
89 friend class GlsGeometryResourceMeshEditor;
272 class DistiAttributeIndexBufferEffectArray;
276 SortedDrawableArrayT _indexBufferDrawables;
329 void OnMatChanged( DynamicArray<int>& a, DynamicArray<int>& b );
330 void ReplaceMaterial(
unsigned int oldIndex,
unsigned int newIndex );
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,
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 );
Definition: dynamic_array.h:79
unsigned Count() const
Definition: dynamic_array.h:218
Definition: gls_geometry_resource_mesh.h:80
virtual DynamicArray< int > & MaterialIndices() DISTI_METHOD_OVERRIDE
unsigned int NumIndexBufferEffects()
Definition: gls_geometry_resource_mesh.h:194
virtual void SetAvailableAttributes(unsigned int value) DISTI_METHOD_OVERRIDE
virtual void Draw() DISTI_METHOD_OVERRIDE
void CleanupDefaultEffect()
bool ReorderAtWill()
Definition: gls_geometry_resource_mesh.h:200
virtual void ResizeIndexBufferEffectsArray(unsigned int newSize)
virtual int MaterialIndex() DISTI_METHOD_OVERRIDE
virtual void GetTransformedExtents(Vector &min, Vector &max, const GlsMatrixType &matrix, bool resetMinMax=true) DISTI_METHOD_OVERRIDE
void SetGeometryTransform(const GlsMatrixType &value)
virtual void SetFromGloData(GlsGloFileAttribute &data) DISTI_METHOD_OVERRIDE
virtual bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint) DISTI_METHOD_OVERRIDE
virtual void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler) DISTI_METHOD_OVERRIDE
GlsGeometryResourceMesh()
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
virtual GlsGeometryResource * GetRenderMesh()=0
IndexBufferEffectArrayT _indexBufferEffects
The effect to use for each index buffer.
Definition: gls_geometry_resource_mesh.h:270
GlsRenderEffect * GetIndexBufferEffect(unsigned int bufferNum)
Definition: gls_geometry_resource_mesh.h:215
virtual void TranslateVertices(float x, float y, float z) DISTI_METHOD_OVERRIDE
virtual void Rotate(const Vector &orig, float angle, const Vector &axis) DISTI_METHOD_OVERRIDE
virtual int TextureIndex() DISTI_METHOD_OVERRIDE
DynamicArray< GlsRenderEffect * > IndexBufferEffectArrayT
Typedef for a list of effects (shaders).
Definition: gls_geometry_resource_mesh.h:269
void DrawIndexBuffers(GlsGeometryResource *renderMesh)
GlsMatrixType _geometryTransform
Transformation matrix to be applied to all geometry in this mesh.
Definition: gls_geometry_resource_mesh.h:263
virtual void GetExtents(float &minx, float &miny, float &minz, float &maxx, float &maxy, float &maxz) DISTI_METHOD_OVERRIDE
virtual void CopyGeometry(DisplayObject *src) DISTI_METHOD_OVERRIDE
void ReorderAtWill(bool reorderAtWill)
Definition: gls_geometry_resource_mesh.h:204
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
bool SetGloIndexBufferEffect(GlsGloFileAttribute &data)
virtual bool SetupTexture()
unsigned int NumIndexBuffers()
Definition: gls_geometry_resource_mesh.h:186
virtual DisplayObject * Pick3D(const Vector &winLoc, const Vector &logicalCoords, float scale, const Vector &directionVector, Vector &collisionWinLoc, const OpenGLMatrices &drawnMatrices) DISTI_METHOD_OVERRIDE
virtual void CopyProperties(DisplayObject *src) DISTI_METHOD_OVERRIDE
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar=0) DISTI_METHOD_OVERRIDE
void SetupDefaultEffect()
virtual void OnGeometryResourceChanged() DISTI_METHOD_OVERRIDE
Callback method to be called by this observer.
Definition: gls_geometry_resource_mesh.h:108
GlsGeometry_Generic * LoadGloGeometryResourceData(GlsGloFileAttribute &data)
virtual void UpdateBoundingVolume() DISTI_METHOD_OVERRIDE
void SetIndexBufferEffect(unsigned int bufferNum, GlsRenderEffect *newEffect)
Definition: gls_geometry_resource_mesh.h:231
const GlsMatrixType & GetGeometryTransform()
Definition: gls_geometry_resource_mesh.h:181
Definition: gls_geometry_resource.h:295
Definition: gls_geometry_resource.h:87
unsigned int NumIndexBuffers() const
Definition: gls_geometry_resource.h:478
Definition: gls_geometry_resource.h:514
Definition: gls_glo_file.h:1243
Definition: gls_render_effect.h:116
virtual void Release()=0
Release a reference to this object.
virtual void AddRef()=0
Add to this object's reference count.
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:544
The disti::DisplayObject class and global enumerations.
Macros and helper code to determine what subset of C++11/14/17 is available.
#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
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:488
#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
The disti::GlsGeometryResource class.
#define GLSGEN_GlsAdvancedMesh_EXPORT
Provides support for creating DLLs.
Definition: gls_geometry_resource_mesh.h:59
The disti::GlsRenderEffect class.
Definition: bmpimage.h:47