Enzo
Loading...
Searching...
No Matches
enzo::geo::Primitive Class Referenceabstract

Base class for all primitive types in the engine. More...

#include <Primitive.h>

Inheritance diagram for enzo::geo::Primitive:
enzo::geo::Camera enzo::geo::Mesh

Classes

struct  PointOffsets
 

Public Member Functions

 Primitive (const Primitive &other)
 
Primitiveoperator= (const Primitive &rhs)
 
virtual PrimType getType () const =0
 
virtual std::shared_ptr< Primitiveclone () const =0
 
virtual TransformClass transformType () const =0
 
virtual void applyTransform (const bt::Matrix4 &mat, TransformClass transformClass)=0
 
void applyTransform (const Transform &transform, TransformClass transformClass)
 
virtual bool canMerge () const
 
virtual void merge (std::shared_ptr< Primitive > other)
 
void incrementVersion ()
 
virtual bool hasPoints () const
 
virtual ga::Offset getNumPoints () const
 
virtual PointOffsets getPoints ()
 
ga::AttributeHandle< bt::intT > addIntAttribute (ga::AttributeOwner owner, std::string name, bool intrinsic=false)
 
ga::AttributeHandleBool addBoolAttribute (ga::AttributeOwner owner, std::string name, bool intrinsic=false)
 
ga::AttributeHandle< bt::Vector3 > addVector3Attribute (ga::AttributeOwner owner, std::string name, bool intrinsic=false)
 
ga::AttributeHandle< bt::Matrix4 > addMatrix4Attribute (ga::AttributeOwner owner, std::string name, bool intrinsic=false)
 
std::shared_ptr< ga::AttributegetAttribByName (ga::AttributeOwner owner, std::string name, bool includeIntrinsics=false)
 
const size_t getNumAttributes (const ga::AttributeOwner owner) const
 
std::weak_ptr< const ga::AttributegetAttributeByIndex (ga::AttributeOwner owner, unsigned int index) const
 
bool attributeExists (ga::AttributeOwner owner, std::string name)
 
bt::String getPath () const
 
void setPath (const bt::String &path)
 

Protected Member Functions

virtual ga::attribVector & getAttributeStore (const ga::AttributeOwner &owner)
 
virtual const ga::attribVector & getAttributeStore (const ga::AttributeOwner &owner) const
 
ga::attribVector deepCopyAttributes (ga::attribVector source)
 

Protected Attributes

std::string path_ = "/prim"
 
ga::attribVector pointAttributes_
 
ga::attribVector primitiveAttributes_
 

Detailed Description

Base class for all primitive types in the engine.

A Primitive is the unit of geometry exchanged between nodes. It holds primitive-level attributes (one value per object) and provides the attribute management API shared by all primitive types.

Point attributes are stored on the base class since many primitive types have points. Use hasPoints() to check before accessing them.

Subclasses (e.g. Mesh) add their own attribute owners and geometry.


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