<commit_before>/*
 * MultiParticleDataCall.h
 *
 * Copyright (C) 2009 by Universitaet Stuttgart (VISUS). 
 * Alle Rechte vorbehalten.
 */

#ifndef MEGAMOLCORE_MULTIPARTICLEDATACALL_H_INCLUDED
#define MEGAMOLCORE_MULTIPARTICLEDATACALL_H_INCLUDED
#if (defined(_MSC_VER) && (_MSC_VER > 1000))
#pragma once
#endif /* (defined(_MSC_VER) && (_MSC_VER > 1000)) */

#include "mmcore/moldyn/AbstractParticleDataCall.h"
#include "mmcore/factories/CallAutoDescription.h"
#include "vislib/assert.h"
#include "vislib/Map.h"
#include "vislib/Array.h"

namespace megamol {
namespace core {
namespace moldyn {


    /**
     * Class holding all data of a single particle type
     *
     * TODO: This class currently can only hold data for spheres and should
     *       be extended to be able to handle data for arbitrary glyphs.
     *       This also applies to interpolation of data.
     */
    class MEGAMOLCORE_API SimpleSphericalParticles {
    public:

        /** possible values for the vertex data */
        enum VertexDataType {
            VERTDATA_NONE, //< indicates that this object is void
            VERTDATA_FLOAT_XYZ, //< use global radius
            VERTDATA_FLOAT_XYZR,
            VERTDATA_SHORT_XYZ //< quantized positions and global radius
        };

        /** possible values for the colour data */
        enum ColourDataType {
            COLDATA_NONE, //< use global colour
            COLDATA_UINT8_RGB,
            COLDATA_UINT8_RGBA,
            COLDATA_FLOAT_RGB,
            COLDATA_FLOAT_RGBA,
            COLDATA_FLOAT_I //< single float value to be mapped by a transfer function
        };

        /**
         * Ctor
         */
        SimpleSphericalParticles(void);

        /**
         * Copy ctor
         *
         * @param src The object to clone from
         */
        SimpleSphericalParticles(const SimpleSphericalParticles& src);

        /**
         * Dtor
         */
        ~SimpleSphericalParticles(void);

        /**
         * Answer the colour data type
         *
         * @return The colour data type
         */
        inline ColourDataType GetColourDataType(void) const {
            return this->colDataType;
        }

        /**
         * Answer the colour data pointer
         *
         * @return The colour data pointer
         */
        inline const void * GetColourData(void) const {
            return this->colPtr;
        }

        /**
         * Answer the colour data stride
         *
         * @return The colour data stride
         */
        inline unsigned int GetColourDataStride(void) const {
            return this->colStride;
        }

        /**
         * Answer the number of stored objects
         *
         * @return The number of stored objects
         */
        inline UINT64 GetCount(void) const {
            return this->count;
        }

        /**
         * Answer the global colour
         *
         * @return The global colour as a pointer to four unsigned bytes
         *         storing the RGBA colour components
         */
        inline const unsigned char * GetGlobalColour(void) const {
            return this->col;
        }

        /**
         * Answer the global radius
         *
         * @return The global radius
         */
        inline float GetGlobalRadius(void) const {
            return this->radius;
        }

        /**
         * Answer the global particle type
         *
         * @return the global type
         */
        inline unsigned int GetGlobalType(void) const {
            return this->particleType;
        }

        /**
         * Answer the maximum colour index value to be mapped
         *
         * @return The maximum colour index value to be mapped
         */
        inline float GetMaxColourIndexValue(void) const {
            return this->maxColI;
        }

        /**
         * Answer the minimum colour index value to be mapped
         *
         * @return The minimum colour index value to be mapped
         */
        inline float GetMinColourIndexValue(void) const {
            return this->minColI;
        }

        /**
         * Answer the vertex data type
         *
         * @return The vertex data type
         */
        inline VertexDataType GetVertexDataType(void) const {
            return this->vertDataType;
        }

        /**
         * Answer the vertex data pointer
         *
         * @return The vertex data pointer
         */
        inline const void * GetVertexData(void) const {
            return this->vertPtr;
        }

        /**
         * Answer the vertex data stride
         *
         * @return The vertex data stride
         */
        inline unsigned int GetVertexDataStride(void) const {
            return this->vertStride;
        }

