HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RAY_PackedQuery Class Referenceabstract

#include <RAY_PackedQuery.h>

Public Types

using KeyType = int64
 

Public Member Functions

 RAY_PackedQuery ()
 Create a packed query for the procedural, possibly inheriting from. More...
 
virtual ~RAY_PackedQuery ()
 
template<typename T >
bool import (const UT_StringRef &name, T *val, int size) const
 
void setInheritFrom (const KeyType parent)
 

Static Public Member Functions

static SYS_FORCE_INLINE bool isValidKey (KeyType k)
 
static RAY_PackedQuerycreate (const GEO_Primitive *prim)
 Create a query struct for a primitive. More...
 
static RAY_PackedQuerycreate (const GT_AttributeListHandle &detail, const GT_AttributeListHandle &uniform, exint uniform_index, const GT_AttributeListHandle &primdet, const GT_AttributeListHandle &packinfo)
 

Protected Member Functions

virtual bool doImport (const UT_StringRef &name, int32 *val, int n) const =0
 
virtual bool doImport (const UT_StringRef &name, int64 *val, int n) const =0
 
virtual bool doImport (const UT_StringRef &name, fpreal32 *val, int n) const =0
 
virtual bool doImport (const UT_StringRef &name, fpreal64 *val, int n) const =0
 
virtual bool doImport (const UT_StringRef &name, UT_StringHolder *val, int n) const =0
 

Detailed Description

When a new procedural is created from a packed primitive, the geometry generated by the procedural should be able to access the attributes from the packed primitive using the renderstate("packed:NAME") method.

This class is used to implement the packed query for a procedural. Once you create a RAY_PackedQuery, you can assign it to the procedural using RAY_Procedural::setPackedQuery().

Definition at line 29 of file RAY_PackedQuery.h.

Member Typedef Documentation

Definition at line 32 of file RAY_PackedQuery.h.

Constructor & Destructor Documentation

RAY_PackedQuery::RAY_PackedQuery ( )
inline

Create a packed query for the procedural, possibly inheriting from.

Definition at line 37 of file RAY_PackedQuery.h.

virtual RAY_PackedQuery::~RAY_PackedQuery ( )
virtual

Member Function Documentation

static RAY_PackedQuery* RAY_PackedQuery::create ( const GEO_Primitive prim)
static

Create a query struct for a primitive.

static RAY_PackedQuery* RAY_PackedQuery::create ( const GT_AttributeListHandle detail,
const GT_AttributeListHandle uniform,
exint  uniform_index,
const GT_AttributeListHandle primdet,
const GT_AttributeListHandle packinfo 
)
static

Create a query struct for a set of GT attributes. The inherit_from should either be the current query id or a -1.

virtual bool RAY_PackedQuery::doImport ( const UT_StringRef name,
int32 val,
int  n 
) const
protectedpure virtual

Import data from the packed primitive

virtual bool RAY_PackedQuery::doImport ( const UT_StringRef name,
int64 val,
int  n 
) const
protectedpure virtual

Import data from the packed primitive

virtual bool RAY_PackedQuery::doImport ( const UT_StringRef name,
fpreal32 val,
int  n 
) const
protectedpure virtual

Import data from the packed primitive

virtual bool RAY_PackedQuery::doImport ( const UT_StringRef name,
fpreal64 val,
int  n 
) const
protectedpure virtual

Import data from the packed primitive

virtual bool RAY_PackedQuery::doImport ( const UT_StringRef name,
UT_StringHolder val,
int  n 
) const
protectedpure virtual

Import data from the packed primitive

template<typename T >
bool RAY_PackedQuery::import ( const UT_StringRef name,
T val,
int  size 
) const
inline

Try to import the packed setting of the given name (the "packed:" prefix is stripped off). For example, "Cd" (not "packed:Cd") This can be specialized for

Definition at line 59 of file RAY_PackedQuery.h.

static SYS_FORCE_INLINE bool RAY_PackedQuery::isValidKey ( KeyType  k)
inlinestatic

Definition at line 34 of file RAY_PackedQuery.h.

void RAY_PackedQuery::setInheritFrom ( const KeyType  parent)
inline

Set the inheritance for the query. If settings aren't found on this query, we search the parent (if there is one).

Definition at line 69 of file RAY_PackedQuery.h.


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