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

#include <RAY_ProcIsoBase.h>

+ Inheritance diagram for RAY_ProcIsoBase:

Public Member Functions

 RAY_ProcIsoBase ()
 
 ~RAY_ProcIsoBase () override
 
virtual fpreal evaluateDensity (const float pos[3]) const =0
 
virtual RAY_ProcIsoBasecreateChild (const UT_BoundingBox &box)=0
 
virtual bool addAttributes (GU_Detail *gdp, float &velocityscale, GA_ROHandleV3 &velocity_attribute)
 
void getBoundingBox (UT_BoundingBox &box) override
 The bounding box is the "object space" bounds of the procedural. More...
 
void render () override
 
- Public Member Functions inherited from RAY_Procedural
 RAY_Procedural ()
 
virtual ~RAY_Procedural ()
 
virtual const char * className () const =0
 
virtual int initialize (const UT_BoundingBox *box)=0
 
virtual bool isEqual (const RAY_Procedural *) const
 
virtual bool canGenerateInstancedGeometry () const
 
int lookupParmToken (const char *name) const
 
RAY_ProceduralGeo createGeometry () const
 Allocate geometry for this procedural. More...
 
const int64getIParm (int token, size_t &size) const
 
const fpreal64getFParm (int token, size_t &size) const
 
const UT_StringHoldergetSParm (int token, size_t &size) const
 
const int64getIParm (const char *name, size_t &size) const
 
const fpreal64getFParm (const char *name, size_t &size) const
 
const UT_StringHoldergetSParm (const char *name, size_t &size) const
 
bool import (const char *name, int32 *value, int vectorsize) const
 
bool import (const char *name, int64 *value, int vectorsize) const
 
bool import (const char *name, fpreal32 *value, int vectorsize) const
 
bool import (const char *name, fpreal64 *value, int vectorsize) const
 
bool import (const char *name, UT_String &result, int idx=0) const
 
bool import (const char *name, UT_StringHolder &result, int idx=0) const
 
bool import (RAY_Handle handle, const char *name, int32 *value, int vectorsize) const
 
bool import (RAY_Handle handle, const char *name, int64 *value, int vectorsize) const
 
bool import (RAY_Handle handle, const char *name, fpreal32 *value, int vectorsize) const
 
bool import (RAY_Handle handle, const char *name, fpreal64 *value, int vectorsize) const
 
bool import (RAY_Handle handle, const char *name, UT_String &result, int idx=0) const
 
bool import (RAY_Handle handle, const char *name, UT_StringHolder &result, int idx=0) const
 
bool importAll (RAY_Handle handle, UT_Options &settings, bool local_only=false) const
 
RAY_ROProceduralGeo createGeometry (GU_DetailHandle &gdh) const
 
RAY_ROProceduralGeo createGeometry (GU_ConstDetailHandle &gdh) const
 
RAY_ROProceduralGeo createGeometry (const GU_DetailHandle *gdh, int nsegments, const fpreal *shutter_times=nullptr) const
 
RAY_ROProceduralGeo createGeometry (const GU_ConstDetailHandle *gdh, int nsegments, const fpreal *shutter_times=nullptr) const
 
RAY_ProceduralData * data ()
 

Protected Attributes

UT_BoundingBox myBox
 
UT_BoundingBox myVelBox
 
float myLodScale
 

Additional Inherited Members

- Static Public Member Functions inherited from RAY_Procedural
static void optimizeGeometry (GU_Detail &gdp, bool create_normals_if_needed)
 
static void optimizeGeometry (GU_DetailHandle &gdp, bool create_normals_if_needed)
 
- Protected Member Functions inherited from RAY_Procedural
const GA_AttributequeryGeometrySegment (const GA_Attribute *attr, int seg) const
 
void clearGeometrySegments (GA_Attribute *attr)
 
fpreal getLevelOfDetail (const UT_BoundingBox &box) const
 
RAY_ProceduralChildPtr createChild () const
 
void openGeometryObject ()
 
void addGeometry (GU_Detail *gdp, fpreal shutter)
 
int openProceduralObject ()
 Open a procedural object. More...
 
void addProcedural (RAY_Procedural *proc)
 
int addProcedural (int argc, char *argv[], const UT_BoundingBox *box=0)
 
void openVolumeObject ()
 Open a volume object. More...
 
void addVolume (VGEO_Volume *volume, fpreal shutter)
 
void setPreTransform (const UT_Matrix4D &transform, fpreal shutter)
 
