Nebula
Loading...
Searching...
No Matches
Models Namespace Reference

Detailed Description

A model resource consists of nodes, each of which inhibit some information read from an .n3 file.

Contains two contexts, one for observers and one for observables.

The transform node contains just a hierarchical transform.

The shader state node wraps the shader associated with a certain primitive node, or group of primitive nodes.

A primitive node contains a mesh resource and a primitive group id.

Classes

class  CharacterNode
 
class  CharacterSkinNode
 
class  ModelContext
 
struct  ModelCreateInfo
 
struct  ModelId
 
class  ModelLoader
 
class  ModelNode
 
struct  ModelStreamingData
 
struct  NodeInstanceRange
 
class  ParticleSystemNode
 
class  PrimitiveNode
 
class  ShaderStateNode
 
class  TransformNode
 

Typedefs

typedef Ids::IdAllocator< Math::bbox, Util::Array< Models::ModelNode * > > ModelAllocator
 

Enumerations

enum  NodeType {
  CharacterNodeType , TransformNodeType , ShaderStateNodeType , PrimitiveNodeType ,
  ParticleSystemNodeType , CharacterSkinNodeType , NumNodeTypes
}
 
enum  NodeBits { NoBits = N_BIT(0) , HasTransformBit = N_BIT(1) , HasStateBit = N_BIT(2) }
 
enum class  LoadBits { NoBits = N_BIT(0) , MeshBit = N_BIT(1) , AnimBit = N_BIT(2) , MaterialBit = N_BIT(3) }
 
enum  { Model_BoundingBox , Model_Nodes }
 
enum class  NodeInstanceFlags {
  NodeInstance_Active = N_BIT(1) , NodeInstance_LodActive = N_BIT(2) , NodeInstance_AlwaysVisible = N_BIT(3) , NodeInstance_Visible = N_BIT(4) ,
  NodeInstance_Moved = N_BIT(5)
}
 

Functions

const ModelId CreateModel (const ModelCreateInfo &info)
 create model (resource)
 
void DestroyModel (const ModelId id)
 discard model (resource)
 
const Util::Array< Models::ModelNode * > & ModelGetNodes (const ModelId id)
 Get model nodes.
 
const Math::bboxModelGetBoundingBox (const ModelId id)
 Get model bounding box.
 
 __ImplementEnumBitOperators (NodeBits)
 
 __ImplementEnumBitOperators (LoadBits)
 
 __ImplementContext (ModelContext, ModelContext::modelContextAllocator)
 
 __ImplementEnumBitOperators (NodeInstanceFlags)
 
 __ImplementClass (Models::ModelLoader, 'SMPO', Resources::ResourceLoader)
 

Variables

ModelAllocator modelAllocator
 
Threading::LockFreeQueue< std::function< void()> > setupCompleteQueue
 

Typedef Documentation

◆ ModelAllocator

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
Model_BoundingBox 
Model_Nodes 

◆ LoadBits

enum class Models::LoadBits
strong
Enumerator
NoBits 
MeshBit 
AnimBit 
MaterialBit 

◆ NodeBits

Enumerator
NoBits 
HasTransformBit 
HasStateBit 

◆ NodeInstanceFlags

enum class Models::NodeInstanceFlags
strong
Enumerator
NodeInstance_Active 
NodeInstance_LodActive 
NodeInstance_AlwaysVisible 
NodeInstance_Visible 
NodeInstance_Moved 

◆ NodeType

Enumerator
CharacterNodeType 
TransformNodeType 
ShaderStateNodeType 
PrimitiveNodeType 
ParticleSystemNodeType 
CharacterSkinNodeType 
NumNodeTypes 

Function Documentation

◆ __ImplementClass()

Models::__ImplementClass ( Models::ModelLoader ,
'SMPO' ,
Resources::ResourceLoader  )

◆ __ImplementContext()

Models::__ImplementContext ( ModelContext ,
ModelContext::modelContextAllocator  )

◆ __ImplementEnumBitOperators() [1/3]

Models::__ImplementEnumBitOperators ( LoadBits )

◆ __ImplementEnumBitOperators() [2/3]

Models::__ImplementEnumBitOperators ( NodeBits )

◆ __ImplementEnumBitOperators() [3/3]

Models::__ImplementEnumBitOperators ( NodeInstanceFlags )

◆ CreateModel()

const ModelId Models::CreateModel ( const ModelCreateInfo & info)

create model (resource)

◆ DestroyModel()

void Models::DestroyModel ( const ModelId id)

discard model (resource)

◆ ModelGetBoundingBox()

const Math::bbox & Models::ModelGetBoundingBox ( const ModelId id)

Get model bounding box.

◆ ModelGetNodes()

const Util::Array< Models::ModelNode * > & Models::ModelGetNodes ( const ModelId id)

Get model nodes.

Get nodes.

Variable Documentation

◆ modelAllocator

ModelAllocator Models::modelAllocator

◆ setupCompleteQueue

Threading::LockFreeQueue<std::function<void()> > Models::setupCompleteQueue