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

#include <StkMeshNode.h>

Public Types

using filter_fn = std::function< bool(const MeshNode &)>
 A filter function used to search through the tree. Return true on nodes that should be returned.
 

Public Member Functions

 MeshNode (MeshGraphicsModel *model, const std::string &name="")
 
void setName (const std::string &name)
 
const std::string & getName () const
 
void setTransform (const STK::Matrix4x4f &transform)
 
const STK::Matrix4x4fgetTransform () const
 
const STK::Matrix4x4fgetGlobalTransform () const
 The global transform is the combined transform of this node and its parents.
 
void update (const STK::Matrix4x4f &m)
 
void addMesh (const std::shared_ptr< Mesh > &mesh)
 
void addChild (const std::shared_ptr< MeshNode > &mesh_node)
 
const auto & getMeshes () const
 
auto & getMeshes ()
 
const auto & getChildren () const
 
auto & getChildren ()
 
std::shared_ptr< MeshNoderefCopy (STK::MeshGraphicsModel *model, std::map< MeshNode *, std::shared_ptr< MeshNode > > &node_map)
 
bool visible () const
 
void setVisible (const bool visible)
 

Static Public Member Functions

static void findMeshNodes (const filter_fn &fn, const std::shared_ptr< MeshNode > &root, std::vector< std::shared_ptr< MeshNode > > &nodes)
 

Protected Attributes

MeshGraphicsModelmodel_
 
std::string name_
 
STK::Matrix4x4f transform_
 
STK::Matrix4x4f global_transform_
 
std::vector< std::shared_ptr< MeshNode > > children_
 
std::vector< std::shared_ptr< Mesh > > meshes_
 
bool visible_
 

Detailed Description

MeshNode - A transformation node containing one or more meshes.

Member Function Documentation

◆ refCopy()

std::shared_ptr< MeshNode > MeshNode::refCopy ( STK::MeshGraphicsModel model,
std::map< MeshNode *, std::shared_ptr< MeshNode > > &  node_map 
)

Copy the node (semi-shallow) The nodes are constructed with the supplied model as parameter. This method makes deep copies of the node itself so that it can have unique transformations. It also copies the meshes, but with references to shared mesh data.


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