#pragma once #include "K3DTypes.h" #include "KResourceManager.h" struct GrassColonyInfo { float fDensity; ///< 밀도 float fDisTribution; ///< 분포 float fSize; ///< 크기 float fHeightP, fHeightM; ///< 높이 Plus, Minus KColor Color; ///< 색상 float fColorRatio; ///< 색상 비율 float fColorTone; ///< 색조 float fChroma; ///< 채도 float fBrightness; ///< 명도 float fCombinationRatio; ///< 풀 배합 비율 float fWindReaction; ///< 풀 바람에 따른 반응 std::string strTexFileName; K3DTextureSPtr m_spTexture; GrassColonyInfo() : fDensity( 5.0f ), fDisTribution(16.0f ), fSize( 5.0f ), fHeightP( 0.1f ), fHeightM( 0.3f ), Color( 255, 255, 255, 255 ), fColorRatio( 0.6f ), fColorTone( 8.0f ), fChroma( 0.08f ), fBrightness( 0.15f ), fCombinationRatio( 50.f ), fWindReaction( 0.2f ), m_spTexture( NULL ) {} GrassColonyInfo( GrassColonyInfo & ColonyInfo ) : m_spTexture( NULL ) { *this = ColonyInfo; CreateTexture(); } ~GrassColonyInfo() { m_spTexture = NULL; } void CreateTexture() { if( strTexFileName.empty() ) return; m_spTexture = NULL; NX3LoadPack loadpack; loadpack.Init(); if( KTextureManager::GetManager()->IsExistTexture( strTexFileName.c_str(), &loadpack ) ) { m_spTexture = KTextureManager::GetManager()->GetTexture( strTexFileName.c_str(), &loadpack, true, KTextureManager::GetManager()->GetMipMapBiasLevel() ); } else { _oprint( "Resource Error : Speed Grass Texture Not Found - %s\n", strTexFileName.c_str() ); } } };