## Public API Reference

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

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

# iProtoFactoryState Struct Reference
[Mesh plugins, Mesh plugins]

The proto mesh is a demonstration or tutorial mesh. More...

`#include <imesh/protomesh.h>`

Inheritance diagram for iProtoFactoryState:

[legend]
List of all members.

## Public Member Functions

virtual csColor * | GetColors ()=0
| Get the array of colors.
virtual csVector3 * | GetNormals ()=0
| Get the array of normals.
virtual csVector2 * | GetTexels ()=0
| Get the array of texels.
virtual csTriangle * | GetTriangles ()=0
| Get the array of triangles.
virtual csVector3 * | GetVertices ()=0
| Get the array of vertices.
virtual void | Invalidate ()=0
| After making a significant change to the vertices or triangles you probably want to let this object recalculate the bounding boxes and such.

## Detailed Description

The proto mesh is a demonstration or tutorial mesh.

It is very simple and really unusable in games but it is a very good start to make a new mesh object. It supports only the new renderer but should compile with old renderer too (just not visible then).

The proto mesh supports:

- Primitive geometry (8 vertices, 12 triangles, just enough for a box).
- Setting of base color and per vertex color.
- Setting of vertices, texels, and normals.
- Material per mesh object.
- Sharing geometry in the factory.
- Collision detection.
- Direct creation of render buffers.
- Delayed creation of render buffers.

The general API for the proto factory. Here you define the actual geometry which is shared between all proto mesh instances.

Main creators of instances implementing this interface:

- Protomesh mesh object plugin (crystalspace.mesh.object.protomesh)
- iMeshObjectType::NewFactory()

Main ways to get pointers to this interface:

- scfQueryInterface() on iMeshFactoryWrapper::GetMeshObjectFactory()

Main users of this interface:

- Protomesh Factory Loader plugin (crystalspace.mesh.loader.factory.protomesh)

Definition at line 71 of file protomesh.h.

## Member Function Documentation

virtual csColor* iProtoFactoryState::GetColors | ( |  | ) | `[pure virtual]`

| Get the array of colors. It is legal to modify the colors in this array. The number of colors in this array is guaranteed to be equal to 8.

virtual csVector3* iProtoFactoryState::GetNormals | ( |  | ) | `[pure virtual]`

| Get the array of normals. It is legal to modify the normals in this array. The number of normals in this array is guaranteed to be equal to 8.

virtual csVector2* iProtoFactoryState::GetTexels | ( |  | ) | `[pure virtual]`

| Get the array of texels. It is legal to modify the texels in this array. The number of texels in this array is guaranteed to be equal to 8.

virtual csTriangle* iProtoFactoryState::GetTriangles | ( |  | ) | `[pure virtual]`

| Get the array of triangles. It is legal to modify the triangles in this array. The number of triangles in this array is guaranteed to be equal to 12.

virtual csVector3* iProtoFactoryState::GetVertices | ( |  | ) | `[pure virtual]`

| Get the array of vertices. It is legal to modify the vertices in this array. The number of vertices in this array is guaranteed to be equal to 8.

virtual void iProtoFactoryState::Invalidate | ( |  | ) | `[pure virtual]`

| After making a significant change to the vertices or triangles you probably want to let this object recalculate the bounding boxes and such. This function will invalidate the internal data structures so that they are recomputed.

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

- imesh/protomesh.h