Vuo  0.5.6
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Typedefs | Enumerations | Functions
VuoSceneObject

Description

A 3D Object: visible (mesh), or virtual (group, light, camera).

Classes

struct  VuoSceneObject
 A 3D Object: visible (mesh), or virtual (group, light, camera). More...
 

Typedefs

typedef struct VuoSceneObject VuoSceneObject
 A 3D Object: visible (mesh), or virtual (group, light, camera).
 

Enumerations

enum  VuoSceneObject_CameraType { VuoSceneObject_NotACamera, VuoSceneObject_PerspectiveCamera, VuoSceneObject_OrthographicCamera }
 The type of camera. More...
 

Functions

VuoReal VuoReal_valueFromJson (json_object *js)
 Decodes the JSON object js, expected to contain a double, to create a new value.
 
VuoSceneObject_CameraType VuoSceneObject_cameraTypeFromCString (const char *cameraTypeString)
 Returns the VuoSceneObject_CameraType corresponding with the string cameraTypeString.
 
const char * VuoSceneObject_cStringForCameraType (VuoSceneObject_CameraType cameraType)
 Returns a string constant representing cameraType.
 
VuoSceneObject VuoSceneObject_valueFromJson (json_object *js)
 Decodes the JSON object js to create a new value.
 
json_object * VuoSceneObject_jsonFromValue (const VuoSceneObject value)
 Encodes value as a JSON object.
 
char * VuoSceneObject_summaryFromValue (const VuoSceneObject value)
 Produces a brief human-readable summary of value.
 
VuoSceneObject VuoSceneObject_makeEmpty (void)
 Creates a new, empty scene object.
 
VuoSceneObject VuoSceneObject_make (VuoList_VuoVertices verticesList, VuoShader shader, VuoTransform transform, VuoList_VuoSceneObject childObjects)
 Creates a visible (mesh) scene object.
 
VuoSceneObject VuoSceneObject_makeQuad (VuoShader shader, VuoPoint3d center, VuoPoint3d rotation, VuoReal width, VuoReal height)
 Returns a scene object that renders a quad with the specified shader.
 
VuoSceneObject VuoSceneObject_makeImage (VuoImage image, VuoPoint3d center, VuoPoint3d rotation, VuoReal width, VuoReal alpha)
 Returns a scene object with the specified image.
 
VuoSceneObject VuoSceneObject_makeCube (VuoTransform transform, VuoShader frontShader, VuoShader leftShader, VuoShader rightShader, VuoShader backShader, VuoShader topShader, VuoShader bottomShader)
 Returns a scene object consisting of 6 child objects (square quads), each with its own shader.
 
VuoSceneObject VuoSceneObject_makePerspectiveCamera (VuoText name, VuoPoint3d position, VuoPoint3d rotation, float fieldOfView, float distanceMin, float distanceMax)
 Returns a perspective camera.
 
VuoSceneObject VuoSceneObject_makeOrthographicCamera (VuoText name, VuoPoint3d position, VuoPoint3d rotation, float width, float distanceMin, float distanceMax)
 Returns an orthographic camera.
 
VuoSceneObject VuoSceneObject_makeDefaultCamera (void)
 Returns a perspective camera at (0,0,1), facing along -z, 90 degree FOV, and clip planes at 0.1 and 10.0.
 
VuoSceneObject VuoSceneObject_findCamera (VuoSceneObject so, VuoText nameToMatch, bool *foundCamera)
 Performs a depth-first search of the scenegraph.
 
void VuoSceneObject_dump (const VuoSceneObject so)
 Outputs information about the sceneobject (and its descendants).
 
VuoSceneObject VuoSceneObject_valueFromString (const char *str)
 Automatically generated function.
 
char * VuoSceneObject_stringFromValue (const VuoSceneObject value)
 Automatically generated function.
 
void VuoSceneObject_retain (VuoSceneObject value)
 Automatically generated function.
 
void VuoSceneObject_release (VuoSceneObject value)
 Automatically generated function.
 

Class Documentation

struct VuoSceneObject
Class Members
float cameraDistanceMax Distance from camera to far clip plane.
float cameraDistanceMin Distance from camera to near clip plane.
float cameraFieldOfView Perspective FOV, in degrees.
VuoSceneObject_CameraType cameraType
float cameraWidth Orthographic width, in scene coordinates.
VuoList_VuoSceneObject childObjects
bool isRealSize If the object is real-size, it ignores rotations and scales, and is sized to match the shader's first image.
VuoText name
VuoShader shader
VuoTransform transform
VuoList_VuoVertices verticesList

Typedef Documentation

A 3D Object: visible (mesh), or virtual (group, light, camera).

Enumeration Type Documentation

The type of camera.

Function Documentation

