Cameras


Data Structures

struct  Lib3dsCamera
 Camera object. More...

Functions

Lib3dsCameralib3ds_camera_new (const char *name)
void lib3ds_camera_free (Lib3dsCamera *camera)
void lib3ds_camera_dump (Lib3dsCamera *camera)
Lib3dsBool lib3ds_camera_read (Lib3dsCamera *camera, Lib3dsIo *io)
Lib3dsBool lib3ds_camera_write (Lib3dsCamera *camera, Lib3dsIo *io)

Function Documentation

void lib3ds_camera_dump ( Lib3dsCamera camera  ) 

Dump information about a Lib3dsCamera object to stdout.

Parameters:
camera Object to be dumped.
See also:
lib3ds_file_dump_cameras

Definition at line 90 of file camera.c.

References Lib3dsCamera::far_range, Lib3dsCamera::fov, Lib3dsCamera::name, Lib3dsCamera::near_range, Lib3dsCamera::position, Lib3dsCamera::roll, Lib3dsCamera::see_cone, and Lib3dsCamera::target.

Referenced by lib3ds_file_dump_cameras().

void lib3ds_camera_free ( Lib3dsCamera camera  ) 

Free a Lib3dsCamera object and all of its resources.

Parameters:
camera Lib3dsCamera object to be freed.

Definition at line 73 of file camera.c.

Referenced by lib3ds_file_free().

Lib3dsCamera* lib3ds_camera_new ( const char *  name  ) 

Return a new Lib3dsCamera object.

Object is initialized with the given name and fov=45. All other values are 0.

Parameters:
name Name of this camera. Must not be NULL. Must be < 64 characters.
Returns:
Lib3dsCamera object or NULL on failure.

Definition at line 48 of file camera.c.

References Lib3dsCamera::fov, and Lib3dsCamera::name.

Lib3dsBool lib3ds_camera_read ( Lib3dsCamera camera,
Lib3dsIo *  io 
)

Read a camera definition from a file.

This function is called by lib3ds_file_read(), and you probably don't want to call it directly.

Parameters:
camera A Lib3dsCamera to be filled in.
io A Lib3dsIo object previously set up by the caller.
Returns:
LIB3DS_TRUE on success, LIB3DS_FALSE on failure.
See also:
lib3ds_file_read

Definition at line 123 of file camera.c.

References Lib3dsCamera::far_range, Lib3dsCamera::fov, lib3ds_chunk_read_end(), lib3ds_chunk_read_next(), lib3ds_chunk_read_start(), lib3ds_chunk_read_tell(), lib3ds_chunk_unknown(), lib3ds_io_read_float(), Lib3dsCamera::near_range, Lib3dsCamera::position, Lib3dsCamera::roll, Lib3dsCamera::see_cone, and Lib3dsCamera::target.

Lib3dsBool lib3ds_camera_write ( Lib3dsCamera camera,
Lib3dsIo *  io 
)

Write a camera definition to a file.

This function is called by lib3ds_file_write(), and you probably don't want to call it directly.

Parameters:
camera A Lib3dsCamera to be written.
io A Lib3dsIo object previously set up by the caller.
Returns:
LIB3DS_TRUE on success, LIB3DS_FALSE on failure.
See also:
lib3ds_file_write

Definition at line 192 of file camera.c.

References Lib3dsChunk::chunk, Lib3dsCamera::far_range, Lib3dsCamera::fov, lib3ds_chunk_write(), lib3ds_chunk_write_end(), lib3ds_chunk_write_start(), lib3ds_io_write_float(), lib3ds_io_write_vector(), Lib3dsCamera::near_range, Lib3dsCamera::position, Lib3dsCamera::roll, Lib3dsCamera::see_cone, Lib3dsChunk::size, and Lib3dsCamera::target.


Hosted by
SourceForge.net Logo
Generated at Wed Jun 20 18:51:36 2007 by Doxygen 1.5.2