39#ifndef INCLUDED_GLS_GEOMETRY_RESOURCE_MESH_H
40#define INCLUDED_GLS_GEOMETRY_RESOURCE_MESH_H
49#if( defined( GLSGEN_EXPORT_GLSADVANCEDMESH ) || defined( GLSGEN_IMPORT_GLSADVANCEDMESH ) || defined( GLS_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \
50 && defined( _MSC_VER )
51# if defined( GLSGEN_EXPORT_GLSADVANCEDMESH ) || defined( GLS_EXPORT_GENERATED )
52# define GLSGEN_GlsAdvancedMesh_EXPORT __declspec( dllexport )
54# define GLSGEN_GlsAdvancedMesh_EXPORT __declspec( dllimport )
57# define GLSGEN_GlsAdvancedMesh_EXPORT
64class GlsSortedDrawable;
68class GlsGloFileAttribute;
80 friend class GlsGeometryResourceMesh_SortedDrawable;
84 DISTI_DEPRECATED(
"This identifier is forbidden by the C++ standard. Use BaseClass instead." )
87 friend class GlsGeometryResourceMeshEditor;
275 class DistiAttributeIndexBufferEffectArray;
332 void OnMatChanged( DynamicArray<int>& a, DynamicArray<int>& b );
333 void ReplaceMaterial(
unsigned int oldIndex,
unsigned int newIndex );
339 unsigned int material_index,
340 int diffuse_texture_index,
341 int normal_texture_index,
342 int specular_texture_index,
343 int reflection_texture_index,
344 float diffuse_amount,
346 float specular_amount,
347 float reflection_amount,
348 bool useVertexColors,
349 bool normalFlipGreen,
350 float diff_map_offset_v = 0.0f,
351 float diff_map_offset_u = 0.0f,
352 float diff_map_tiling_u = 1.0f,
353 float diff_map_tiling_v = 1.0f,
354 float diff_map_angle_w = 0.0f,
355 float norm_map_offset_v = 0.0f,
356 float norm_map_offset_u = 0.0f,
357 float norm_map_tiling_u = 1.0f,
358 float norm_map_tiling_v = 1.0f,
359 float norm_map_angle_w = 0.0f,
360 float spec_map_offset_v = 0.0f,
361 float spec_map_offset_u = 0.0f,
362 float spec_map_tiling_u = 1.0f,
363 float spec_map_tiling_v = 1.0f,
364 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:78
DynamicArray< int > & MaterialIndices() DISTI_METHOD_OVERRIDE
void CopyGeometry(DisplayObject *src) DISTI_METHOD_OVERRIDE
void TranslateVertices(float x, float y, float z) DISTI_METHOD_OVERRIDE
unsigned int NumIndexBufferEffects()
Definition: gls_geometry_resource_mesh.h:197
void CleanupDefaultEffect()
bool ReorderAtWill()
Definition: gls_geometry_resource_mesh.h:203
virtual void ResizeIndexBufferEffectsArray(unsigned int newSize)
int TextureIndex() DISTI_METHOD_OVERRIDE
void SetGeometryTransform(const GlsMatrixType &value)
void CopyProperties(DisplayObject *src) DISTI_METHOD_OVERRIDE
SortedDrawableArrayT _indexBufferDrawables
GlsSortedDrawable for each index buffer.
Definition: gls_geometry_resource_mesh.h:279
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:270
void SetAvailableAttributes(unsigned int value) DISTI_METHOD_OVERRIDE
void GetTransformedExtents(Vector &min, Vector &max, const GlsMatrixType &matrix, bool resetMinMax=true) DISTI_METHOD_OVERRIDE
void GetCppInterfaceDescriptionFree(InterfaceListType *array) DISTI_METHOD_OVERRIDE
virtual GlsGeometryResource * GetRenderMesh()=0
IndexBufferEffectArrayT _indexBufferEffects
The effect to use for each index buffer.
Definition: gls_geometry_resource_mesh.h:273
GlsRenderEffect * GetIndexBufferEffect(unsigned int bufferNum)
Definition: gls_geometry_resource_mesh.h:218
int MaterialIndex() DISTI_METHOD_OVERRIDE
DynamicArray< GlsRenderEffect * > IndexBufferEffectArrayT
Typedef for a list of effects (shaders).
Definition: gls_geometry_resource_mesh.h:272
void DrawIndexBuffers(GlsGeometryResource *renderMesh)
DynamicArray< GlsSortedDrawable * > SortedDrawableArrayT
Typedef for a list of sorted drawables.
Definition: gls_geometry_resource_mesh.h:278
DisplayObject * Pick3D(const Vector &winLoc, const Vector &logicalCoords, float scale, const Vector &directionVector, Vector &collisionWinLoc, const OpenGLMatrices &drawnMatrices) DISTI_METHOD_OVERRIDE
void OnGeometryResourceChanged() DISTI_METHOD_OVERRIDE
Callback method to be called by this observer.
Definition: gls_geometry_resource_mesh.h:106
GlsMatrixType _geometryTransform
Transformation matrix to be applied to all geometry in this mesh.
Definition: gls_geometry_resource_mesh.h:266
void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler) DISTI_METHOD_OVERRIDE
void Draw() DISTI_METHOD_OVERRIDE
void ReorderAtWill(bool reorderAtWill)
Definition: gls_geometry_resource_mesh.h:207
void MaterialIndex(int index) DISTI_METHOD_OVERRIDE
bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint) DISTI_METHOD_OVERRIDE
DynamicArray< int > _newMaterialIndices
Intermediate data storage to make the setting of new material indices through the Faces simpler.
Definition: gls_geometry_resource_mesh.h:268
virtual bool SetupTexture()
unsigned int NumIndexBuffers()
Definition: gls_geometry_resource_mesh.h:189
void Scale(float px, float py, float pz, Vertex *anchor, int handleBar=0) DISTI_METHOD_OVERRIDE
virtual void MaterialIndex(unsigned int index)
Definition: gls_geometry_resource_mesh.h:151
void SetupDefaultEffect()
void UpdateBoundingVolume() DISTI_METHOD_OVERRIDE
InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL) DISTI_METHOD_OVERRIDE
void GetExtents(float &minx, float &miny, float &minz, float &maxx, float &maxy, float &maxz) DISTI_METHOD_OVERRIDE
void Rotate(const Vector &orig, float angle, const Vector &axis) DISTI_METHOD_OVERRIDE
void SetIndexBufferEffect(unsigned int bufferNum, GlsRenderEffect *newEffect)
Definition: gls_geometry_resource_mesh.h:234
const GlsMatrixType & GetGeometryTransform()
Definition: gls_geometry_resource_mesh.h:184
Definition: gls_geometry_resource.h:294
Definition: gls_geometry_resource.h:86
unsigned int NumIndexBuffers() const
Definition: gls_geometry_resource.h:477
Definition: gls_geometry_resource.h:513
Definition: gls_glo_file.h:1241
Definition: gls_render_effect.h:115
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:540
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:245
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:487
#define DISTI_METHOD_OVERRIDE
Macro to wrap the override keyword, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:221
The disti::GlsGeometryResource class.
#define GLSGEN_GlsAdvancedMesh_EXPORT
Provides support for creating DLLs.
Definition: gls_geometry_resource_mesh.h:57
The disti::GlsRenderEffect class.
Definition: bmpimage.h:46