Nebula
Loading...
Searching...
No Matches
Models::PrimitiveNode Class Reference

#include <primitivenode.h>

Inherits Models::ShaderStateNode.

Inherited by Models::CharacterSkinNode.

Classes

struct  LoadContext

Public Member Functions

 PrimitiveNode ()
 constructor
virtual ~PrimitiveNode ()
 destructor
uint GetPrimitiveGroupIndex () const
 Get the nodes primitive group index.
uint GetMeshIndex () const
 Get the mesh index.
const CoreGraphics::PrimitiveGroupGetPrimitiveGroup () const
 Get primitive group.
CoreGraphics::MeshId GetMesh () const
 Get primitives mesh id.
Resources::ResourceId GetMeshResource () const
 Get mesh resource.
Public Member Functions inherited from Models::ShaderStateNode
 ShaderStateNode ()
 constructor
virtual ~ShaderStateNode ()
 destructor
const Materials::MaterialId GetMaterial () const
 get surface
Public Member Functions inherited from Models::TransformNode
 TransformNode ()
 constructor
virtual ~TransformNode ()
 destructor
void GetLODDistances (float &minDistance, float &maxDistance)
 Get LOD distances.
Public Member Functions inherited from Models::ModelNode
 ModelNode ()
 constructor
virtual ~ModelNode ()
 destructor
const Util::Array< ModelNode * > & GetChildren () const
 return constant reference to children
const NodeType GetType () const
 get type of node
const NodeBits GetBits () const
 get feature bits of node
virtual bool GetImplicitHierarchyActivation () const
 return true if all children should create hierarchies upon calling CreateInstance
const Util::StringAtomGetName () const
 return name
const uint32_t HashCode () const
 get hash
virtual std::function< void(const CoreGraphics::CmdBufferId)> GetApplyFunction ()
 Get function to apply node.
virtual std::function< const CoreGraphics::PrimitiveGroup()> GetPrimitiveGroupFunction ()
 Get function to fetch primitive group.

Protected Member Functions

virtual bool Load (const Util::FourCC &fourcc, const Util::StringAtom &tag, const Ptr< IO::BinaryReader > &reader, bool immediate) override
 load primitive
virtual void Unload () override
 unload data
virtual void OnFinishedLoading (ModelStreamingData *streamingData) override
 called once when all pending resource have been loaded
Protected Member Functions inherited from Models::ShaderStateNode
bool Load (const Util::FourCC &fourcc, const Util::StringAtom &tag, const Ptr< IO::BinaryReader > &reader, bool immediate) override
 load shader state
Protected Member Functions inherited from Models::ModelNode
virtual void Discard ()
 discard node

Protected Attributes

Resources::ResourceName meshResource
Resources::ResourceId res
CoreGraphics::MeshId mesh
struct Models::PrimitiveNode::LoadContext loadContext
CoreGraphics::BufferId vbo
CoreGraphics::BufferId ibo
IndexT baseVboOffset
IndexT attributesVboOffset
IndexT iboOffset
CoreGraphics::IndexType::Code indexType
CoreGraphics::PrimitiveTopology::Code topology
CoreGraphics::PrimitiveGroup primGroup
CoreGraphics::VertexLayoutId vertexLayout
Protected Attributes inherited from Models::ShaderStateNode
Resources::ResourceId materialRes
Materials::MaterialId material
Resources::ResourceName materialName
Util::FixedArray< CoreGraphics::ResourceTableIdresourceTables
Protected Attributes inherited from Models::TransformNode
Math::vec3 position
Math::quat rotate
Math::vec3 scale
Math::vec3 rotatePivot
Math::vec3 scalePivot
bool isInViewSpace
float minDistance
float maxDistance
bool useLodDistances
bool lockedToViewer
Protected Attributes inherited from Models::ModelNode
Util::StringAtom name
NodeType type
NodeBits bits
Models::ModelNodeparent
Util::Array< Models::ModelNode * > children
Math::bbox boundingBox
Util::StringAtom tag
IndexT uniqueId

Friends

class ModelLoader

Additional Inherited Members

Static Public Member Functions inherited from Models::ShaderStateNode
static Util::FixedArray< CoreGraphics::ResourceTableIdCreateResourceTables ()
 Create resource table.
Static Public Attributes inherited from Models::ShaderStateNode
static const uint NumMaxOffsets = 4
Static Protected Attributes inherited from Models::ModelNode
static IndexT ModelNodeUniqueIdCounter = 0

Constructor & Destructor Documentation

◆ PrimitiveNode()

Models::PrimitiveNode::PrimitiveNode ( )

constructor

◆ ~PrimitiveNode()

Models::PrimitiveNode::~PrimitiveNode ( )
virtual

destructor

Member Function Documentation

◆ GetMesh()

CoreGraphics::MeshId Models::PrimitiveNode::GetMesh ( ) const
inline

Get primitives mesh id.

◆ GetMeshIndex()

uint Models::PrimitiveNode::GetMeshIndex ( ) const
inline

Get the mesh index.

◆ GetMeshResource()

Resources::ResourceId Models::PrimitiveNode::GetMeshResource ( ) const
inline

Get mesh resource.

◆ GetPrimitiveGroup()

const CoreGraphics::PrimitiveGroup & Models::PrimitiveNode::GetPrimitiveGroup ( ) const
inline

Get primitive group.

◆ GetPrimitiveGroupIndex()

uint Models::PrimitiveNode::GetPrimitiveGroupIndex ( ) const
inline

Get the nodes primitive group index.

◆ Load()

bool Models::PrimitiveNode::Load ( const Util::FourCC & fourcc,
const Util::StringAtom & tag,
const Ptr< IO::BinaryReader > & reader,
bool immediate )
overrideprotectedvirtual

load primitive

Reimplemented from Models::TransformNode.

Reimplemented in Models::CharacterSkinNode.

◆ OnFinishedLoading()

void Models::PrimitiveNode::OnFinishedLoading ( ModelStreamingData * streamingData)
overrideprotectedvirtual

called once when all pending resource have been loaded

Reimplemented from Models::ShaderStateNode.

Reimplemented in Models::CharacterSkinNode.

◆ Unload()

void Models::PrimitiveNode::Unload ( )
overrideprotectedvirtual

unload data

Reimplemented from Models::ShaderStateNode.

◆ ModelLoader

friend class ModelLoader
friend

Member Data Documentation

◆ attributesVboOffset

IndexT Models::PrimitiveNode::attributesVboOffset
protected

◆ baseVboOffset

IndexT Models::PrimitiveNode::baseVboOffset
protected

◆ ibo

CoreGraphics::BufferId Models::PrimitiveNode::ibo
protected

◆ iboOffset

IndexT Models::PrimitiveNode::iboOffset
protected

◆ indexType

CoreGraphics::IndexType::Code Models::PrimitiveNode::indexType
protected

◆ loadContext

struct Models::PrimitiveNode::LoadContext Models::PrimitiveNode::loadContext
protected

◆ mesh

CoreGraphics::MeshId Models::PrimitiveNode::mesh
protected

◆ meshResource

Resources::ResourceName Models::PrimitiveNode::meshResource
protected

◆ primGroup

CoreGraphics::PrimitiveGroup Models::PrimitiveNode::primGroup
protected

◆ res

Resources::ResourceId Models::PrimitiveNode::res
protected

◆ topology

CoreGraphics::PrimitiveTopology::Code Models::PrimitiveNode::topology
protected

◆ vbo

CoreGraphics::BufferId Models::PrimitiveNode::vbo
protected

◆ vertexLayout

CoreGraphics::VertexLayoutId Models::PrimitiveNode::vertexLayout
protected

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