Graphics::IModelWorld class

A model world is a space where models can be rendered in the game.

Model worlds keep track of all the models loaded in order to render them when the model world itself is rendered. A world can also contain multiple lighting worlds; for more information, check the ILightingWorld interface. When no lighting worlds are added a default lighting is used.

In order for the model world to render, you must add it to the render queue. This step is not necessary if the ILayer::Render() method is called directly from another renderer. For example: Renderer.AddLayer(modelWorld->AsLayer(), 8); You might use greater render layer indices, like Graphics::kRenderQueueMain + 1. An example of this would be having a model world for translucid objects, which need to be rendered last.

Derived classes

class cModelWorld

Public types

enum ModelWorldFlags { kBuildDrawLists = 0x00000100, kUpdateLOD = 0x00000200, kUseOccluders = 0x00000400, kSetState = 0x00000800, kDrawOpaque = 0x00001000, kDrawAlpha = 0x00002000, kDrawDebug = 0x00004000, kNoSort = 0x00008000, kForceOpaque = 0x00010000, kRenderAll = 0x00007f00, kRenderAllNoLOD = 0x00007d00 }

Constructors, destructors, conversion operators

~IModelWorld() virtual

Public functions

auto AddRef() -> int pure virtual
auto Release() -> int pure virtual
auto CreateModel(uint32_t instanceID, uint32_t groupID, int arg_8 = 0) -> Model* pure virtual
Loads a model from the resources system with the given instance and group ID.
auto GetNumModelsLoading() -> int pure virtual
Return the number of models that are currently loading.
auto CallOnLoad(Model* model, ModelPredicate_t callback, void* data) -> bool pure virtual
Calls the given function when the model finishes loading, calling it immediately if the model has already loaded.
auto PreloadModels(App::PropertyList* propList, int preloadIndex) -> void pure virtual
Reads a list of models and sets them to load.
auto ModelsHavePreloaded(int preloadIndex) -> bool pure virtual
Returns whether a given model preload list has finished loading all models.
auto CreateGroup(int, void*&) -> void* pure virtual
auto FindFirstModelAlongLine(const Vector3& point1, const Vector3& point2, float* factorDst = nullptr, Vector3* dstIntersectionPoint = nullptr, Vector3* = nullptr, FilterSettings& settings = FilterSettings(), int* = nullptr, int* = nullptr) -> Model* pure virtual
Gets the first model that is intersected with the segment between point1 and point2.
auto FindFirstModelAlongLine2(const Vector3& point1, const Vector3& point2, float* factorDst, FilterSettings& settings = FilterSettings()) -> Model* pure virtual
auto FindModels(eastl::vector<Model*>& dst, FilterSettings& settings = FilterSettings()) -> bool pure virtual
Gets all the models that fit the filter.
auto FindModelsAlongLineOrdered(const Vector3& point1, const Vector3& point2, eastl::vector<eastl::pair<Model*, float>>& result, FilterSettings& settings = FilterSettings(), float = 0.0) -> bool pure virtual
Gets all the models that intersect with a segment.
auto FindModelsAlongLine(const Vector3& point1, const Vector3& point2, eastl::vector<Model*>& result, FilterSettings& settings = FilterSettings(), float = 0.0) -> bool pure virtual
Gets all the models that intersect with a segment.
auto FindModelsInSphere(const Vector3& center, float radius, eastl::vector<Model*> result, FilterSettings& settings = FilterSettings()) -> bool pure virtual
Finds all the models that intersect with the sphere with center and radius.
auto FindModelsInBox(const BoundingBox& bbox, eastl::vector<Model*>& result, FilterSettings& settings = FilterSettings()) -> bool pure virtual
Finds all the models that intersect with the given bounding box.
auto FindModelsInFrustum(const cFrustumCull& frustum, eastl::vector<Model*> result, FilterSettings& settings = FilterSettings()) -> bool pure virtual
Finds all the models that intersect with the given frustum.
auto PickAgainstModel(const Vector3& linePoint1, const Vector3& linePoint2, Model* model, float& dstFactor, FilterSettings& settings = FilterSettings()) -> bool pure virtual
Intersects a line segment with a model, and gives the point in the segment that intersected with the model.
auto SphereIntersectsModel(const Vector3& center, float radius, Model* model, FilterSettings& settings = FilterSettings()) -> bool pure virtual
Returns true if the sphere with center and radius intersects with the model.
auto BoxIntersectsModel(const BoundingBox& bbox, Model* model, FilterSettings& settings = FilterSettings()) -> bool pure virtual
Returns true if the given bounding box intersects with the model.
auto GetModelResourceIDs(Model* model, uint32_t* pDstInstanceID, uint32_t* pDstGroupID) -> void pure virtual
Used to get the instance and group ID of the given model.
auto GetRegionList(Model* model, eastl::vector<uint32_t>& dst) -> void pure virtual
Gets all the region codes present in this model; to be precise, it gets all the values of the 'region' shader data of the materials in the model.
auto StallUntilLoaded(Model* model) -> void pure virtual
Ensures the given model is loaded and all its parameters are updated.
auto GetBoundingRadius(Model* model) -> float pure virtual
Returns the model bounding radius, calling StallUntilLoaded() if the model does not have the 'overrideBoundingRadius' property.
auto GetBoundingBox(Model* model) -> const BoundingBox& pure virtual
Returns the model bounding box, calling StallUntilLoaded() if the model does not have the 'overrideBoundingBox' property.
auto GetNumAnimationGroups() -> int pure virtual
Returns the amount of animation groups.
auto GetNumAnimations(Model* model, int animationGroup = 0) const -> int pure virtual
Returns the amount of animations contained in the model.
auto GetAnimationIDs(Model* model, uint32_t* dst, int animationGroup = 0) const -> int pure virtual
Used to get the IDs of the animations contained in the model.
auto AnimAction(Model* model, uint32_t animID, int arg3 = 3, float arg4 = 0.0, int animationGroup = 0) -> void pure virtual
Sets the current playing animation of a model.
auto MoveToTime(Model* model, uint32_t animID, float time, int animationGroup = 0) -> void pure virtual
Changes the current time of an animation in the model.
auto SetWeight(Model* model, uint32_t animID, float weight, int animationGroup = 0) -> void pure virtual
Changes the blending weight of a model animation (that is, how much it combines/blends with other animations, default is 1.0)
auto SetTimeScale(Model* model, float timeScale) const -> void pure virtual
Changes the animation time scale of the model, 1.0 is the default.
auto GetAnimationRange(Model* model, uint32_t animID, float& dstStart, float& dstEnd, int = 0) const -> bool pure virtual
Used to get the start and end time of an animation in the model, in seconds.
auto GetNumBones(Model* model) const -> int pure virtual
Returns the number of animation bones in the given model.
auto GetPoseTransforms(Model* model, RenderWare::cMDBoneTransform* dst, bool original = false) const -> int pure virtual
auto GetBoneTransforms(Model* model, RenderWare::cMDBoneTransform* dst) -> int pure virtual
auto GetBoneIDs(Model* model, uint32_t* dst) -> int pure virtual
Used to obtain the IDs of the animation bones in the given model.
auto GetBoneParents(Model* model, int* dst) -> int pure virtual
Used to obtain the index to the parent of each animation bone in a model (-1 means it is the root and has no parent).
auto SetBoneTable(Model* model, int arg1, RenderWare::cMDBoneTransform* boneTable) -> void pure virtual
auto SetBoneCallback(Model* model, BoneCallback_t callback, void* data = nullptr, int boneIndex = -1, int arg5 = 0) -> int pure virtual
Sets a function that is executed for a bone or all bones (when playing an animation?)
auto SetAnimationGroupTransform(Model* model, int animationGroup, const Transform& transform) -> void pure virtual
Sets the transform of a model animation group.
auto SetMaterialInfo(Model* model, cMaterialInfo* pMaterialInfo, int region = -1) const -> void pure virtual
auto GetMaterialInfo(Model* model, int region = -1) const -> cMaterialInfo* pure virtual
auto SetDynamicDraw(Model* model, void* pDynamicDraw, bool arg3) -> void pure virtual
auto GetNumLODs(Model* model) const -> int pure virtual
Returns how many mesh versions this model has, which depend on the level of detail (LOD).
auto SetLOD(Model* model, int lod) const -> void pure virtual
Forces the model to use a certain lod level, or restores it to the default (which is changing lod level depending on distance).
auto SetEffectRange(Model* model, double effectRange = -1.0f) const -> void pure virtual
Sets the effect range for the model.
auto SetLODScale(float scale) -> void pure virtual
auto GetLODScale() -> float pure virtual
auto SetEffectsRunning(Model* model, bool enable, bool startStop, uint32_t instanceID = 0) const -> void pure virtual
Enables or disables the effects in the model.
auto SetFloatParams(Model* model, Swarm::FloatParams param, const float* data, int count, uint32_t instanceID = 0) const -> bool pure virtual
Changes parameters of effects in a model.
auto SetIntParams(Model* model, Swarm::IntParams param, const int* data, int count, uint32_t instanceID = 0) const -> bool pure virtual
Changes parameters of effects in a model.
auto SetUnknownParams(Model* model, Swarm::ObjectParams param, Object* data, uint32_t instanceID = 0) const -> bool pure virtual
Changes parameters of effects in a model.
auto SetExternalEffectsTransform(Model* model, const Transform* pTransform = nullptr, uint32_t instanceID = 0) -> void pure virtual
auto GetHull(Model* model, cMWHull& hull) -> void pure virtual
auto GetTransformedHull(Model* model, cMWTransformedHull*& hull) -> void pure virtual
auto ReleaseTransformedHull(Model* model, cMWTransformedHull*& hull) -> void pure virtual
auto GetHullBoundingBox(Model* model, BoundingBox& dst) const -> void pure virtual
Gets the bounding box of the hull (collision) model.
auto GetDeformationHandles(Model* model, MorphHandleInfo* dst, int count) -> int pure virtual
auto GetDeformationAnimationIDs(Model* model, uint32_t* dst, int animationGroup = 0) -> int pure virtual
Obtain the animation ID of all the deformation handles in the model.
auto GetBakedMeshes(Model* model, eastl::vector<cMeshDataPtr>& dst, const Transform& transform) -> bool pure virtual
auto GetBakedMeshes2(Model* model, eastl::vector<cMeshDataPtr>& dst) -> bool pure virtual
auto GetMeshes(Model* model, eastl::vector<cMeshDataPtr>& dst, const Transform& transform) -> bool pure virtual
auto GetBakedMeshesUnscaled(Model* model, eastl::vector<cMeshDataPtr>& dst, const Transform& transform) -> bool pure virtual
auto GetRuntimeMeshes(Model* model, eastl::vector<cMeshDataPtr>& dst, RenderWare::RenderWareFile*, void*, void*) -> int pure virtual
auto GetRuntimeModel(Model* model, void** dst, const ResourceKey& key) -> int pure virtual
auto GetMeshTransform(Model* model) -> Transform* pure virtual
Returns default transform stored in the prop file of the model.
auto UpdatePickMesh(Model* model, BoundingBox* dstBbox = nullptr) -> bool pure virtual
auto UpdateHullPickMesh(Model* model, BoundingBox* dstBbox = nullptr) -> bool pure virtual
auto GetPickMeshTri(Model* model, int, void** dst, bool useHull) -> bool pure virtual
auto GetPickMeshTriPositions(Model* model, int, Vector3& dst1, Vector3& dst2, Vector3& dst3) -> bool pure virtual
auto SetRenderGroups(const eastl::bitset<64>&, const eastl::bitset<64>&) -> void pure virtual
auto GetRenderGroups(eastl::bitset<64>& dst1, eastl::bitset<64>& dst2) -> void pure virtual
auto SetRenderSetInfo(int indexDrawSet, int info1, int info2) -> void pure virtual
auto GetRenderSetInfo(int indexDrawSet, int* dst1, int* dst2) -> void pure virtual
auto SetWorldType(int worldType) -> void pure virtual
auto GetWorldType() -> int pure virtual
auto SetActive(bool active) -> void pure virtual
Toggles the visibility of all the world, including the lighting and all the models contained.
auto GetActive() -> bool pure virtual
auto AsLayer() -> ILayer* pure virtual
Returns the ILayer object that can be used to render this model world.
auto SetLightingWorld(ILightingWorld* pWorld, int indexDrawSet, bool drawShadows) -> int pure virtual
auto GetLightingWorld(int indexDrawSet) -> ILightingWorld* pure virtual
auto SetEffectsWorld(Swarm::IEffectsWorld*) -> int pure virtual
auto GetEffectsWorld() -> Swarm::IEffectsWorld* pure virtual
auto SetWorldBounds(const BoundingBox& bbox, float, float) -> void pure virtual
auto SetHorizonCullFactor(float factor) -> void pure virtual
auto AddOccluder(const Vector3& position, float radius) -> int pure virtual
auto UpdateOccluder(int index, const Vector3& position, float radius) -> void pure virtual
auto RemoveOccluder(int index) -> void pure virtual
auto func164h() -> void pure virtual
auto GetArenaResource(Model* model) -> RenderWare::RenderWareFile* pure virtual
auto SetInWorld(Model* model, bool visible) -> bool pure virtual
Changes the visibility of a given model inside this world.
auto FinalRelease(Model* model, bool) -> void pure virtual
auto Initialize() -> bool pure virtual
auto Dispose() -> bool pure virtual
auto UpdateHull(Model* model, cMWTransformedHull* hull) -> void pure virtual