        /**
         * Sets the colour data
         *
         * @param t The type of the colour data
         * @param p The pointer to the colour data (must not be NULL if t
         *          is not 'COLDATA_NONE'
         * @param s The stride of the colour data
         */
        void SetColourData(ColourDataType t, const void *p,
                unsigned int s = 0) {
        //    ASSERT((p != NULL) || (t == COLDATA_NONE));
            this->colDataType = t;
            this->colPtr = p;<commit_msg>rhaehne: documentation on MultiParticleDataCall (Strides) extended<commit_after>/*
 * MultiParticleDataCall.h
 *
 * Copyright (C) 2009 by Universitaet Stuttgart (VISUS). 
 * Alle Rechte vorbehalten.
 */

#ifndef MEGAMOLCORE_MULTIPARTICLEDATACALL_H_INCLUDED
#define MEGAMOLCORE_MULTIPARTICLEDATACALL_H_INCLUDED
#if (defined(_MSC_VER) && (_MSC_VER > 1000))
#pragma once
#endif /* (defined(_MSC_VER) && (_MSC_VER > 1000)) */

#include "mmcore/moldyn/AbstractParticleDataCall.h"
#include "mmcore/factories/CallAutoDescription.h"
#include "vislib/assert.h"
#include "vislib/Map.h"
#include "vislib/Array.h"

namespace megamol {
namespace core {
namespace moldyn {


    /**
     * Class holding all data of a single particle type
     *
     * TODO: This class currently can only hold data for spheres and should
     *       be extended to be able to handle data for arbitrary glyphs.
     *       This also applies to interpolation of data.
     */
    class MEGAMOLCORE_API SimpleSphericalParticles {
    public:

        /** possible values for the vertex data */
        enum VertexDataType {
            VERTDATA_NONE, //< indicates that this object is void
            VERTDATA_FLOAT_XYZ, //< use global radius
            VERTDATA_FLOAT_XYZR,
            VERTDATA_SHORT_XYZ //< quantized positions and global radius
        };

        /** possible values for the colour data */
        enum ColourDataType {
            COLDATA_NONE, //< use global colour
            COLDATA_UINT8_RGB,
            COLDATA_UINT8_RGBA,
            COLDATA_FLOAT_RGB,
            COLDATA_FLOAT_RGBA,
            COLDATA_FLOAT_I //< single float value to be mapped by a transfer function
        };

        /**
         * Ctor
         */
        SimpleSphericalParticles(void);

        /**
         * Copy ctor
         *
         * @param src The object to clone from
         */
        SimpleSphericalParticles(const SimpleSphericalParticles& src);

        /**
         * Dtor
         */
        ~SimpleSphericalParticles(void);

        /**
         * Answer the colour data type
         *
         * @return The colour data type
         */
        inline ColourDataType GetColourDataType(void) const {
            return this->colDataType;
        }

        /**
         * Answer the colour data pointer
         *
         * @return The colour data pointer
         */
        inline const void * GetColourData(void) const {
            return this->colPtr;
        }

        /**
         * Answer the colour data stride.
         * It represents the distance to the succeeding colour.
         *
         * @return The colour data stride in byte.
         */
        inline unsigned int GetColourDataStride(void) const {
            return this->colStride;
        }

        /**
         * Answer the number of stored objects
         *
         * @return The number of stored objects
         */
        inline UINT64 GetCount(void) const {
            return this->count;
        }

        /**
         * Answer the global colour
         *
         * @return The global colour as a pointer to four unsigned bytes
         *         storing the RGBA colour components
         */
        inline const unsigned char * GetGlobalColour(void) const {
            return this->col;
        }

        /**
         * Answer the global radius
         *
         * @return The global radius
         */
        inline float GetGlobalRadius(void) const {
            return this->radius;
        }

        /**
         * Answer the global particle type
         *
         * @return the global type
         */
        inline unsigned int GetGlobalType(void) const {
            return this->particleType;
        }

        /**
         * Answer the maximum colour index value to be mapped
         *
         * @return The maximum colour index value to be mapped
         */
        inline float GetMaxColourIndexValue(void) const {
            return this->maxColI;
        }

        /**
         * Answer the minimum colour index value to be mapped
         *
         * @return The minimum colour index value to be mapped
         */
        inline float GetMinColourIndexValue(void) const {
            return this->minColI;
        }

        /**
         * Answer the vertex data type
         *
         * @return The vertex data type
         */
        inline VertexDataType GetVertexDataType(void) const {
            return this->vertDataType;
        }

        /**
         * Answer the vertex data pointer
         *
         * @return The vertex data pointer
         */
        inline const void * GetVertexData(void) const {
            return this->vertPtr;
        }

        /**
         * Answer the vertex data stride.
         * It represents the distance to the succeeding vertex.
         *
         * @return The vertex data stride in byte.
         */
        inline unsigned int GetVertexDataStride(void) const {
            return this->vertStride;
        }

        /**
         * Sets the colour data
         *
         * @param t The type of the colour data
         * @param p The pointer to the colour data (must not be NULL if t
         *          is not 'COLDATA_NONE'
         * @param s The stride of the colour data
         */
        void SetColourData(ColourDataType t, const void *p,
                unsigned int s = 0) {
        //    ASSERT((p != NULL) || (t == COLDATA_NONE));
            this->colDataType = t;
            this->colPtr = p;
{'fraction_non_alphanumeric': 0.0759669789444393, 'fraction_numerical': 0.0031536963175957705, 'mean_word_length': 1.586852207293666, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4814411', 'n_tokens_mistral': 2863, 'n_tokens_neox': 2783, 'n_words': 890}