199 auto currentModel =
model;
306 return particleSystem;
318 delete particleSystem;
490 if (soundIt ==
soundsById.end())
return nullptr;
491 return soundIt->second;
513 if (soundIt ==
soundsById.end())
return false;
514 auto sound = soundIt->second;
TDME2 engine entity shader parameters.
void setShader(const string &shaderId)
Set shader.
static constexpr int RENDERPASS_ALL
Representation of a 3d model.
Prototype audio definition.
Prototype bounding volume definition.
Prototype LOD level definition.
Prototype particle system definition.
Prototype physics body definitions.
Prototype terrain definition.
PrototypeAudio * addSound(const string &id)
Add sound with given id.
void setLODLevel3(PrototypeLODLevel *lodLevel)
Set LOD level 3.
void setImposterLOD(PrototypeImposterLOD *imposterLOD)
Set imposter LOD.
void setContributesShadows(bool contributesShadows)
Enable/disable contributes shadows.
int getParticleSystemsCount()
PrototypeParticleSystem * addParticleSystem()
Add particle system.
PrototypeLODLevel * getLODLevel2()
vector< PrototypeBoundingVolume * > boundingVolumes
void setFileName(const string &fileName)
Set up prototype file name including relative path.
int64_t environmentMapTimeRenderUpdateFrequency
void setShader(const string &id)
Set shader.
const vector< PrototypeAudio * > & getSounds()
PrototypeImposterLOD * getImposterLOD()
PrototypeAudio * getSound(const string &id)
Returns sound of given sound id.
void removeSound(const string &id)
Remove sound of given sound id.
void setDistanceShaderParameters(const EntityShaderParameters ¶meters)
Set distance shader parameters.
virtual ~Prototype()
Destructor.
EntityShaderParameters shaderParameters
void setId(int id)
Set Id.
PrototypeTerrain * terrain
const string & getShader()
Get shader.
PrototypeLODLevel * getLODLevel3()
map< string, PrototypeAudio * > soundsById
float getDistanceShaderDistance()
Get distance shader distance.
Prototype(int id, Prototype_Type *prototypeType, const string &name, const string &description, const string &fileName, const string &modelFileName, const string &thumbnail, Model *model, const Vector3 &pivot)
Creates a prototype.
bool isRenderGroups()
Is using render groups.
Model * unsetModel()
Unset model without deleting current one.
bool isContributesShadows()
bool isTerrainMesh()
Is terrain mesh.
int32_t environmentMapRenderPassMask
float distanceShaderDistance
PrototypePhysics * physics
const string & getFileName()
const string & getDistanceShader()
Get distance shader.
PrototypeLODLevel * lodLevel3
bool addBoundingVolume(int idx, PrototypeBoundingVolume *prototypeBoundingVolume)
Add bounding volume at given index.
void setDistanceShaderDistance(float distance)
Set distance shader distance.
PrototypePhysics * getPhysics()
void setModel(Model *model)
Set model.
void setTerrainMesh(bool terrainMesh)
Set terrain mesh.
PrototypeParticleSystem * getParticleSystemAt(int idx)
Get particle system at given index.
void setDistanceShader(const string &id)
Set distance shader.
const EntityShaderParameters & getDistanceShaderParameters()
Get distance shader parameters.
PrototypeLODLevel * lodLevel2
EntityShaderParameters distanceShaderParameters
int getBoundingVolumeCount()
void setShaderParameters(EntityShaderParameters ¶meters)
Set shader parameters.
int64_t getEnvironmentMapTimeRenderUpdateFrequency()
static constexpr int ID_NONE
PrototypeBoundingVolume * getBoundingVolume(int idx)
Get bounding volume at given index.
void setEnvironmentMapTimeRenderUpdateFrequency(int64_t frequency)
Set up environment map render update time frequency.
void setEmbedded(bool embedded)
Set embedded.
void removeBoundingVolume(int idx)
Remove bounding volume at given index.
bool removeParticleSystemAt(int idx)
Remove particle system at given index.
const string & getThumbnail()
PrototypeTerrain * getTerrain()
void setRenderGroups(bool renderGroups)
Set using render groups.
void setLODLevel2(PrototypeLODLevel *lodLevel)
Set LOD level 2.
const EntityShaderParameters & getShaderParameters()
Get shader parameters.
const string & getModelFileName()
int getEnvironmentMapRenderPassMask()
vector< PrototypeParticleSystem * > particleSystems
void setEnvironmentMapRenderPassMask(int renderPassMask)
Set up environment render pass mask.
void setModelFileName(const string &fileName)
Set model file name.
void setReceivesShadows(bool receivesShadows)
Enable/disable receives shadows.
vector< PrototypeAudio * > sounds
Prototype_Type * getType()
PrototypeImposterLOD * imposterLOD
bool renameSound(const string &id, const string &newId)
Renames sound of given sound id with new id.
void removeLODLevel(int lodLevel)
Remove LOD level.
Scene prototype library definition.