Protected functions

auto LoadModelProperties(const App::PropertyList* pPropList, cMWModelInternal* pAsset, int nFlags, int arg_C) -> void

Function documentation

Model* Graphics::IModelWorld::CreateModel(uint32_t instanceID, uint32_t groupID, int arg_8 = 0) pure virtual

Loads a model from the resources system with the given instance and group ID.

Parameters
instanceID
groupID
arg_8

Keep in mind that a model refers to the configuration file (i.e. the .prop file) which includes the model files for each level of detail, the effects that must be used, etc. If the model configuration does not exist, a builtin model might be used.

bool Graphics::IModelWorld::CallOnLoad(Model* model, ModelPredicate_t callback, void* data) pure virtual

Calls the given function when the model finishes loading, calling it immediately if the model has already loaded.

Parameters
model
callback
data Argument that is passed to the callback function.

void Graphics::IModelWorld::PreloadModels(App::PropertyList* propList, int preloadIndex) pure virtual

Reads a list of models and sets them to load.

Parameters
propList
preloadIndex

bool Graphics::IModelWorld::ModelsHavePreloaded(int preloadIndex) pure virtual

Returns whether a given model preload list has finished loading all models.

Parameters
preloadIndex

Model* Graphics::IModelWorld::FindFirstModelAlongLine(const Vector3& point1, const Vector3& point2, float* factorDst = nullptr, Vector3* dstIntersectionPoint = nullptr, Vector3* = nullptr, FilterSettings& settings = FilterSettings(), int* = nullptr, int* = nullptr) pure virtual

