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;
87 friend class GlsGeometryResourceMeshEditor;
96 GLSGEN_GlsAdvancedMesh_EXPORT
GlsGeometryResourceMesh(
const GlsGeometryResourceMesh& that,
const bool generateNames );
106 virtual void OnGeometryResourceChanged()
123 virtual GLSGEN_GlsAdvancedMesh_EXPORT
void Draw(
void );
126 virtual GLSGEN_GlsAdvancedMesh_EXPORT
void GetExtents(
float& minx,
float& miny,
float& minz,
float& maxx,
float& maxy,
float& maxz );
130 virtual GLSGEN_GlsAdvancedMesh_EXPORT
bool Hit(
float x,
float y,
float z,
float scale,
const Vector& directionVector,
Vector* collisionPoint );
132 virtual GLSGEN_GlsAdvancedMesh_EXPORT
void Scale(
float px,
float py,
float pz,
Vertex* anchor,
int handleBar = 0 );
133 virtual GLSGEN_GlsAdvancedMesh_EXPORT
void Rotate(
const Vector& orig,
float angle,
const Vector& axis );
134 virtual GLSGEN_GlsAdvancedMesh_EXPORT
void TranslateVertices(
float x,
float y,
float z );
140 virtual GLSGEN_GlsAdvancedMesh_EXPORT
int TextureIndex(
void );
143 virtual GLSGEN_GlsAdvancedMesh_EXPORT
void TextureIndex(
int index );
146 virtual GLSGEN_GlsAdvancedMesh_EXPORT
bool SetupTexture(
void );
150 virtual GLSGEN_GlsAdvancedMesh_EXPORT
void MaterialIndex(
unsigned int index );
256 oldEffect->Release();
282 class DistiAttributeIndexBufferEffectArray;
290 GLSGEN_GlsAdvancedMesh_EXPORT
void SetupDefaultEffect();
292 GLSGEN_GlsAdvancedMesh_EXPORT
void CleanupDefaultEffect();
294 GLSGEN_GlsAdvancedMesh_EXPORT
void DrawGeometry();
317 GlsGeometryResourceMesh& operator=(
const GlsGeometryResourceMesh& rhs ) DISTI_SPECIAL_MEM_FUN_DELETE;
320 void CopyGeometryInternal(
const GlsGeometryResourceMesh& src );
323 void OnMatChanged( DynamicArray<int>& a, DynamicArray<int>& b );
324 void ReplaceMaterial(
unsigned int oldIndex,
unsigned int newIndex );
329 unsigned int material_index,
330 int diffuse_texture_index,
331 int normal_texture_index,
332 int specular_texture_index,
333 int reflection_texture_index,
334 float diffuse_amount,
336 float specular_amount,
337 float reflection_amount,
338 bool useVertexColors,
339 bool normalFlipGreen,
340 float diff_map_offset_v = 0.0f,
341 float diff_map_offset_u = 0.0f,
342 float diff_map_tiling_u = 1.0f,
343 float diff_map_tiling_v = 1.0f,
344 float diff_map_angle_w = 0.0f,
345 float norm_map_offset_v = 0.0f,
346 float norm_map_offset_u = 0.0f,
347 float norm_map_tiling_u = 1.0f,
348 float norm_map_tiling_v = 1.0f,
349 float norm_map_angle_w = 0.0f,
350 float spec_map_offset_v = 0.0f,
351 float spec_map_offset_u = 0.0f,
352 float spec_map_tiling_u = 1.0f,
353 float spec_map_tiling_v = 1.0f,
354 float spec_map_angle_w = 0.0f );
IndexBufferEffectArrayT _indexBufferEffects
The effect to use for each index buffer.
Definition: gls_geometry_resource_mesh.h:280
virtual int TextureIndex(void)
unsigned int NumIndexBufferEffects()
Definition: gls_geometry_resource_mesh.h:193
void SetGeometryTransform(const GlsMatrixType &value)
Definition: dynamic_array.h:62
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:301
SortedDrawableArrayT _indexBufferDrawables
GlsSortedDrawable for each index buffer.
Definition: gls_geometry_resource_mesh.h:286
virtual int MaterialIndex()
bool ReorderAtWill()
Definition: gls_geometry_resource_mesh.h:201
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL)
virtual void CopyGeometry(DisplayObject *src)
virtual DynamicArray< int > & MaterialIndices()
virtual void CopyProperties(DisplayObject *src)
virtual DisplayObject * Pick3D(const Vector &winLoc, const Vector &logicalCoords, float scale, const Vector &directionVector, Vector &collisionWinLoc, const OpenGLMatrices &drawnMatrices)
virtual void UpdateBoundingVolume(void)
virtual void ResizeIndexBufferEffectsArray(unsigned int newSize)
virtual void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler)
void ReorderAtWill(bool reorderAtWill)
Definition: gls_geometry_resource_mesh.h:209
Definition: gls_glo_file.h:982
The disti::DisplayObject class and global enumerations.
Definition: gls_geometry_resource.h:241
virtual void GetExtents(float &minx, float &miny, float &minz, float &maxx, float &maxy, float &maxz)
void InvalidatePainter()
Definition: display.h:1717
virtual bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint)
unsigned int NumIndexBuffers()
Definition: gls_geometry_resource_mesh.h:185
virtual void GetTransformedExtents(Vector &min, Vector &max, const GlsMatrixType &matrix, bool resetMinMax=true)
Definition: gls_geometry_resource.h:82
void Count(const unsigned int count)
Definition: dynamic_array.h:115
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar=0)
void SetIndexBufferEffect(unsigned int bufferNum, GlsRenderEffect *newEffect)
Definition: gls_geometry_resource_mesh.h:240
GlsRenderEffect * GetIndexBufferEffect(unsigned int bufferNum)
Definition: gls_geometry_resource_mesh.h:224
virtual void SetAvailableAttributes(unsigned int value)
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:180
T * InternalArray()
Definition: dynamic_array.h:395
Definition: gls_geometry_resource_mesh.h:78
virtual void TranslateVertices(float x, float y, float z)
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array)
virtual void Rotate(const Vector &orig, float angle, const Vector &axis)
bool _reorderAtWill
Definition: gls_geometry_resource_mesh.h:277
The disti::GlsGeometryResource class.
GlsGeometryResourceMesh(void)
~GlsGeometryResourceMesh(void)
Definition: gls_render_effect.h:115
Macros and helper code to determine what subset of C++11/14/17 is available.
unsigned int NumIndexBuffers() const
Definition: gls_geometry_resource.h:417
Definition: bmpimage.h:46
Definition: gls_geometry_resource.h:453
The disti::GlsRenderEffect class.