OptiX  3.9
NVIDIA OptiX Acceleration Engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Public Member Functions | Friends | List of all members
optix::VariableObj Class Reference

Detailed Description

Variable object wraps OptiX C API RTvariable type and its related function set.

See OptiXApiReference for complete description of the usage and behavior of RTvariable objects. Creation and querying of Variables can be performed via the Handle::operator[] function of the scope object associated with the variable. For example:

my_context["new_variable"]->setFloat( 1.0f );

will create a variable named new_variable on the object my_context if it does not already exist. It will then set the value of that variable to be a float 1.0f.

Inheritance diagram for optix::VariableObj:
optix::APIObj

Public Member Functions

Context getContext () const
 
std::string getName () const
 
std::string getAnnotation () const
 
RTobjecttype getType () const
 
RTvariable get ()
 
RTsize getSize () const
 
Float setters

Set variable to have a float value.

void setFloat (float f1)
 
void setFloat (optix::float2 f)
 
void setFloat (float f1, float f2)
 
void setFloat (optix::float3 f)
 
void setFloat (float f1, float f2, float f3)
 
void setFloat (optix::float4 f)
 
void setFloat (float f1, float f2, float f3, float f4)
 
void set1fv (const float *f)
 
void set2fv (const float *f)
 
void set3fv (const float *f)
 
void set4fv (const float *f)
 
Int setters

Set variable to have an int value.

void setInt (int i1)
 
void setInt (int i1, int i2)
 
void setInt (optix::int2 i)
 
void setInt (int i1, int i2, int i3)
 
void setInt (optix::int3 i)
 
void setInt (int i1, int i2, int i3, int i4)
 
void setInt (optix::int4 i)
 
void set1iv (const int *i)
 
void set2iv (const int *i)
 
void set3iv (const int *i)
 
void set4iv (const int *i)
 
Unsigned int setters

Set variable to have an unsigned int value.

void setUint (unsigned int u1)
 
void setUint (unsigned int u1, unsigned int u2)
 
void setUint (unsigned int u1, unsigned int u2, unsigned int u3)
 
void setUint (unsigned int u1, unsigned int u2, unsigned int u3, unsigned int u4)
 
void setUint (optix::uint2 u)
 
void setUint (optix::uint3 u)
 
void setUint (optix::uint4 u)
 
void set1uiv (const unsigned int *u)
 
void set2uiv (const unsigned int *u)
 
void set3uiv (const unsigned int *u)
 
void set4uiv (const unsigned int *u)
 
Matrix setters

Set variable to have a Matrix value

void setMatrix2x2fv (bool transpose, const float *m)
 
void setMatrix2x3fv (bool transpose, const float *m)
 
void setMatrix2x4fv (bool transpose, const float *m)
 
void setMatrix3x2fv (bool transpose, const float *m)
 
void setMatrix3x3fv (bool transpose, const float *m)
 
void setMatrix3x4fv (bool transpose, const float *m)
 
void setMatrix4x2fv (bool transpose, const float *m)
 
void setMatrix4x3fv (bool transpose, const float *m)
 
void setMatrix4x4fv (bool transpose, const float *m)
 
Numeric value getters

Query value of a variable with numeric value

float getFloat () const
 
optix::float2 getFloat2 () const
 
optix::float3 getFloat3 () const
 
optix::float4 getFloat4 () const
 
void getFloat (float &f1) const
 
void getFloat (float &f1, float &f2) const
 
void getFloat (float &f1, float &f2, float &f3) const
 
void getFloat (float &f1, float &f2, float &f3, float &f4) const
 
unsigned getUint () const
 
optix::uint2 getUint2 () const
 
optix::uint3 getUint3 () const
 
optix::uint4 getUint4 () const
 
void getUint (unsigned &u1) const
 
void getUint (unsigned &u1, unsigned &u2) const
 
void getUint (unsigned &u1, unsigned &u2, unsigned &u3) const
 
void getUint (unsigned &u1, unsigned &u2, unsigned &u3, unsigned &u4) const
 
int getInt () const
 
optix::int2 getInt2 () const
 
optix::int3 getInt3 () const
 
optix::int4 getInt4 () const
 
void getInt (int &i1) const
 
void getInt (int &i1, int &i2) const
 
void getInt (int &i1, int &i2, int &i3) const
 
void getInt (int &i1, int &i2, int &i3, int &i4) const
 
void getMatrix2x2 (bool transpose, float *m) const
 
void getMatrix2x3 (bool transpose, float *m) const
 
void getMatrix2x4 (bool transpose, float *m) const
 
void getMatrix3x2 (bool transpose, float *m) const
 
void getMatrix3x3 (bool transpose, float *m) const
 
void getMatrix3x4 (bool transpose, float *m) const
 
void getMatrix4x2 (bool transpose, float *m) const
 
void getMatrix4x3 (bool transpose, float *m) const
 
void getMatrix4x4 (bool transpose, float *m) const
 
OptiX API object setters

Set variable to have an OptiX API object as its value

void setBuffer (Buffer buffer)
 
void set (Buffer buffer)
 
void setTextureSampler (TextureSampler texturesample)
 
void set (TextureSampler texturesample)
 
void set (GeometryGroup group)
 
void set (Group group)
 
void set (Program program)
 
void setProgramId (Program program)
 
void set (Selector selector)
 
void set (Transform transform)
 
OptiX API object getters

Reitrieve OptiX API object value from a variable

Buffer getBuffer () const
 
GeometryGroup getGeometryGroup () const
 
GeometryInstance getGeometryInstance () const
 
Group getGroup () const
 
Program getProgram () const
 
Selector getSelector () const
 
TextureSampler getTextureSampler () const
 
Transform getTransform () const
 
User data variable accessors
void setUserData (RTsize size, const void *ptr)
 
void getUserData (RTsize size, void *ptr) const
 
- Public Member Functions inherited from optix::APIObj
void addReference ()
 
int removeReference ()
 
virtual void checkError (RTresult code) const
 
virtual void checkError (RTresult code, Context context) const
 
void checkErrorNoGetContext (RTresult code) const
 

Friends

class Handle< VariableObj >
 

Additional Inherited Members

- Static Public Member Functions inherited from optix::APIObj
static Exception makeException (RTresult code, RTcontext context)