HDK
|
#include <BRAY_Interface.h>
Static Public Member Functions | |
static ScenePtr | allocScene () |
Allocate a new scene. More... | |
static void | setExitOnFailedLicense (bool state=true) |
static bool | isEngineSupported (const UT_StringRef &name) |
Check to see whether a rendering engine is supported. More... | |
When defining materials for face sets, the material specification is given by a pair of the MaterialPtr
and an array of integers. The integers specify the list of faces to material and must appear in sorted order (smallest to largest). Interface to the scene manager
Definition at line 218 of file BRAY_Interface.h.
|
default |
BRAY::ScenePtr::~ScenePtr | ( | ) |
bool BRAY::ScenePtr::addTraceset | ( | const UT_StringHolder & | name | ) |
Add traceset name to global list (categories on objects that do not belong to this list will be ignored) Returns true if added, false if already exists.
|
static |
Allocate a new scene.
OptionSet BRAY::ScenePtr::cameraProperties | ( | ) |
Grab a copy of the current camera properties
void BRAY::ScenePtr::commitOptions | ( | ) |
After changing any options, must commit prior to rendering.
Grab a copy of the current light properties
Grab a copy of the current light properties
Grab a copy of the current object properties.
Grab a copy of the current scene options
CameraPtr BRAY::ScenePtr::createCamera | ( | const UT_StringHolder & | name | ) |
Create a camera.
CoordSysPtr BRAY::ScenePtr::createCoordSys | ( | const UT_StringHolder & | name | ) |
Create a coordinate system.
ObjectPtr BRAY::ScenePtr::createGeometry | ( | const GT_PrimitiveHandle & | prim | ) |
Create an object given a GT_Primitive handle. At the current time, the only classes supported are:
ObjectPtr BRAY::ScenePtr::createGeometry | ( | const GT_PrimitiveHandle & | prim, |
const GT_DataArrayHandle & | holes | ||
) |
For polygonal meshes, use this to create geometry to handle holes.
ObjectPtr BRAY::ScenePtr::createInstance | ( | const ObjectPtr & | obj, |
const UT_StringHolder & | name | ||
) |
Create an instance of an object.
LightPtr BRAY::ScenePtr::createLight | ( | const UT_StringHolder & | name | ) |
Create a light.
MaterialPtr BRAY::ScenePtr::createMaterial | ( | const UT_StringHolder & | name | ) |
Create a material.
ObjectPtr BRAY::ScenePtr::createProcedural | ( | UT_UniquePtr< BRAY_Procedural > | proc | ) |
Create a procedural object. Ownership of the procedural is passed to the object.
ObjectPtr BRAY::ScenePtr::createScene | ( | ) |
Create a nested scene graph.
ShaderGraphPtr BRAY::ScenePtr::createShaderGraph | ( | const UT_StringHolder & | name | ) |
Create a shader nodegraph.
ObjectPtr BRAY::ScenePtr::createVolume | ( | const UT_StringHolder & | name | ) |
Create a volume given its detail attribute and the names and GT_PrimitiveHandles of the corresponding fields in the volume
OptionSet BRAY::ScenePtr::defaultProperties | ( | BRAY_PropertyType | type | ) | const |
Grab a the default properties for a given type. Changing their values will cause all future objects created to inherit the new values.
bool BRAY::ScenePtr::destroyMaterial | ( | const UT_StringRef & | name | ) |
Destroy/Delete a material (returns false if material wasn't found)
MaterialPtr BRAY::ScenePtr::findMaterial | ( | const UT_StringRef & | name | ) | const |
Find a material.
void BRAY::ScenePtr::forceRedice | ( | ) |
Force redicing of displacement and subd surfaces on the next render. This will only take effect on the next call to beginRender().
|
static |
Check to see whether a rendering engine is supported.
bool BRAY::ScenePtr::isKarmaCPU | ( | ) | const |
convenience methods to determine which renderer is active (tests the value of the BRAY_OPT_ENGINE option)
bool BRAY::ScenePtr::isKarmaXPU | ( | ) | const |
bool BRAY::ScenePtr::isTraceset | ( | const UT_StringHolder & | name | ) |
Check to see if a traceset exists.
|
inline |
Test validity.
Definition at line 243 of file BRAY_Interface.h.
OptionSet BRAY::ScenePtr::lightProperties | ( | ) |
Grab a copy of the current light properties
bool BRAY::ScenePtr::loadHDA | ( | const char * | path | ) |
Load an HDA to define shader code. Not all applications support this feature.
|
inline |
Lock or unlock all object properties.
Definition at line 427 of file BRAY_Interface.h.
Lock properties based on a string pattern of parameter names. This method returns the number of properties modified.
bool BRAY::ScenePtr::lockProperty | ( | BRAY_ObjectProperty | token, |
bool | state | ||
) |
Locking the object property prevents any overriding of the property after the fact, essentially turning the property into a read-only property. This method is intended to lock default properties. The current value of the property is used as the value.
The return value is the previous lock state of the property.
bool BRAY::ScenePtr::nestedInstancing | ( | ) | const |
Test whether the renderer supports nested instancing.
OptionSet BRAY::ScenePtr::objectProperties | ( | ) |
Grab a copy of the current object properties.
|
inline |
Private access to the underling scene
Definition at line 298 of file BRAY_Interface.h.
|
inline |
Convenience methods to look up scene and scene options. Get an scene option value.
Definition at line 385 of file BRAY_Interface.h.
|
inline |
Convenience methods to look up scene and scene options. Get an scene option value.
Definition at line 389 of file BRAY_Interface.h.
|
inline |
Convenience methods to look up scene and scene options. Get an scene option value.
Definition at line 387 of file BRAY_Interface.h.
|
inline |
Convenience methods to look up scene and scene options. Get an scene option value.
Definition at line 342 of file BRAY_Interface.h.
|
inline |
Return whether an option has variadic arguments.
Definition at line 381 of file BRAY_Interface.h.
|
inline |
Convenience methods to look up scene and scene options. Get an scene option value.
Definition at line 391 of file BRAY_Interface.h.
|
inline |
Return the size of an option. This can be used for variadics (e.g. shading quality will be 1)
Definition at line 367 of file BRAY_Interface.h.
|
inline |
Return the storage class of an option.
Definition at line 374 of file BRAY_Interface.h.
OptionSet BRAY::ScenePtr::planeProperties | ( | ) |
Grab a copy of the current image plane properties.
|
inline |
Convenience methods to look up object properties. Get an object property value.
Definition at line 458 of file BRAY_Interface.h.
|
inline |
Convenience methods to look up object properties. Get an object property value.
Definition at line 462 of file BRAY_Interface.h.
|
inline |
Convenience methods to look up object properties. Get an object property value.
Definition at line 460 of file BRAY_Interface.h.
|
inline |
Convenience methods to look up object properties. Get an object property value.
Definition at line 399 of file BRAY_Interface.h.
|
inline |
Return whether an property has variadic arguments.
Definition at line 454 of file BRAY_Interface.h.
|
inline |
Convenience methods to look up object properties. Get an object property value.
Definition at line 464 of file BRAY_Interface.h.
|
inline |
Return the size of an option. This can be used for variadics (e.g. shading quality will be 1)
Definition at line 440 of file BRAY_Interface.h.
|
inline |
Return the storage class of an option.
Definition at line 447 of file BRAY_Interface.h.
void BRAY::ScenePtr::saveCheckpointASAP | ( | ) |
Forcibly save checkpoint as soon as possible (if checkpointing is enabled)
OptionSet BRAY::ScenePtr::sceneOptions | ( | ) |
Grab a copy of the current scene options
|
inline |
Private access to the underling scene
Definition at line 299 of file BRAY_Interface.h.
|
inline |
Private access to the underling scene
Definition at line 300 of file BRAY_Interface.h.
fpreal64 BRAY::ScenePtr::sceneUnits | ( | ) | const |
Set the unit scale for the scene - this is in meters/unit. For example, centimeters would be 0.01.
void BRAY::ScenePtr::setCameraRayMask | ( | BRAY_RayVisibility | mask | ) |
Set camera ray visibility. The mask should be a combination of
|
static |
Force an exit when there's a failed license check failure. The normal behaviour is to render a black image.
|
inline |
Interface to set an option. This template class is specialized for:
Definition at line 350 of file BRAY_Interface.h.
|
inline |
Simple interface to set a scalar option.
Definition at line 360 of file BRAY_Interface.h.
|
inline |
Interface to set an property. This template class is specialized for:
Definition at line 407 of file BRAY_Interface.h.
|
inline |
Simple interface to set a scalar property.
Definition at line 433 of file BRAY_Interface.h.
Set the unit scale for the scene - this is in meters/unit. For example, centimeters would be 0.01.
void BRAY::ScenePtr::setShadowRayMask | ( | BRAY_RayVisibility | mask | ) |
Set shadow ray visibility. The mask should be a combination of
void BRAY::ScenePtr::startEdits | ( | BRAY::RendererPtr & | renderer | ) |
Start edits/loading of the scene.
bool BRAY::ScenePtr::threadSafe | ( | ) | const |
Test whether the scene is thread-safe.
void BRAY::ScenePtr::updateCamera | ( | const CameraPtr & | ptr, |
BRAY_EventType | event | ||
) |
Update camera object in the scene.
void BRAY::ScenePtr::updateCoordSys | ( | const CoordSysPtr & | ptr, |
BRAY_EventType | event | ||
) |
Update coord sys object.
void BRAY::ScenePtr::updateLight | ( | const LightPtr & | ptr, |
BRAY_EventType | event | ||
) |
Update light object in the scene.
void BRAY::ScenePtr::updateMaterial | ( | const MaterialPtr & | ptr, |
BRAY_EventType | event | ||
) |
Update material object in the scene.
void BRAY::ScenePtr::updateObject | ( | const ObjectPtr & | ptr, |
BRAY_EventType | event | ||
) |
Update an object in the scene.