csMeshOnTexture Class Reference
This class manages the rendering of a mesh on a texture. More...
#include <cstool/procmesh.h>
Public Member Functions | |
| csMeshOnTexture (iObjectRegistry *object_reg) | |
| Construct a csMeshOnTexture object. | |
| bool | DoRender (iTextureHandle *handle, bool persistent=false, int color=-1) |
| Do the actual rendering. | |
| csView * | GetView () const |
| Get the view that is represented by this mesh on texture instance. | |
| void | PrepareRender (iTextureHandle *handle) |
| Prepare rendering on a texture. | |
| bool | Render (iMeshWrapper *mesh, iTextureHandle *handle, bool persistent=false, int color=-1) |
| 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
| bool csMeshOnTexture::DoRender | ( | iTextureHandle * | handle, | |
| bool | persistent = false, |
|||
| int | color = -1 | |||
| ) |
Do the actual rendering.
To use this you must first call PrepareRender() and then set up filter for one or more meshes (using view->GetMeshFilter().AddFilterMesh()). Finally the sector of the camera in the view must be set correctly.
| 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.
| void csMeshOnTexture::PrepareRender | ( | iTextureHandle * | handle | ) |
Prepare rendering on a texture.
This should be called first and is useful if you want to filter out multiple meshes at the same time. It sets up the internal view and clears the filter.
| bool csMeshOnTexture::Render | ( | iMeshWrapper * | mesh, | |
| iTextureHandle * | handle, | |||
| bool | persistent = false, |
|||
| int | color = -1 | |||
| ) |
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
Generated for Crystal Space 2.1 by doxygen 1.6.1