Gets the first model that is intersected with the segment between point1 and point2.

Returns The closest model that intersected, or nullptr if no model intersected the ray.

bool Graphics::IModelWorld::FindModels(eastl::vector<Model*>& dst, FilterSettings& settings = FilterSettings()) pure virtual

Gets all the models that fit the filter.

Parameters
dst
settings Settings that decide which models are valid.
Returns True if any model intersected, false otherwise.

By default, the filter accepts all models.

bool Graphics::IModelWorld::FindModelsAlongLineOrdered(const Vector3& point1, const Vector3& point2, eastl::vector<eastl::pair<Model*, float>>& result, FilterSettings& settings = FilterSettings(), float = 0.0) pure virtual

Gets all the models that intersect with a segment.

Parameters
point1 The start of the ray.
point2 The end of the ray.
result The vector where the { model, factor } pairs will be added.
settings Settings that decide which models are valid.
Returns True if any model intersected, false otherwise.

It adds them in the vector ordered by distance to point1; the vector will contains pairs of model and a float, the proportion between the two points where it intersected.

bool Graphics::IModelWorld::FindModelsAlongLine(const Vector3& point1, const Vector3& point2, eastl::vector<Model*>& result, FilterSettings& settings = FilterSettings(), float = 0.0) pure virtual

