Data Structures | Macros | Typedefs
Camera Nodes

Data Structures

struct  AtCameraInput
 Camera ray creation inputs. More...
 
struct  AtCameraOutput
 Camera ray creation outputs. More...
 
struct  AtCameraNodeMethods
 Camera node methods structure. More...
 

Macros

#define AI_CAMERA_NODE_EXPORT_METHODS(tag)
 Camera node methods exporter. More...
 

Typedefs

typedef struct AtCameraInput AtCameraInput
 Camera ray creation inputs.
 
typedef struct AtCameraOutput AtCameraOutput
 Camera ray creation outputs. More...
 
typedef struct AtCameraNodeMethods AtCameraNodeMethods
 Camera node methods structure.
 

API Methods for Camera Writers

AI_API void AiCameraInitialize (AtNode *node, void *data)
 Initialize the camera's internal data. More...
 
AI_API void AiCameraUpdate (AtNode *node, bool plane_distance)
 Updates camera's internal data. More...
 
AI_API void AiCameraDestroy (AtNode *node)
 Releases the memory allocated for camera's internal data. More...
 
AI_API void * AiCameraGetLocalData (const AtNode *node)
 Returns a pointer to the camera's local data. More...
 

Node Method Declarations

#define camera_create_ray   static void CameraCreateRay(const AtNode* node, const AtCameraInput* input, AtCameraOutput* output, int tid)
 Create Camera Ray method declaration.
 

Detailed Description

Macro Definition Documentation

#define AI_CAMERA_NODE_EXPORT_METHODS (   tag)
Value:
static AtCameraNodeMethods ai_cam_mtds = { \
CameraCreateRay \
}; \
static AtNodeMethods ai_node_mtds = { \
&ai_common_mtds, \
&ai_cam_mtds \
}; \
AtNodeMethods* tag = &ai_node_mtds;

Camera node methods exporter.

Typedef Documentation

Camera ray creation outputs.

If the d*d* derivatives are left to their default value of zero, an accurate numerical estimate will be automatically computed for them to prevent catastrophic degradation of texture IO performance. Note that this estimate might not be as good as analytically computed derivatives but will often be good enough.

Function Documentation

AI_API void AiCameraInitialize ( AtNode node,
void *  data 
)

Initialize the camera's internal data.

This must be called once and only once during node_initialize

Parameters
nodepointer to the camera node
datapointer to the camera's local data
AI_API void AiCameraUpdate ( AtNode node,
bool  plane_distance 
)

Updates camera's internal data.

This must be called during node_update

Parameters
nodepointer to the camera node
plane_distancewill the Z-depth and near/far clip be computed from the camera plane, or from the camera point?
AI_API void AiCameraDestroy ( AtNode node)

Releases the memory allocated for camera's internal data.

This must be called during node_finish

Parameters
nodepointer to the camera node
AI_API void* AiCameraGetLocalData ( const AtNode node)

Returns a pointer to the camera's local data.

This can be called in the camera_create_ray method to access user-defined data that is attached to the camera.

Parameters
nodepointer to the camera node
Returns
local data pointer, as passed to AiCameraInitialize()

© 2009-2013 Solid Angle SL · all rights reserved · www.solidangle.com