SketchUp SDK
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
camera.h File Reference
#include <slapi/geometry.h>
#include <slapi/slapi.h>
#include <slapi/unicodestring.h>
#include <slapi/model/defs.h>

Go to the source code of this file.

Functions

SU_RESULT SUCameraGetOrientation (SUCameraRef camera, struct SUPoint3D *position, struct SUPoint3D *target, struct SUVector3D *up_vector)
 Retrieves the orientation of a camera object. More...
 
SU_RESULT SUCameraSetOrientation (SUCameraRef camera, const struct SUPoint3D *position, const struct SUPoint3D *target, const struct SUVector3D *up_vector)
 Sets the position of a camera object. More...
 
SU_RESULT SUCameraSetPerspectiveFrustumFOV (SUCameraRef camera, double fov)
 Sets the field of view angle of a camera object. If the camera object is an orthographic camera, the camera object subsequently becomes a perspective camera. The field of view is measured along the vertical direction of the camera. More...
 
SU_RESULT SUCameraGetPerspectiveFrustumFOV (SUCameraRef camera, double *fov)
 Retrieves the field of view in degrees of a camera object. The field of view is measured along the vertical direction of the camera. More...
 
SU_RESULT SUCameraGetAspectRatio (SUCameraRef camera, double *aspect_ratio)
 Retrieves the aspect ratio of a camera object. More...
 
SU_RESULT SUCameraSetOrthographicFrustumHeight (SUCameraRef camera, double height)
 Sets the height of a camera object which is used to calculate the orthographic projection of a camera object. If the camera object is a perspective camera, the camera subsequently becomes an orthographic camera. More...
 
SU_RESULT SUCameraGetOrthographicFrustumHeight (SUCameraRef camera, double *height)
 Retrieves the height of an orthographic camera object. More...
 
SU_RESULT SUCameraSetPerspective (SUCameraRef camera, bool perspective)
 Sets a camera object perspective or orthographic. More...
 
SU_RESULT SUCameraGetPerspective (SUCameraRef camera, bool *perspective)
 Retrieves whether a camera object is a perspective camera or not (i.e. orthographic). More...
 

Function Documentation

SU_RESULT SUCameraGetAspectRatio ( SUCameraRef  camera,
double *  aspect_ratio 
)

Retrieves the aspect ratio of a camera object.

Parameters
[in]cameraThe camera object.
[out]aspect_ratioThe aspect ratio retrieved.
Returns
SU_RESULT SUCameraGetOrientation ( SUCameraRef  camera,
struct SUPoint3D position,
struct SUPoint3D target,
struct SUVector3D up_vector 
)

Retrieves the orientation of a camera object.

Parameters
[in]cameraThe camera object.
[out]positionThe position retrieved.
[out]targetThe target retrieved.
[out]up_vectorThe up direction retrieved.
Returns
SU_RESULT SUCameraGetOrthographicFrustumHeight ( SUCameraRef  camera,
double *  height 
)

Retrieves the height of an orthographic camera object.

Parameters
[in]cameraThe camera object.
[out]heightThe height retrieved.
Returns
SU_RESULT SUCameraGetPerspective ( SUCameraRef  camera,
bool *  perspective 
)

Retrieves whether a camera object is a perspective camera or not (i.e. orthographic).

Parameters
[in]cameraThe camera object.
[out]perspectiveThe perspective flag retrieved.
Returns
SU_RESULT SUCameraGetPerspectiveFrustumFOV ( SUCameraRef  camera,
double *  fov 
)

Retrieves the field of view in degrees of a camera object. The field of view is measured along the vertical direction of the camera.

Parameters
[in]cameraThe camera object.
[out]fovThe field of view retrieved.
Returns
SU_RESULT SUCameraSetOrientation ( SUCameraRef  camera,
const struct SUPoint3D position,
const struct SUPoint3D target,
const struct SUVector3D up_vector 
)

Sets the position of a camera object.

Parameters
[in]cameraThe camera object.
[in]positionThe new eye position.
[in]targetThe new target position.
[in]up_vectorThe new up direction.
Returns
SU_RESULT SUCameraSetOrthographicFrustumHeight ( SUCameraRef  camera,
double  height 
)

Sets the height of a camera object which is used to calculate the orthographic projection of a camera object. If the camera object is a perspective camera, the camera subsequently becomes an orthographic camera.

Parameters
[in]cameraThe camera object.
[in]heightThe height of the camera view.
Returns
SU_RESULT SUCameraSetPerspective ( SUCameraRef  camera,
bool  perspective 
)

Sets a camera object perspective or orthographic.

Parameters
[in]cameraThe camera object.
[in]perspectiveThe perspective flag.
Returns
SU_RESULT SUCameraSetPerspectiveFrustumFOV ( SUCameraRef  camera,
double  fov 
)

Sets the field of view angle of a camera object. If the camera object is an orthographic camera, the camera object subsequently becomes a perspective camera. The field of view is measured along the vertical direction of the camera.

Parameters
[in]cameraThe camera object.
[in]fovThe field of view angle in degrees.
Returns