Maria GDK 5.0.0.738
Documentation of native code in develop branch
Loading...
Searching...
No Matches
STK::GraphicsModel Class Referenceabstract

#include <StkGraphicsModel.h>

Inheritance diagram for STK::GraphicsModel:
Maria3D::Globe Maria3D::ManagedGraphicsModel Maria3D::SymbolModel STK::GraphicsModelGroup STK::GraphicsModelInstance STK::LODGraphicsModel STK::MeshGraphicsModel Maria3D::FrustumModel Maria3D::ObserverModel STK::AxisModel STK::BillboardRenderItem STK::MarkerObject Maria::EntityBadge3D STK::TextLabel3D Maria3D::PointSymbolLabel

Public Types

using filter_fn = std::function< bool(const GraphicsModel &)>
 

Public Member Functions

 GraphicsModel (const std::string &name="")
 
void setName (const std::string &name)
 
const std::string & getName () const
 
virtual void filterChildren (const filter_fn &fn, std::vector< std::shared_ptr< GraphicsModel > > &matched)
 
void setTransform (const STK::Matrix4x4f &transform)
 
const STK::Matrix4x4fgetTransform () const
 
void setEnvironmentMap (const std::shared_ptr< STK::CubeMap > &env_map)
 
std::shared_ptr< STK::CubeMapgetEnvironmentMap ()
 
std::shared_ptr< const STK::CubeMapgetEnvironmentMap () const
 
void setWireframe (bool wireframe)
 
bool getWireframe () const
 
void setInvisible (bool invisible)
 
bool getInvisible () const
 
void setCastShadows (bool cast_shadows)
 
bool getCastShadows () const
 
void setDebugGraphics (bool debug_gfx)
 
bool getDebugGraphics () const
 
virtual void redraw (const STK::Camera &cam, const STK::Viewport &vp, int render_mask=STK::OpaqueMask, const std::vector< std::shared_ptr< STK::Uniform > > *uniforms=nullptr)=0
 
virtual void drawShadowMap (const STK::Camera &cam, const STK::Viewport &vp, const STK::Camera &shd_cam, const STK::Viewport &shd_vp, STK::ShaderProgram *shader, STK::ShaderProgram *tex_shader)=0
 
virtual void calcBoundingSphere (STK::Vector3f &center, double &radius)=0
 
virtual void calcBoundingBox (STK::Vector3f &min, STK::Vector3f &max)=0
 

Protected Attributes

std::string name_
 
STK::Matrix4x4f transform_
 
std::shared_ptr< STK::CubeMapenv_map_
 
bool wireframe_
 
bool invisible_
 
bool cast_shadows_
 
bool debug_gfx_
 

Detailed Description

GraphicsModel - Short description. Detailed description.

Member Typedef Documentation

◆ filter_fn

using STK::GraphicsModel::filter_fn = std::function<bool(const GraphicsModel&)>

A filter function, used to filter out which children we want out. Return true to include model

Member Function Documentation

◆ filterChildren()

virtual void STK::GraphicsModel::filterChildren ( const filter_fn fn,
std::vector< std::shared_ptr< GraphicsModel > > &  matched 
)
inlinevirtual

Append the children that match the filter function to the matched argument.

Reimplemented in STK::GraphicsModelGroup, and STK::LODGraphicsModel.

◆ getTransform()

const STK::Matrix4x4f & STK::GraphicsModel::getTransform ( ) const
inline

Global model transform. This transform places the grapics model in world space. For moving objects, this transform is updated often. For more static transforms, use the root node.

◆ setEnvironmentMap()

void STK::GraphicsModel::setEnvironmentMap ( const std::shared_ptr< STK::CubeMap > &  env_map)
inline

Set environment map for this model. If set, will activate the environment map for all shaders with the defined uniform.

◆ setTransform()

void STK::GraphicsModel::setTransform ( const STK::Matrix4x4f transform)
inline

Global model transform. This transform places the grapics model in world space. For moving objects, this transform is updated often. For more static transforms, use the root node.


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