31 #include "../../common_ogl/openGL_includes.h" 32 #include "../raytracing/shapes3D/bbox_3d.h" 33 #include "../../3d_enums.h" 35 #include <wx/chartype.h> 57 Draw(
false, 1.0f, aUseSelectedMaterial, aSelectionColor );
66 Draw(
true, aOpacity, aUseSelectedMaterial, aSelectionColor );
161 GLuint* aIdxOut,
const glm::vec4& aColor );
163 void Draw(
bool aTransparent,
float aOpacity,
bool aUseSelectedMaterial,
164 SFVEC3F& aSelectionColor )
const;
167 #endif // _MODEL_3D_H_ define an internal structure to be used by the 3D renders
MATERIAL(const SMATERIAL &aOther)
bool HasOpaqueMeshes() const
Return true if have opaque meshes to render.
unsigned int m_render_idx_count
Manage a bounding box defined by two SFVEC3F min max points.
static void MakeBbox(const BBOX_3D &aBox, unsigned int aIdxOffset, VERTEX *aVtxOut, GLuint *aIdxOut, const glm::vec4 &aColor)
GLuint m_bbox_index_buffer
float m_Transparency
1.0 is completely transparent, 0.0 completely opaque
GLuint m_bbox_vertex_buffer
static constexpr unsigned int bbox_vtx_count
static constexpr unsigned int bbox_idx_count
bool m_have_transparent_meshes
void DrawBbox() const
Draw main bounding box of the model.
std::vector< MATERIAL > m_materials
static const wxChar * m_logTrace
bool HasTransparentMeshes() const
Return true if have transparent mesh's to render.
MATERIAL_MODE
Render 3d model shape materials mode.
bool m_have_opaque_meshes
void DrawBboxes() const
Draw individual bounding boxes of each mesh.
MATERIAL_MODE m_materialMode
GLenum m_index_buffer_type
bool IsTransparent() const
void DrawOpaque(bool aUseSelectedMaterial, SFVEC3F aSelectionColor=SFVEC3F(0.0f)) const
Render the model into the current context.
static void EndDrawMulti()
Cleanup render states after drawing multiple models.
MODEL_3D(const S3DMODEL &a3DModel, MATERIAL_MODE aMaterialMode)
Load a 3D model.
void DrawTransparent(float aOpacity, bool aUseSelectedMaterial, SFVEC3F aSelectionColor=SFVEC3F(0.0f)) const
Render the model into the current context.
std::vector< BBOX_3D > m_meshes_bbox
individual bbox for each mesh
void Draw(bool aTransparent, float aOpacity, bool aUseSelectedMaterial, SFVEC3F &aSelectionColor) const
const BBOX_3D & GetBBox() const
Get the main bounding box.
Store the a model based on meshes and materials.
GLenum m_bbox_index_buffer_type
static void BeginDrawMulti(bool aUseColorInformation)
Set some basic render states before drawing multiple models.
unsigned int m_render_idx_buffer_offset
BBOX_3D m_model_bbox
global bounding box for this model