void setTransform (const UT_Matrix4D &transform, fpreal shutter)
 
void setStylerInfo (const RAY_StylerInfo &styler_info)
 
bool setShopMaterialPath (const char *shop_materialpath, const char *material_override=nullptr, const char *property_map=nullptr)
 
void debugSettings (const char *style="object") const
 Print out the object's settings to stderr. More...
 
void processPrimitiveMaterial (const GEO_Primitive *prim)
 
void closeObject ()
 
bool parseMaterialIFD (const char *filename)
 
int queryWorldTransformSamples () const
 Query the number of transform samples for the world. More...
 
UT_Matrix4D queryWorldTransform (int sample) const
 Get the world transform. More...
 
RAY_ObjectHandle queryObject (const char *name) const
 
RAY_MaterialHandle queryMaterial (const char *name) const
 
RAY_LightHandle queryLight (const char *name) const
 
int queryTransformSamples (RAY_Handle handle) const
 
UT_Matrix4D queryTransform (RAY_Handle handle, int sample) const
 
const UT_Matrix4DqueryShaderTransform (RAY_ObjectHandle handle, int sample) const
 
const STY_StylerqueryStyler (RAY_ObjectHandle handle) const
 
const char * queryName (RAY_Handle handle) const
 
const char * queryRootName () const
 Get the name of the object which owns this procedural. More...
 
int queryGeometrySamples (RAY_ObjectHandle handle) const
 
RAY_ROProceduralGeo queryGeometry (RAY_ObjectHandle handle) const
 
bool changeSetting (const char *name, const char *value, const char *style="object")
 
bool changeSetting (const char *name, int argc, const char *const *argv, const char *style="object")
 
bool changeSetting (const char *name, int argc, const int *argv, const char *style="object")
 
bool changeSetting (const char *name, int argc, const fpreal *argv, const char *style="object")
 
bool declareSetting (const char *name, const char *value)
 
bool declareSetting (const char *name, int argc, const char *const *argv)
 
bool declareSetting (const char *name, int argc, const int *argv)
 
bool declareSetting (const char *name, int argc, const fpreal *argv)
 
- Static Protected Member Functions inherited from RAY_Procedural
static void lookupPrimitiveMaterialAttributes (const GEO_Detail &geo, RAY_PrimitiveMaterialAttributes &attribs)
 

Detailed Description

Definition at line 19 of file RAY_ProcIsoBase.h.

Constructor & Destructor Documentation

RAY_ProcIsoBase::RAY_ProcIsoBase ( )
RAY_ProcIsoBase::~RAY_ProcIsoBase ( )
override

Member Function Documentation

virtual bool RAY_ProcIsoBase::addAttributes ( GU_Detail gdp,
float velocityscale,
GA_ROHandleV3 velocity_attribute 
)
virtual
virtual RAY_ProcIsoBase* RAY_ProcIsoBase::createChild ( const UT_BoundingBox box)
pure virtual
virtual fpreal RAY_ProcIsoBase::evaluateDensity ( const float  pos[3]) const
pure virtual
void RAY_ProcIsoBase::getBoundingBox ( UT_BoundingBox box)
overridevirtual

The bounding box is the "object space" bounds of the procedural.

Implements RAY_Procedural.

void RAY_ProcIsoBase::render ( )
overridevirtual

The render method is called when the procedural is required to either generate geometry or split into more procedurals. Inside the render() method you should make calls to open/add/close geometry or sub-procedurals.

The way that a procedural splits is critical to the performance of mantra's ray tracer. For optimal performance, make sure that sub-procedural bounding boxes overlap as little as possible - which allows mantra to build more optimal trees for ray tracing.

In multi-threaded renders, the render() method needs to be reentrant

  • that is, the render() method on different RAY_Procedural objects may be called simultaneously by different threads. This means that you should design the code in your procedural such that global data structures are protected by a thread lock (for example, a UT_Lock).
    Note
    The render method may be called more than once during a render to regenerate the geometry.

Implements RAY_Procedural.

Member Data Documentation

UT_BoundingBox RAY_ProcIsoBase::myBox
protected

Definition at line 81 of file RAY_ProcIsoBase.h.

float RAY_ProcIsoBase::myLodScale
protected

Definition at line 83 of file RAY_ProcIsoBase.h.

UT_BoundingBox RAY_ProcIsoBase::myVelBox
protected

Definition at line 82 of file RAY_ProcIsoBase.h.


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