#include <BaseShape.h>
Inheritance diagram for CSLBaseShape:

The CSLBaseShape class contains information about the position coordinates, normal coordinates and color values of a mesh.
There are two possible types of shape: ordered & indexed. The set of functions that can be used depends on the type of shape that is described by each class instance.
For example, the function CreateNormals will work on an ordered shape, but won't on an indexed shape. On the other hand, the function CreateIndexedNormals will work on an indexed shape, but won't on an ordered shape. However, the functions DestroyNormals and GetNormalCount will work with both types (ordered & indexed).
Example - Using CSLBaseShape
CSLModel *l_pMeshModel = RootModel->AddMesh(); // // Set some default values // l_pMeshModel->SetName("MyMesh"); l_pMeshModel->Visibility()->SetVisibility(SI_TRUE); l_pMeshModel->Transform()->SetScale(CSIBCVector3D(1.0, 1.0, 1.0) ); l_pMeshModel->GlobalMaterial()->SetPropagationType(CSLGlobalMaterial::SI_INHERITED); // // Set default material // l_pMeshModel->GlobalMaterial()->SetMaterial(l_pMeshModel->Scene()->GetMaterialLibrary()->GetMaterialList()[0] ); // // Get the CSLMesh pointer from the model // CSLMesh *l_pMesh = (CSLMesh *) l_pMeshModel->Primitive(); // // Get a pointer to the Mesh's shape // CSLBaseShape *l_pShape = l_pMesh->Shape(); // // Add 8 vertices // CSLBaseShape::CSLVector3DArray *l_Vertices = l_pShape->GetVertexList(); l_Vertices->Resize(8); // // Add 8 normals // CSLBaseShape::CSLVector3DArray *l_Normals = l_pShape->CreateNormals(); l_Normals.Resize(8); // // Now set the positions / normal // for (int i=0;i<8;i++) { (*l_Vertices)[vindex].Set(0.0f, 0.0f, 0.0f); (*l_Normals)[vindex].Set (0.0f, 1.0f, 0.0f); }
| typedef CSLArrayProxy<CSIBCVector2D, SI_Float, 2> CSLVector2DArray |
Proxy class that allows modifying a list of CSIBCVector2D objects like an array.
| typedef CSLArrayProxy<CSIBCVector3D, SI_Float, 3> CSLVector3DArray |
Proxy class that allows modifying a list of CSIBCVector3D objects like an array.
| typedef CSLArrayProxy<CSIBCColorf, SI_Float, 4> CSLColorArray |
Proxy class that allows modifying a list of CSIBCColorf objects like an array.
| typedef CSLArrayProxy<SLIndexedVector2D, SI_Float, 3> CSLIndexedVector2DArray |
Proxy class that allows modifying a list of SLIndexedVector2D objects like an array.
| typedef CSLArrayProxy<SLIndexedVector3D, SI_Float, 4> CSLIndexedVector3DArray |
Proxy class that allows modifying a list of SLIndexedVector3D objects like an array.
| typedef CSLArrayProxy<SLIndexedColor, SI_Float, 5> CSLIndexedColorArray |
Proxy class that allows modifying a list of SLIndexedColor objects like an array.
| enum EShapeType |
| virtual ~CSLBaseShape | ( | ) | [virtual] |
Destructor
| CSLBaseShape | ( | CSLScene * | in_pScene, | |
| CSLModel * | in_pModel, | |||
| CdotXSITemplate * | in_pTemplate, | |||
| EShapeType | in_Type | |||
| ) | [protected] |
Constructor
| in_pScene | Pointer to the scene containing the BaseShape | |
| in_pModel | Pointer to the model containing the BaseShape | |
| in_pTemplate | Pointer to the CdotXSITemplate containing the BaseShape | |
| in_Type | The shape type to be used in the BaseShape |
| CSLVector3DArray* CreateNormals | ( | ) |
Create a normal coordinates array.
| CSLIndexedVector3DArray* CreateIndexedNormals | ( | ) |
Create an indexed normal coordinates array.
| SI_Int GetNormalCount | ( | ) |
Return the number of normal coordinates.
| CSLVector3DArray* GetNormalList | ( | ) |
Return the normal coordinate array proxy.
| CSIBCVector3D* GetNormalListPtr | ( | ) |
Returns an array of CSBCVector3D containing the normal coordinates.
| CSLIndexedVector3DArray* GetIndexedNormalList | ( | ) |
Return the indexed normal coordinate array proxy.
| SLIndexedVector3D* GetIndexedNormalListPtr | ( | ) |
Returns an array of SLIndexedVector3D containing the indexed normal coordinates.
| SI_Error DestroyNormals | ( | ) |
Destroy the normal coordinates array.
| CSLColorArray* CreateColors | ( | ) |
Create a color values array.
| CSLIndexedColorArray* CreateIndexedColors | ( | ) |
Create an indexed color values array.
| SI_Int GetColorCount | ( | ) |
Return the number of color values.
| CSLColorArray* GetColorList | ( | ) |
Return the color values array proxy.
| CSIBCColorf* GetColorListPtr | ( | ) |
Returns an array of CSIBCColorf containing the color values.
| CSLIndexedColorArray* GetIndexedColorList | ( | ) |
Return the indexed color values array proxy.
| SLIndexedColor* GetIndexedColorListPtr | ( | ) |
Returns an array of SLIndexedColor containing the indexed color values.
| SI_Error DestroyColors | ( | ) |
Destroy the color values array.
| SI_Int GetVertexCount | ( | ) |
Return the number of vertex coordinates.
| CSLVector3DArray* GetVertexList | ( | ) |
Return the vertex coordinate array proxy.
| CSIBCVector3D* GetVertexListPtr | ( | ) |
Returns an array of CSBCVector3D containing the vertex coordinates.
| CSLIndexedVector3DArray* GetIndexedVertexList | ( | ) |
Return the indexed vertex coordinate array proxy.
| SLIndexedVector3D* GetIndexedVertexListPtr | ( | ) |
Returns an array of SLIndexedVector3D containing the indexed vertex coordinates.
| EShapeType ShapeType | ( | ) |
Indicate which type of shape this object describes.
| virtual SI_Error Fix | ( | ) | [virtual] |
Clean invalid data from the template.
Reimplemented from CSLTemplate.
| virtual SI_Error Synchronize | ( | ) | [virtual] |
Synchronize will ensure that the animated parameter is up to date.
Reimplemented from CSLTemplate.
Reimplemented in CSLShape, and CSLShape_35.