Gets all the models that intersect with a segment.

Parameters
point1 The start of the ray.
point2 The end of the ray.
result The vector where the models will be added.
settings Settings that decide which models are valid.
Returns True if any model intersected, false otherwise.

bool Graphics::IModelWorld::FindModelsInSphere(const Vector3& center, float radius, eastl::vector<Model*> result, FilterSettings& settings = FilterSettings()) pure virtual

Finds all the models that intersect with the sphere with center and radius.

Parameters
center The center point of the sphere.
radius The radius of the sphere.
result The vector where the models will be added.
settings Settings that decide which models are valid and which collision mode is used.
Returns True if any model intersected, false otherwise.

bool Graphics::IModelWorld::FindModelsInBox(const BoundingBox& bbox, eastl::vector<Model*>& result, FilterSettings& settings = FilterSettings()) pure virtual

Finds all the models that intersect with the given bounding box.

Parameters
bbox The bounding box to check.
result The vector where the models will be added.
settings Settings that decide which models are valid and which collision mode is used.
Returns True if any model intersected, false otherwise.

bool Graphics::IModelWorld::FindModelsInFrustum(const cFrustumCull& frustum, eastl::vector<Model*> result, FilterSettings& settings = FilterSettings()) pure virtual

Finds all the models that intersect with the given frustum.

