//----------------------------------------------------------------------------------------- //------CMATERIALEDITORFACTORY----------------------------------------------------------------- //----------------------------------------------------------------------------------------- CPGInstanceManagerFactory::CPGInstanceManagerFactory(OgitorsView *view) : CBaseEditorFactory(view) { mTypeName = "PGInstance Manager Object"; mEditorType = ETYPE_CUSTOM_MANAGER; mAddToObjectList = true; mRequirePlacement = false; mIcon = "Icons/pagedgeometry.svg"; mCapabilities = CAN_UNDO | CAN_DELETE; OgitorsPropertyDef *definition = AddPropertyDefinition("model", "Model", "The model to be used.", PROP_STRING); definition->setOptions(OgitorsRoot::getSingletonPtr()->GetModelNames()); AddPropertyDefinition("pagesize", "Page Size", "Size of batch pages.",PROP_INT); AddPropertyDefinition("batchdistance", "Batch Distance", "Batch Distance.",PROP_INT); AddPropertyDefinition("impostordistance", "Impostor Distance", "Impostor Distance.",PROP_INT); definition = AddPropertyDefinition("bounds", "Bounds", "The dimensions of the bounding area.",PROP_VECTOR4); definition->setFieldNames("X1","Z1","X2","Z2"); AddPropertyDefinition("castshadows","Cast Shadows","Do the instances cast shadows?",PROP_BOOL); AddPropertyDefinition("tempmodified", "", "Is it temporarily modified.", PROP_BOOL); AddPropertyDefinition("randomizer::minscale", "Randomizer::Min. Scale", "Minimum Scale of new objects.",PROP_REAL); AddPropertyDefinition("randomizer::maxscale", "Randomizer::Max. Scale", "Maximum Scale of new objects.",PROP_REAL); AddPropertyDefinition("randomizer::minyaw", "Randomizer::Min. Yaw", "Minimum Yaw of new objects.",PROP_REAL); AddPropertyDefinition("randomizer::maxyaw", "Randomizer::Max. Yaw", "Maximum Yaw of new objects.",PROP_REAL); OgitorsPropertyDefMap::iterator it = mPropertyDefs.find("name"); it->second.setAccess(true, false); }
//------------------------------------------------------------------------------- //----------CPLANEEDITORFACTORY-------------------------------------------------- //------------------------------------------------------------------------------- CPlaneEditorFactory::CPlaneEditorFactory(OgitorsView *view) : CNodeEditorFactory(view) { mTypeName = "Plane Object"; mEditorType = ETYPE_MOVABLE; mAddToObjectList = true; mRequirePlacement = true; mIcon = "Icons/plane.svg"; mCapabilities = CAN_PAGE | CAN_MOVE | CAN_SCALE | CAN_ROTATE | CAN_CLONE | CAN_DELETE | CAN_FOCUS | CAN_DRAG | CAN_UNDO | CAN_USEMATERIAL | CAN_ACCEPTCOPY; AddPropertyDefinition("normal","Normal","The normal of the object.",PROP_VECTOR3); AddPropertyDefinition("distance","Distance","The distance of the object.",PROP_REAL); AddPropertyDefinition("width","Width","The width of the object.",PROP_REAL); AddPropertyDefinition("height","Height","The height of the object.",PROP_REAL); AddPropertyDefinition("xsegments","X Segments","The xSegments of the plane.",PROP_INT); AddPropertyDefinition("ysegments","Y Segments","The ySegments of the plane.",PROP_INT); AddPropertyDefinition("numcoordsets","Num. Coord. Sets","The number of coord sets of the object.",PROP_INT); AddPropertyDefinition("utile","U Tile","The uTiling of the object.",PROP_INT); AddPropertyDefinition("vtile","V Tile","The vTiling of the object.",PROP_INT); AddPropertyDefinition("hasnormals","Has Normals","Does the object has normals?",PROP_BOOL); OgitorsPropertyDef *definition; definition = AddPropertyDefinition("material","Material","The material of the object.",PROP_STRING); definition->setOptions(OgitorsRoot::GetMaterialNames()); AddPropertyDefinition("castshadows","Cast Shadows","Does the object cast shadows?",PROP_BOOL); OgitorsPropertyDefMap::iterator it = mPropertyDefs.find("layer"); it->second.setAccess(true, true); }
//----------------------------------------------------------------------------------------- bool CEntityEditor::load(bool async) { if(mLoaded->get()) return true; if(CNodeEditor::load()) { CSceneManagerEditor *mSceneMgr = mOgitorsRoot->GetSceneManagerEditor(); try { mEntityHandle = mOgitorsRoot->GetSceneManager()->createEntity(mName->get(), mMeshFile->get() + ".mesh"); mUsingPlaceHolderMesh = false; } catch(...) { mUsingPlaceHolderMesh = true; mEntityHandle = mOgitorsRoot->GetSceneManager()->createEntity(mName->get(), "missing_mesh.mesh"); mEntityHandle->setMaterialName("MAT_GIZMO_X_L"); } mHandle->attachObject(mEntityHandle); mEntityHandle->setQueryFlags(QUERYFLAG_MOVABLE); mEntityHandle->setCastShadows(mCastShadows->get()); mEntityHandle->setVisibilityFlags(1 << mLayer->get()); mEntityHandle->setRenderingDistance(mRenderingDistance->get()); OgitorsPropertyDef *definition; if(mSubEntityCount->get() == -1) { int count = mEntityHandle->getNumSubEntities(); mSubEntityCount->set(count); for(int ix = 0; ix < count; ix++) { Ogre::String sCount1 = "SubEntities::SubEntity" + Ogre::StringConverter::toString(ix); Ogre::String sCount2 = "subentity" + Ogre::StringConverter::toString(ix); definition = mFactory->AddPropertyDefinition(sCount2 + "::material", sCount1 + "::Material", "Sub Entity's Material Name", PROP_STRING, true, true); definition->setOptions(OgitorsRoot::GetMaterialNames()); mFactory->AddPropertyDefinition(sCount2 + "::visible", sCount1 + "::Visible", "Sub Entity's Visibility", PROP_BOOL, true, true); PROPERTY(sCount2 + "::material", Ogre::String, mEntityHandle->getSubEntity(ix)->getMaterialName(), ix, SETTER(Ogre::String, CEntityEditor, _setSubMaterial)); PROPERTY(sCount2 + "::visible", bool, mEntityHandle->getSubEntity(ix)->isVisible(), ix, SETTER(bool, CEntityEditor, _setSubVisible)); if(mSceneMgr->getShadowsEnabled()) { Ogre::MaterialPtr matEnt = Ogre::MaterialManager::getSingletonPtr()->getByName(mEntityHandle->getSubEntity(ix)->getMaterialName()); mEntityHandle->getSubEntity(ix)->setMaterial(mSceneMgr->buildDepthShadowMaterial(matEnt)); } } } else if(!mUsingPlaceHolderMesh)
//------------------------------------------------------------------------------- //--------------CPARTICLEEDITORFACTORY------------------------------------------- //------------------------------------------------------------------------------- CParticleEditorFactory::CParticleEditorFactory(OgitorsView *view) : CNodeEditorFactory(view) { mTypeName = "Particle Object"; mEditorType = ETYPE_PARTICLE; mAddToObjectList = true; mRequirePlacement = true; mIcon = "Icons/particle.svg"; mCapabilities = CAN_PAGE | CAN_MOVE | CAN_SCALE | CAN_ROTATE | CAN_CLONE | CAN_DELETE | CAN_FOCUS | CAN_DRAG | CAN_UNDO | CAN_ACCEPTCOPY; OgitorsPropertyDef *definition; definition = AddPropertyDefinition("particle","Particle System","The particle name of the object.",PROP_STRING); definition->setOptions(OgitorsRoot::GetParticleTemplateNames()); AddPropertyDefinition("castshadows","Cast Shadows","Does the object cast shadows?",PROP_BOOL); OgitorsPropertyDefMap::iterator it = mPropertyDefs.find("layer"); it->second.setAccess(true, true); }
//----------------------------------------------------------------------------------------- //---------CLIGHTEDITORFACTORY------------------------------------------------------------- //----------------------------------------------------------------------------------------- CLightEditorFactory::CLightEditorFactory(OgitorsView *view) : CBaseEditorFactory(view) { mTypeName = "Light"; mEditorType = ETYPE_LIGHT; mAddToObjectList = true; mRequirePlacement = true; mIcon = "light.svg"; mCapabilities = CAN_MOVE | CAN_ROTATE | CAN_CLONE | CAN_DELETE | CAN_FOCUS | CAN_DRAG | CAN_UNDO | CAN_ACCEPTCOPY; mUsesGizmos = true; mUsesHelper = true; mLightTypes.clear(); mLightTypes.push_back(PropertyOption("LT_POINT",Ogre::Any((int)Ogre::Light::LT_POINT))); mLightTypes.push_back(PropertyOption("LT_DIRECTIONAL",Ogre::Any((int)Ogre::Light::LT_DIRECTIONAL))); mLightTypes.push_back(PropertyOption("LT_SPOTLIGHT",Ogre::Any((int)Ogre::Light::LT_SPOTLIGHT))); OgitorsPropertyDef *definition; AddPropertyDefinition("position", "Position", "The position of the object.",PROP_VECTOR3); AddPropertyDefinition("orientation","Orientation", "The orientation of the object.",PROP_QUATERNION, true, false); AddPropertyDefinition("direction", "Direction", "The direction of the object.",PROP_VECTOR3); definition = AddPropertyDefinition("lighttype", "Light Type", "The light object's type.",PROP_INT); definition->setOptions(&mLightTypes); AddPropertyDefinition("diffuse", "Diffuse", "The light object's diffuse colour.",PROP_COLOUR); AddPropertyDefinition("specular", "Specular", "The light object's specular colour.",PROP_COLOUR); definition = AddPropertyDefinition("lightrange", "Range", "The light object's range.",PROP_VECTOR3); definition->setFieldNames("InnerAngle", "OuterAngle", "Falloff"); definition = AddPropertyDefinition("attenuation", "Attenuation", "The light object's attenuation.",PROP_VECTOR4); definition->setFieldNames("Distance", "Constant Mult.", "Linear Mult.", "Quadratic Mult."); AddPropertyDefinition("power", "Power", "The light object's power.",PROP_REAL); AddPropertyDefinition("castshadows", "Cast Shadows", "Does the object cast shadows?",PROP_BOOL); OgitorsPropertyDefMap::iterator it = mPropertyDefs.find("updatescript"); it->second.setAccess(true, true); }
//-------------------------------------------------------------------------------------------------- //-----CAELUMEDITORFACTORY-------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------- CCaelumEditorFactory::CCaelumEditorFactory(OgitorsView *view) : CBaseEditorFactory(view) { mTypeName = "Caelum Object"; mEditorType = ETYPE_SKY_MANAGER; mAddToObjectList = true; mIcon = "Icons/caelum.svg"; mCapabilities = CAN_DELETE; mMonths.clear(); mMonths.push_back(PropertyOption("January",Ogre::Any((int)1))); mMonths.push_back(PropertyOption("Febuary",Ogre::Any((int)2))); mMonths.push_back(PropertyOption("March",Ogre::Any((int)3))); mMonths.push_back(PropertyOption("April",Ogre::Any((int)4))); mMonths.push_back(PropertyOption("May",Ogre::Any((int)5))); mMonths.push_back(PropertyOption("June",Ogre::Any((int)6))); mMonths.push_back(PropertyOption("July",Ogre::Any((int)7))); mMonths.push_back(PropertyOption("August",Ogre::Any((int)8))); mMonths.push_back(PropertyOption("September",Ogre::Any((int)9))); mMonths.push_back(PropertyOption("October",Ogre::Any((int)10))); mMonths.push_back(PropertyOption("November",Ogre::Any((int)11))); mMonths.push_back(PropertyOption("December",Ogre::Any((int)12))); OgitorsPropertyDef *definition; AddPropertyDefinition("clock::year","UniversalClock::Date::Year","Specifies the current year",PROP_INT, true, true); definition = AddPropertyDefinition("clock::month","UniversalClock::Date::Month","Specifies the current month",PROP_INT, true, true); definition->setOptions(&mMonths); AddPropertyDefinition("clock::day","UniversalClock::Date::Day","Specifies the current day",PROP_INT, true, true); AddPropertyDefinition("clock::hour","UniversalClock::Time::Hour","Specifies the current hour",PROP_INT, true, true); AddPropertyDefinition("clock::minute","UniversalClock::Time::Minute","Specifies the current minute",PROP_INT, true, true); AddPropertyDefinition("clock::second","UniversalClock::Time::Second","Specifies the current second",PROP_INT, true, true); AddPropertyDefinition("clock::speed","UniversalClock::Speed","Specifies the current speed multiplier",PROP_REAL, true, true); AddPropertyDefinition("observer::longitude","Observer::Longitude","",PROP_REAL, true, true); AddPropertyDefinition("observer::latitude","Observer::Latitude","",PROP_REAL, true, true); AddPropertyDefinition("lighting::ensure_single_lightsource","Lighting::SingleLightSource","Force single light",PROP_BOOL, true, true); AddPropertyDefinition("lighting::ensure_single_shadowsource","Lighting::SingleShadowSource","Force single shadow source",PROP_BOOL, true, true); AddPropertyDefinition("lighting::manage_ambient_light","Lighting::ManageAmbientLight","Manage ambient light",PROP_BOOL, true, true); AddPropertyDefinition("lighting::minimum_ambient_light","Lighting::MinimumAmbientLight","Manage ambient light",PROP_COLOUR, true, true); AddPropertyDefinition("fog::manage","Fog::Manage","",PROP_BOOL, true, true); AddPropertyDefinition("fog::density_multiplier","Fog::DensityMultiplier","",PROP_REAL, true, true); AddPropertyDefinition("sun::enable","Sun::Enable","",PROP_BOOL, true, true); AddPropertyDefinition("sun::ambient_multiplier","Sun::AmbientMultiplier","",PROP_COLOUR, true, true); AddPropertyDefinition("sun::diffuse_multiplier","Sun::DiffuseMultiplier","",PROP_COLOUR, true, true); AddPropertyDefinition("sun::specular_multiplier","Sun::SpecularMultiplier","",PROP_COLOUR, true, true); AddPropertyDefinition("sun::auto_disable","Sun::AutoDisable","",PROP_BOOL, true, true); AddPropertyDefinition("sun::cast_shadow","Sun::CastShadow","",PROP_BOOL, true, true); AddPropertyDefinition("sun::attenuation::distance","Sun::Attenuation::Distance","",PROP_REAL, true, true); AddPropertyDefinition("sun::attenuation::constant_multiplier","Sun::Attenuation::ConstantMultiplier","",PROP_REAL, true, true); AddPropertyDefinition("sun::attenuation::linear_multiplier","Sun::Attenuation::LinearMultiplier","",PROP_REAL, true, true); AddPropertyDefinition("sun::attenuation::quadric_multiplier","Sun::Attenuation::QuadricMultiplier","",PROP_REAL, true, true); AddPropertyDefinition("sun::position","Sun::Position","The position of the sun.",PROP_VECTOR3, false, false, false); AddPropertyDefinition("sun::colour","Sun::Colour","The colour of the sun.",PROP_COLOUR, false, false, false); AddPropertyDefinition("sun::lightcolour","Sun::LightColour","The colour of the sun light.",PROP_COLOUR, false, false, false); AddPropertyDefinition("moon::enable","Moon::Enable","",PROP_BOOL, true, true); AddPropertyDefinition("moon::ambient_multiplier","Moon::AmbientMultiplier","",PROP_COLOUR, true, true); AddPropertyDefinition("moon::diffuse_multiplier","Moon::DiffuseMultiplier","",PROP_COLOUR, true, true); AddPropertyDefinition("moon::specular_multiplier","Moon::SpecularMultiplier","",PROP_COLOUR, true, true); AddPropertyDefinition("moon::auto_disable","Moon::AutoDisable","",PROP_BOOL, true, true); AddPropertyDefinition("moon::cast_shadow","Moon::CastShadow","",PROP_BOOL, true, true); AddPropertyDefinition("moon::attenuation::distance","Moon::Attenuation::Distance","",PROP_REAL, true, true); AddPropertyDefinition("moon::attenuation::constant_multiplier","Moon::Attenuation::ConstantMultiplier","",PROP_REAL, true, true); AddPropertyDefinition("moon::attenuation::linear_multiplier","Moon::Attenuation::LinearMultiplier","",PROP_REAL, true, true); AddPropertyDefinition("moon::attenuation::quadric_multiplier","Moon::Attenuation::QuadricMultiplier","",PROP_REAL, true, true); AddPropertyDefinition("stars::enable","Stars::Enable","",PROP_BOOL, true, true); AddPropertyDefinition("stars::magnitude_scale","Stars::MagnitudeScale","",PROP_REAL, true, true); AddPropertyDefinition("stars::mag0_pixel_size","Stars::Mag0PixelSize","",PROP_REAL, true, true); AddPropertyDefinition("stars::min_pixel_size","Stars::MinPixelSize","",PROP_REAL, true, true); AddPropertyDefinition("stars::max_pixel_size","Stars::MinPixelSize","",PROP_REAL, true, true); AddPropertyDefinition("clouds::layer0::enable","Clouds::Layer0::Enable","",PROP_BOOL, true, true); AddPropertyDefinition("clouds::layer0::coverage","Clouds::Layer0::Coverage","",PROP_REAL, true, true); AddPropertyDefinition("clouds::layer0::height","Clouds::Layer0::Height","",PROP_REAL, true, true); AddPropertyDefinition("clouds::layer0::speed","Clouds::Layer0::Speed","",PROP_VECTOR2, true, true); AddPropertyDefinition("clouds::layer1::enable","Clouds::Layer1::Enable","",PROP_BOOL, true, true); AddPropertyDefinition("clouds::layer1::coverage","Clouds::Layer1::Coverage","",PROP_REAL, true, true); AddPropertyDefinition("clouds::layer1::height","Clouds::Layer1::Height","",PROP_REAL, true, true); AddPropertyDefinition("clouds::layer1::speed","Clouds::Layer1::Speed","",PROP_VECTOR2, true, true); AddPropertyDefinition("clouds::layer2::enable","Clouds::Layer2::Enable","",PROP_BOOL, true, true); AddPropertyDefinition("clouds::layer2::coverage","Clouds::Layer2::Coverage","",PROP_REAL, true, true); AddPropertyDefinition("clouds::layer2::height","Clouds::Layer2::Height","",PROP_REAL, true, true); AddPropertyDefinition("clouds::layer2::speed","Clouds::Layer2::Speed","",PROP_VECTOR2, true, true); OgitorsPropertyDefMap::iterator it = mPropertyDefs.find("name"); it->second.setAccess(true, false); it = mPropertyDefs.find("layer"); it->second.setAccess(false, false); }
//----------------------------------------------------------------------------------------- //------CTERRAINGROUPEDITORFACTORY--------------------------------------------------------- //----------------------------------------------------------------------------------------- CTerrainGroupEditorFactory::CTerrainGroupEditorFactory(OgitorsView *view) : CBaseEditorFactory(view) { mTypeName = "Terrain Group"; mEditorType = ETYPE_TERRAIN_MANAGER; mAddToObjectList = true; mIcon = "pagedterrainmanager.svg"; mCapabilities = CAN_DELETE | CAN_UNDO; mUsesGizmos = false; mUsesHelper = false; mMinBatchSizes.clear(); mMinBatchSizes.push_back(PropertyOption("5", Ogre::Any((int)5))); mMinBatchSizes.push_back(PropertyOption("9", Ogre::Any((int)9))); mMinBatchSizes.push_back(PropertyOption("17", Ogre::Any((int)17))); mMinBatchSizes.push_back(PropertyOption("33", Ogre::Any((int)33))); mMaxBatchSizes.clear(); mMaxBatchSizes.push_back(PropertyOption("33", Ogre::Any((int)33))); mMaxBatchSizes.push_back(PropertyOption("65", Ogre::Any((int)65))); mMaxBatchSizes.push_back(PropertyOption("129", Ogre::Any((int)129))); mMapSizeOptions.clear(); mMapSizeOptions.push_back(PropertyOption("128x128", Ogre::Any((int)129))); mMapSizeOptions.push_back(PropertyOption("256x256", Ogre::Any((int)257))); mMapSizeOptions.push_back(PropertyOption("512x512", Ogre::Any((int)513))); mMapSizeOptions.push_back(PropertyOption("1024x1024", Ogre::Any((int)1025))); mColourMapSizeOptions.clear(); mColourMapSizeOptions.push_back(PropertyOption("128x128", Ogre::Any((int)128))); mColourMapSizeOptions.push_back(PropertyOption("256x256", Ogre::Any((int)256))); mColourMapSizeOptions.push_back(PropertyOption("512x512", Ogre::Any((int)512))); mColourMapSizeOptions.push_back(PropertyOption("1024x1024", Ogre::Any((int)1024))); mColourMapSizeOptions.push_back(PropertyOption("2048x2048", Ogre::Any((int)2048))); mMaterialGeneratorTypes.clear(); mMaterialGeneratorTypes.push_back(PropertyOption("Default", Ogre::Any((int)0))); mMaterialGeneratorTypes.push_back(PropertyOption("Ogitor10", Ogre::Any((int)1))); AddPropertyDefinition("pageworldsize","World Size", "The size of page in world coordinates.",PROP_REAL); OgitorsPropertyDef *definition = AddPropertyDefinition("pagemapsize","Map Size", "The size of page in vertices per side.",PROP_INT); definition->setOptions(&mMapSizeOptions); AddPropertyDefinition("pagenameprefix","Page Name Prefix", "The Prefix to be added to page names.",PROP_STRING); definition = AddPropertyDefinition("materialgeneratortype","Mat. Generator", "The material generator to be used.",PROP_INT); definition->setOptions(&mMaterialGeneratorTypes); definition = AddPropertyDefinition("lightmap::texturesize","Light Map::Texture Size", "The size of lightmap texture.",PROP_INT); definition->setOptions(&mColourMapSizeOptions); definition = AddPropertyDefinition("blendmap::texturesize","Blend Map::Texture Size", "The size of blendmap texture.",PROP_INT); definition->setOptions(&mColourMapSizeOptions); definition = AddPropertyDefinition("tuning::compositemaptexturesize","Tuning::Composite Map Size", "The size of compositemap texture.",PROP_INT); definition->setOptions(&mColourMapSizeOptions); AddPropertyDefinition("colourmap::enabled","Colour Map::Enabled", "Is the colourmap enabled?",PROP_BOOL); definition = AddPropertyDefinition("colourmap::texturesize","Colour Map::Texture Size", "The size of colourmap texture.",PROP_INT); definition->setOptions(&mColourMapSizeOptions); AddPropertyDefinition("tuning::compositemapdistance","Tuning::Composite Map Dist.", "The distance at which composite map will be used for terrain texturing", PROP_INT); AddPropertyDefinition("tuning::maxpixelerror","Tuning::Max Pixel Error", "Maximum Pixel Error for LOD", PROP_INT); definition = AddPropertyDefinition("tuning::minbatchsize","Tuning::Min Batch Size", "Minimum Batch Size.",PROP_INT); definition->setOptions(&mMinBatchSizes); definition = AddPropertyDefinition("tuning::maxbatchsize","Tuning::Max Batch Size", "Maximum Batch Size.",PROP_INT); definition->setOptions(&mMaxBatchSizes); AddPropertyDefinition("tuning::skirtsize","Tuning::Skirt Size", "Skirt Size.",PROP_INT); AddPropertyDefinition("tuning::userayboxdistancecalculation","Tuning::Adv. Dist. Calc.", "Use Ray Box Distance Calculation for LOD.",PROP_BOOL); definition = AddPropertyDefinition("pg::densitymapsize","Paged Grass::Density Map Size", "", PROP_INT); definition->setOptions(&mColourMapSizeOptions); AddPropertyDefinition("pg::pagesize","Paged Grass::Page Size", "", PROP_INT); AddPropertyDefinition("pg::detaildistance","Paged Grass::Detail Distance", "", PROP_INT); OgitorsPropertyDefMap::iterator it = mPropertyDefs.find("name"); it->second.setAccess(true, false); }
//------------------------------------------------------------------------------- //--------CSCENEMANAGEREDITORFACTORY--------------------------------------------- //------------------------------------------------------------------------------- CSceneManagerEditorFactory::CSceneManagerEditorFactory(OgitorsView *view) : CBaseEditorFactory(view) { mTypeName = "OctreeSceneManager"; mEditorType = ETYPE_SCENEMANAGER; mIcon = "Icons/tsm.svg"; mCapabilities = CAN_DROP | CAN_UNDO | CAN_ACCEPTPASTE; mFogModes.clear(); mFogModes.push_back(PropertyOption("FOG_NONE",Ogre::Any((int)Ogre::FOG_NONE))); mFogModes.push_back(PropertyOption("FOG_LINEAR",Ogre::Any((int)Ogre::FOG_LINEAR))); mFogModes.push_back(PropertyOption("FOG_EXP",Ogre::Any((int)Ogre::FOG_EXP))); mFogModes.push_back(PropertyOption("FOG_EXP2",Ogre::Any((int)Ogre::FOG_EXP2))); mTextureMapSizes.clear(); mTextureMapSizes.push_back(PropertyOption("128x128",Ogre::Any((int)128))); mTextureMapSizes.push_back(PropertyOption("256x256",Ogre::Any((int)256))); mTextureMapSizes.push_back(PropertyOption("512x512",Ogre::Any((int)512))); mTextureMapSizes.push_back(PropertyOption("1024x1024",Ogre::Any((int)1024))); mTextureMapSizes.push_back(PropertyOption("2048x2048",Ogre::Any((int)2048))); mTextureMapSizes.push_back(PropertyOption("4096x4096",Ogre::Any((int)4096))); mShadowTechniqueNames.clear(); mShadowTechniqueNames.push_back(PropertyOption("NONE",Ogre::Any((int)Ogre::SHADOWTYPE_NONE))); mShadowTechniqueNames.push_back(PropertyOption("STENCIL_ADDITIVE",Ogre::Any((int)Ogre::SHADOWTYPE_STENCIL_ADDITIVE))); mShadowTechniqueNames.push_back(PropertyOption("STENCIL_MODULATIVE",Ogre::Any((int)Ogre::SHADOWTYPE_STENCIL_MODULATIVE))); mShadowTechniqueNames.push_back(PropertyOption("TEXTURE_ADDITIVE",Ogre::Any((int)Ogre::SHADOWTYPE_TEXTURE_ADDITIVE))); mShadowTechniqueNames.push_back(PropertyOption("TEXTURE_ADDITIVE_INTEGRATED",Ogre::Any((int)Ogre::SHADOWTYPE_TEXTURE_ADDITIVE_INTEGRATED))); mShadowTechniqueNames.push_back(PropertyOption("TEXTURE_MODULATIVE",Ogre::Any((int)Ogre::SHADOWTYPE_TEXTURE_MODULATIVE))); mShadowTechniqueNames.push_back(PropertyOption("TEXTURE_MODULATIVE_INTEGRATED",Ogre::Any((int)Ogre::SHADOWTYPE_TEXTURE_MODULATIVE_INTEGRATED))); AddPropertyDefinition("scenemanagertype","Manager Type","The typename of the Scene Manager.",PROP_STRING, true, false); AddPropertyDefinition("configfile","Config File","The configuration file of the object.",PROP_STRING,true,false); AddPropertyDefinition("ambient","Ambient","The ambient colour of the scene.",PROP_COLOUR); OgitorsPropertyDef *definition = AddPropertyDefinition("skybox::material","SkyBox::Material","The material of the skybox.",PROP_STRING); definition->setOptions(OgitorsRoot::GetSkyboxMaterials()); AddPropertyDefinition("skybox::active","SkyBox::Active","Is the skybox active?",PROP_BOOL); AddPropertyDefinition("skybox::distance","SkyBox::Distance","The distance of the skybox.",PROP_REAL); definition = AddPropertyDefinition("skydome::material","SkyDome::Material","The material of the skydome.",PROP_STRING); definition->setOptions(OgitorsRoot::GetSkyboxMaterials()); AddPropertyDefinition("skydome::active","SkyDome::Active","Is the skydome active?",PROP_BOOL); definition = AddPropertyDefinition("fog::mode","Fog::Mode","The fog mode of the scene.",PROP_INT); definition->setOptions(&mFogModes); AddPropertyDefinition("fog::colour","Fog::Colour","The colour of the fog.",PROP_COLOUR); AddPropertyDefinition("fog::start","Fog::Start","The distance at which fog starts.",PROP_REAL); AddPropertyDefinition("fog::end","Fog::End","The distance at which fog ends.",PROP_REAL); AddPropertyDefinition("fog::density","Fog::Density","The density of fog.",PROP_REAL); AddPropertyDefinition("position","Position","The position of the object.",PROP_VECTOR3, true, false); AddPropertyDefinition("scale","Scale","The scale of the object.",PROP_VECTOR3); AddPropertyDefinition("orientation","Orientation","The orientation of the object.",PROP_QUATERNION, true, false); AddPropertyDefinition("renderingdistance","Rendering Distance","The maximum distance to render meshes.",PROP_REAL); AddPropertyDefinition("shadows::enabled","Shadows::Enabled","Enable/Disable Shadows",PROP_BOOL); definition = AddPropertyDefinition("shadows::technique","Shadows::Technique","Shadow Technique to use",PROP_INT, true, false); definition->setOptions(&mShadowTechniqueNames); AddPropertyDefinition("shadows::renderingdistance","Shadows::Rendering Distance","The distance up to which shadows will be rendered",PROP_INT); definition = AddPropertyDefinition("shadows::resolutionnear","Shadows::Near Map Res.","Resolution of the nearest shadow map",PROP_INT); definition->setOptions(&mTextureMapSizes); definition = AddPropertyDefinition("shadows::resolutionmiddle","Shadows::Middle Map Res.","Resolution of the middle shadow map",PROP_INT); definition->setOptions(&mTextureMapSizes); definition = AddPropertyDefinition("shadows::resolutionfar","Shadows::Far Map Res.","Resolution of the far shadow map",PROP_INT); definition->setOptions(&mTextureMapSizes); OgitorsPropertyDefMap::iterator it = mPropertyDefs.find("layer"); it->second.setAccess(false, false); }