HDK
|
#include <RAY_DemoSprite.h>
Public Member Functions | |
RAY_DemoSprite () | |
~RAY_DemoSprite () override | |
const char * | className () const override |
int | initialize (const UT_BoundingBox *box) override |
int | initChild (RAY_DemoSprite *sprite, const UT_BoundingBox &box) |
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 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 int64 * | getIParm (int token, size_t &size) const |
const fpreal64 * | getFParm (int token, size_t &size) const |
const UT_StringHolder * | getSParm (int token, size_t &size) const |
const int64 * | getIParm (const char *name, size_t &size) const |
const fpreal64 * | getFParm (const char *name, size_t &size) const |
const UT_StringHolder * | getSParm (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 () |
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_Attribute * | queryGeometrySegment (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_Matrix4D & | queryShaderTransform (RAY_ObjectHandle handle, int sample) const |
const STY_Styler & | queryStyler (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) |
Definition at line 58 of file RAY_DemoSprite.h.
RAY_DemoSprite::RAY_DemoSprite | ( | ) |
Definition at line 142 of file RAY_DemoSprite.C.
|
override |
Definition at line 231 of file RAY_DemoSprite.C.
|
overridevirtual |
The class name is used in diagnostic messages. It can simply be the name of the class, or alternatively, you can choose a unique name for each procedural instance.
Implements RAY_Procedural.
Definition at line 242 of file RAY_DemoSprite.C.
|
overridevirtual |
The bounding box is the "object space" bounds of the procedural.
Implements RAY_Procedural.
Definition at line 392 of file RAY_DemoSprite.C.
int RAY_DemoSprite::initChild | ( | RAY_DemoSprite * | sprite, |
const UT_BoundingBox & | box | ||
) |
Definition at line 174 of file RAY_DemoSprite.C.
|
overridevirtual |
The initialize method is called when the procedural is created. Returning zero (failure) will abort the rendering of this procedural.
The bounding box passed in is the user defined bounding box. If the user didn't specify a bounding box, then the box will be NULL.
Implements RAY_Procedural.
Definition at line 248 of file RAY_DemoSprite.C.
|
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
Implements RAY_Procedural.
Definition at line 604 of file RAY_DemoSprite.C.