Ejemplo n.º 1
0
//===========================================================================
cShapeBox* cShapeBox::copy(const bool a_duplicateMaterialData,
                           const bool a_duplicateTextureData,
                           const bool a_duplicateMeshData,
                           const bool a_buildCollisionDetector)
{
    // create new instance
    cShapeBox* obj = new cShapeBox(2.0 * m_hSizeX,
                                   2.0 * m_hSizeY,
                                   2.0 * m_hSizeZ);

    // copy generic properties
    copyGenericProperties(obj, a_duplicateMaterialData, a_duplicateTextureData);

    // return
    return (obj);
}
//===========================================================================
cShapeSphere* cShapeSphere::copy(const bool a_duplicateMaterialData,
                                 const bool a_duplicateTextureData, 
                                 const bool a_duplicateMeshData,
                                 const bool a_buildCollisionDetector)
{
    // enable display list
    m_useDisplayList = true;

    // create new instance
    cShapeSphere* obj = new cShapeSphere(m_radius);

    // copy generic properties
    copyGenericProperties(obj, a_duplicateMaterialData, a_duplicateTextureData);

    // return
    return (obj);
}