Parameters
frustum The frustum to check.
result The vector where the models will be added.
settings Settings that decide which models are valid and which collision mode is used.
Returns True if any model intersected, false otherwise.

bool Graphics::IModelWorld::PickAgainstModel(const Vector3& linePoint1, const Vector3& linePoint2, Model* model, float& dstFactor, FilterSettings& settings = FilterSettings()) pure virtual

Intersects a line segment with a model, and gives the point in the segment that intersected with the model.

Parameters
linePoint1 Start point of the segment
linePoint2 End point of the segment
model The model to check
dstFactor out If the model intersected, this will be the factor of the segment where it intersected, where 0.0 is the start point and 1.0 the end point.
settings Settings that decide which models are valid and which collision mode is used.
Returns True if the model intersected at some point in the segment, false otherwise.

bool Graphics::IModelWorld::SphereIntersectsModel(const Vector3& center, float radius, Model* model, FilterSettings& settings = FilterSettings()) pure virtual

Returns true if the sphere with center and radius intersects with the model.

Parameters
center The center point of the sphere.
radius The radius of the sphere.
model The model to intersect with.
settings Settings that decide which models are valid and which collision mode is used.
Returns True if the model intersects with the bbox, false otherwise.

bool Graphics::IModelWorld::BoxIntersectsModel(const BoundingBox& bbox, Model* model, FilterSettings& settings = FilterSettings()) pure virtual

Returns true if the given bounding box intersects with the model.

Parameters
bbox The bounding box to check.
model The model to intersect with.
settings Settings that decide which models are valid and which collision mode is used.
Returns True if the model intersects with the bbox, false otherwise.

void Graphics::IModelWorld::GetModelResourceIDs(Model* model, uint32_t* pDstInstanceID, uint32_t* pDstGroupID) pure virtual

Used to get the instance and group ID of the given model.

Parameters
model The model.
pDstInstanceID [Optional] Reference to the destination variable for the instance ID.
pDstGroupID [Optional] Reference to the destination variable for the group ID.

void Graphics::IModelWorld::GetRegionList(Model* model, eastl::vector<uint32_t>& dst) pure virtual

Gets all the region codes present in this model; to be precise, it gets all the values of the 'region' shader data of the materials in the model.

Parameters
model
dst

void Graphics::IModelWorld::StallUntilLoaded(Model* model) pure virtual

Ensures the given model is loaded and all its parameters are updated.

Parameters
model

float Graphics::IModelWorld::GetBoundingRadius(Model* model) pure virtual

Returns the model bounding radius, calling StallUntilLoaded() if the model does not have the 'overrideBoundingRadius' property.

Parameters
model
Returns The bounding radius.

const BoundingBox& Graphics::IModelWorld::GetBoundingBox(Model* model) pure virtual

Returns the model bounding box, calling StallUntilLoaded() if the model does not have the 'overrideBoundingBox' property.

Parameters
model
Returns The bounding box.

int Graphics::IModelWorld::GetNumAnimations(Model* model, int animationGroup = 0) const pure virtual

Returns the amount of animations contained in the model.

Parameters
model
animationGroup

int Graphics::IModelWorld::GetAnimationIDs(Model* model, uint32_t* dst, int animationGroup = 0) const pure virtual

Used to get the IDs of the animations contained in the model.

Parameters
model
dst out
animationGroup

dst must be an array of the size returned by GetAnimCount()

void Graphics::IModelWorld::AnimAction(Model* model, uint32_t animID, int arg3 = 3, float arg4 = 0.0, int animationGroup = 0) pure virtual

Sets the current playing animation of a model.

Parameters
model
animID
arg3
arg4
animationGroup

void Graphics::IModelWorld::MoveToTime(Model* model, uint32_t animID, float time, int animationGroup = 0) pure virtual

Changes the current time of an animation in the model.

Parameters
model
animID
time
animationGroup

The time must be in the range returned by GetAnimationRange()

void Graphics::IModelWorld::SetWeight(Model* model, uint32_t animID, float weight, int animationGroup = 0) pure virtual

Changes the blending weight of a model animation (that is, how much it combines/blends with other animations, default is 1.0)

Parameters
model
animID
weight
animationGroup

void Graphics::IModelWorld::SetTimeScale(Model* model, float timeScale) const pure virtual

Changes the animation time scale of the model, 1.0 is the default.

Parameters
model
timeScale

