clCopy functions
[Standard functions]

Standard functions to "deep" copy CL structs. More...

Functions

CLcolourclCopyColour (CLcolour *dest, const CLcolour *src)
CLvertexclCopyVertex (CLvertex *dest, const CLvertex *src)
CLnormalclCopyNormal (CLnormal *dest, const CLnormal *src)
CLtexcoordclCopyTexCoord (CLtexcoord *dest, const CLtexcoord *src)
CLedgeflagclCopyEdgeFlag (CLedgeflag *dest, const CLedgeflag *src)
CLmatrixclCopyMatrix (CLmatrix *dest, const CLmatrix *src)
CLimageclCopyImage (CLimage *dest, const CLimage *src)
CLlightclCopyLight (CLlight *dest, const CLlight *src)
CLmaterialclCopyMaterial (CLmaterial *dest, const CLmaterial *src)
CLtextureclCopyTexture (CLtexture *dest, const CLtexture *src)
CLprimitivesetclCopyPrimitiveSet (CLprimitiveset *dest, const CLprimitiveset *src)
CLmeshclCopyMesh (CLmesh *dest, const CLmesh *src)
CLcontextclCopyContext (CLcontext *dest, const CLcontext *src)
CLmodelclCopyModel (CLmodel *dest, const CLmodel *src)

Detailed Description

Functions of the form:

   CL[name]* clCopy[Name](CL[name]* dest, const CL[name]* src)
  

"deep" copy CL structs. These functions are analogous to the standard "memcpy" function. Unlike the memcpy function, the size of the structs to copy is known. Thus the function does not accept the number of bytes to copy as an argument. Also, it returns a pointer to the dest as a CL[name]* rather than a void* since the type is known.


Function Documentation

CLcolour* clCopyColour CLcolour dest,
const CLcolour src
 

Todo:
Docs

Definition at line 6 of file clcopy.c.

References CL_MEMCPY.

Referenced by clCopyMesh().

CLcontext* clCopyContext CLcontext dest,
const CLcontext src
 

Todo:
change this to use an initial memcpy

Definition at line 200 of file clcopy.c.

References CL_MALLOC, clClearContext(), clCopyMaterial(), clNewContext(), clNewMaterial(), CLcontext::materials, and CLcontext::num_materials.

CLlight* clCopyLight CLlight dest,
const CLlight src
 

Note:
When copying, the display_list is set to zero to seperate server copies.

Definition at line 60 of file clcopy.c.

References clClearLight(), and CLlight::display_list.

CLmaterial* clCopyMaterial CLmaterial dest,
const CLmaterial src
 

Note:
When copying, the display_list is set to zero to seperate server copies.

Definition at line 79 of file clcopy.c.

References clClearMaterial(), and CLmaterial::display_list.

Referenced by clCopyContext().

CLmesh* clCopyMesh CLmesh dest,
const CLmesh src
 

Note:
When copying, the display_list is set to zero to seperate server copies.

Definition at line 137 of file clcopy.c.

References CL_MALLOC, CL_MEMCPY, clClearMesh(), clCopyColour(), clCopyPrimitiveSet(), clNewColour(), clNewPrimitiveSet(), CLmesh::colour, CLmesh::colours, CLmesh::edgeflags, CLmesh::normals, CLmesh::num_primitivesets, CLmesh::num_vertices, CLmesh::primitivesets, CLmesh::texcoords, and CLmesh::vertices.

Referenced by clCopyModel().

CLtexture* clCopyTexture CLtexture dest,
const CLtexture src
 

Note:
When copying, the texture_object is set to zero to seperate server copies.

Definition at line 98 of file clcopy.c.

References clClearTexture(), clCopyImage(), CLtexture::image, and CLtexture::texture_object.


Generated on Thu Dec 27 13:53:42 2007 for CL by  doxygen 1.4.6