<commit_before>//============================================================================
// Name        : IMaterial.cpp
// Author      : <NAME>
// Version     :
// Copyright   : ;)
// Description : IMaterial Interface
//============================================================================

#include <Pyros3D/Materials/IMaterial.h>

namespace p3d {
    
    uint32 IMaterial::_InternalID = 0;
    
    IMaterial::IMaterial()
    {
        // Values By Default
        isTransparent = false;
        isWireFrame = false;
        isCastingShadows = false;
        cullFace = CullFace::BackFace;
        
        // Set Internal ID
        materialID = _InternalID;
        
        // Increase Internal ID
        _InternalID++;
    }
    void IMaterial::Destroy() {}
    void IMaterial::SetOpacity(const f32 &opacity)
    {
        this->opacity = opacity;
        if (opacity<1.f) isTransparent = true;
        else isTransparent = false;
        AddUniform(Uniform("uOpacity",DataType::Float,&this->opacity));
    }
    void IMaterial::SetCullFace(const uint32 &face)
    {
        this->cullFace = face;
    }
   IMaterial::~IMaterial() {}
    
    void IMaterial::SetTransparencyFlag(bool transparency)
    {
        isTransparent = transparency;
    }
    bool IMaterial::IsTransparent() const
    {
        return isTransparent;
    }
    uint32 IMaterial::GetCullFace() const
    {
        return cullFace;
    }
    const f32 &IMaterial::GetOpacity() const
    {<commit_msg>Fixed a major bug on opacity property<commit_after>//============================================================================
// Name        : IMaterial.cpp
// Author      : <NAME>
// Version     :
// Copyright   : ;)
// Description : IMaterial Interface
//============================================================================

#include <Pyros3D/Materials/IMaterial.h>

namespace p3d {
    
    uint32 IMaterial::_InternalID = 0;
    
    IMaterial::IMaterial()
    {
        // Values By Default
        isTransparent = false;
        isWireFrame = false;
        isCastingShadows = false;
        cullFace = CullFace::BackFace;
        
        // Set Internal ID
        materialID = _InternalID;
        
        // Increase Internal ID
        _InternalID++;
    }
    void IMaterial::Destroy() {}
    void IMaterial::SetOpacity(const f32 &opacity)
    {
        this->opacity = opacity;
        AddUniform(Uniform("uOpacity",DataType::Float,&this->opacity));
    }
    void IMaterial::SetCullFace(const uint32 &face)
    {
        this->cullFace = face;
    }
   IMaterial::~IMaterial() {}
    
    void IMaterial::SetTransparencyFlag(bool transparency)
    {
        isTransparent = transparency;
    }
    bool IMaterial::IsTransparent() const
    {
        if (isTransparent) return isTransparent;
        else return (opacity<1);
    }
    uint32 IMaterial::GetCullFace() const
    {
        return cullFace;
    }
    const f32 &IMaterial::GetOpacity() const
    {
{'fraction_non_alphanumeric': 0.2020812353138637, 'fraction_numerical': 0.009399127223900638, 'mean_word_length': 2.4976525821596245, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '347951', 'n_tokens_mistral': 841, 'n_tokens_neox': 806, 'n_words': 164}