VuoReal VuoReal_valueFromJson ( json_object *  js)

Decodes the JSON object js, expected to contain a double, to create a new value.

VuoSceneObject_CameraType VuoSceneObject_cameraTypeFromCString ( const char *  cameraTypeString)

Returns the VuoSceneObject_CameraType corresponding with the string cameraTypeString.

If none matches, returns VuoSceneObject_NotACamera.

const char* VuoSceneObject_cStringForCameraType ( VuoSceneObject_CameraType  cameraType)

Returns a string constant representing cameraType.

void VuoSceneObject_dump ( const VuoSceneObject  so)

Outputs information about the sceneobject (and its descendants).

VuoSceneObject VuoSceneObject_findCamera ( VuoSceneObject  so,
VuoText  nameToMatch,
bool *  foundCamera 
)

Performs a depth-first search of the scenegraph.

Returns the first camera whose name contains nameToMatch (or, if nameToMatch is emptystring, just returns the first camera). Output paramater foundCamera indicates whether a camera was found. If no camera was found, returns VuoSceneObject_makeDefaultCamera().

Todo:
apply hierarchical transformations
struct json_object * VuoSceneObject_jsonFromValue ( const VuoSceneObject  value)
read

Encodes value as a JSON object.

VuoSceneObject VuoSceneObject_make ( VuoList_VuoVertices  verticesList,
VuoShader  shader,
VuoTransform  transform,
VuoList_VuoSceneObject  childObjects 
)

Creates a visible (mesh) scene object.

VuoSceneObject VuoSceneObject_makeCube ( VuoTransform  transform,
VuoShader  frontShader,
VuoShader  leftShader,
VuoShader  rightShader,
VuoShader  backShader,
VuoShader  topShader,
VuoShader  bottomShader 
)

Returns a scene object consisting of 6 child objects (square quads), each with its own shader.

VuoSceneObject VuoSceneObject_makeDefaultCamera ( void  )

Returns a perspective camera at (0,0,1), facing along -z, 90 degree FOV, and clip planes at 0.1 and 10.0.

VuoSceneObject VuoSceneObject_makeEmpty ( void  )

Creates a new, empty scene object.

VuoSceneObject VuoSceneObject_makeImage ( VuoImage  image,
VuoPoint3d  center,
VuoPoint3d  rotation,
VuoReal  width,
VuoReal  alpha 
)

Returns a scene object with the specified image.

This function may be called from any thread. (However, the caller is responsible for ensuring that the GL context is not used simultaneously on multiple threads.)

VuoSceneObject VuoSceneObject_makeOrthographicCamera ( VuoText  name,
VuoPoint3d  position,
VuoPoint3d  rotation,
float  width,
float  distanceMin,
float  distanceMax 
)

Returns an orthographic camera.

VuoSceneObject VuoSceneObject_makePerspectiveCamera ( VuoText  name,
VuoPoint3d  position,
VuoPoint3d  rotation,
float  fieldOfView,
float  distanceMin,
float  distanceMax 
)

Returns a perspective camera.

VuoSceneObject VuoSceneObject_makeQuad ( VuoShader  shader,
VuoPoint3d  center,
VuoPoint3d  rotation,
VuoReal  width,
VuoReal  height 
)

Returns a scene object that renders a quad with the specified shader.

The quad does not include normals, tangents, or bitangents.

Parameters
shaderThe shader used to render the object.
centerThe object's center, specified in scene coordinates.
rotationThe object's rotation, specified in degrees.
widthThe object's width, specified in scene coordinates.
heightThe object's height, specified in scene coordinates.
Returns
The quad scene object.

This function may be called from any thread. (However, the caller is responsible for ensuring that the GL context is not used simultaneously on multiple threads.)

void VuoSceneObject_release ( VuoSceneObject  value)

Automatically generated function.

void VuoSceneObject_retain ( VuoSceneObject  value)

Automatically generated function.

char* VuoSceneObject_stringFromValue ( const VuoSceneObject  value)

Automatically generated function.

char * VuoSceneObject_summaryFromValue ( const VuoSceneObject  value)

Produces a brief human-readable summary of value.

VuoSceneObject VuoSceneObject_valueFromJson ( json_object *  js)

Decodes the JSON object js to create a new value.

Example:
{
"verticesList" : ... ,
"shader" : ... ,
"isRealSize" : false,
"childObjects" : ...,
"transform" : ...
}
Example:
{
"cameraType" : "perspective",
"cameraFieldOfView" : 90.0,
"cameraDistanceMin" : 0.1,
"cameraDistanceMax" : 10.0,
"name" : ...,
"transform" : ...
}
VuoSceneObject VuoSceneObject_valueFromString ( const char *  str)

Automatically generated function.