int NgonGeneralData::setDataProperty(int property, void const* value, int numElements)
{
    switch (property)
    {
        case NUM_ELEMENTS_ARRAY :
            return setNumElementsArray((int const*) value);
        case COORDINATES :
            setData((double const*) value, numElements);
            break;
        case X_COORDINATES :
            setDataX((double const*) value, numElements);
            break;
        case Y_COORDINATES :
            setDataY((double const*) value, numElements);
            break;
        case Z_COORDINATES :
            setDataZ((double const*) value, numElements);
            break;
        case COLORS :
            setColors((double const*) value, numElements);
            break;
        default :
            return NgonData::setDataProperty(property, value, numElements);
    }

    return 1;
}
Esempio n. 2
0
int NgonGridData::setDataProperty(int property, void const* value, int numElements)
{
    if (property == GRID_SIZE)
    {
        return setGridSize((int const*) value);
    }
    else if (property == X_COORDINATES)
    {
        setDataX((double const*) value, numElements);
    }
    else if (property == Y_COORDINATES)
    {
        setDataY((double const*) value, numElements);
    }
    else if (property == Z_COORDINATES)
    {
        setDataZ((double const*) value, numElements);
    }
    else if (property == Z_COORDINATES_SHIFT)
    {
        setZCoordinatesShift((double const*) value);
    }
    else
    {
        return NgonData::setDataProperty(property, value, numElements);
    }

    return 1;
}
Esempio n. 3
0
int TriangleMeshData::setDataProperty(int property, void const* value, int numElements)
{
    if (property == NUM_VERTICES)
    {
        return setNumVertices(*((unsigned int const*) value));
    }
    else if (property == NUM_INDICES)
    {
        return setNumIndices(*((unsigned int const*) value));
    }
    else if (property == X_COORDINATES)
    {
        setDataX((double const*) value, numElements);
    }
    else if (property == Y_COORDINATES)
    {
        setDataY((double const*) value, numElements);
    }
    else if (property == Z_COORDINATES)
    {
        setDataZ((double const*) value, numElements);
    }
    else if (property == COORDINATES)
    {
        setVertices((double const*) value, numElements);
    }
    else if (property == INDICES)
    {
        setIndices((unsigned int const*) value, numElements);
    }
    else if (property == VALUES)
    {
        setValues((double const*) value, numElements);
    }
    else
    {
        return Data3D::setDataProperty(property, value, numElements);
    }

    return 1;
}