## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# csMeshOnTexture Class Reference

This class manages the rendering of a mesh on a texture. More...

`#include <cstool/procmesh.h>`

List of all members.

## Public Member Functions

| csMeshOnTexture (iObjectRegistry *object_reg)
| Construct a csMeshOnTexture object.
csView * | GetView () const
| Get the view that is represented by this mesh on texture instance.
bool | Render (iMeshWrapper *mesh, iTextureHandle *handle, bool persistent=false)
| Render a mesh on a texture.
void | ScaleCamera (iMeshWrapper *mesh, float distance)
| Look at a given mesh at a given distance.
void | ScaleCamera (iMeshWrapper *mesh, int txtw, int txth)
| With the view camera transformation set at a certain spot in space, this function will try to move the camera as close as possible so that as much of the object is visible at the same time in the given texture resolution.
virtual | ~csMeshOnTexture ()
| Destruct.

## Detailed Description

This class manages the rendering of a mesh on a texture.

Definition at line 38 of file procmesh.h.

## Constructor & Destructor Documentation

csMeshOnTexture::csMeshOnTexture | ( | iObjectRegistry * | object_reg | ) |

Construct a csMeshOnTexture object.

This will also create a private view that will be used to render the object with.

virtual csMeshOnTexture::~csMeshOnTexture | ( |  | ) | `[virtual]`

Destruct.

## Member Function Documentation

csView* csMeshOnTexture::GetView | ( |  | ) | const`[inline]`

Get the view that is represented by this mesh on texture instance.

This can be used to setup the camera that you want to use here.

Definition at line 66 of file procmesh.h.

bool csMeshOnTexture::Render | ( | iMeshWrapper * | mesh,
|  | iTextureHandle * | handle,
|  | bool | persistent = `false` |
| ) |  |  |

Render a mesh on a texture.

Returns false on failure. Error will have been reported on the reporter.

If 'persistent' is true then the current contents of the texture will be copied on screen before drawing occurs (in the first call to BeginDraw). Otherwise it is assumed that you fully render the texture.

void csMeshOnTexture::ScaleCamera | ( | iMeshWrapper * | mesh,
|  | float | distance |
| ) |  |  |

Look at a given mesh at a given distance.

The relative orientation to the mesh remains unchanged.

void csMeshOnTexture::ScaleCamera | ( | iMeshWrapper * | mesh,
|  | int | txtw,
|  | int | txth |
| ) |  |  |

With the view camera transformation set at a certain spot in space, this function will try to move the camera as close as possible so that as much of the object is visible at the same time in the given texture resolution.

The documentation for this class was generated from the following file:

- cstool/procmesh.h