bool Graphics::IModelWorld::GetAnimationRange(Model* model, uint32_t animID, float& dstStart, float& dstEnd, int = 0) const pure virtual

Used to get the start and end time of an animation in the model, in seconds.

Parameters
model
animID
dstStart out
dstEnd out

The length of the animation can be calculated with dstEnd - dstStart.

int Graphics::IModelWorld::GetNumBones(Model* model) const pure virtual

Returns the number of animation bones in the given model.

Parameters
model
Returns

int Graphics::IModelWorld::GetBoneIDs(Model* model, uint32_t* dst) pure virtual

Used to obtain the IDs of the animation bones in the given model.

Parameters
model
dst out Array of uint32_t of enough size (GetNumBones()), the IDs will be written here
Returns The number of bones

int Graphics::IModelWorld::GetBoneParents(Model* model, int* dst) pure virtual

Used to obtain the index to the parent of each animation bone in a model (-1 means it is the root and has no parent).

Parameters
model
dst out Array of int of enough size (GetNumBones()), the parent indices will be written here
Returns The number of bones

int Graphics::IModelWorld::SetBoneCallback(Model* model, BoneCallback_t callback, void* data = nullptr, int boneIndex = -1, int arg5 = 0) pure virtual

Sets a function that is executed for a bone or all bones (when playing an animation?)

Parameters
model
callback
data
boneIndex
arg5

void Graphics::IModelWorld::SetAnimationGroupTransform(Model* model, int animationGroup, const Transform& transform) pure virtual

Sets the transform of a model animation group.

Parameters
model
animationGroup
transform

int Graphics::IModelWorld::GetNumLODs(Model* model) const pure virtual

Returns how many mesh versions this model has, which depend on the level of detail (LOD).

Parameters
model

void Graphics::IModelWorld::SetLOD(Model* model, int lod) const pure virtual

Forces the model to use a certain lod level, or restores it to the default (which is changing lod level depending on distance).

Parameters
model The model to change.
lod The level of detail t use, between 0 and 3. If -1 is used, the lod will be decided by distance.

void Graphics::IModelWorld::SetEffectRange(Model* model, double effectRange = -1.0f) const pure virtual

Sets the effect range for the model.

Parameters
model
effectRange

If the value is negative, effect range will be ignored, so effects in this model will be displayed at any distance. Otherwise, the value is ignored, and the effect range is loaded from the model .prop file.

void Graphics::IModelWorld::SetEffectsRunning(Model* model, bool enable, bool startStop, uint32_t instanceID = 0) const pure virtual

Enables or disables the effects in the model.

Parameters
model
enable If true, effects will be enabled
startStop
instanceID [Optional] If not 0, only effects with this ID will be changed.

An instance ID can be specified; in that case, only effects with that ID will be affected.

bool Graphics::IModelWorld::SetFloatParams(Model* model, Swarm::FloatParams param, const float* data, int count, uint32_t instanceID = 0) const pure virtual

Changes parameters of effects in a model.

Parameters
model
param
data
count
instanceID [Optional] If not 0, only effects with this ID will be changed.
Returns

bool Graphics::IModelWorld::SetIntParams(Model* model, Swarm::IntParams param, const int* data, int count, uint32_t instanceID = 0) const pure virtual

Changes parameters of effects in a model.

Parameters
model
param
data
count
instanceID [Optional] If not 0, only effects with this ID will be changed.
Returns

bool Graphics::IModelWorld::SetUnknownParams(Model* model, Swarm::ObjectParams param, Object* data, uint32_t instanceID = 0) const pure virtual

Changes parameters of effects in a model.

Parameters
model
param
data
instanceID [Optional] If not 0, only effects with this ID will be changed.
Returns

void Graphics::IModelWorld::GetHullBoundingBox(Model* model, BoundingBox& dst) const pure virtual

Gets the bounding box of the hull (collision) model.

Parameters
model
dst

int Graphics::IModelWorld::GetDeformationAnimationIDs(Model* model, uint32_t* dst, int animationGroup = 0) pure virtual

Obtain the animation ID of all the deformation handles in the model.

Parameters
model
dst out
animationGroup
Returns The number of IDs written

Transform* Graphics::IModelWorld::GetMeshTransform(Model* model) pure virtual

Returns default transform stored in the prop file of the model.

Parameters
model

bool Graphics::IModelWorld::SetInWorld(Model* model, bool visible) pure virtual

Changes the visibility of a given model inside this world.

Parameters
model The model to set visible/invisible, which must be included inside this world.
visible Whether the model must be visible or not.