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
66 class GlsSortedDrawable;
70 class GlsGloFileAttribute;
82 friend class GlsGeometryResourceMesh_SortedDrawable;
86 DISTI_DEPRECATED(
"This identifier is forbidden by the C++ standard. Use BaseClass instead." )
89 friend class GlsGeometryResourceMeshEditor;
98 GLSGEN_GlsAdvancedMesh_EXPORT
GlsGeometryResourceMesh(
const GlsGeometryResourceMesh& that,
const bool generateNames );
108 virtual void OnGeometryResourceChanged() DISTI_METHOD_OVERRIDE
114 virtual GLSGEN_GlsAdvancedMesh_EXPORT
void SetAvailableAttributes(
unsigned int value ) DISTI_METHOD_OVERRIDE;
125 virtual GLSGEN_GlsAdvancedMesh_EXPORT
void Draw(
void ) DISTI_METHOD_OVERRIDE;
128 virtual GLSGEN_GlsAdvancedMesh_EXPORT
void GetExtents(
float& minx,
float& miny,
float& minz,
float& maxx,
float& maxy,
float& maxz ) DISTI_METHOD_OVERRIDE;
132 virtual GLSGEN_GlsAdvancedMesh_EXPORT
bool Hit(
float x,
float y,
float z,
float scale,
const Vector& directionVector,
Vector* collisionPoint ) DISTI_METHOD_OVERRIDE;
134 virtual GLSGEN_GlsAdvancedMesh_EXPORT
void Scale(
float px,
float py,
float pz,
Vertex* anchor,
int handleBar = 0 ) DISTI_METHOD_OVERRIDE;
135 virtual GLSGEN_GlsAdvancedMesh_EXPORT
void Rotate(
const Vector& orig,
float angle,
const Vector& axis ) DISTI_METHOD_OVERRIDE;
136 virtual GLSGEN_GlsAdvancedMesh_EXPORT
void TranslateVertices(
float x,
float y,
float z ) DISTI_METHOD_OVERRIDE;
142 virtual GLSGEN_GlsAdvancedMesh_EXPORT
int TextureIndex(
void ) DISTI_METHOD_OVERRIDE;
145 virtual GLSGEN_GlsAdvancedMesh_EXPORT
void TextureIndex(
int index ) DISTI_METHOD_OVERRIDE;
148 virtual GLSGEN_GlsAdvancedMesh_EXPORT
bool SetupTexture(
void );
152 virtual GLSGEN_GlsAdvancedMesh_EXPORT
void MaterialIndex(
unsigned int index );
155 virtual GLSGEN_GlsAdvancedMesh_EXPORT
int MaterialIndex() DISTI_METHOD_OVERRIDE;
258 oldEffect->Release();
270 virtual GLSGEN_GlsAdvancedMesh_EXPORT
void SetFromGloData(
GlsGloFileAttribute& data ) DISTI_METHOD_OVERRIDE;
284 class DistiAttributeIndexBufferEffectArray;
292 GLSGEN_GlsAdvancedMesh_EXPORT
void SetupDefaultEffect();
294 GLSGEN_GlsAdvancedMesh_EXPORT
void CleanupDefaultEffect();
296 GLSGEN_GlsAdvancedMesh_EXPORT
void DrawGeometry();
319 GlsGeometryResourceMesh& operator=(
const GlsGeometryResourceMesh& rhs ) DISTI_SPECIAL_MEM_FUN_DELETE;
322 void CopyGeometryInternal(
const GlsGeometryResourceMesh& src );
325 void OnMatChanged( DynamicArray<int>& a, DynamicArray<int>& b );
326 void ReplaceMaterial(
unsigned int oldIndex,
unsigned int newIndex );
331 unsigned int material_index,
332 int diffuse_texture_index,
333 int normal_texture_index,
334 int specular_texture_index,
335 int reflection_texture_index,
336 float diffuse_amount,
338 float specular_amount,
339 float reflection_amount,
340 bool useVertexColors,
341 bool normalFlipGreen,
342 float diff_map_offset_v = 0.0f,
343 float diff_map_offset_u = 0.0f,
344 float diff_map_tiling_u = 1.0f,
345 float diff_map_tiling_v = 1.0f,
346 float diff_map_angle_w = 0.0f,
347 float norm_map_offset_v = 0.0f,
348 float norm_map_offset_u = 0.0f,
349 float norm_map_tiling_u = 1.0f,
350 float norm_map_tiling_v = 1.0f,
351 float norm_map_angle_w = 0.0f,
352 float spec_map_offset_v = 0.0f,
353 float spec_map_offset_u = 0.0f,
354 float spec_map_tiling_u = 1.0f,
355 float spec_map_tiling_v = 1.0f,
356 float spec_map_angle_w = 0.0f );
virtual int MaterialIndex() DISTI_METHOD_OVERRIDE
IndexBufferEffectArrayT _indexBufferEffects
The effect to use for each index buffer.
Definition: gls_geometry_resource_mesh.h:282
virtual int TextureIndex(void) DISTI_METHOD_OVERRIDE
virtual void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler) DISTI_METHOD_OVERRIDE
virtual void CopyProperties(DisplayObject *src) DISTI_METHOD_OVERRIDE
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:436
unsigned int NumIndexBufferEffects()
Definition: gls_geometry_resource_mesh.h:195
void SetGeometryTransform(const GlsMatrixType &value)
unsigned Count() const
Definition: dynamic_array.h:204
Definition: dynamic_array.h:66
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:471
SortedDrawableArrayT _indexBufferDrawables
GlsSortedDrawable for each index buffer.
Definition: gls_geometry_resource_mesh.h:288
bool ReorderAtWill()
Definition: gls_geometry_resource_mesh.h:203
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL) DISTI_METHOD_OVERRIDE
virtual void ResizeIndexBufferEffectsArray(unsigned int newSize)
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array) DISTI_METHOD_OVERRIDE
void ReorderAtWill(bool reorderAtWill)
Definition: gls_geometry_resource_mesh.h:211
Definition: gls_glo_file.h:988
virtual DisplayObject * Pick3D(const Vector &winLoc, const Vector &logicalCoords, float scale, const Vector &directionVector, Vector &collisionWinLoc, const OpenGLMatrices &drawnMatrices) DISTI_METHOD_OVERRIDE
The disti::DisplayObject class and global enumerations.
Definition: gls_geometry_resource.h:245
virtual void Draw(void) DISTI_METHOD_OVERRIDE
virtual bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint) DISTI_METHOD_OVERRIDE
unsigned int NumIndexBuffers()
Definition: gls_geometry_resource_mesh.h:187
Definition: gls_geometry_resource.h:86
virtual void CopyGeometry(DisplayObject *src) DISTI_METHOD_OVERRIDE
virtual void Rotate(const Vector &orig, float angle, const Vector &axis) DISTI_METHOD_OVERRIDE
virtual void TranslateVertices(float x, float y, float z) DISTI_METHOD_OVERRIDE
virtual void GetExtents(float &minx, float &miny, float &minz, float &maxx, float &maxy, float &maxz) DISTI_METHOD_OVERRIDE
void SetIndexBufferEffect(unsigned int bufferNum, GlsRenderEffect *newEffect)
Definition: gls_geometry_resource_mesh.h:242
GlsRenderEffect * GetIndexBufferEffect(unsigned int bufferNum)
Definition: gls_geometry_resource_mesh.h:226
GlsRenderEffect * CreateRenderEffect_DiffNormSpecRefl(unsigned int material_index, int diffuse_texture_index, int normal_texture_index, int specular_texture_index, int reflection_texture_index, float diffuse_amount, float normal_amount, float specular_amount, float reflection_amount, bool useVertexColors, bool normalFlipGreen, float diff_map_offset_v=0.0f, float diff_map_offset_u=0.0f, float diff_map_tiling_u=1.0f, float diff_map_tiling_v=1.0f, float diff_map_angle_w=0.0f, float norm_map_offset_v=0.0f, float norm_map_offset_u=0.0f, float norm_map_tiling_u=1.0f, float norm_map_tiling_v=1.0f, float norm_map_angle_w=0.0f, float spec_map_offset_v=0.0f, float spec_map_offset_u=0.0f, float spec_map_tiling_u=1.0f, float spec_map_tiling_v=1.0f, float spec_map_angle_w=0.0f)
const GlsMatrixType & GetGeometryTransform()
Definition: gls_geometry_resource_mesh.h:182
virtual DynamicArray< int > & MaterialIndices() DISTI_METHOD_OVERRIDE
Definition: gls_geometry_resource_mesh.h:78
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar=0) DISTI_METHOD_OVERRIDE
bool _reorderAtWill
Definition: gls_geometry_resource_mesh.h:279
The disti::GlsGeometryResource class.
GlsGeometryResourceMesh(void)
~GlsGeometryResourceMesh(void)
virtual void UpdateBoundingVolume(void) DISTI_METHOD_OVERRIDE
Definition: gls_render_effect.h:117
Macros and helper code to determine what subset of C++11/14/17 is available.
virtual void GetTransformedExtents(Vector &min, Vector &max, const GlsMatrixType &matrix, bool resetMinMax=true) DISTI_METHOD_OVERRIDE
unsigned int NumIndexBuffers() const
Definition: gls_geometry_resource.h:421
Definition: bmpimage.h:46
virtual void SetAvailableAttributes(unsigned int value) DISTI_METHOD_OVERRIDE
Definition: gls_geometry_resource.h:457
The disti::GlsRenderEffect class.