Maria GDK 5.0.0.738
Documentation of native code in develop branch
Loading...
Searching...
No Matches
Maria3D::ModelInstanceRenderer Class Reference

#include <M3DModelInstanceRenderer.h>

Inheritance diagram for Maria3D::ModelInstanceRenderer:
Maria3D::ISceneryModels

Public Member Functions

 ModelInstanceRenderer (const std::shared_ptr< Maria3D::ModelManager > &modelManager, const std::shared_ptr< LocalOrigin > &origin, const std::shared_ptr< STK::ShaderProgramManager > &shaderManager)
 
void findIntersectingModels (const QuadCoo &tile, unsigned short renderMask, std::vector< std::shared_ptr< ModelInstance > > &models) override
 
bool addModelInstance (const std::string &modelId, const std::string &instanceId, bool footprintMasking=false)
 
bool addModelInstance (const std::shared_ptr< STK::GraphicsModel > &model, const std::string &instanceId, bool footprintMasking=false)
 
void removeModelInstance (const std::string &instanceId)
 
void removeAllModelInstances ()
 
void setModelInstanceTransform (const std::string &instanceId, const BasicGeoTypes::GeoPos3D &pos, double roll=0.0, double pitch=0.0, double yaw=0.0, double scale=1.0)
 
void setModelInstanceBodyTransform (const std::string &instanceId, double tx, double ty, double tz, double roll, double pitch, double yaw, double scale=1.0)
 ‍** Set local body transform for the model instance. This transform is on
 
void setModelInstanceTransform (const std::string &instanceId, const STK::Vector3d &pos, const STK::Vector3d &tx, const STK::Vector3d &ty, const STK::Vector3d &tz, double scale=1.0)
 
void setModelInstanceMaskFootprint (const std::string &instanceId, bool footprintMask)
 
bool needsRedraw () const
 
void setDirty (bool dirty)
 
void getAllModels (std::vector< std::shared_ptr< STK::GraphicsModel > > &models)
 
void getVisibleModels (const STK::Camera &cam, std::vector< std::shared_ptr< STK::GraphicsModel > > &models)
 ‍** Get a list of models that intersect the given camera frustum.
 
virtual void findIntersectingModels (const QuadCoo &tile, unsigned short renderMask, std::vector< std::shared_ptr< ModelInstance > > &models)=0
 

Detailed Description

ModelInstanceRenderer - Simple renderer of instanced graphics models. There are no spatial search structures, so this class is not well suited for large numbers of models.

Member Function Documentation

◆ addModelInstance()

bool Maria3D::ModelInstanceRenderer::addModelInstance ( const std::string &  modelId,
const std::string &  instanceId,
bool  footprintMasking = false 
)

Add a 3D model instance. This will create an instance of the given 3D model. Returns true if successful, false if not (for example if the given instanceId is taken, or the modelId doesn't exist)

Parameters
footprintMaskingThis parameter indicates that the instance should cut out the terrain surface beneath it.

◆ findIntersectingModels()

void ModelInstanceRenderer::findIntersectingModels ( const QuadCoo tile,
unsigned short  renderMask,
std::vector< std::shared_ptr< ModelInstance > > &  models 
)
overridevirtual

Find all active models that intersect the given bounding box in Google Mercator coordinates.

Implements Maria3D::ISceneryModels.

◆ getAllModels()

void ModelInstanceRenderer::getAllModels ( std::vector< std::shared_ptr< STK::GraphicsModel > > &  models)

Get a list of all model instances.


The documentation for this class was generated from the following files: