NSMeshes::TMeshCreator Class Reference

This class ensures simplest models creaiting and also helps create basic vertex declarations. More...

#include <MeshCreator.h>

Inheritance diagram for NSMeshes::TMeshCreator:

Inheritance graph
[legend]
Collaboration diagram for NSMeshes::TMeshCreator:

Collaboration graph
[legend]
List of all members.

Public Member Functions

TRendererVertexElementArrayCreateDeclarationArray (EnumGraphicVertexDeclaration type) const
 This method creates vertex element array according to parameter.
TGraphicBufferCreateBox_XYZ_COLOR (float width, float height, float length, TColor color) const
 This method creates simple box with diffuse color.
TGraphicBufferCreateBox_XYZ_NXNYNZ_COLOR (float width, float height, float length, TColor color) const
 This method creates simple box with normals and diffuse color.
TGraphicBufferCreateBox_XYZ_TUTV (float width, float height, float length) const
 This method creates simple box with texture (without normals).

Detailed Description

This class ensures simplest models creaiting and also helps create basic vertex declarations.

This class serve only as mesh creator, not as manager, thus you can create object TModelCreator, then create meshes and destroy creator.

Definition at line 53 of file MeshCreator.h.


Member Function Documentation

TGraphicBuffer * TMeshCreator::CreateBox_XYZ_COLOR float  width,
float  height,
float  length,
TColor  color
const
 

This method creates simple box with diffuse color.

Box is created around [0,0,0]. If any value is negative then absolute value is used. Object is created as list of triangles!!! Triangles are created as CW.

Parameters:
width [in] width of box (X-axis)
height [in] height of box (Z-axis)
length [in] length of box (Y-axis)
color [in] diffuse color (stored in each vertex)

Definition at line 149 of file MeshCreator.cpp.

References TColor::GetColor(), and TGraphicBuffer::GetDataAtItem().

Here is the call graph for this function:

TGraphicBuffer * TMeshCreator::CreateBox_XYZ_NXNYNZ_COLOR float  width,
float  height,
float  length,
TColor  color
const
 

This method creates simple box with normals and diffuse color.

Box is created around [0,0,0]. If any value is negative then absolute value is used. Object is created as list of triangles!!! Triangles are created as CW.

Parameters:
width [in] width of box (X-axis)
height [in] height of box (Z-axis)
length [in] length of box (Y-axis)
color [in] diffuse color (stored in each vertex)

Definition at line 354 of file MeshCreator.cpp.

References TColor::GetColor(), and TGraphicBuffer::GetDataAtItem().

Here is the call graph for this function:

TGraphicBuffer * TMeshCreator::CreateBox_XYZ_TUTV float  width,
float  height,
float  length
const
 

This method creates simple box with texture (without normals).

Box is created around [0,0,0]. If any value is negative then absolute value is used. Object is created as list of triangles!!! Triangles are created as CW.

Parameters:
width [in] width of box (X-axis)
height [in] height of box (Z-axis)
length [in] length of box (Y-axis)

Definition at line 670 of file MeshCreator.cpp.

References TGraphicBuffer::GetDataAtItem().

Here is the call graph for this function:

TRendererVertexElementArray * TMeshCreator::CreateDeclarationArray EnumGraphicVertexDeclaration  type  )  const
 

This method creates vertex element array according to parameter.

This array may be used for creating vertex declaration with TRenderer class. If parameter is invalid NULL is returned.

This method allocates memory which must be deallocated by caller!!!

Parameters:
type [in] enumerator which defines required declaration type

Definition at line 27 of file MeshCreator.cpp.

References TArray< T, align, size, step >::AddItem(), DBGASSERT, FALSE, NSMeshes::GRAPH_VERTEXDECL_XYZ, NSMeshes::GRAPH_VERTEXDECL_XYZ_DIFF, NSMeshes::GRAPH_VERTEXDECL_XYZ_DIFF_SPEC, NSMeshes::GRAPH_VERTEXDECL_XYZ_NXNYNZ, NSMeshes::GRAPH_VERTEXDECL_XYZ_NXNYNZ_TUTV, NSMeshes::GRAPH_VERTEXDECL_XYZ_TUTV, NSMeshes::GRAPH_VERTEXDECL_XYZW, NSMeshes::GRAPH_VERTEXDECL_XYZW_NXNYNZ, NSMeshes::GRAPH_VERTEXDECL_XYZW_TUTV, GRAPH_VERTEXTYPE_COLOR1, GRAPH_VERTEXTYPE_FLOAT1, GRAPH_VERTEXTYPE_FLOAT2, GRAPH_VERTEXTYPE_FLOAT3, GRAPH_VERTEXTYPE_FLOAT4, GRAPH_VERTEXUSAGE_DIFFUSE, GRAPH_VERTEXUSAGE_END, GRAPH_VERTEXUSAGE_NORMAL, GRAPH_VERTEXUSAGE_POSITION, GRAPH_VERTEXUSAGE_SPECULAR, and GRAPH_VERTEXUSAGE_TEXCOORD0.

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Wed Nov 28 23:08:53 2007 for Joy4D by  doxygen 1.4.6-NO